Skip to content

Execute a FSM

Emmanuel Chebbi edited this page Feb 8, 2018 · 2 revisions

Table of Contents

1. Instantiate a new model

Create a new model

  1. Launch a new GEMOC with Run > Run Configurations... > Eclipse Application
  2. Create a new project with File > New > New Java Project
  3. Create a new model file with File > New > Other ... > Example EMF Model Creation Wizards > <language-name> Model

Populate the model

  1. Right-click on the model file: Open with > <language-name> Model Editor
  2. Right-click on the model's root: New Child > ...

2. Execute the model

To execute a model, stay on the new Eclipse:

  1. Open Run Configurations: Run > Run Configurations ...
  2. Create a new configuration: Gemoc Sequential eXecutable Model > New
  3. Select the model to execute
  4. Select the Melange language
  5. Select the Main method (the one annotated with @Main)
  6. Select the Main model element path
  7. Validate with Run

3. Execute the model with the Model Animator

To use the Model Animator, the model must be executed with a debug configuration:

  1. Open Run Configurations: Run > Debug Configurations ...
  2. Create a new configuration: Gemoc Sequential eXecutable Model > New
  3. Select the model to execute
  4. Select the Melange language
  5. Check the Break at start checkbox
  6. Select the Main method (the one annotated with @Main)
  7. Select the Main model element path
  8. Validate with Debug

Note; to benefit from the MultiDimensional Trace view, you must open the Engine Addons tab and check Generic MultiDimensional Trace.