Skip to main content
Jump to: navigation, search

Difference between revisions of "VIATRA/Transformation/Examples"

 
(One intermediate revision by one other user not shown)
Line 45: Line 45:
  
  
= Older examples =
+
== 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.
 
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.
  
 +
=== Java Refactoring ===
 +
An example transformation is available for the Java Refactoring case of the Transformation Tool Contest 2015
 +
 +
* Case description: http://www.transformation-tool-contest.eu/2015/solutions_refactoring.html
 +
* Paper: https://github.com/FTSRG/paper-ttc15-java-refactoring
 +
* Implementation: https://github.com/viatra/java-refactoring-ttc-viatra
 +
 +
=== Movie Database ===
 +
An example transformation is available for the Movie Database case of the Transformation Tool Contest 2014 (plain Xtend transformation over EMF-IncQuery API; does not rely on EVM or transformation API)
 +
* Case description: http://www.transformation-tool-contest.eu/2014/solutions_movie.html
 +
* Paper: https://inf.mit.bme.hu/en/research/publications/movie-database-case-emf-incquery-solution
 +
* Implementation: https://github.com/FTSRG/ttc14-eiq
  
 
=== Petri nets to State charts ===
 
=== Petri nets to State charts ===
Line 55: Line 67:
 
* Case description: http://planet-sl.org/community/index.php?option=com_community&view=groups&task=viewgroup&groupid=26&Itemid=387&lang=en
 
* Case description: http://planet-sl.org/community/index.php?option=com_community&view=groups&task=viewgroup&groupid=26&Itemid=387&lang=en
 
* Implementation: https://github.com/izsob/TTC13-PN2SC-EIQ (look for the branch ''viatra-api'')
 
* Implementation: https://github.com/izsob/TTC13-PN2SC-EIQ (look for the branch ''viatra-api'')
** The following snippets are taken from this repository
 
  
== Program understanding (Java code to state charts) ==
+
=== Program understanding (Java code to state charts) ===
  
The most up-to-date example can be found here: https://github.com/ujhelyiz/viatra2-programunderstanding
+
A partial implementation of the Program Understanding case of TTC 2011 can be found here: https://github.com/ujhelyiz/viatra-programunderstanding
  
== Petri net simulator ==
+
=== Petri net simulator ===
 
A very simple, batch transformation program is available from here: https://github.com/ujhelyiz/viatra-petrinet-simulator
 
A very simple, batch transformation program is available from here: https://github.com/ujhelyiz/viatra-petrinet-simulator

Latest revision as of 09:35, 28 November 2018

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.

Java Refactoring

An example transformation is available for the Java Refactoring case of the Transformation Tool Contest 2015

Movie Database

An example transformation is available for the Movie Database case of the Transformation Tool Contest 2014 (plain Xtend transformation over EMF-IncQuery API; does not rely on EVM or transformation API)

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)

A partial implementation of the Program Understanding case of TTC 2011 can be found here: https://github.com/ujhelyiz/viatra-programunderstanding

Petri net simulator

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

Copyright © Eclipse Foundation, Inc. All Rights Reserved.