WebDPF: A Web-based Metamodelling and Model Transformation
Environment
Fazle Rabbi
1,2
, Yngve Lamo
1
, Ingrid Chieh Yu
2
and Lars Michael Kristensen
1
1
Bergen University College, Bergen, Norway
2
University of Oslo, Oslo, Norway
Keywords:
Model Driven Engineering, Metamodelling, Model Transformation, Domain Specific Modelling, Model
Completion.
Abstract:
Metamodelling and model transformation play important roles in model-driven engineering as they can be
used to define domain-specific modelling languages. During the modelling phase, modellers encode domain
knowledge into models which may include both structural and behavioral aspects of a system. The contri-
bution of this paper is a new web-based metamodelling and model transformation tool called WebDPF based
on the Diagram Predicate Framework (DPF). WebDPF supports multilevel diagrammatic metamodelling and
specification of model constraints, and it supports diagrammatic development and analysis of model transfor-
mation systems. We show how the support for model transformation systems in WebDPF can be exploited to
(i) support auto-completion of partial models thereby enhancing modelling efficiency, and (ii) provide execu-
tion semantics for workflow models. Furthermore, we illustrate how WebDPF incorporates a scalable model
navigation facility designed to enable users to inspect and query large models.
1 INTRODUCTION
Software development productivity can be greatly
enhanced by applying Model Driven Engineering
(MDE) (Schmidt, 2006). MDE is considered to be
an effective way of reducing repetitive, error-prone,
and time-consuming tasks through automation, with-
out sacrificing software quality. Although MDE was
introduced to reduce the complexity of system devel-
opment, it adds in many cases accidental complexity
(Whittle et al., 2013). This problem gets worse when
software models become larger. One of the main rea-
son of MDE not being adopted in the software de-
velopment process, as pointed out by many authors,
is inadequate tool support (Tomassetti et al., 2012).
There are reasons to believe that with advanced tool
support, MDE can be successfully applied to model
and develop large-scale software applications.
There exists several MDE tools such as DIA-
GEN (Mazanek et al., 2008), WebGME (Mar
´
oti et al.,
2014), AToMPM (Syriani et al., 2013), Melanie (Ken-
nel, 2012), AGG (Ehrig et al., 2006), eMoflon (An-
jorin et al., 2011) for modelling and development of
domain specific modelling languages (DSML). These
tools include various features which are essential for
developing DSMLs. In this paper, we present Web-
DPF which is a web-based tool inspired by the tools
listed above yet incorporating a distinguished set of
features including support for scalability concerning
the size of models, completion of partial models, and
the construction of reusable components for structural
and behavioral modelling of systems.
WebDPF has been developed using HTML5 and
JavaScript.
Any HTML5 and JavaScript enabled web browser
can be used for metamodelling with WebDPF. Algo-
rithms related to model transformation and analysis in
WebDPF are written in JavaScript and therefore exe-
cutes on the client machine.
The WebDPF metamodelling environment is
based on the Diagram Predicate Framework (DPF)
(Rutle, 2010) which supports multilevel metamod-
elling. Earlier in (Lamo et al., 2012), an Eclipse-
based diagrammatic workbench, DPF-WB has been
presented. The WebDPF is built on the foundation of
the DPF yet incorporating a number of new features
to ease metamodelling.
In WebDPF, one can graphically specifiy con-
straints and model transformation rules. Transforma-
tion rules have been introduced in WebDPF for two
purposes: i) automatic rewriting of partial (incom-
plete) models so that they can be made to conform
Rabbi, F., Lamo, Y., Yu, I. and Kristensen, L.
WebDPF: A Web-based Metamodelling and Model Transformation Environment.
DOI: 10.5220/0005686900870098
In Proceedings of the 4th International Conference on Model-Driven Engineering and Software Development (MODELSWARD 2016), pages 87-98
ISBN: 978-989-758-168-7
Copyright
c
2016 by SCITEPRESS Science and Technology Publications, Lda. All rights reserved
87
to the underlying metamodel; ii) modelling the be-
havior of systems. In the process of software devel-
opment, modellers are often confronted with a variety
of inconsistencies and/or incompleteness in the mod-
els under construction (Mens and Van Der Straeten,
2007). In particular, the modeller will most of the
time be working with a partial model not conform-
ing to the metamodel that defines the modelling lan-
guage being used (Sen et al., 2007), i.e., it is not typed
by and/or not satisfying modelling constraints. One
aspect of using model transformation rules in Web-
DPF is to reduce the modelling effort of the mod-
eller by means of model completion
1
. Therefore, the
model transformation rules that are intended to au-
tomatically complete a partial model are referred to
as completion rules. Another aspect of using model
transformation rules in WebDPF is to model the be-
havior of a system. While designing the behavior of
a transition system, the modeller can take advantage
of reusing rules. Rules that are intended to model the
behavior are referred to as production rules. The tool
exploits the locality of model transformation rules for
termination analysis and provides a foundation that
enables automated tool-support to increase modelling
productivity.
Scalability is a general problem for graphical lan-
guages as graphical models occupy more space than
text. In order to tackle this issue, WebDPF imple-
ments a model navigation feature that allows a de-
signer to search for desired model elements and dis-
play a small fragment of a model in the modelling
editor. This approach provides better visualization
support for the designer to focus on essential parts of
his/her work.
The foundation of the paper is based on category
theory and graph transformation systems (Barr and
Wells, 1995), (Ehrig et al., 2006). The rest of this
paper is organised as follows. Section 2 provides
a description of multilevel metamodelling and back-
ground knowledge on DPF, section 3 provides an in-
troduction to the WebDPF tool. In section 4 we pro-
vide a description of the model navigation facility.
In section 5 we present the underlying diagrammatic
transformation system of WebDPF. In section 6 and
section 7 we provide a detailed description of model
completion and production rules with examples. Sec-
tions 8 and 9 present some related work and conclude
the paper.
1
Model completion is also known as model repair technique
in some literature (Macedo et al., 2015).
2 BACKGROUND ON DPF
Multilevel metamodelling offers a clean, simple and
coherent semantics for metamodelling (Atkinson and
K
¨
uhne, 2001) which is an essential requirement for
the development of domain specific modelling lan-
guages. DPF is a language independent formalism
for defining metamodelling hierarchies. DPF allows
us to construct a metamodelling hierarchy in which a
model at any level can be considered as a metamodel
wrt. the models at the level below it. Models at each
level in a metamodelling hierarchy are specified by a
modelling language at the level above and conform to
the corresponding metamodel.
In the DPF approach, models at any level are for-
malised as diagrammatic specifications which con-
sist of type graphs annotated with diagrammatic con-
straints. To briefly introduce DPF, we consider re-
quirements R1-R5 for an envisioned system in the
healthcare domain:
R1. A Caregiver (e.g., nurse, doctor) must work for
at least one Department (possibly more).
R2. A Ward must be controlled by exactly one De-
partment.
R3. A Caregiver who is involved in a Ward, must work
for its controlling Department.
R4. All Caregivers assigned to a Ward have access to
the patient information who are admitted to the same
Ward.
R5. A Caregiver who works for a Department must
be registered for that Department.
Caregiver
Department
Ward
Patient
empDeps
depEmps
wardDeps
[1.. ]
8
[INV]
(a)
[1.. 1]
Class
Data Type
Attribute
Reference
Typing
(b)
dataAccess
wardEmps
wardPats
[COMP]
[COMP]
Figure 1: a) Metamodel S
0
, b) Model S
1
.
Figure 1 shows a DPF model (specification) S
1
with its metamodel (specification) S
0
developed from
the above requirements. The type graphs in Figure 1
represent the structure of the models; constraints are
added into the structure by predicates. Table 1 lists
the predicates used for constraining the specification
S
1
. Each predicate has a name (p), a shape graph
(arity, α(p)), a visualisation, and a semantic interpre-
tation. In Table 1, we used set theoretic notation to
describe the semantics of the predicates. For example
the intended semantics of [mult(n, m)] is that: f must
have at least n and at most m instances.
MODELSWARD 2016 - 4th International Conference on Model-Driven Engineering and Software Development
88
Table 2 shows how the predicates are constraining the
specification S
1
by means of graph homomorphisms
δ : α(p) S from the shape graph to the specification.
Multiplicity constraints are added into the specifica-
tion by graph homomorphisms from the shape graph
(1
f
2) of [mult(n, m)] predicate to the model ele-
ments (e.g., Caregiver
empDeps
Department) . The
graph homomorphism is indicated by subscripts in
Table 2. The (atomic) constraining constructs which
are available for the users of the modelling language
are provided in the signature Σ
i
. A signature con-
sists of a collection of diagrammatic predicates. R1
is encoded in S
1
by the [mult(1, )] predicate on
the edge empDeps; R2 by the [mult(1, 1)] predicate
on the edge wardDeps; R3 by the [composite] pred-
icate on edges wardEmps, wardDeps and empDeps;
R4 by the [composite] predicate on edges wardEmps,
wardPats and dataAccess; and R5 by the [inverse]
predicate on edges empDeps, depEmps.
Table 1: Predicates of a sample signature Σ
0
.
p α(p) visualisation Semantic Interpretation
[mult(n,m)]
f
1
2
[n..m]
f
X
Y
f must have at least n and at
most m instances. Formally,
x X : n | f (x)| m, with
0 n m and n 1
[inverse]
f
1
2
g
X
Y
f
g
[INV]
For each instance of f there ex-
ists an instance of g or vice
versa. Formally, x X , y Y :
y f (x) iff x g(y)
[composite]
f
1
2
g
h
3
f
g
h
X
Y
Z
[COMP]
For each instance of (g; f ), there
exists an instance of h. Formally,
x X :
S
{ f (y) | y g(x)}
h(x)
Table 2: The set of atomic constraints C
S
1
of S
1
.
(p, δ) α(p) δ(α(p))
([mult(1, )], δ
1
)
Caregiver
Department
empDeps
1
2
f
([mult(1, 1)], δ
2
)
Ward
Department
wardDeps
1
2
f
([inverse],δ
3
)
f
1
2
g
Caregiver
Department
depEmps
empDeps
1
2
f
g
([composite],δ
4
)
f
1
2
g
h
3
Caregiver
Department
empDeps
wardEmps
Ward
wardDeps
1
2
3
f
g
h
([composite],δ
5
)
f
1
2
g
h
3
Caregiver
Patient
dataAccess
wardEmps
Ward
wardPats
1
2
3
f
g
h
In DPF, a modelling language is formalised as a
modelling formalism (Σ
i
, S
i
, Σ
i1
) where i and i 1
represent two adjacent modelling levels. The cor-
responding metamodel of the modelling language is
represented by the specification S
i
which has its con-
straints formulated by predicates from the signature
Σ
i1
.
3 INTRODUCTION TO WEBDPF
The WebDPF editor (see Figure 2) consists of four
resizable windows. The windows are arranged in
a single view which provides the modeller with an
overview of different modelling artefacts. The control
panel on the left allows the user to select metamod-
els from the metamodel stack and also provides op-
tions to perform analysis such as conformance check-
ing and termination analysis of model transforma-
tion (see section. 5). The conformance checking is
used for validating whether a model conforms to its
metamodel and the termination analysis is used for
checking whether the application of transformation
rules are terminating. While designing a model us-
ing the WebDPF model editor, the metamodel viewer
displays the metamodel to help the modeller choose
types for modelling elements. The signature editor is
used to graphically define the arity and visualization
of predicates. An atomic constraint can be defined by
selecting a predicate in the signature editor and bind-
ing the arity of the predicate to the model elements
from the model editor.
The semantics of the predicates are provided in
a fibred manner (Diskin and Wolter, 2008). That is,
the semantics of a predicate is given by the set of its
instances. In WebDPF, the semantic of a predicate is
defined by writing a validation method in JavaScript.
The validation method is used to check if an instance
of a model satisfies its atomic constraints. For each
predicate, the tool produces a JavaScript object from
the given arity. The language designer has to provide
a validation method that will be used by the tool to
determine if a constrained model is conforming to its
metamodel or not.
Instances that violate the constraints are then high-
lighted in the model. In future we will incorporate an
OCL validator for checking constraints. A model that
does not satisfy its constraints is referred to as a par-
tial model. An important observation regarding par-
tial models is that in many situations partial models
can be automatically repaired using model comple-
tion. In section 6 we provide a way to repair partial
models by means of model transformations.
Predicates can be parameterized to support syn-
tactic variation of model constraints. For instance,
the multiplicity predicate [mult(n, m)] has two param-
eters (see Table 1) to indicate the minimum and max-
imum cardinality of the instances of an edge. Two
different variations of a multiplicity predicate have
been used to constraint the model S
1
in Figure 1.
The atomic constraint (mult[1, 1], δ
2
) on the edge
wardDeps specifies that a Ward must be controlled by
exactly one Department (R2); the atomic constraint
WebDPF: A Web-based Metamodelling and Model Transformation Environment
89
Figure 2: The WebDPF editor with a control panel (left), a metamodel viewer (top right), a model editor (bottom right), a
signature editor (top left), and a rule editor (bottom left).
([mult(1, )], δ
1
) on the edge empDeps specifies that
a Caregiver must work for at least one Department
(R1). The main motivation behind using graphical
signatures for constraining models is that they pro-
vide an abstraction to the modeller. Once a signature
is defined by a language designer, the domain experts
do not need to see the implementation giving the se-
mantics of the predicates. Having an understanding
of the intended semantics of the predicates suffices to
use them for modelling.
4 MODEL NAVIGATION AND
QUERY SUPPORT
Support for model navigation and query over mod-
elling elements may come in handy when dealing
with larger graphical models. In our approach, one
can select a meta-model and a model from a meta-
model stack to visualize the model elements in the
WebDPF editor (Figure 2). WebDPF supports a query
format that one can use to filter meta-model and
model elements. Filter criterias can be specified over
meta-model elements as well as model elements.
A query is built from eight tuples (m
1
, m
2
, src
1
, e
1
,
trg
1
, src
2
, e
2
, trg
2
) where
m
1
denotes the meta-model,
m
2
denotes the model,
src
1
denotes a node in m
1
,
e
1
denotes an edge in m
1
with source src
1
,
trg
1
denotes the target of edge e
1
in m
1
,
src
2
denotes a node in m
2
,
e
2
denotes an edge in m
2
with source src
2
,
trg
2
denotes the target of e
2
in m
2
,
If all eight parameters are specified, it means
that the user is looking for nodes src
2
of type src
1
where src
2
has outgoing edges that matches with e
2
of type e
1
and e
2
has a target that matches with
trg
2
of type trg
1
. If any of the parameters from
src
1
, e
1
,trg
1
, src
2
, e
2
,trg
2
are not specified, a wild-
card ‘%’ is assumed for the query.
Figure 3 shows a screenshot of the WebDPF edi-
tor with a model and its instance. The model instance
consist of three patients, two wards, six caregivers,
two departments and the relations among them. It is
evident from the diagram that for large models it is
difficult to accomodate all modelling elements in a
small viewing area. But in most cases, a modeller
is interested in viewing only a small fragment of a
model rather than the entire model. Let us consider
MODELSWARD 2016 - 4th International Conference on Model-Driven Engineering and Software Development
90
Figure 3: A large model and its instance that illustrates filtering.
Figure 4: Query result.
that the modeller wishes to visualize the information
related to the patient ‘Stephen’. The modeller can per-
form a query in WebDPF and can visualize the data
related to the patient ‘Stephen’. Figure 4 shows the
query on the left and the search result on the right in
the WebDPF editor. Search parameters can be speci-
fied by either selecting model elements from the ed-
itor or by typing inside the Search Item text-fields.
Query results are listed in a table where the model
elements can be browsed in the editor. WebDPF pro-
vides the option for exploring and hiding nodes. The
neighbouring nodes at a model element can be made
visible in the editor or it can be made invisible with all
its neighbour nodes. WebDPF also provides the op-
tion of searching for paths between model elements.
The user can specify a source node and a target node,
and investigate if there exists a path. This feature is
useful to encode queries such as “Is there any patient
in the Cardiology department who lives in Bergen”.
5 MODEL TRANSFORMATION
There are various applications of model transforma-
tions such as conversion of model elements and model
fragments from one domain to another, model migra-
tion for meta-model evolutions (Taentzer et al., 2013),
and behavioural modelling of systems (Rutle et al.,
2012). In this article we use model transformations
for representing the dynamic aspect of systems. Web-
DPF extends the DPF approach by attaching model
transformation rules to predicates. The purpose of
this extension is twofold: it aids the software designer
to complete partial models and thereby reduce mod-
elling effort, and it allows a modeller to reuse model
transformation rules and design the behavior of a sys-
tem using WebDPF.
Our diagrammatic model transformation system is
based on graph transformation rules. The rules are
linked to predicates and we use the standard double-
pushout (DPO) approach (Ehrig et al., 2006) for
defining transformation rules. We omit the technical
details of the application of (coupled) transformation
WebDPF: A Web-based Metamodelling and Model Transformation Environment
91
rules in this paper and provide an informal description
instead.
Attached transformation rules for a predicate p, is
given by a set of coupled transformation rules ρ(p)
where the meta-models remain unchanged. A rule
r ρ(p) of a predicate p has a matching pattern
(L), a gluing condition (K), a replacement pattern
(R), and an optional negative application condition,
NAC (n : L N) where L,N, K, R are all typed by the
arity α(p) of the predicate p. The matching pattern
and replacement pattern are also known as left-hand
side and right-hand side of a rule, respectively. Fig-
ure 5 illustrates a rule associated with the [composite]
predicate where the graphs L, N, K, R are all typed by
the arity of the [composite] predicate.
X
Y
Z
g
f
h
[comp]
([composite])
LHS (L)
N
RHS (R)
Typing
x
y
z
:f
:h
:g
x
y
z
:f
:g
x
y
z
:f
:h
:g
x
y
z
:f
:g
Glue (K)
Figure 5: A transformation rule linked to the [composite]
predicate.
Since the rules are not directly linked to a model,
they can be reused by constraining a model with ap-
propriate predicates. A match (δ,m) of a rule is given
by an atomic constraint δ : α(p) S
i1
and an injec-
tive morphism m : L S
i
such that constraint δ and
an injective morphism m together with typing mor-
phisms ι
L
: L α(p) and ι
S
i
: S
i
S
i1
constitute a
commuting square: ι
L
;δ = m; ι
S
i
. This is illustrated
in the following diagram.
Arity α(p) Graph S
i1
of S
i1
=
LHS (L) Graph S
i
of S
i
constraint, δ
in jective mor phism, m
ι
L
ι
S
i
Figure 6 shows the left hand side of a rule attached
to the [composite] predicate and its match is given
by a constraint and an injective morphism. A rule
is applied as long as it satisfies its negative applica-
tion condition (NAC) which is typically expressed by
a graph structure in a graph transformation system.
Negative application conditions are typically used in
graph transformation to prohibit an infinite number of
rule applications. A rule transforms a model (S
i
, ι
S
i
)
to (S
i
, ι
S
i
) if there exists a match (δ, m) where (δ, m)
satisfies the NAC.
WebDPF supports the execution of rules in two
different ways. One can apply the rules interactively
Caregiver
Department
Ward
Patient
empDeps
depEmps
wardDeps
Bryan
Emergency
:wardEmps
:wardDeps
dataAccess
wardEmps
wardPats
John
:wardPats
X
Y
Z
g
f
h
x
y
z
:g
:f
L
[COMP]
S
i
constraint,
injective
morphism, m
([composite])
LHS (L)
Ward10
X
Z
Y
f
g
h
y
:f
:g
x
z
Figure 6: An example match (δ, m) of a rule.
where the user guides the execution order; or automat-
ically considering all possible orderings of rule execu-
tion. If the rules are applied automatically, then it is
important to perform an analysis of the termination of
the transformation system.
WebDPF performs termination analysis based on
principles adapted from layered graph grammars
(Ehrig et al., 2006). In a layered typed graph gram-
mar, transformation rules are distributed across dif-
ferent layers. The transformation rules of a layer
are applied as long as possible before going to the
next layer. WebDPF generalizes the layer conditions
from (Ehrig et al., 2006) allowing deleting and non-
deleting rules to reside in the same layer as long as the
rules are loop-free. Furthermore, it permits a rule to
use newly created edges allowing us to perform tran-
sitive closure operations (Levendovszky et al., 2007).
A loop detection algorithm is implemented in Web-
DPF that overestimates the existance of a loop from a
set of rules. The loop detection algorithm is based on
the following sufficient conditions for loop freeness.
Let R
k
be the set of rules of a layer k. In order to be
loop free, all the rules in R
k
must satisfy the following
conditions:
1. If a rule r
i
R
k
creates an element x of type t then
r
i
must have an element of type t in its NAC,
2. If a rule r
i
R
k
deletes an element of type t then
there is no rule in r
j
R
k
that creates an element
of type t,
Informally, a rule r
i
that creates an element x of
type t, becomes disabled as soon as the element x is
created according to condition (1). Therefore rule r
i
cannot execute in a loop unless a rule r
j
deletes the el-
ement x. Deletion of the element x would enable rule
r
i
. This is however impossible because of condition
(2). So the bottomline is: rules that create and delete
an element x of type t cannot be executed in the same
layer. Note that we are assuming, a finite number of
rules in each layer and that the rules are applied on a
finite input graph. The algorithm in WebDPF guaran-
tees termination if all the rules for each layer satisfies
the above mentioned conditions. WebDPF provides a
warning to the modeller if it detects a potential loop.
MODELSWARD 2016 - 4th International Conference on Model-Driven Engineering and Software Development
92
6 MODEL COMPLETION
A diagrammatic approach to model completion were
proposed in (Rabbi et al., 2015a) where the comple-
tion rules defined in a metamodel are used to com-
plete a partial model. As an example, consider the re-
quirements R1-R5 from section 3. Figure 7(a) shows
a DPF model (specification) S
1
developed from the
above requirements. The metamodel (specification)
of S
1
was shown in Figure 1(a). Figure 7(b) shows
a candidate instance ι : I S of S
1
(also represented
as (I, ι)) where S is the graph of specification S
1
. In
this example, Bryan works at Ward10; Ward10 is con-
trolled by the Emergency department. Even though I
is typed by S, (I, ι) is not a valid instance of S
1
since it
does not satisfy the [composite] and [mult(1, )] con-
straints.
Since Ward10 is controlled by the Emergency de-
partment, Bryan must work at the Emergency depart-
ment. Also, the caregivers are supposed to work for
at least one department which is missing in ι : I S
of S
1
. Figure 8 shows a screenshot of the WebDPF
editor that highlights which part of the model instance
violates the constraint.
In the above example, the partial model (I, ι) can
be automatically repaired by adding missing arcs such
as the missing arc from Bryan to the Emergency de-
partment which is required in order to satisfy the con-
straints and thereby conform to the metamodel S
1
.
WebDPF improves the productivity of the modeller
by providing editing support that either automatically
creates such missing model elements or make sug-
gestions based on completion rules to assist the mod-
eller in completing the model. In many respects, this
idea is similar to code completion features as found
in IDEs. More generally, modelling effort is reduced
by providing editing support for automated rewriting
of models so that they conform to the modelling lan-
guage used.
We augment the above mentioned example with
completion rules at the meta-model level that can be
used as a basis for automatically fixing the inconsis-
tencies of the partial model (I, ι). Table 3 shows com-
pletion rules linked to predicates. The semantics of
completion rules are defined by coupled transforma-
tion rules (Schulz et al., 2011) (Becker, 2008) with
negative application conditions as in Table 3. No-
tice that the matching patterns and negative applica-
tion conditions are represented in the same diagram
in Table 3 to make it more readable. Negative appli-
cation conditions on model elements are represented
by a strike through the corresponding model elements
in the diagram to represent that they must not exist
while matching.
Caregiver
Department
Ward
Patient
empDeps
depEmps
wardDeps
[1.. ]
8
[surj]
Nat
systolic
diastolic
Bryan
Emergency
Ward10
[INV]
:wardEmps
:wardDeps
1
I
(a)
(c)
[1.. 1]
Class
Data Type
Attribute
Reference
2
Typing
(b)
dataAccess
wardEmps
wardPats
[COMP]
[COMP]
Joseph
John
:wardEmps
:wardPats
:systolic
:diastolic
140
90
Figure 7: a) A DPF model S
1
= (S,C
S
1
: Σ
2
), and b) an
instance (I, ι) of S
1
.
Figure 8: An inconsistent instance (I, ι) of S
1
.
By applying the completion rules from Table 3 on
(I, ι) from Figure 8, the partial model is updated to
become a model, (I
, ι) which conforms to its meta-
model.
Once we apply the completion rules for [inverse]
and [composite] on (I, ι), we obtain the instance of
specification S
1
shown in Figure 9. Thick arcs (also
shown with a green color) represent the additional
edges derived from the application of completion
rules.
7 BEHAVIORAL MODELLING
In order to illustrate the general application of trans-
formation systems as supported by WebDPF, we
model the behavior of a system by developing a
multilevel description of a workflow modelling lan-
guage. We use coupled transformation rules with neg-
ative application conditions for developing a diagram-
matic transformation systems in WebDPF. Since the
purpose of these transformation rules are to build a
transformation system, they are referred to as pro-
duction rules.There is no fundamental difference be-
WebDPF: A Web-based Metamodelling and Model Transformation Environment
93
Table 3: Completion predicates and rules of S
1
.
p ρ(p) Interpretation
[inverse]
x
y
:f
:g
X
Y
f
g
[INV]
derive an edge y
:g
x (if
it does not exist) from
the existence of an edge
x
: f
y or vice versa.
x
y
:f
:g
X
Y
f
g
[INV]
[composite]
x
y
:f
:g
z
:h
X
Y
f
g
Z
h
[COMP]
derive an edge x
:h
z (if
it does not exist) from the
existence of edges x
:g
y
and y
: f
z.
Caregiver
Department
Ward
Patient
empDeps
depEmps
wardDeps
[1.. ]
8
Bryan
Emergency
Ward10
[INV]
:wardEmps
:wardDeps
1
I*
(a)
(b)
[1.. 1]
dataAccess
wardEmps
wardPats
[COMP]
[COMP]
Joseph
John
:wardEmps
:wardPats
:empDeps
:depEmps
:empDeps
:depEmps
:dataAccess
:dataAccess
Figure 9: a) A specification S
1
= (S,C
S
1
: Σ
0
) and b) an
instance (I
, ι) of S
1
.
tween production rules and completion rules other
than their purpose. Similar to completion rules, pro-
duction rules are also attach to predicates and there-
fore they can be reused by binding predicate struc-
tures to the model elements. This essentially means
that a modeller can graphically design rules and can
use them as a library of rules. This feature is useful
for building model transformation languages.
Rutle et al. proposed a metamodelling approach
for behavioral modelling in (Rutle et al., 2012) and
developed a workflow modelling langauge named
DERF using coupled model transformation rules. In
this section we generalize the concepts of DERF and
show that domain specific languages for workflow
modelling such as DERF can be constructed using
WebDPF. In general, a workflow or process modelling
language requires different types of routing operators
to control the execution flow among processes. The
state of a workflow is determined by the states of
task instances (i.e., processes) in DERF. Each task in-
stance is annotated with a predicate from [running]
and [disabled] (in short <R>, <D>, resp.) to indi-
cate its state. A task instance annotated with the pred-
icate [running] indicates that the task instance is in
the running state and may transit to the disabled state
(e.g., become annotated with [disabled]) when it is
finished its execution. Table 4 shows a set of selected
routing operators and their production rules (adapted
from (Rutle et al., 2012)) that can be used to construct
a workflow model. The execution flow of a workflow
instance is controlled by the production rules.
Figure 10 shows an overview of a hypertention man-
agement workflow model S
1
with its meta-model S
0
and an instance (I, ι) of S
1
. We have formalized this
workflow from a clinical guide for hypertension man-
agement (Chi, 2006). The workflow model in Fig-
ure 10 is however shows an abstract process model
which requires further enhancement with pre/post
conditions (Rabbi and MacCaull, 2014) (Rabbi et al.,
2015b). All the nodes (and edges) in S
1
are typed
by the ‘Task’ (and the ‘Flow’ respectively) from S
0
.
Routing predicates from Table 4 have been used to
constraint the workflow model S
1
. In the instance I,
we use : X to denote a typing morphism ι : x X.
Initially patients’ blood pressure (BP) is measured
at the ‘:Initial BP Measure’ task which may prompt
the clinical hypertension management procedures. If
the initial BP is found normal, the workflow termi-
nates. Otherwise the clinical procedure (i.e., ‘:Visit1’,
‘:Visit2’, and all other subsequest task instances in
Figure 10) starts to manage patients’ hypertension.
The production rules attached to the [xor split] pred-
icate ensures that when the ‘:Check Eligibility’ task
instance is finished running, either ‘:Visit1’ or ‘:End’
task instance transits to the running state. Patients
with high BP have risk of organ failures and/or other
chronic illness. During the first visit at the doctors of-
fice (‘Visit1’) the BP is measured twice, an initial as-
sessment is done, and an investigation is started with
diagnostic tests. During ‘:Visit2’ BP is measured, di-
agnosis is performed and followup visits are sched-
uled. The workflow executes ‘:Ambulatory blood
pressure monitoring’ (‘:ABPM’) or ‘:Clinical BPM’
(‘:CBPM’) depending on the availability. ‘:ABPM’
and ‘:CBPM’ tasks are rescheduled if required other-
wise the workflow terminates.
MODELSWARD 2016 - 4th International Conference on Model-Driven Engineering and Software Development
94
Table 4: Production rules for workflow modelling.
p Visualization
ρ(p)
LHS RHS
[sequence]
Y
X
f
[seq]
Y
X
f
[seq]
y
x
:f
<R>
<D>
Y
X
f
[seq]
y
x
:f
<D>
<R>
[and split]
Y
X
f
g
Z
[and]
Y
X
f
g
Z
[and]
x
:f
:g
y
z
<R>
<D>
<D>
Y
X
f
g
Z
[and]
x
:f
:g
y
z
<D>
<R>
<R>
[and merge]
X
Y
f
g
Z
[and']
X
Y
f
g
Z
[and']
x
:f
:g
z
y
<R>
<R>
<D>
X
Y
f
g
Z
[and']
x
:f
:g
z
y
<D>
<D>
<R>
[xor split]
Y
X
f
g
Z
[xor]
Y
X
f
g
Z
[xor]
x
:f
:g
y
z
<R>
<D>
<D>
Y
X
f
g
Z
[xor]
x
:f
:g
y
z
<D>
<R>
<D>
Y
X
f
g
Z
[xor]
x
:f
:g
y
z
<R>
<D>
<D>
Y
X
f
g
Z
[xor]
x
:f
:g
y
z
<D>
<D>
<R>
Initial BP
Measure
Check
Eligibility
Visit1 Visit2
End
Check
Availability
CBPM
ABPM
Check for
Reschedule
[xor]
[xor']
[xor]
[xor']
[xor]
[xor']
[seq]
[seq]
:Initial BP
Measure
:Check
Eligibility
:Visit1 :Visit2
:End
:Check
Availability
:CBPM
:ABPM
:Check for
Reschedule
f
g
h
i
j
k
l
m n
q
<R>
<D>
<D> <D>
<D>
<D>
<D>
<D>
<D>
:f
:j
:k
:l
:m
:n
:q
:g
:h
:i
Task
Flow
(a)
(b)
(c)
r
:r
Figure 10: (a) A workflow meta-model S
0
, (b) a workflow
model S
1
, and (c) an instance (I, ι) of S
1
.
The behavior of a DERF workflow is determined
by the set of states reachable from an initial state. The
initial state for the workflow model S
1
is in this sit-
uation s
0
:= (I, ι) which represents the start state of
the system. Other states are reached by applying pro-
duction rules from Table 4. At state s
0
, the production
rule attached to the [sequence] predicate is applicable
and the transition s
0
ρ[sequence]
====== s
1
is given by an appli-
cation of production rule. At state s
1
(see Figure 11),
‘:Initial BP Measure’ is annotated with the predicate
[disabled] and ‘:Check Eligibility’ is annotated with
the predicate [running]. At state s
1
, two production
rules attached to the [xor split] predicate are applica-
ble giving two choices. For each choice we get a dif-
ferent execution path (to s
2
or s
3
) for a transformation
system which is shown in Figure 11.
:Initial BP
Measure
:Check
Eligibility
:Visit1 :Visit2
:End
:Check
Availability
:CBPM
:ABPM
:Check for
Reschedule
<D>
<R>
<D> <D>
<D>
<D>
<D>
<D>
<D>
:f
:j
:k
:l
:m
:n
:q
:g
:h
:i
:Initial BP
Measure
:Check
Eligibility
:Visit1 :V
:End
<D>
<D>
<D>
<R>
:f
:j
:g
:i
:Initial BP
Measure
:Check
Eligibility
:Visit1
:V
:End
<D>
<D>
<R>
<D>
:f
:j
:g
:i
s
1
s
2
s
3
:r
Figure 11: Two different execution paths from state s
1
.
8 RELATED WORK
In this section we compare the features of WebDPF to
related works found in the literature. Table 5 provides
an overview comparing WebDPF features with other
modelling tools.
WebGME is a web and cloud-based scalable meta-
modelling tool (Mar
´
oti et al., 2014) that supports the
development of domain specific modelling languages
(DSML). Online collaboration is the main focus of
the WebGME tool. In WebGME, changes are imme-
diately broadcast to all the client machines and every
modeller sees the same state. WebGME provides a
visualization toolkit that the DSML designer can effi-
ciently use to control the visualization aspects of the
concrete syntax. WebGME supports filtered views
showing only a subset of the elements of the model,
but a query functionality on modelling elements is
missing. AToMPM is another web-based modelling
framework for designing DSMLs, performing model
transformations, manipulating and managing models
(Syriani et al., 2013).
The tool features collaborate development and
share modeling artifacts among users. Even though
WebGME and ATomPM have several advantages over
desktop based (meta)modeling tools they have limita-
tions on defining constraints and transformation rules
in comparison to WebDPF.
Metamodelling in WebDPF is similar to the mod-
elling environment of Melanie (Kennel, 2012) as the
metamodels and models are displayed in a single
view. In the Melanie editor, all metamodels are open
at the same time focusing on the whole ontology at a
time. This perspective works well as long as the mod-
els are small. This approach does not scale to larger
WebDPF: A Web-based Metamodelling and Model Transformation Environment
95
Table 5: Comparison of WebDPF features with other modelling tools.
Tool Multilevel Web-based UI Constraint Model navigation Rule Model Termination
metamodelling language (query facility) Reusability completion analysis
DIAGEN X
WebGME X X OCL
AToMPM X X JavaScript
Melanie X OCL
AGG Graph constraints X
eMoflon X OCL X
DPF-WB X OCL, Java, Alloy
WebDPF X X JavaScript X X X X
models as it becomes difficult to get an overview of
the system. WebDPF overcomes this problem in two
ways: it only shows two levels of metamodels at the
same time instead of the entire metamodel stack, and
it supports filtering over the displayed items via a
model naviagation facility. Although Melanie comes
with an adapter for the ATL transformation language
(Atkinson et al., 2013), it does not provide support for
designing transformation rules graphically. Also, the
Melanie tool is not web-based.
AGG is a visual tool for algebraic graph trans-
formation (Ehrig et al., 2006). The tool can also be
used as a graph transformation engine for Java ap-
plications. Layered graph transformation system can
be developed with AGG and the tool supports vari-
ous analysis techniques, such as critical pair analysis,
consistency checking, and facilitating validation of
graph transformations. eMoflon (Anjorin et al., 2011)
is built on the Eclipse Modelling Framework (EMF),
using Ecore for metamodelling that supports rule-
based unidirectional and bidirectional model trans-
formation. eMoflon is featured with MOF 2.0 com-
pliant code generation and concentrates on bidirec-
tional model transformations with triple graph gram-
mars and their mapping to unidirectional transforma-
tions. WebDPF utilizes many concepts and theories
of AGG and provides a web-based tool for metamod-
elling. Transformation rules are attached to predicates
in WebDPF that gives the modeller opportunity to
reuse them by constraining the predicates inside the
models. The query feature to manage large models
in the WebDPF editor is also unique. AGG, eMoflon
and other model transformation tools such as Henshin
(Arendt et al., 2010) do not have these features.
Mazanek et al. presented an editor generator
framework called DIAGEN that is based on the graph
grammar approach (Mazanek et al., 2008). The
framework is used for graph completion and the tech-
nique has been applied to realize editors for Nassi-
Shneiderman diagrams, flowcharts, and trees. How-
ever, the framework does not support features that
has been presented in this paper such as multilevel
metamodelling, predicate constraints, and behavioral
modelling.
Work similar to our was also presented in (Sen
et al., 2007) where the authors presented a method-
ology to automatically solve partial model comple-
tion problems. They transformed a partial model,
its metamodel, and additional constraints to a con-
straint logic program (CLP). The metamodel specifies
the domain of possible assignments for each and ev-
ery property. This information is being used by the
CLP to complete a partial model object. In our situa-
tion, we are given a model specification with a meta-
model, a set of predicate constraints, a constrainted
partial model instance, and a set of completion rules.
In WebDPF, all these artefacts are diagrammatically
specified. We use completion rules to derive a com-
plete model instance. Another possible application
of our partial model completion is in the evolving
software engineering process. In many cases, soft-
ware models need to migrate because of the evolution
of software requirements and/or modelling languages
(Taentzer et al., 2013). The concept of partial mod-
els is applicable also in this setting if accompanied
by completion rules and would potentially be able to
automate the model migration process.
9 CONCLUSIONS
In this paper we have introduced the WebDPF tool
which is based on a rigorous mathematical founda-
tion in the form of DPF. The main features of Web-
DPF are: a model navigation facility, a JavaScript
editor for writing predicate semantics, partial model
completion, reusability of transformation rules, and
termination analysis. A prototype implementation of
WebDPF may be found from http://dpf.hib.no where
one can graphically design modelling artefacts in a
web browser and apply the transformation rules.
We are currently investigating the metamodelling
approach for modelling distributed systems. We are
developing a prototype of a blood transfusion appli-
cation in collaboration with the local health authority.
The goal of the project is to develop an application for
MODELSWARD 2016 - 4th International Conference on Model-Driven Engineering and Software Development
96
safe blood transfusion. We are modelling the process
flow and developing the data models as well as mod-
elling the interaction between different subsystems.
WebDPF has been used for modelling the system and
simulating the process flow. Initial results have been
published in (Rabbi et al., 2015b) where we provide
different level of abstraction for modelling.
REFERENCES
(2006). Hypertension. Building Healthy Lifestyles.
www.chinookprimarycarenetwork.ab.ca/
extranet/docs/guides/7.pdf.
Anjorin, A., Lauder, M., Patzina, S., and Sch
¨
urr, A. (2011).
eMoflon: Leveraging EMF and Professional CASE
Tools. In 3. Workshop Methodische Entwicklung von
Modellierungswerkzeugen (MEMWe2011).
Arendt, T., Biermann, E., Jurack, S., Krause, C., and
Taentzer, G. (2010). Henshin: Advanced Concepts
and Tools for In-place EMF Model Transformations.
In Proceedings of the 13th International Conference
on Model Driven Engineering Languages and Sys-
tems: Part I, MODELS’10, pages 121–135. Springer-
Verlag, Berlin, Heidelberg.
Atkinson, C., Gerbig, R., and Tunjic, C. (2013). Enhanc-
ing classic transformation languages to support multi-
level modeling. Software & Systems Modeling, pages
1–22.
Atkinson, C. and K
¨
uhne, T. (2001). The essence of multi-
level metamodeling. In Proceedings of the 4th Inter-
national Conference on The Unified Modeling Lan-
guage, Modeling Languages, Concepts, and Tools,
UML’01, pages 19–33. Springer-Verlag.
Barr, M. and Wells, C., editors (1995). Category Theory
for Computing Science, 2nd Ed. Prentice Hall Inter-
national (UK) Ltd., Hertfordshire, UK.
Becker, S. (2008). Coupled model transformations. In Pro-
ceedings of the 7th International Workshop on Soft-
ware and Performance, WOSP ’08, pages 103–114.
Diskin, Z. and Wolter, U. (2008). A diagrammatic logic for
object-oriented visual modeling. Electronic Notes in
Theoretical Computer Science, 203(6):19 41. Pro-
ceedings of the Second Workshop on Applied and
Computational Category Theory (ACCAT 2007).
Ehrig, H., Ehrig, K., Prange, U., and Taentzer, G.
(2006). Fundamentals of Algebraic Graph Transfor-
mation. Monographs in Theoretical Computer Sci-
ence. Springer.
Kennel, B. (2012). A Unified Framework for Multi-Level
Modeling. PhD thesis, University of Mannheim.
Lamo, Y., Wang, X., Mantz, F., MacCaull, W., and Rutle,
A. (2012). DPF Workbench: A diagrammatic multi-
layer domain specific (meta-)modelling environment.
In Lee, R., editor, Computer and Information Science
2012, volume 429 of Studies in Computational Intel-
ligence, pages 37–52. Springer.
Levendovszky, T., Prange, U., and Ehrig, H. (2007). Ter-
mination criteria for dpo transformations with injec-
tive matches. Electr. Notes Theor. Comput. Sci.,
175(4):87–100.
Macedo, N., Tiago, J., and Cunha, A. (2015). A feature-
based classification of model repair approaches.
CoRR, abs/1504.03947.
Mar
´
oti, M., Kecsk
´
es, T., Keresk
´
enyi, R., Broll, B.,
V
¨
olgyesi, P., Jur
´
acz, L., Levendovszky, T., and
L
´
edeczi,
´
A. (2014). Next generation (meta)modeling:
Web- and cloud-based collaborative tool infrastruc-
ture. In Proceedings of the 8th Workshop on Multi-
Paradigm Modeling, MPM@MODELS 2014, pages
41–60.
Mazanek, S., Maier, S., and Minas, M. (2008). Auto-
completion for diagram editors based on graph gram-
mars. In Visual Languages and Human-Centric Com-
puting, 2008. VL/HCC 2008. IEEE Symposium on,
pages 242–245.
Mens, T. and Van Der Straeten, R. (2007). Incremental res-
olution of model inconsistencies. In Recent Trends in
Algebraic Development Techniques, volume 4409 of
LNCS, pages 111–126. Springer.
Rabbi, F., Lamo, Y., Yu, I., and Kristensen, L. (2015a).
A diagrammatic approach to model completion. In
Proceedings of the 4th Workshop on the Analysis of
Model Transformations co-located with the 18th In-
ternational Conference on Model Driven Engineer-
ing Languages and Systems (MODELS 2015), volume
1500 of CEUR Workshop Proceedings, pages 56–65.
CEUR-WS.org.
Rabbi, F., Lamo, Y., Yu, I. C., and Kristensen, L. M.
(2015b). Towards a Multi Metamodelling Approach
for Developing Distributed Healthcare Applications. .
NIK: Norsk Informatikkonferanse, ISSN: 1892-0721.
Rabbi, F. and MacCaull, W. (2014). User-Friendly UIs for
the Execution of Clinical Practice Guidelines. In 2014
IEEE 27th International Symposium on Computer-
Based Medical Systems, 2014, pages 489–490. IEEE
Computer Society.
Rutle, A. (2010). Diagram Predicate Framework: A For-
mal Approach to MDE. PhD thesis, Department of
Informatics, University of Bergen, Norway.
Rutle, A., MacCaull, W., Wang, H., and Lamo, Y. (2012).
A metamodelling approach to behavioural modelling.
In Proceedings of the Fourth Workshop on Behaviour
Modelling - Foundations and Applications, BM-FA
’12, pages 5:1–5:10. ACM.
Schmidt, D. C. (2006). Guest editor’s introduction: Model-
driven engineering. 39(2):25–31.
Schulz, C., L
¨
owe, M., and K
¨
onig, H. (2011). A cate-
gorical framework for the transformation of object-
oriented systems: Models and data. J. Symb. Comput.,
46(3):316–337.
Sen, S., Baudry, B., and Precup, D. (2007). Partial model
completion in model driven engineering using con-
straint logic programming. In INAP’07, Germany.
Syriani, E., Vangheluwe, H., Mannadiar, R., Hansen, C.,
Mierlo, S. V., and Ergin, H. (2013). AToMPM: A web-
based modeling environment. In Joint Proceedings
of MODELS’13 Invited Talks, Demonstration Session,
WebDPF: A Web-based Metamodelling and Model Transformation Environment
97
Poster Session, and ACM Student Research Competi-
tion, volume 1115, pages 21–25. CEUR-WS.org.
Taentzer, G., Mantz, F., Arendt, T., and Lamo, Y. (2013).
Customizable model migration schemes for meta-
model evolutions with multiplicity changes. In 16th
International Conference, MODELS 2013, volume
8107 of LNCS, pages 254–270. Springer.
Tomassetti, F., Torchiano, M., Tiso, A., Ricca, F., and Reg-
gio, G. (2012). Maturity of software modelling and
model driven engineering: A survey in the italian in-
dustry. In 16th International Conference on Evalu-
ation & Assessment in Software Engineering, EASE
2012, pages 91–100. IET - The Institute of Engineer-
ing and Technology / IEEE Xplore.
Whittle, J., Hutchinson, J., Rouncefield, M., Burden, H.,
and Heldal, R. (2013). Industrial adoption of model-
driven engineering: Are the tools really the prob-
lem? In 16th International Conference, MODELS
2013, volume 8107 of LNCS, pages 1–17. Springer.
MODELSWARD 2016 - 4th International Conference on Model-Driven Engineering and Software Development
98