using_language.txt 1.6 KB

1234567891011121314151617181920212223242526272829303132
  1. .. _using-a-modelling-language:
  2. Using a Modelling Language
  3. ==========================
  4. Using a modelling language is relatively easy, and requires you to make use of the *MainMenu* toolbar:
  5. .. image:: img/main_toolbar.png
  6. Loading a Formalism Toolbar
  7. ---------------------------
  8. The first step when using a language is to load its associated formalism toolbar by pressing the second button on the *MainMenu* toolbar. You are presented with a file browser. To load the *TrafficLights* example, for example:
  9. .. image:: img/load_trafficlights.png
  10. The toolbar allows you to place instances of classes on the canvas and connect them. For more information, see :ref:`formalism-toolbars`.
  11. Opening a Model
  12. ---------------
  13. To open a model, press the fifth button of the *MainMenu* toolbar. Opening a model replaces the currently opened model, if any. If there are any unsaved changes in the currently opened model, you will receive a warning.
  14. Saving a Model
  15. --------------
  16. When you are done editing, you can save your model by pressing the seventh button on the *MainMenu* toolbar. If this is the first time you save a model, you will be presented with a file browser that allows you to choose a name for your model.
  17. .. note:: Model names need to end with the .model file extension.
  18. Validating a Model
  19. ------------------
  20. To validate whether the structure of your model adheres to all constraints defined by the language, press the third-last button. If no message appears, it means all constraints are satisfied. Otherwise, a message appears detailing the constraint that failed. For example:
  21. .. image:: img/validation_failed.png