Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » pre and post conditions in OCL metamodel
pre and post conditions in OCL metamodel [message #1748556] Thu, 24 November 2016 10:49 Go to next message
meriem lahr is currently offline meriem lahrFriend
Messages: 31
Registered: March 2013
Member
Hi all,

I would like to express transformation constraints (preconditions, postconditions and invariants) that conform to the OCL metamodel.

The OCL metamodel contains a definition of OCL expressions. But how to indicate, for an OCL expression, if it is a postcondition, precondition or invariant?

Thank you very much
Re: pre and post conditions in OCL metamodel [message #1748557 is a reply to message #1748556] Thu, 24 November 2016 11:06 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Complete OCL supports definition of an OCL document that complements an existing meta-model. It provides for the definition of pre/post-conditions on operations.

If your transformation language provides a metamodel, as QVT does, then since a Transformation is-a Class you could add invariants to the Transformation. However a Rule is not an Operation so you cannot add pre/post-conditions to Rules.

However you write vaguely that you want transformation pre/post-conditions. What are they? A declarative model transformation has only two states, the input and the output, so do you really just mean a set of invariants on the input and a set of invariants on the output? These can be specified by Complete OCL using your input/output meta-models totally independent of your unspecified transformation technology.

If you are looking towards new technology, I can see a case whereby a transformation language's input/output model declarations could be extended to support invariants that could optionally be checked at run-time and could be exploited by the execution.

Regards

Ed Willink
Re: pre and post conditions in OCL metamodel [message #1748559 is a reply to message #1748557] Thu, 24 November 2016 11:52 Go to previous messageGo to next message
meriem lahr is currently offline meriem lahrFriend
Messages: 31
Registered: March 2013
Member
Hi Ed,

Thanks for your answer and sorry, my question was not clear. The transformation constraints are as follow :

constraints on a model to be transformed
constraints on a model to be a valid result of the transformation (these constraints are independent of the source model)
constraints on the evolution between source and target models

My OCL constraints specification doesn't depend on a language or an execution (but they are specific to input/output metamodel). My goal is to be able to express them conforming to a metamodel in order provide them as input of a higher order transformation.

Regards

Meriem

[Updated on: Thu, 24 November 2016 16:56]

Report message to a moderator

Re: pre and post conditions in OCL metamodel [message #1748571 is a reply to message #1748559] Thu, 24 November 2016 15:14 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I am no clearer what you are really trying to do that I did not answer earlier.

Always a good idea to give an example, rather than expect me to successfully guess at what you mean.

Regards

Ed Willink
Previous Topic:choosing "Property::CompatibleDefaultExpression" for programmatically defined pivot types
Next Topic:Loading oclxmi files
Goto Forum:
  


Current Time: Fri Apr 19 01:23:34 GMT 2024

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

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

Back to the top