Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

VIATRA2/Basics

< VIATRA2
Revision as of 05:00, 6 June 2008 by Unnamed Poltroon (Talk) (New page: = VIATRA2 Basics = == Basic concepts == === Model space === VIATRA2 is a model transformation engine which can be used to manipulate abstract models (software, architecture, domain-spec...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

VIATRA2 Basics

Basic concepts

Model space

VIATRA2 is a model transformation engine which can be used to manipulate abstract models (software, architecture, domain-specific) by creating model-to-model and model-to-code transformations. VIATRA2 stores models in the VIATRA2 Model Space, supports the uniform representation of metamodels and models in a single logical container (as opposed to EMF where metamodels and models are separated), using an arbitrary number of metamodeling levels.

Transformations

Model-to-model and model-to-code transformations are specified using the VIATRA2 Transformation Language (VTCL) which is a textual domain-specific programming language tailored for this specific task. TODO

Model import and export

VIATRA2 supports the programmatic import of metamodels and models from other tools using an Application Programming Interface (API).TODO Model exports are supported using (i) code generation, or (ii) the VIATRA2 modeling API accessible from any Java program.

Simple examples

First steps

Model space wizard

In order to begin working with VIATRA2, you'll first need to create a model space instance to store your models.

  1. Create a new project in Eclipse. The project can be of any type.
  2. In the project, create a new file (right click|new|other).
  3. In the wizard, select "VIATRA2 VPM Model space" from the "VIATRA2 Framework Release3" category.
  4. Specify the file name and click Next (not Finish).
  5. On the modelspace fragments selection screen, select "VPM Core and Datatypes metamodel".
  6. Click Finish.

VIATRA2 Wizard 0.png

Once the wizard is finished, you should have the new VPML file in your project. VPML files are XML serializations of the VIATRA2 model space, you can have any number of VPML files open at the same time, meaning that you can work with multiple model spaces concurrently.

Model space editor and VIATRA2 views

Double-click the newly created VPML file to open the VIATRA2 model editor (or select Open With|VIATRA2 model editor from the context menu). You should also open the VIATRA2 model spaces view (Window|Show view|Other|VIATRA2 Model spaces) and the VIATRA2 Textual Output view to get the basic home screen:

VIATRA2 Screen 0.png

The Hello World transformation

Back to the top