User guide

The user guide explains how to install and use the tool for editing and running Diamodl models. It does not provide an explanation of the language (see Diamodl language instead), although some guidance for how to use the constructs are given.

For the latest version(s) and installation instructions, see downloads.

Creating a Diamodl document

A wizard is provided for creating Diamodl documents. Select File→New→Other… and select Examples→Diamodl diagram (filter on “diamodl” to make it appear quickly). The wizard will ask for the location, and the name of the diagram and model files, which together make up the Diamodl document. The diagram file contains the visual information of the model elements, like position and size, and should have the “diamodl_diagram” extension. The model file contains the semantic elements, like the interactor hierarchy, and should have the “diamodl” extension. Both should have the same base name, e.g. example1.diamodl_diagram and example1.diamodl. Upon finishing, the Diamodl document is created and the graphical editor opened.

Editor and views

The graphical editor consists of a toolbar, diagram editing area and a tool palette. The direct manipulation tools in the palette are used for creating and editing model elements, like variables, interactors and gates, computations and connections. Some important features of the elements must be edited using the Properties view. In addition, there is an Outline view, which shows a thumbnail of the diagram and supports panning.

Using Diamodl with Ecore

Support for domain modelling is provided by means of EMF and GMF and their tools for creating Ecore models. The Diamodl editor and runtime automatically looks for an ecore file with the same base name as the diamodl file. E.g. if the diamodl file has the name example1.diamodl the corresponding domain model must be named example1.ecore. EMF provides both a tree-based editor and a graphical editor for Ecore models. The graphical Ecore editor is built upon the same framework (GMF) as the Diamodl editor, and should be easy to use.

Besides editors for Ecore models, EMF also provides support for creating corresponding data files. Before trying to create such a data file, e.g. for providing test data for a user interface modelled with Diamodl, ensure that every class in the Ecore model is directly or indirectly connected to a root class through aggregation associations only. It will not be possible to create instances of classes that are not connected the root class in this way. Once this property of the model is ensured, you create the data file by opening the ecore file with the tree editor, navigating to and selecting the root class and selecting “Create Dynamic Instance…” from the context menu. Make sure the data file has the same base name as the other files, with the xmi extension. As for ecore models, this file will be automatically detected and used by the Diamodl runtime.