graph grammar. In AToM
3
, formalisms and models
are described as graphs. From the specification of
a formalism (i.e., graph), AToM
3
produces a tool to
operate visually (create and edit) models described
in the formalism indicated. With AToM
3
, meta-
modelling becomes easier, since the graphical inter-
face provided to specify any formalism. Using Entity
relationship formalism or UML class diagram, users
can create their own formalism. Besides, depending
on the graph grammar, this tool can transform graphi-
cal model in a specified formalism into another equiv-
alent model expressed in a different formalism such as
textual one (De Lara and Vangheluwe, 2002b) (Raida
El Mansouri and Chaoui, 2008).
This contribution aims at first to obtain a visual
tool to model workflow applications in activity dia-
gram formalism using meta-modelling. And to auto-
mate the transformation of this model into a textual
code, using graph grammar. The graph grammar will
map the model created to form a well structured Event
B machine ready to be proved with B4free. Struc-
tural properties are verified based on graph grammar.
When there is added properties, which are not related
to activities diagrams but to user requirements, the
event B model can be used.
Using this solution, syntactical properties are ver-
ified with AToM
3
and structural and semantics prop-
erties are verified with Event B. This allows to avoid
generated errors, due to syntactical errors, in the re-
sulting Event B model. Then, only structural and se-
mantic properties are considered. Also, the transfor-
mation of activity diagram into Event B preserves the
equivalence between the two models thanks to the use
of graph grammar, compared to our previous works,
where we should to prove the correctness of transfor-
mation rules.
The paper before hands is organized as follows:
in section 2 we present meta-modelling in AToM
3
. In
section 3, we define graph grammar in AToM
3
. Sec-
tion 4 as such highlights how to specify activity di-
agram and generate a visual tool for this formalism.
Section 5 is devoted to propose a graph grammar so
as to generate a textual code and Event B machine
from the model of workflow. In section6, we propose
an algorithm for the detection of structural errors in
workflow applications. In order to validate our ap-
proach, we expose an case study of workflow appli-
cation. Finally , the last section concludes our work.
2 META MODELLING
A meta-model is the process of modelling a syn-
tax and a semantics of a formalism. Thus, a meta-
modelling tool allows a domain experts to build a
meta-model and synthesize a domain specific mod-
elling environment from it. In AToM
3
, the highest
meta-model level is the Entity Relationship model
and UML class diagram. Entity and rel (relation-
ship) are the two component of Entity Relationship
meta-meta-model. To make a meta-model modelled
with one of the two meta-meta-models used in AToM
3
more expressive and to give it some constraints de-
pending on its type, we should add other constraints
to the meta-model (formalism) using constraints lan-
guage. So no syntactical errors will be found in the fu-
ture models. For example, when we model the meta-
model of UML activity diagram, an activity generally
does not have more than one outgoing connection.
This constraint can not be expressed graphically, we
need to encode it in Python language. It is also pos-
sible in AToM
3
to encode a constraint using Object
Constraint Language OCL used in UML.
3 GRAPH GRAMMAR
The grammar of graph is made up of a rules of pro-
duction, each one of them contains a graph on the left
(LHS) and another on the right (RHS). After mapping
a LHS and a sub-graph of our model,when there is
an agreement between these two graphs, the rule can
be applied. As a result, this sub-graph is replaced by
the RHS of the rule. In AToM
3
, the model transfor-
mations are specified through a graph grammars, and
consist on an initial action, a final action and a trans-
formation rules. Each rule consists on a Left Hand
Side (LHS) and a Right Hand Side (RHS) graphs, a
Condition (pre condition), an Action (post condition)
and a Priority properties.
During the execution of a model transformation,
Graph Rewriting Processor (GRP) of AToM
3
iterates
through the list of the rules sorted by their prior-
ity in an ascending order (De Lara and Vangheluwe,
2002b). Then, it tries to apply the current rule to the
model. If the rule makes a match (LHS pattern is
found and conditions are met), it is executed and the
GRP repeats trying each rule again from the begin-
ning of the list. This continues until there are no more
rules that can be applied. And then the GRP notify
that the model transformation is completed.
So a model transformation such as a code gener-
ation, a simulators and a graph reduction which are a
graph grammar based, can be created in AToM
3
. An
important aspect in a model transformation is the au-
tomatic generation of the target model, obtained by
the transformation, thanks to the graph grammar.
USING AToM3 FOR THE VERIFICATION OF WORKFLOW APPLICATIONS
33