Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » What specification to use(To what OCL specification doe the OCLinEcore editor conform?)
What specification to use [message #1701731] Wed, 15 July 2015 09:38 Go to next message
Bill Laurune is currently offline Bill LauruneFriend
Messages: 2
Registered: July 2015
Junior Member
I have the OMG Object Constraint Language specification version 2.4, but certain keywords are different in the OCLinEcore editor.

For example, in OCL 2.4, the keyword is post, but that gives me an error. I have to use postcondition.

I've found a few short examples on the web, and worked from those, but a specification would be very helpful.

Thanks
Re: What specification to use [message #1701780 is a reply to message #1701731] Wed, 15 July 2015 14:25 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

OCLinEcore is an additional tool not covered by the OCL specification;
the embedded OCL is standard, the embedding language is more in the
realms of UML.

Complete OCL syntax is not used because it is a dreadful syntax that
inhibits parser error recovery and consequently makes helpful error
messages hard to produce.

The (Eclipse) OCL documentation provides a grammar definition using
syntax diagrams. (They may be a bit stale with respect to the details of
template types.)

You may find it easier to just load a *.ecore and see what happens in
OCLinEcore syntax.

Ctrl-Space completion assist is sometimes helpful too.

Regards

Ed Willink



On 15/07/2015 13:26, Bill Laurune wrote:
> I have the OMG Object Constraint Language specification version 2.4,
> but certain keywords are different in the OCLinEcore editor.
>
> For example, in OCL 2.4, the keyword is post, but that gives me an
> error. I have to use postcondition.
>
> I've found a few short examples on the web, and worked from those, but
> a specification would be very helpful.
>
> Thanks
Re: What specification to use [message #1701812 is a reply to message #1701780] Wed, 15 July 2015 22:12 Go to previous message
Bill Laurune is currently offline Bill LauruneFriend
Messages: 2
Registered: July 2015
Junior Member
Thanks Ed.

I understand about the OCL syntax. Years ago, I did my own variation on OCL to simplify the syntax and add the ability to define a data model without reliance on UML diagrams.

What seems missing is a way to use a "let" expression in operations to simply expressions. Am I missing it, or is it just missing?
Previous Topic:How to add a custom data type?
Next Topic:Nested OCL forAlls
Goto Forum:
  


Current Time: Tue Mar 19 02:49:16 GMT 2024

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

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

Back to the top