Re: is iterate a deterministic operation ?



Date view Thread view Subject view Author view

Jos Warmer (J.Warmer@klasse.nl)
Fri, 25 Feb 2000 18:01:07 +0100


Right, many OCL expressions are nondeterministic as you and several others have shown. This cannot be a reason for removing asSequence from OCL. We could argue that it is a matter of good style, to not write nondeterminsitic OCL. However, I do not know whether you can check this from the text of the constraint. Jos At 04:13 PM 25-02-00 +0000, Perdita Stevens wrote: >Following up Gianna's point, unless I'm misunderstanding something (I >realise I'm not sure of a syntactic point in the below -- whether it's >compulsory to give the type of element -- but as far as I can tell it's OK >bar that), consider: > >mySet -> iterate ( element; > mySequence : Sequence = Sequence{} > | mySequence -> append (element) ) > >Isn't it true that the sequences which could be returned by this are >exactly the sequences that could be returned by asSequence, so we could >regard asSequence as syntactic sugar for this? In which case, removing >asSequence from the language would achieve nothing -- the idea that you can >get sequences from sets is more deeply embedded. > >Perdita >-- >Dr. Perdita Stevens >Division of Informatics, University of Edinburgh >www.dcs.ed.ac.uk/home/pxs Fax: +44 131 667 7209 > > > >To remove yourself from this list please mail puml-list-request@cs.york.ac.uk >with a message containing the word "unsubscribe". > > > > _____________________________________________________ Klasse Objecten tel : +31 (0)35 6037646 Chalonhof 153 fax : +31 (0)35 6037647 3762 CT Soest email : J.Warmer@klasse.nl The Netherlands internet: http://www.klasse.nl


Date view Thread view Subject view Author view