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 10:57  |
Eclipse User |
|
|
|
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 #988684 is a reply to message #937006] |
Sat, 01 December 2012 04:03   |
Eclipse User |
|
|
|
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:05Hi
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 #988699 is a reply to message #988687] |
Sat, 01 December 2012 09:27   |
Eclipse User |
|
|
|
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 opera [message #989574 is a reply to message #989558] |
Thu, 06 December 2012 14:39  |
Eclipse User |
|
|
|
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.
>> >
>
>
|
|
|
Goto Forum:
Current Time: Wed Jul 23 18:03:32 EDT 2025
Powered by FUDForum. Page generated in 0.04793 seconds
|