Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "VIATRA/Transformation/Examples"

Line 2: Line 2:
  
 
As a main demonstrating example, the CPS demonstrator provides a complex set of VIATRA features over the Cyber-physical Systems domain. In addition to model transformation and code generation support, the  
 
As a main demonstrating example, the CPS demonstrator provides a complex set of VIATRA features over the Cyber-physical Systems domain. In addition to model transformation and code generation support, the  
demonstrator also presents [VIATRA/Addon/Validation live validation], [VIATRA/Addons/UserDocumentation/VIATRA_Viewers query-based viewers], [query-driven derived features VIATRA/Addon/Query_Based_Features] usage.
+
demonstrator also presents [[VIATRA/Addon/Validation | live validation]], [[VIATRA/Addons/UserDocumentation/VIATRA_Viewers | query-based viewers]], [[VIATRA/Addon/Query_Based_Features | query-driven derived features]] usage.
  
 
The model transformations themselves were implemented using Xtend, but different variants.
 
The model transformations themselves were implemented using Xtend, but different variants.

Revision as of 05:57, 21 April 2016

The CPS Demonstrator example

As a main demonstrating example, the CPS demonstrator provides a complex set of VIATRA features over the Cyber-physical Systems domain. In addition to model transformation and code generation support, the demonstrator also presents live validation, query-based viewers, query-driven derived features usage.

The model transformations themselves were implemented using Xtend, but different variants.

Batch Transformation Variants

  1. Xtend (`id = batch.simple`)
  2. Xtend + EMF-IncQuery (`id = batch.eiq`)
  3. VIATRA Batch API (`id = batch.viatra`)

Incremental Transformation Variants

For the incremental alternatives, a differentiating factor is the method to identify changes in the source model which must be synchronized to the target ("dirty flag")

  1. Direct notification (`id = incr.direct`)
    • dirty: EMF adapter/IQBase
  2. Explicit traceability (`id = incr.expl`)
  3. Query result traceability (`id = incr.qrt`)
  4. Partial batch transformation (`id = incr.aggr`)
  5. Change-driven transformations (`id = incr.cdt`)
    • dirty: EVM activation life-cycle
  6. VIATRA event-driven transformation API (`id = incr.viatra`)


The CPS example is being migrated into eclipse.org, tracked at bug 490621.

Other examples

Petri net simulator with Maven

A simple, Hello world transformation is available from http://git.eclipse.org/c/viatra/org.eclipse.viatra.examples.git/tree/transformation that uses a pure maven-build (does not require Eclipse to be executed).


Older examples

The following examples were created for earlier versions of VIATRA; they may or may not work ported to the current version of VIATRA; and while they illustrate basic usage of the framework, might require adjusting to work with current versions.


Petri nets to State charts

An example transformation is available by implementing the Petri net to State Charts case of the Transformation Tool Contest 2013.

Program understanding (Java code to state charts)

The most up-to-date example can be found here: https://github.com/ujhelyiz/viatra2-programunderstanding

Petri net simulator

A very simple, batch transformation program is available from here: https://github.com/ujhelyiz/viatra-petrinet-simulator

Back to the top