is iterate a deterministic operation ?



Date view Thread view Subject view Author view

Gianna Reggio (reggio@disi.unige.it)
Fri, 25 Feb 2000 16:32:09 +0100 (MET)


In am new to OCl, and so excuse me if the answer to the following question is well-known By looking at UML 1.3 presentation of OCl I have the impression that the ``iterate'' construct is be nondeterministic Indeed, what is the result of the following expression set{ 0, 1 } -> iterate{ I; Integer; acc: Integer = 0 | if i = 0 then 0 else i / acc} I have the impression that depending on which order the elements of the set { 0, 1} are examined by the iterator we can get either 0 or an error/undefine due to a division by zero Best Regards Gianna Reggio =================================================================== Gianna Reggio Dipartimento di Informatica e Scienze dell'Informazione Universita' di Genova Via Dodecaneso 35 16146 Genova (Italy) Phone: +39-010 3536702 Fax: +39- 010 3536699 email: reggio @ disi.unige.it


Date view Thread view Subject view Author view