[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt.ocl] Re: New to EMF and OCL

Hi Richard

I don't really understand what you're asking.

A pre-condition is a side-effect free expression that can be used to determine whether the invocation context is suitable to invoke a function.

The function can the do whatever it likes.

A post-condition is a side-effect free expression that can be used to determine whether the function behaved as expected.

Sometimes the post-condition may be sufficiently simple to be able to reinterpret its is-it-so query into a make-it-so operation. That is not what OCL does, although a specific form of OCL code synthesizer might.

	Regards

		Ed Willink


Richard Catlin wrote:
All,

I am using the EMF Framework Validation Plug-in: "OCL Example". It allows me to write OCL expressions in a text file.

Is it possible to set properties in the model based on OCL expressions? The OCL 2.0 Spec says that expressions are guaranteed to be without side effects, but then goes on to say that OCL expressio can be used to specify a state change (eg. in a post-condition).

Pardon me if this is an obvious question.  I am new to EMF and OCL.

Thank you,
Richard Catlin