eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[oclstdlib] OclAny.toString() is not OMG-compliant #2211

Open eclipse-ocl-bot opened 1 week ago

eclipse-ocl-bot commented 1 week ago

| --- | --- | | Bugzilla Link | 577336 | | Status | NEW | | Importance | P3 normal | | Reported | Nov 18, 2021 10:08 EDT | | Modified | Nov 18, 2021 10:26 EDT | | Reporter | Ed Willink |

Description

Both Classic and Pivot OCL implement OCLAny::toString for both OclVoid and OclInvalid although OCL 2.4 defines only numeric/logical toString().

The anomally was highlighted by the stricter processing for the symbolic evaluation visitor for which OclVoid worked but OclInvalid failed.

toString() is a helpful debug aid so pedantically depriving users of it or forcing type tests seems a bit brutal.

https://issues.omg.org/browse/OCL25-219 raised to enhance OMG OCL.

eclipse-ocl-bot commented 1 week ago

By Ed Willink on Nov 18, 2021 10:26

(In reply to Ed Willink from comment #0)\ ]> https://issues.omg.org/browse/OCL25-219 raised to enhance OMG OCL.

and suggesting that a tostring() / ?parse() round-trip should be monotonic.

How can different Collection types be serialized efficiently and monotonically?