Information Technology Reference
In-Depth Information
becomes true, the initial process checks different states of each process and, if
more than one process is in the correct state for receiving the signal, it nondeter-
ministically selects an input to be generated (a signal to be sent via the channel).
The list of possible states and generated inputs for the translated process
T
1are
presented from lines 11 to 15.
5
Implementation of the Transformation
The previous section completed the description of the translation from xUML
to PROMELA, now we show how this translation is implemented. A key as-
pect of our work is the use of model transformation technology to implement
the translation between the different languages. As an underlying basis, model
transformation requires the use of meta-models to provide the basic structure
that models must conform to. In Subsection 5.1 we provide an overview of the
meta-models we are using for both the xUML action language and the PRO-
MELA translation. We describe the translation to PROMELA in Subsection 5.2.
The generation of code from translated PROMELA models is presented in Sub-
section 5.3.
5.1 Meta-Modelling
The meta-model is used to define a structure that models must conform to. By
using Eclipse and associated tools (Papyrus, EMFText and Epsilon), we have
defined our meta-models using the Eclipse Modelling Framework (EMF). Our
meta-models are composed of classes, references and basic attributes, such as
string and integer variables. In particular, we have defined two different meta-
models: one is for representing the xUML action language; another represents
the translated PROMELA model. We do not have to define a meta-model for the
UML files, since we use the UML2 project meta-model [24] found in Eclipse -
also produced as output by the Papyrus tool. UML2 provides an implementation
of the UML OMG meta-model standard in Eclipse.
Fig. 10 shows the meta-model used to represent the xUML action grammar
in the Papyrus tool-set. This is supposed to be a simple model, since we intend
to keep extending it in order to accommodate new actions in the language. As
shown in Fig. 10, all the actions are contained in a body class. Currently, we
have actions for the creation of links (set references), assignments, send messages,
create objects and rules for checking the state of different objects (used in the
change transitions).
In the PROMELA meta-model (Fig. 11) we have defined a model composed
of constants (state and message names from the xUML model), processes (from
class diagrams and associated state machines) and an initial process (
).
Amongst the most important features, note that the processes include transi-
tions, states and references to their super classes (generalization) - much like the
structure of a UML class diagram. Translated processes (objects) are represented
by ProctypeDef 's, contained in the initial process. When translating verification
Init
 
Search WWH ::




Custom Search