Skip to main content



      Home
Home » Modeling » OCL » toLower() or toLowerCase()
toLower() or toLowerCase() [message #654601] Wed, 16 February 2011 08:17 Go to next message
Eclipse UserFriend
Hi,

I made an ecore model containing a derived attribute that utilizes the toLower() function.

The oclinecore editor states that it dies not know this function. However, it does indicate that the toLowerCase() function should exist. Whenever I make a dynamic instance containing the derived attribute, the expression does not compute. Using the ocl console indicates that the toLower() shoudl be used instead.

My question is: how is this possible. Who is right? Are there two OC implementations running?

Greetings,
Wilbert.
Re: toLower() or toLowerCase() [message #654701 is a reply to message #654601] Wed, 16 February 2011 13:11 Go to previous message
Eclipse UserFriend
Hi Wilberts

On 16/02/2011 13:17, Wilbert Alberts wrote:
> My question is: how is this possible. Who is right? Are there two OC
> implementations running?

Yes.

The traditional OCL implementation uses an LPG parser and embedded
erroneous definitions of toLower and toUpper.

The new (in MDT/OCL 3.0) editors use Xtext and an ANTLR parser and a
model of the OCL Standard Library much more closely corresponds with the
OMG specification.

So the OCLinEcore editor reports an error but actual API usage has no
problem.

The support (in MDT/OCL 3.1) is migrating away from Ecore/UML bindings
to a uniform Pivot model that hides the OMG non-compliances and enables
the OMG specification to be realised. The new support may be found in
the org.eclipse.ocl.examples.{library,pivot,xtext} plugins. The new
editors at last have semantic as well as syntactic validation, and hover
text to give you signature clues.

Look forward to extensibility, model-definition and OMG compliance in
the new code.

Regards

Ed Willink
Previous Topic:Type of variable in "let" not agreeing with oclIsTypeOf/oclAsType
Next Topic:using @pre. operator.
Goto Forum:
  


Current Time: Wed Jul 23 08:05:34 EDT 2025

Powered by FUDForum. Page generated in 0.28667 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top