eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

No error when parsing untyped variable #545

Closed eclipse-ocl-bot closed 1 month ago

eclipse-ocl-bot commented 1 month ago

| --- | --- | | Bugzilla Link | 315482 | | Status | CLOSED WONTFIX | | Importance | P3 normal | | Reported | Jun 02, 2010 16:11 EDT | | Modified | May 29, 2012 13:22 EDT | | Reporter | Wayne |

Description

Build Identifier: CVS HEAD on June 2, 2010

If you have an untyped variable in an OCL expression and run it through HelperUtil.parseInvariant(), the OCLAnalyzer (AbstractOCLAnalyzer) fails to detect that the OCL is invalid.

A patch to fix the problem is attached.

Reproducible: Always

eclipse-ocl-bot commented 1 month ago

By Wayne on Jun 02, 2010 16:11

Created attachment 170877 Patch to fix the problem

:notepad_spiral: OCLNoType.txt

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Jun 02, 2010 17:01

Your patch generates an analysis error when a meta-model property has no type; not when an OCL variable has no type.

A missing meta-model property type is a meta-model validation error not an OCL analysis error.

The role of the analyzer is (now) to report errors that prevent creation of a consistent AST.

The role of the validator is (now) to report errors in the AST.

So this could be a validation check, but I would need to study the ramifications of OCL duplicating EMF validation. I suspect we get an irritating number of duplicate messages. OCL should diagnose the downstream consequence that some expression node has no type.

Please submit a test case if you can demonstrate that it is OCL rather than the meta-model that is wrong.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 27, 2011 02:58

Closing WONTFIXes.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 29, 2012 13:22

Closing all bugs resolved in Indigo.