eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

Parser requires operation body expressions to be boolean-valued #179

Closed eclipse-ocl-bot closed 1 month ago

eclipse-ocl-bot commented 1 month ago

| --- | --- | | Bugzilla Link | 185345 | | Status | CLOSED FIXED | | Importance | P1 critical | | Reported | May 03, 2007 10:15 EDT | | Modified | May 27, 2011 02:42 EDT | | Version | 1.1.0 | | Reporter | Christian Damus |

Description

Currently, the OCLHelper::createBodyCondition(String) method requires the body expression to be boolean-valued, as the UML specification requires of body constraints.

It should allow expressions whose values are the operation result, which is how the OCL specification defines the operation body.

For this release, it would be sufficient to just accept either form. For the 1.2 release, the createBodyCondition(String) method should probably be deprecated and replaced by a createBodyExpression(String) and createBodyConstraint(String) pair that apply the OCL and UML well-formedness rules, respectively.

eclipse-ocl-bot commented 1 month ago

By Christian Damus on May 03, 2007 18:52

Updated the ValidationVisitor to allow body expressions that conform to the type of the operation, or if the body expression is boolean-valued and the operation is not, assert that it is formulated like a post-condition. Made sure that, for body expressions of any kind, the result variable cannot be referenced to get its value.

Also ensured that the OCL 1.0 compatibility API still asserts the post-condition-like structure.

eclipse-ocl-bot commented 1 month ago

By Nick Boldt on Jan 28, 2008 16:37

Move to verified as per bug 206558.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 27, 2011 02:40

Closing after over a year in verified state.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 27, 2011 02:42

Closing after over a year in verified state.