Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operation bodyCondition has to have a boolean value #13

Closed
eclipse-ocl-bot opened this issue Sep 18, 2024 · 4 comments
Closed

Operation bodyCondition has to have a boolean value #13

eclipse-ocl-bot opened this issue Sep 18, 2024 · 4 comments

Comments

@eclipse-ocl-bot
Copy link
Collaborator

| --- | --- |
| Bugzilla Link | 116251 |
| Status | CLOSED FIXED |
| Importance | P2 major |
| Reported | Nov 14, 2005 11:04 EDT |
| Modified | May 27, 2011 02:42 EDT |
| Version | 1.0.0 |
| Reporter | Vishy Ramaswamy |

Description

OCL framework assumes the bodyCondition constraint applies to the result of
the operation and does not allow the constraint to include result =
. This is incorrect as with result =, the bodyCondition
constraint is not a valid constraint since it does not result in a boolean
value.

The bodyCondition should be a valid constraint just like a postCondition. From
the UML2 specification: "The bodyCondition for an operation constrains the
return result. The bodyCondition differs from postconditions in that the
bodyCondition may be overridden when an operation is redefined, whereas
postconditions can only be added during redefinition.". So the framework
should not assume result = is part of the constraint.

@eclipse-ocl-bot
Copy link
Collaborator Author

By Christian Damus on Dec 14, 2005 17:46

Committed the fix.

The OCL parser is updated to require all operation constraints to be boolean valued and, furthermore, that body conditions look like:
o result = OR
o = result OR
o let ... in result = OR
o let ... in = result OR
o let ... in let ... in result = ETC.

where is an expression conforming to the operation's return type and does not reference the special result variable.

@eclipse-ocl-bot
Copy link
Collaborator Author

By Nick Boldt on Jan 28, 2008 16:34

Move to verified as per bug 206558.

@eclipse-ocl-bot
Copy link
Collaborator Author

By Ed Willink on May 27, 2011 02:40

Closing after over a year in verified state.

@eclipse-ocl-bot
Copy link
Collaborator Author

By Ed Willink on May 27, 2011 02:42

Closing after over a year in verified state.

This was referenced Sep 19, 2024
This was referenced Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant