Skip to content
  Kermeta  

Examples

Document Actions
This page presents a set of simulation, transformation examples written in Kermeta. Some of them depend on Eclipse EMF libraries (especially those which handle model persistence) or Topcased if you want create graphically FSM models.

Embedded sample in your Kermeta installation:

  • In Eclipse, click on New > Example > FSM Demo or Kermeta samples, then a project will be created with all needed files.
  1. FSM: this samples demonstrates the use of Kermeta to create a Kermeta metamodel, how to specify the behavior of a Finite State Machine metamodel and how to run Kermeta. Documentation for the FSM demo. (FSM sample works with 2 eclipse projects fr.irisa.triskell.kermeta.samples.fsm and fr.irisa.triskell.kermeta.samples.fsm.demo. The demo project contains all the Kermeta code)
  2. Kermeta samples are related to kmLogo, Class2RDBMS, Arabic2Roman,...
  • Open and try the samples in the imported projects. The launch configurations are automaticaly added in the "Run Configuration ..." dialog box (via *.launch files)
  • class2RDBMS specificity: Before to launching the sample, you must register the 2 metamodels: ClassMM.ecore and RDBMSMM.ecore

Registering the packages of a metamodel: this facility is available through the KerMeta menu entry of the Ecore files contextual menu ("KerMeta > Register EPackages into repository"). It registers all the packages defined into a metamodel in the EMF repository (the updated list of registered packages is displayed into the Console view).
Once registered, these packages can be referred to through their URI instead of using the file path to the metamodel that define them.

Note: that this registration is not persistent, which means that it has to be performed again for each new Eclipse session. Note also that the reverse facility (unregistering the packages of a metamodel from the EMF repository) is also available.

Online samples:

We provides several samples that you can download and try.

The project called fr.irisa.triskell.kermeta.samples contains the following demos :

  • Arabic2Roman transformation
  • A sample example of how to use kunit (the JUnit-like for Kermeta)
  • KmLogo
  • ...

(note: These samples are directly extracted from our cvs, they are uptodate with the current CVS release, these samples are in CVS at: fr.irisa.triskell.kermeta.samples)


Categorization of samples / demos:

Sample \ Use case
Prototyping and simulation
Model transformation
Constraint checking
 FSM
(Finite State Machine)
fsm.demo.loaderFsm.launchfsm.demo.determinization.launch
fsm.demo.minimization.launch
fsm.demo.checkInvariants.launch
fsm.demo.loaderFsm4prepost.launch
 kmLogo
kmlogo.launch
  
 Class2RDBMS (MTIP) class2RDBMS.launch
 
 Arabic2Roman (MTIP)
 arabic2roman.launch
 


There are some other older samples that may still work but that I haven't checked in the latest release. I leave them here until I rewrite the additional explanations

  • MTIP : this page contains material for the Model Transformation In Practice (MTIP) Workshop co-located with the Models 2005 conference
  • kmLogo : This samples demonstrates the use of Kermeta to specify the behavior of a simple language : Logo.