Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » VIATRA » Viatra tutorial(Viatra tutorial)
Viatra tutorial [message #1759150] Fri, 07 April 2017 00:30 Go to next message
zhang ph is currently offline zhang phFriend
Messages: 43
Registered: March 2017
Member
Hi,
Recently, i work through the tutorial of Viatra with event-driven mode, and i have two doubt:
1. Is the traceability model a must in practical application? If not,could you share a method with me?
2. After finishing transformation, i restart the eclipse, and i find when i press the `Toggel incremental transformation` menu, the source model is transformed from the beginning instead of from last transformation result! Am l right?

Hope for your reply!
Re: Viatra tutorial [message #1759164 is a reply to message #1759150] Fri, 07 April 2017 08:06 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 392
Registered: July 2015
Senior Member
Hi,

thanks for your interest in the tutorial; I try to answer your questions here. If something is unclear, feel free to ask for clarification.

1) Event-driven transformations have to maintain a trace back to the original model in some way to allow the continuation of the transformation (basically, rule preconditions should be able to distinguish between source model elements that have or have not been transformed into the target models). Traceability models is such an approach that is also useful for a post-mortem analysis or documenting the relation between the different model artifacts. However, if e.g. new model elements are created with shared model identifiers, they can be reused to provide such trace information. Such a transformation (based on queries) is described in [1] (sorry for the raw asciidoc format here, the documentation is being moved to eclipse.org, and we have not finished deploying the output yet).

2) Yes, as the transformation state (e.g. what rules were already executed) is encoded in the transformation itself. This approach was selected to ensure the tutorial does not take too long to complete. If you want to have an _incremental_ transformation (e.g. that handles restarts), you should have queries that also check the traceability records, as in [2].

[1] http://git.eclipse.org/c/viatra/org.eclipse.viatra.git/tree/documentation/org.eclipse.viatra.documentation.help/src/main/asciidoc/cps/Query-result-traceability-M2M-transformation.adoc
[2] http://git.eclipse.org/c/viatra/org.eclipse.viatra.git/tree/documentation/org.eclipse.viatra.documentation.help/src/main/asciidoc/cps/Explicit-traceability-M2M-transformation.adoc

Best regards,
Zoltán
Re: Viatra tutorial [message #1769154 is a reply to message #1759164] Thu, 27 July 2017 07:12 Go to previous messageGo to next message
zhang ph is currently offline zhang phFriend
Messages: 43
Registered: March 2017
Member
Hi,
Today I perform the M2M transformation with incremental method as described in the tutorial, I load an existing CPS model(about 8.5MB, generated by CPS benchmark in LOW_SYNCH scenario, scale is 32) into my eclipse, my eclipse is blocked. And about 20 minutes later, it become active. Then I load larger model into it, it need more time to become active, even is alway blocked. From my opinion, it is because EMF takes long time to parse the model, am I right? Do you encounter the same issue or Could you give me any suggestions to handle it?
Hope for your reply, Thanks!
Re: Viatra tutorial [message #1769159 is a reply to message #1769154] Thu, 27 July 2017 08:13 Go to previous messageGo to next message
Abel Hegedus is currently offline Abel HegedusFriend
Messages: 197
Registered: September 2015
Senior Member
Yes, this is expected. The CPS model elements have identifiers and EMF uses that instead of XMI paths when persisting the model. During loading, the resolution of IDs to EObjects takes a lot of time. There are ways to make that faster (either disabling the usage of IDs in XMI or postponing the ID resolution to the end of the loading combined with an ID map that can be provided to the Resource handling code in EMF), but since we always generate the models in the benchmarks it was not a priority to solve this issue.

This is the relevant code fragment: https://www.eclipse.org/forums/index.php?t=msg&th=796300&goto=1404066&#msg_1404066

You could open an issue on Bugzilla for VIATRA under the examples component ( https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Viatra&component=Examples ) that this should be implemented for the CPS domain.
Re: Viatra tutorial [message #1769372 is a reply to message #1769159] Mon, 31 July 2017 07:07 Go to previous message
zhang ph is currently offline zhang phFriend
Messages: 43
Registered: March 2017
Member
Thanks for your reply, and the loading time is about 90(s) for a CPS model with one million of element.

[Updated on: Tue, 01 August 2017 07:43]

Report message to a moderator

Previous Topic:java_trace files necessary?
Next Topic:M2M increamental transformation of CPS benchmark
Goto Forum:
  


Current Time: Sun Dec 08 19:51:39 GMT 2024

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

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

Back to the top