Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » extending OCL MDT with "just" a temporal operator always
extending OCL MDT with "just" a temporal operator always [message #936996] Mon, 08 October 2012 14:57 Go to next message
Fy Za is currently offline Fy ZaFriend
Messages: 245
Registered: March 2010
Senior Member
Hi all,
As defined in the title, I try to add "just" a temporal operator "always"
in the MDT/OCL.
I add it in the EssentialOCL xtext grammar
EssentialOCLPrefixOperator:
	'-' | 'not'
	| 'always';

but when I try to write some constraints,
I has this error "Unresolved Operation 'Boolean::always()'"

I find that I should extend oclstdlib, pivot, etc.
but I don't know the order of changes.
what are the several steps?

Best regards,
Fy Za
Re: extending OCL MDT with "just" a temporal operator always [message #937006 is a reply to message #936996] Mon, 08 October 2012 15:05 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Extending the OCL grammars is possible, but not supported; no tutorials etc.

Since you are extending with something very similar to 'not' you can
search out/step through resolution of a not expression.

Regards

Ed Willink


On 08/10/2012 15:57, Fy Za wrote:
> Hi all,
> As defined in the title, I try to add "just" a temporal operator "always"
> in the MDT/OCL.
> I add it in the EssentialOCL xtext grammar
>
> EssentialOCLPrefixOperator:
> '-' | 'not'
> | 'always';
>
> but when I try to write some constraints,
> I has this error "Unresolved Operation 'Boolean::always()'"
>
> I find that I should extend oclstdlib, pivot, etc.
> but I don't know the order of changes. what are the several steps?
>
> Best regards,
> Fy Za
Re: extending OCL MDT with "just" a temporal operator always [message #971993 is a reply to message #937006] Mon, 05 November 2012 09:16 Go to previous messageGo to next message
malik malik is currently offline malik malikFriend
Messages: 1
Registered: November 2012
Junior Member
Dear Fy za,
Have succeeded to extend eclipse OCL with temporal constraints?
I have seen that you are from an engineering school in France, me too. Can we collaborate together to perform such an extension?
BR
Malik
Re: extending OCL MDT with "just" a temporal operator always [message #986596 is a reply to message #971993] Wed, 21 November 2012 06:56 Go to previous messageGo to next message
Fy Za is currently offline Fy ZaFriend
Messages: 245
Registered: March 2010
Senior Member
Yes Malik,
you can contact me by private message

Fy Za
Re: extending OCL MDT with "just" a temporal operator always [message #988684 is a reply to message #937006] Sat, 01 December 2012 09:03 Go to previous messageGo to next message
Fy Za is currently offline Fy ZaFriend
Messages: 245
Registered: March 2010
Senior Member
Hi Ed,
I succeeded to extend CompleteOCL with always operator (as you said, I should follow the 'not' operator).
However, my extension was defined in the code level. I edit some classes like for example org.eclipse.ocl.examples.library.oclstdlib.OCLstdlibTables.java.
However, when I try to generate this class with some modifications defined in the OCL-2.4.oclstdlib using org.eclipse.ocl.examples.codegen.tables.model2tables.mtl,
I have many errors in org.eclipse.ocl.examples.library.oclstdlib.OCLstdlibTables.java.
.
What is the element that should be clicked to run the model2tables.mtl? the OCL-2.4.oclstdlib file? or all the package?
I 'd like to know if I should use this model2tables.mtl directly or using a mwe2 workflow ?

Best regards,

Ed Willink wrote on Mon, 08 October 2012 11:05
Hi

Extending the OCL grammars is possible, but not supported; no tutorials etc.

Since you are extending with something very similar to 'not' you can
search out/step through resolution of a not expression.

Regards

Ed Willink


On 08/10/2012 15:57, Fy Za wrote:
> Hi all,
> As defined in the title, I try to add "just" a temporal operator "always"
> in the MDT/OCL.
> I add it in the EssentialOCL xtext grammar
>
> EssentialOCLPrefixOperator:
> '-' | 'not'
> | 'always';
>
> but when I try to write some constraints,
> I has this error "Unresolved Operation 'Boolean::always()'"
>
> I find that I should extend oclstdlib, pivot, etc.
> but I don't know the order of changes. what are the several steps?
>
> Best regards,
> Fy Za

Re: extending OCL MDT with "just" a temporal operator always [message #988685 is a reply to message #988684] Sat, 01 December 2012 09:20 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Don't run the *.mtl directly. Use the Generate OCLstdlib model MWE2
script. (Nearly all automation uses an MWE2 script.

Regards

Ed


On 01/12/2012 09:03, Fy Za wrote:
> Hi Ed,
> I succeeded to extend CompleteOCL with always operator (as you said, I
> should follow the 'not' operator).
> However, my extension was defined in the code level. I edit some
> classes like for example
> org.eclipse.ocl.examples.library.oclstdlib.OCLstdlibTables.java.
> However, when I try to generate this class with some modifications
> defined in the OCL-2.4.oclstdlib using
> org.eclipse.ocl.examples.codegen.tables.model2tables.mtl,
> I have many errors in
> org.eclipse.ocl.examples.library.oclstdlib.OCLstdlibTables.java.
Re: extending OCL MDT with "just" a temporal operator always [message #988687 is a reply to message #988685] Sat, 01 December 2012 10:00 Go to previous messageGo to next message
Fy Za is currently offline Fy ZaFriend
Messages: 245
Registered: March 2010
Senior Member
Hi Ed.
Thank you for the quickly reply.
I run Generate OCLstdlib model MWE2
before these 3 MWE2 (Generate Pivot Models, Generate Xtext Models, Generate All Editors) or after?

best regards,
Fy Za
Ed Willink wrote on Mon, 17 September 2012 09:27
Hi

The Acceleo builder is flaky, particularly on a 'clean' project. As with
many things in Eclipse, sometimes the incremental updates are outwitted
so sometimes you need to refresh and clean some/all projects. I hope
this fixes it.

--- hang on you said GenerateAll -- someone else said this doesn't work.

I never use it, since I know how to sequence the relevant sub-generators

Generate Pivot Models
Generate Xtext Models
Generate All Editors

https://bugs.eclipse.org/bugs/show_bug.cgi?id=389720 raised

Regards

Ed

Ed Willink wrote on Sat, 01 December 2012 04:20
Hi

Don't run the *.mtl directly. Use the Generate OCLstdlib model MWE2
script. (Nearly all automation uses an MWE2 script.

Regards

Ed

Re: extending OCL MDT with "just" a temporal operator always [message #988699 is a reply to message #988687] Sat, 01 December 2012 14:27 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

In principle you can just do GenerateAll but it has a registration bug.

I think

Generate OCLstdlib model,
Generate Pivot Models,
Generate Xtext Models,
Generate All Editors

can be run in any order; probably better to run Generate Xtext Models
before Generate All Editors (or just one of the editors).

Regards

Ed Willink

On 01/12/2012 10:00, Fy Za wrote:
> Hi Ed.
> Thank you for the quickly reply.
> I run Generate OCLstdlib model MWE2
> before these 3 MWE2 (Generate Pivot Models, Generate Xtext Models,
> Generate All Editors) or after?
>
> best regards,
> Fy Za
> Ed Willink wrote on Mon, 17 September 2012 09:27
>> Hi
>>
>> The Acceleo builder is flaky, particularly on a 'clean' project. As
>> with many things in Eclipse, sometimes the incremental updates are
>> outwitted so sometimes you need to refresh and clean some/all
>> projects. I hope this fixes it.
>>
>> --- hang on you said GenerateAll -- someone else said this doesn't work.
>>
>> I never use it, since I know how to sequence the relevant sub-generators
>>
>> Generate Pivot Models
>> Generate Xtext Models
>> Generate All Editors
>>
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=389720 raised
>>
>> Regards
>>
>> Ed
>
> Ed Willink wrote on Sat, 01 December 2012 04:20
>> Hi
>>
>> Don't run the *.mtl directly. Use the Generate OCLstdlib model MWE2
>> script. (Nearly all automation uses an MWE2 script.
>>
>> Regards
>>
>> Ed
>
>
Re: extending OCL MDT with "just" a temporal operator always [message #988950 is a reply to message #988699] Tue, 04 December 2012 01:56 Go to previous messageGo to next message
Fy Za is currently offline Fy ZaFriend
Messages: 245
Registered: March 2010
Senior Member
Thank you Ed,
Finally, It works Wink

I have a question about AST and CST.
There is an article or a document with explains the difference
between these two trees? And what is the appropriate one can be
used to transform these extended constraints into LTL properties?

Best regards,
Fy Za.
Re: extending OCL MDT with "just" a temporal operator alwa [message #989018 is a reply to message #988950] Tue, 04 December 2012 10:38 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

All my presentations are on: http://wiki.eclipse.org/MDT/OCL/Articles

http://www.eclipse.org/modeling/mdt/ocl/docs/publications/MODELS2010OCLWorkshop%5Coclxtext.pdf
deals with ASTs and CSTs.

I don't understand "the appropriate one can be used to transform these
extended constraints into LTL properties".

Regards

Ed Willink

On 04/12/2012 01:56, Fy Za wrote:
> Thank you Ed,
> Finally, It works ;)
>
> I have a question about AST and CST.
> There is an article or a document with explains the difference between
> these two trees? And what is the appropriate one can be used to
> transform these extended constraints into LTL properties?
>
> Best regards,
> Fy Za.
>
Re: extending OCL MDT with "just" a temporal operator alwa [message #989558 is a reply to message #989018] Thu, 06 December 2012 17:43 Go to previous messageGo to next message
Fy Za is currently offline Fy ZaFriend
Messages: 245
Registered: March 2010
Senior Member
Thank you Ed for references.
I mean what is the richer than the other with information?
CST include AST?
or AST include CST?
there is some examples about an OCL document with its AST and its CST
in order that I understand the difference between them?

How I can find code to serialize an OCL document into a CST form?

Best regards,
Fy Za
Ed Willink wrote on Tue, 04 December 2012 05:38
Hi

All my presentations are on: http://wiki.eclipse.org/MDT/OCL/Articles

http://www.eclipse.org/modeling/mdt/ocl/docs/publications/MODELS2010OCLWorkshop%5Coclxtext.pdf
deals with ASTs and CSTs.

I don't understand "the appropriate one can be used to transform these
extended constraints into LTL properties".

Regards

Ed Willink

On 04/12/2012 01:56, Fy Za wrote:
> Thank you Ed,
> Finally, It works Wink
>
> I have a question about AST and CST.
> There is an article or a document with explains the difference between
> these two trees? And what is the appropriate one can be used to
> transform these extended constraints into LTL properties?
>
> Best regards,
> Fy Za.
>

Re: extending OCL MDT with "just" a temporal opera [message #989574 is a reply to message #989558] Thu, 06 December 2012 19:39 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The CST is Xtext friendly. Just save the Xtext resource.

The AST is OMG-defined.

Try looking at the examples/Junit tests.

Regards

Ed Willink




On 06/12/2012 17:43, Fy Za wrote:
> Thank you Ed for references.
> I mean what is the richer than the other with information?
> CST include AST? or AST include CST?
> there is some examples about an OCL document with its AST and its CST
> in order that I understand the difference between them?
>
> How I can find code to serialize an OCL document into a CST form?
>
> Best regards,
> Fy Za
> Ed Willink wrote on Tue, 04 December 2012 05:38
>> Hi
>>
>> All my presentations are on: http://wiki.eclipse.org/MDT/OCL/Articles
>>
>> http://www.eclipse.org/modeling/mdt/ocl/docs/publications/MODELS2010OCLWorkshop%5Coclxtext.pdf
>> deals with ASTs and CSTs.
>>
>> I don't understand "the appropriate one can be used to transform
>> these extended constraints into LTL properties".
>>
>> Regards
>>
>> Ed Willink
>>
>> On 04/12/2012 01:56, Fy Za wrote:
>> > Thank you Ed,
>> > Finally, It works ;)
>> >
>> > I have a question about AST and CST.
>> > There is an article or a document with explains the difference
>> between > these two trees? And what is the appropriate one can be
>> used to > transform these extended constraints into LTL properties?
>> >
>> > Best regards,
>> > Fy Za.
>> >
>
>
Previous Topic:OCL parsing without a model?
Next Topic:OCL in Xtext editor: Quick fixes for constraints
Goto Forum:
  


Current Time: Thu Apr 25 01:22:51 GMT 2024

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

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

Back to the top