Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » CompleteOCL errors against UML model.
CompleteOCL errors against UML model. [message #804476] Wed, 22 February 2012 17:13 Go to next message
John Guerson is currently offline John GuersonFriend
Messages: 51
Registered: August 2011
Member
Hi,

I have tried to use my ocl constraints (.ocl) against my UML model using the eclipse Indigo and recently the eclipse Juno M5 with OCLTools, but it seems that still contains a lot of errors regarding to UML. For instance, all the properties in my model cannot be resolved in my ocl constraints...

Does Anyone know if the OCL binding to UML is completed?

Regards,
John
Re: CompleteOCL errors against UML model. [message #804501 is a reply to message #804476] Wed, 22 February 2012 17:45 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi John

When you say 'use' your .ocl file, do you mean using the Java API and
the UML binding (nothing much changed in Juno), or the new neutral pivot
binding that underlies the interactive Xtext editors, Xtext Console, and
Code Generator?

Quite a lot of progress has been made in Juno M5 so that the OCL in the
upcoming UML 2.5 specification can be tool checked.

I'm not confident about use of Association names, qualifiers or profiles
in OCL yet, but other usages should be pretty good.

Can you provide an example that you find unsatisfactory?

Regards

Ed Willink


On 22/02/2012 17:13, John Mising name wrote:
> Hi,
>
> I have tried to use my ocl constraints (.ocl) against my UML model
> using the eclipse Indigo and recently the eclipse Juno M5 with
> OCLTools, but it seems that still contains a lot of errors regarding
> to UML. For instance, all the properties in my model cannot be
> resolved in my ocl constraints...
> Does Anyone know if the OCL binding to UML is completed?
>
> Regards,
> John
Re: CompleteOCL errors against UML model. [message #804520 is a reply to message #804501] Wed, 22 February 2012 18:23 Go to previous messageGo to next message
John Guerson is currently offline John GuersonFriend
Messages: 51
Registered: August 2011
Member
Hi Edward,

I mean the CompleteOCL errors in the editor.
I have an uml model, and the OCL document against it.

See the print below for more details...

In this example, i'm using the indigo SR1. I think it is normal that contains some errors, but it is "normal" in Juno M5 ?

Regards,
John.

[Updated on: Thu, 23 February 2012 16:34]

Report message to a moderator

Re: CompleteOCL errors against UML model. [message #804532 is a reply to message #804520] Wed, 22 February 2012 18:40 Go to previous messageGo to next message
John Guerson is currently offline John GuersonFriend
Messages: 51
Registered: August 2011
Member
Edward,

I just checked in Juno M5 and only the properties names are not resolved.

I think it still need of improvements. Are you working on it?

Regards,
John.


Re: CompleteOCL errors against UML model. [message #804659 is a reply to message #804532] Wed, 22 February 2012 21:31 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The errors can be misleading. Xtext gives three relevant processing phases

resolve syntax
resolve references
validate rules

In Indigo syntax failures suppress reference resolution, but validation
still occurs so almost every reference shows as a validation error
making it difficult to see the underlying syntax error.

In Juno I've fixed this, so it's much easier to tackle the problems.

Can you give me an example of the problems you see on M5?

Regards

Ed Willink


On 22/02/2012 18:40, John Mising name wrote:
> Edward,
>
> I just checked in Juno M5 and only the properties names are not resolved.
>
> I think it still need of improvements. Are you working on it?
> Regards,
> John.
>
>
>
Re: CompleteOCL errors against UML model. [message #804783 is a reply to message #804659] Thu, 23 February 2012 01:51 Go to previous messageGo to next message
John Guerson is currently offline John GuersonFriend
Messages: 51
Registered: August 2011
Member
Hi Edward,

Maybe is something wrong with the model or constraints... but i doubt it.

Most of errors are in the properties.

See the images below..

Thanks for your reply

Regards,
John

[Updated on: Thu, 23 February 2012 23:20]

Report message to a moderator

Re: CompleteOCL errors against UML model. [message #804897 is a reply to message #804783] Thu, 23 February 2012 05:42 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

All the errors you show appear to be secondary errors; for some reason
Student::enr1 and School::enr2 do not exist once your UML model is
automatically converted via Ecore to the Pivot meta-model.

Your figure shows that these exist as Association ends, but the relevant
classes are collapsed so I cannot see the Properties.

Normally the UML2Ecore conversion works well so that the missing
Association support is not a problem, so I suspect that there is one
primary error causing all these secondaries.

The hover text shows the context as "Enrollment.uml::_::Student"; the
"_" package is very suspicious.

Can you send your example files so that I can
a) diagnose the problem
b) see why the primary error is swamped by secondaries

Regards

Ed Willink

On 23/02/2012 01:51, John Mising name wrote:
> Hi Edward,
>
> Maybe is something wrong with the model or constraints... but i doubt it.
>
> Most of errors are in the properties.
>
> See the images below..
>
> Thanks for your reply
>
> Regards,
> John
>
>
Re: CompleteOCL errors against UML model. [message #805322 is a reply to message #804897] Thu, 23 February 2012 16:34 Go to previous messageGo to next message
John Guerson is currently offline John GuersonFriend
Messages: 51
Registered: August 2011
Member
Hey Edward,

This UML model was generated by my transformation, so it may have been generated incorrectly in some way.

The package "_" is because i did not set the package name through the code.

Thanks,
John

[Updated on: Thu, 23 February 2012 23:19]

Report message to a moderator

Re: CompleteOCL errors against UML model. [message #805354 is a reply to message #805322] Thu, 23 February 2012 17:02 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Thanks for the files. The problem is that your UML is unusual in that
you are using Association owned ends, rather than Class owned attributes
referenced by Association member ends. It seems the UML2Ecore conversion
does not like your idiom.

Since the UML was generated by a transformation, I suggest adjusting the
UML structure to be more conventional.

Regards

Ed Willink

On 23/02/2012 16:34, John Mising name wrote:
> Hey Edward,
>
> This UML model was generated by my transformation, so it may have been generated incorrectly in some way.
>
> The package "_" is because i did not set the package name through the code.
>
> Thanks,
> John
Re: CompleteOCL errors against UML model. [message #806339 is a reply to message #805354] Fri, 24 February 2012 21:17 Go to previous message
John Guerson is currently offline John GuersonFriend
Messages: 51
Registered: August 2011
Member
Hi Edward,

Thanks for your patience.

I figured out that my transformation wasn't creating the associations correctly.

I fixed the problem, and now there is no error in Juno, not even in Indigo.

Regards,
John
Previous Topic:Are null-able Enums still supported?
Next Topic:Using OCL to query; how to integrate in my metamodel
Goto Forum:
  


Current Time: Fri Mar 29 09:24:10 GMT 2024

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

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

Back to the top