Case Study: Imperative Modeling Language
The imperative modeling language (IML) allows to define imperative statements that express calculations. Additionally it supports the definition of variables and the assignment of calculated values to these variables as well as goto statements.
The distinctive feature of this language is its imperative nature as well as its sequential execution model requiring a statement counter which holds the index of the statement to be executed next similarly to a program counter in CPUs.
This exemplary model of the IML DSML (depicted in textual concrete syntax) consists of the three Variablesa, b, and c which are initialized with the values 1, 1, and 10 respectively (lines 1-3). Further, the model consists of two Assignments (line 5, line 7) and one Goto statement (line 6). In the given example the Variable a is incremented by adding the value of the Varaible b (line 5) until a reaches the value 10 (line 6) and then 10 (value of Variable c) is added to a (line 7). Thus, in the end of the execution of this model a has the value 20 and the other variables remain unchanged (b=1, c=10).