Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » toLower() or toLowerCase()
toLower() or toLowerCase() [message #654601] Wed, 16 February 2011 13:17 Go to next message
Wilbert Alberts is currently offline Wilbert AlbertsFriend
Messages: 144
Registered: June 2010
Senior Member

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?

Re: toLower() or toLowerCase() [message #654701 is a reply to message #654601] Wed, 16 February 2011 18:11 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4548
Registered: July 2009
Senior Member
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?


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

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.


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

Current Time: Thu Nov 26 12:35:51 GMT 2015

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

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