Re: elements vs sets



Date view Thread view Subject view Author view

Jos Warmer (J.Warmer@klasse.nl)
Fri, 25 Feb 2000 13:50:48 +0100


Hello Perdita, At 11:05 AM 25-02-00 +0000, Perdita Stevens wrote: >Well, you could use mySet -> asSequence -> first; but I agree that OCL is >fundamentally broken in this respect. > The inclusion of a feature 'giveOneElement' for a Set (or Bag) in OCL has been discussed in the past. We have decided not to include this, because such a feature has undeterministic behavior. You request a random element from the set (Bag) and you cannot determine which element you get. Such undeterministic behavior was unwanted on OCL. Therefore it was not included. You can always use the 'forAll' operation instead of this. As explained in my answer to Leonor, the fact that a collection might actually have one element in certain circumstances is not relevant. OCL tools cannot rely on this when checking the well formedness of an OCL expression. >Anyone know whether there are any plans to fix it? What is happening in the >RTF on OCL? > I know what is happening in the RTF on OCL. We (mostly myself) are working on the resolution of a number of issues that have been send to the "issues@omg.org" address. The main points that have been sent in came from people who have written OCL tools and found some problems in their work. In principle, everything send to the issues list will be handled. You can also send issues to me, and request me to put them on the list. >Perdita Regards, Jos _____________________________________________________ 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