Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [gemoc-dev] File modifications in GEMOC engines

Hi Steffen!


To answer your questions, we would need to know more about what you are
trying to achieve, and what kinds of semantics your engine will work
with. Is your source code publicly available somewhere, by any chance?
Or would you have time to describe what you do in more detail?

For instance:
- do you define the dynamic state of your models directly inside your
Ecore abstract syntax file, or do you define it separately? 
- if it is defined separately, how?
- what kind of transformation language is used to define your
semantics? does it also take care of defining the dynamic state? how
does it load the model it executes?

Also, a few comments below:

Le lundi 09 juillet 2018 à 10:38 +0000, Zschaler, Steffen a écrit :
> Hi,
>  
> I’m working on a new execution engine for the GEMOC studio. It seems
> to be working well, though I have had to be a bit rough in
> integrating it in some places. One problem I have, at the moment,
> however, is figuring out which resource to modify and whose
> responsibility it is to save that resource and when. As a result, I
> get some strange effects:
>  
> 1.       I have chosen to use executionContext.getResourceModel() as
> the resource to modify, but have found out that that is not the
> resource in the new execution workspace, but rather the original
> model file. It does seem to be, however, the resource for which the
> corresponding Sirius diagram is opened. So my first question is:
> Should I open that resource or should I use
> executionWorkSpace.getModelPath to find and load the copied resource?

The resource to modify should be the original one. GEMOC Studio
automatically disables saving on the loaded resource to make sure that
all changes made for the execution are transient/temporary. It should
be the same resource that is loaded by Sirius, if I am correct. You
should never have to load the model yourself, the model loader should
take care of it once and then you programatically give the model
content to the interpreter.

> 2.       When I have run my program, I see the results in the Model
> Explorer. However, these results don’t seem to have been saved to the
> actual resource on disk: the Sirius diagram has not been updated and
> if I open the model file directly in its tree editor, I see only the
> original contents. So, my second question is: should I expect the
> resource to be saved automatically or is my execution engine expected
> to do so? If so, when am I expected to do any saves?

As said above, nothing should be saved on disk, except maybe an archive
of the model and an execution trace (but neither of these are relevant
at runtime). The Sirius representation should be automatically updated
even if the file is never changed, thanks to how sirius is Integrated
to GEMOC. You should never have to save the file, nor to take care of
anything in particular to have Sirius animation working.


Hope it helps! Good luck and welcome in GEMOC development :)

Regards,
Erwan


>  
> Any suggestions would be most welcome…
>  
> Many thanks,
> 
> Steffen
>  
>  
> Dr. rer. nat. Steffen Zschaler AHEA
> Senior Lecturer
>  
> King's College London
> Department of Informatics
>  
> Email szschaler@xxxxxxx
> Phone +44 (020) 7848 1513
> WWW   http://www.steffen-zschaler.de/
>  
> _______________________________________________
> gemoc-dev mailing list
> gemoc-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or
> unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/gemoc-dev

Back to the top