Tutorial : Building a DSL using Kermeta

FSM example

François Tanguy, Didier Vojtisek, Zoé Drey, Marie Gouyette

Build date: 3-November-2010

Last modification: $Date:: 2010-05-25 08:39:54#$
19/07/2006

Abstract

This tutorial is part of a serie of tutorials that explain step by step the process explained in the Building DSL main process. In this case, it rely on the classical Finite State Machine example.


Table of Contents

Preface
1. Introduction
2. Installation
2.1. Prerequisites
2.1.1. Required knowledge
2.2. Install FSM project
2.2.1. Install FSM tutorial
2.2.2. Install the tutorial 's solution
3. Define the FSM metamodel
3.1. Fsm metamodel presentation
3.2. Create the fsm meta-model
4. Editor
4.1. Dynamic instances
4.2. Tree view editor
4.2.1. Generate the editor
4.2.2. Use the editor
4.3. Textual editors
4.4. Graphical editors
5. Model manipulation in Kermeta
5.1. Create a new Kermeta file
5.2. Package registry
5.3. Serialisation
5.3.1. Load an EMF model with Kermeta
5.3.2. Modify and save an EMF model with Kermeta
5.3.3. Create a model in Kermeta, and save it as an EMF model
5.3.4. A template for a complete Kermeta program
5.3.5. Load and save for models divided into several resources
6. Check model
7. Design by contract
7.1. Run configurations
7.1.1. An entry point for the program
7.1.2. Execution without parameters
7.1.3. Execution with parameter(s)
7.2. Constraints checking execution sample
7.2.1. Pre condition violation
7.2.2. Post condition violation
8. Behaviour
8.1. Expected behaviour for this tutorial
8.2. Structuration of this behavior with aspects
8.3. Behavior algorithms
8.3.1. Run algorithm
8.3.2. Step algorithm
8.3.3. Fire algorithm
8.4. Run an fsm example of behaviour
9. Model Transformation
10. UI improvements
10.1. Customize the generated EMF editor
10.1.1. Change the editor's icons
10.1.2. Change text presentation
11. Conclusion

List of Figures

2.1. Eclipse window
2.2. Wizard for selection
2.3. View of the example project
3.1. Example of IO/State machines
3.2. FSM metamodel
3.3. A simple fsm metamodel
4.1. Create dynamic instance from an Ecore file
4.2. Example of dynamic instance
4.3. Model Directory Property
4.4. Plugins Generated with EMF
5.1. Wizard to create a new Kermeta file
5.2. New Kermeta file
5.3. Register the meta model into the EMF EPackage Registry
5.4. Kermeta icon
5.5. Reload icon
5.6. Fsm_dyn_sample1.xmi
5.7. Fsm_dyn_sample1.xmi content
5.8. Fsm_scratch_sample view
6.1. Fsm_scratch_sample view
6.2. Invariant error 's trace
7.1. The launcher folder
7.2. Execution of minimization example
7.3. Run configurations
8.1. FSM metamodel with behavior
8.2. Example of behaviour execution
10.1. Import EMF and Topcased FSM Editor deployed plugins
10.2. Customize icons
10.3. FSM icon
10.4. State icon
10.5. Transition icon