Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » Best practice to check OCL invariants from inside QVTo script
Best practice to check OCL invariants from inside QVTo script [message #899794] Thu, 02 August 2012 11:34 Go to next message
Christopher Gerking is currently offline Christopher GerkingFriend
Messages: 116
Registered: April 2011
Senior Member
Several OCL invariants are specified as part of my meta-model. During generation of an instance of this meta-model, I have to check conformance with all specified invariants from inside the QVTo script. The check must happen during the transformation, since further results depend on it.

I see different possibilities to achieve this:

1. Move all invariants to operations/attributes. Call the operation or attribute inside the invariant and also from my QVTo script.

2. Create a blackbox library and introduce an evaluation operation, which uses existing validation code.

3. Make invariants 'callable'. Is there an example available? Inserting the keyword to my ecore file recently crashed it...


Using the blackbox library brings the advantage of not invoking all the invariants individually. Is this the solution to go for?
Re: Best practice to check OCL invariants from inside QVTo script [message #899815 is a reply to message #899794] Thu, 02 August 2012 12:39 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7670
Registered: July 2009
Senior Member
Hi

I would do both.

Use the blackbox for development for which Java debugging will be helpful.

Raise a Bugzilla on your bad callable example please.

Regards

Ed Willink


On 02/08/2012 12:34, Christopher G. wrote:
> Several OCL invariants are specified as part of my meta-model. During
> generation of an instance of this meta-model, I have to check
> conformance with all specified invariants from inside the QVTo script.
> The check must happen during the transformation, since further results
> depend on it.
>
> I see different possibilities to achieve this:
>
> 1. Move all invariants to operations/attributes. Call the operation or
> attribute inside the invariant and also from my QVTo script.
>
> 2. Create a blackbox library and introduce an evaluation operation,
> which uses existing validation code.
> 3. Make invariants 'callable'. Is there an example available?
> Inserting the keyword to my ecore file recently crashed it...
>
>
> Using the blackbox library brings the advantage of not invoking all
> the invariants individually. Is this the solution to go for?
Previous Topic:Code style / Performance / Best practice question
Next Topic:Modifying QVT Traceability.
Goto Forum:
  


Current Time: Tue Sep 24 23:45:28 GMT 2024

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

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

Back to the top