Modeling Modeling: Software and Systems Modeling July 2012
Modeling Modeling: Software and Systems Modeling July 2012
net/publication/43406877
Modeling Modeling
CITATIONS READS
27 219
3 authors:
Benoit Baudry
National Institute for Research in Computer Science and Control
284 PUBLICATIONS 4,313 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Pierre-Alain Muller on 23 May 2014.
1. Introduction
Many articles have already been written about modeling, offering definitions at
various levels of abstraction, introducing conceptual frameworks or pragmatic tools,
describing languages or environments, discussing practices and processes. It is
amazing to observe in many calls for papers how modeling is now permeating all
fields of software engineering. It looks like a lot of people are using models, as
Monsieur Jourdain [1] was using prose, without knowing it.
While much has already been written on this topic, there is however neither precise
description about what we do when we model, nor explicit description of the relations
among modeling artifacts. Therefore we propose to focus on the very heart of
modeling, particularly on the relation that we establish to represent something by
something else, when we say that we model. Interestingly, the nature of these
(some)things does not have to be defined for thinking about the relations between
them. We will show how we can focus on the nature of relations, or on the patterns of
relations between these things.
In this paper, we emphasize the major importance of the intentional nature of
modeling and introduce intention as a first-class property of the representation
relation between two things used in a modeling process. In this, we relate to Rabelais’
famous words about scientific knowledge: “science without conscience is the soul’s
perdition” [2]. A similar remark is made more recently in the IT domain, by
Rothenberg [3]: “It is widely recognized that the purpose of a model must be
understood before the model can be discussed”. These quotes emphasize the
paramount importance to distinguish between information contained by models (to be
considered as absolute facts) and the intention of models (to be considered as relative
to the purpose models were made for). This means for instance, that information that
was created with some intention in mind can later be reused for some other intention.
This work is a contribution towards a theory of modeling. Whilst focused on
modeling in software development and model management, the presented material
may apply to models in general, and in other disciplines. We define a canonical set of
relations that represent different intentions when representing a thing with another
thing in a modeling process. This canonical set contains 5 kinds of representation
relations that may be refined with nature (analytical / synthetical) and causality
(correctness / validity). The initial purpose for the definition of these relations and an
associated graphical syntax is to ease and structure reasoning about modeling. In
particular it is essentially meant as a language for exchanging ideas when talking
around a modeling task. Since we would like this language to be mostly used for
communicating and debating about the nature of modeling, it has to be flexible but it
also needs a precise definition. This paper extends our work published in
MODELS’09 [4] with a formal interpretation of the composition laws between
representation relations and a metamodel for the modeling modeling language.
The paper proceeds as follows: after this introduction, section 2 (related works)
summarizes what several authors have said about models, section 3 defines a set of
primitive representation relations based on the analysis of these various points of
views. Section 4 introduces a metamodel for our language and section 5 discusses
possible uses of this metamodel. Section 6 illustrates the use of the notation via
several examples excerpted from the software engineering field. Section 7 draws
some final conclusions and outlines future works.
2. Related works
Much has already been written on modeling. In this section we will examine
related works, and start to classify what authors have said about models. The
following table contains a summary of model definitions, even if Jochen Ludewig
states in [5] that “nobody can just define what a model is, and expect that other people
will accept this definition; endless discussions have proven that there is no consistent
common understanding of models”.
Features of models
Figure 1: X is a representation of Y
Intention
1
http://www.cse.buffalo.edu/~rapaport/intensional.html
or the mental purpose a modeler wants to achieve when building a representation of a
thing. On the other hand, modeling in intension (with an ‘s’) aims at capturing the set
of properties that are shared by all elements contained in a representation of a thing.
For example, in set theory, a set is defined in intension if it is defined as the properties
satisfied by all elements in the set. This can be opposed to an extensional definition of
the set, which consists in enumerating all elements in the set.
As already said earlier, the “category theory kind” of thinking that we take in this
paper does not require a description of the internals of the modeling artifacts. Hence,
it is enough to say that artifacts have an intention. The intentional flavor of models
has also been used by Kuehne [25] in his description of metamodeling and by Gasevic
et al. in their extension of Favre's megamodel [26]. The consequences of intentional
thinking applied to modeling can be understood and represented using Venn diagrams
[27]. Table 2 summarizes 5 kinds of µ-relations and associated notation.
All authors agree to say that the power of models stems from the fact they can be
used in place of what they model, at least for some given purposes. This is what
Stachowiak
[24]
calls the pragmatic feature of models. In practice it is convenient to
work with a subset of the intention, and to consider that the μ-relation is a complete
representation of that given subset: hence the μ/I notation below, which means that X
is a representation of Y (for a given subset of the intention). The I sign can then be
used elsewhere in a diagram, to show that a given pattern holds for that subset of the
intention. If intention is constant throughout the diagram, it can be omitted as a
notation shortcut.
X Y X2
X Y
I(Y) X1 Y
As seen earlier, several authors make a distinction between analytical models and
synthetical models (respectively descriptive and specification models in the sense of
Seidewitz [11] and Favre [23]).
An analytical representation relation states that the source expresses something
about the target. We define the analytical representation (represented µα) as:
where Tα is a relation such as X can be derived (or abstracted) from R(Y), with R
being a representation of X (including the Identity). In model-driven parlance Tα
could denote a model transformation. Interestingly, intentions of source and target do
not necessarily have to overlap (notice that for convenience we use here a simple
arrow as a placeholder for the different kinds of representation relations that we have
defined in table 2). In terms of truth (as coined by Favre), truth is held by the target in
case of µα representation.
A synthetical representation relation explains that the target is generated from the
source. We define the synthetical representation (represented μγ) as:
where Tγ is a relation such as Y can be derived (or generated) from R(X), with R
being a representation of X (including the Identity). In model-driven parlance Tγ
could again denote a model transformation. In terms of truth, truth is held by the
source in case of μγ representation. If we talk in terms of intentions, this means that
the intention of Y can be derived (synthesized) from the intention of X, or at least be
driven by the intention of X, as Y is actually the result of Tγ applied to X. Quantifying
the respective contributions of X and Tγ to the synthesis of Y is out of the scope of
this paper.
However, if one wants to represent that the transformation significantly
contributes to the target's intention, it is possible to use an explicit representation such
as in Figure 2. Y is partially generated from X (for the S part of the intention). The
complement (the S' part) is provided by Tγ. This could typically be used to represent
that X is a PIM (Platform Independent Model), and Y a PSM (Platform Specific
Model), with the specifics of the platform being introduced in Y by the Tγ
transformation.
S S’
X Y Tγ | Y = Tγ (X)
Causality
For computer based systems, causality is typically discrete, and making the models
meaningful requires adherence to results of information theory such as Nyquist-
Shannon sampling theorem [28]. Causality can be used to re-visit the definition given
by Wolfgang Hesse, who makes an amalgam between analytical/synthetical
representation, and earlier/later existence, when he proposes to distinguish between
descriptive and prescriptive “depending on whether it is (the model) there earlier or
later than its original” [16]. A way to lift this ambiguity is to separate clearly between
nature (analytical/synthetical) and causality (correctness/validity) of the
representation relation. In Figure 3 the model is a causal analytical representation of
the system. If the system changes, the causal μα relation implies that the model is
updated. In turn, as the model is also a causal μγ representation of the program, the
program is updated to remain an analytical representation of the system.
Transitivity
These two possibilities can be automatically inferred using the Prolog clauses that
model the transitivity rules between different types of representations and the built-in
predicate findall that collects objects resulting from successful computations. Table
5 shows the console output for the previous example. First, the clauses specifying the
transitivity rules are compiled - i.e., consulted - (lines 1 &2), independently of any
specific example. Then, the predicate directrepresentation is used to specify
the concrete example2 (lines 3 & 6). Finally, the findall predicate collects all
possible kinds of representation between x and z in the list R (lines 7 & 8). "
2
Note that this specification could be automatically generated from the model using our
formalism
The µ-relation is mainly characterized by its intention (Intention), which
captures all or part of the intention of the source thing (src). We assume that a thing
is defined without any intention, but it is captured through its representation of
another thing. In other words, one RepresentationOf relation holds the intention of
the src with respect to the tgt (in the metamodel, src and tgt are the two roles that
a Thing can play in a RepresentationOf). This appears in the metamodel as a
represent containment reference between Thing and RepresentationOf,
whereas the representedBy reference is not a container because the target thing is
independent of the representation. Also, we allow the possibility to define a thing
without any representation of another thing (and thus unintentionally) but only to
consider its internal structure (information), as a black box in our formalism.
We also assume in our formalism a black box definition of the intention of each
representation between things (except an informal description using body). Thus, no
consideration can be made on the content of intentions, and the link with the
information of a thing (i.e., its internal structure). However, in the context of one
representation, the kind attribute allows to characterize the perimeter of the intention
of the source thing (src) compared to the intention of the target thing (tgt),
according to the Table 4.
The µ-relation (representationOf) is also characterized by its nature (nature),
used to distinguish analytical and synthetical representations. Finally, the causality of
a µ-relation is captured by the boolean attribute causality of
representationOf. We assume that the formalization of the causal relationship
appears very important (e.g., for process engineering, megamodeling, etc.) but we
consider this concern outside the scope of modeling modeling.
We have built a preliminary version of a graphical editor on the basis of this formal
structural definition of modeling. It is implemented with GMF3 and supports the
concrete syntax introduced in Section 3.
3
The Eclipse Graphical Modeling Framework, cf. http://www.eclipse.org/modeling/gmf/
manipulated by these tools. As an example, let us consider expressing intentional
constraints over aspect weaving within a model repository.
The model in Figure 6 can be seen as the specification of a constraint that the
model repository may enforce. This constraint states that the order of aspect weaving
(respectively weaving either first Aspect1 and then Aspect2 into the Base, or the
inverse, first Aspect2 and next Aspect1) shall not affect the resulting intention. M’1
and M’2 have the same intention, this is stated by the two enclosing same arrows.
M1 and M2 are built as extensions of the Base, by incorporating intention carried
respectively by Aspect1 and Aspect2. The intention of M1 (and M2) includes the
intention of the base: this is represented by a Super representation relation. The
intention of M1 (and M2) does not completely include the intention of Aspect1
(respectively Aspect2); M1 (and so M2) does not have to be an aspect (for instance, it
does not bear weaving information), this is represented by a Sub representation
relation. M1 (and M2) is then further extended by M’1 (respectively M’2). In the end,
M’1 and M’2 do have the same intention. This is stated by a Same representation
relation.
This constraint is not saying that the order in which Aspect1 and Aspect2 are
woven does not matter. It is stating that we are interested in preserving intention
during the weaving process, and that we are especially interested in the fact that the
weaving order will not affect the resulting intention. Thus, this is clearly the
specification of a constraint.
As seen earlier, a tool could check such constraint. For instance, if the content of
intentions is detailed, then it is possible to use the kind of Prolog clauses to check the
preservation of the expected property in a model repository.
Let's examine the already classic example inspired from Magritte's painting. The
picture is a μα representation of the pipe. The picture and the pipe share some
intention. In addition, the real pipe could be used to smoke, while the picture could be
used to show the pipe remotely. This is represented by an extended partial μα
representation. In the following example, the distribution of colors plays the role of an
analytical model, providing information about the picture from which it is generated.
It does not share intention either with the picture or with the pipe (this is modeled by
the dashed arrow); however the information that it contains may be used to have an
idea of the color of the real world pipe.
This is an illustration of the point that we emphasized in the introduction. The
information contained by the picture was made with some intention in mind. The
distribution of colors was produced with a totally different intention, and the dashed
arrow reflects this.
So, the dashed arrow represents the intention of modeling. Should this intention be
different, for instance to reflect the fact that the distribution of colors could be used to
retrieve information about the real world pipe, then the arrow would be different too
(we would use a partial representation).
.jpg Distribution of
Real world object colors
In table 1, the c) case represents the fact that the target (in our case generated)
thing contains the intention of the source thing. This is especially interesting in case
the source was itself in a μα relation with a third thing. Figure 8 shows such situation.
M stands for model, S for system, and R for representation (with the idea that R is a
computerized representation, in other words a program which implements S).
R = The Machine
Model
S = The Problem Domain
I ( Problem Domain)
I ( Machine) I ( Model)
PDM2 PDM1
I(PSM2)
I(PIM) I(PSM1)
Figure 10: Refinement of PIM into PSM, with platform specific information
In host-target development, the same program (here the model) is compiled both for a
host machine (typically a workstation) and a target machine (typically some
embedded computer). This allows early problem detection, even before the final
hardware machine is available. Therefore, the host implementation can be considered
as a partial analytical model of the target implementation (it may also be extended by
host specific concerns).
Model
Target
Host Implementation
Implementation
Figure 11: The host implementation provides information about the target
implementation.
Code skeletons are generated from UML class diagrams (represented by the μγ).
Then, developers extend the skeletons by hand. If developers change the structure of
the final program (and therefore also the structure of the skeletons which get updated
at the same time as they live in the same file), then the class diagram has to be
changed accordingly. The UML class diagram and a Java skeleton are two different
models of a thing that share the same intention: they are both written in order to
represent, analyze and understand the structure of the thing. We model this with a
causal μα relation between class diagrams and Java skeletons. The causal nature of the
relation implies that the model is always up-to-date.
Model-based testing is performed by generating test cases that can be used to test
the program. As represented in Figure 13, the model and the program are developed
on one side while the test cases are developed separately. Then, testing consists in
checking the consistency between these two views on the system. When an
inconsistency is detected, an error has been found.
The test model is a partial representation of the system, with an additional intention
of testing (looking for errors) that is not present in the system. The test model is also a
partial representation of the model that shares intentions with the model (the concepts
manipulated by these representations are the same), but again the test model has this
additional test intention. Symmetrically, the model is a representation of the system.
The model is then used to generate parts of the program.
When the test model is rich enough, test cases can be automatically synthesized
from this model, according to a test adequacy criterion. Thus there exists a μγ relation
between these things. This particular relation also implies that the μα relation between
the test model and the system is propagated to the test cases that are thus also
representations of the system.
The last interesting relationship that appears on the figure is that test cases are
representations of the program since they can provide information to analyze the
presence of errors in the program. However, these two things do not share any
intention since test cases aim at detecting errors in the program while the program
aims at providing functionalities to some user.
Model Program
System
Test Test
Model Cases
Figure 13: Model-based testing
This example is drawn from the tutorial T38 "Introduction to the Eclipse Modeling
Framework" delivered at OOPSLA'06. The tutorial includes generating a working
graphical editor to create and manipulate instances of a UML model. The editor is
made of three generated Java projects (respectively Model, Edit, and Editor). The
process starts with an XML file that contains a schema, which represents a purchase
order system. The various modeling artifacts are represented in Figure 14.
The XML schema (.xsd file) is a μα representation of the system (wrt. a given
intention I). The schema is used to generate an EMF model (.ecore file). The model
and the schema share the same intention I, as shown by μα/I relations. The model is
then used to generate a generation model (.genmodel), which is also in a μα relation
with the system. The .genmodel contains additional information (wrt. the model) to
drive the code generation process; therefore it is the target of a partial μγ relation.
Three Java projects are generated from the generation model: model, edit, and editor.
Edit.java is a Java projection of the model, thus it is a μα/I representation of the
system as well. Edit.java contains general editing mechanisms (not dependent on the
graphical user interface) and uses the java projection of the model (represented with
another μα relation). Finally, Editor.java provides end-user editing facilities to
visualize models, using a tree-based explorator.
Purchase
Order System
Model.java
.genmodel Edit.java
.xsd .ecore
Editor.java
This paper is entitled “modeling modeling modelling”. This is to reflect the fact
that the presented work is about building a formal model (F in the picture) of a
language (L in the picture), which in turn is a representation for a set of models of
systems (M and S in the picture). This journal paper (modelling modeling modeling)
extends the conference paper (modeling modeling) by a third level of modelling.
Hence, this third modeling is the contribution of this paper.
Modeling
7. Conclusion
This work analyzes various definitions of models, as found in the related works,
and proposes a modeling language which can be used as a foundation to represent the
various representation relations between models, metamodels and languages.
Our language focuses on representation relations between modeling artifacts,
without actually trying to understand the nature of these artifacts. Ignoring the details
of their internal structure appears to be very effective because it magnifies the fact
that modeling is a matter of relations and roles, and not intrinsic to the artifacts.
We have identified 5 kinds of representation relation (based on their intention), two
natures (analytical and synthetical), and taken causal dependencies and transitivity
into account. We have also introduced a formal definition of the domain of modeling
modeling as well as precise semantics for relations between things that are
manipulated when modeling. We have illustrated our approach with several simple
examples, drawn from the software engineering domain.
From a practical point of view, we hope that this step toward a better
understanding of representation relations will serve as a basis for intention-aware
metamodeling tools, in the same way as relational algebra triggered the development
of efficient databases. One step in that direction would consist in formally capturing
the operational semantics of the modeling modeling language.
Acknowledgements
This paper is the result of numerous informal discussions we have had with so
many people that it is almost impossible to enumerate them all here. We would like to
especially thank a few of them: including Jean-Marie Favre, Thomas Kuehne, Colin
Atkinson, Marc Pantel, Christophe Gaston, and Régis Fleurquin. We would also like
to acknowledge the invaluable comments of anonymous reviewers of an earlier
version of this paper.
8. References
1. Molière, Le Bourgeois gentilhomme. 1607
2. Rabelais, F., Les horribles et épouvantables faits et prouesses du très
renommé Pantagruel Roi des Dipsodes, fils du Grand Géant Gargantua.
1532
3. Rothenberg, J., The nature of modeling, in AI, Simulation and Modeling,
L.E. Widman, K.A. Loparo, and N.R. Nielsen, Editors. 1989, John Wiley &
Sons. p. 75−92.
4. Muller, P.-A., F. Fondement, and B. Baudry. Modeling Modeling. in
Proceedings of MODELS'09. 2009. Denver, CO, USA: p. 2-16.
5. Ludewig, J., Models in software engineering - an introduction. SoSyM,
2003. 2(3): p. 5-14.
6. Bézivin, J. and O. Gerbé, Towards a Precise Definition of the OMG/MDA
Framework, in ASE, Automated Software Engineering. 2001.
7. Brown, A.W., Model driven architecture: Principles and practice. SoSyM,
2004. 3(3): p. 314-327.
8. Jackson, M., Some Basic Tenets of Description. Software and Systems
Modeling, 2002. 1(1): p. 5-9.
9. Kühne, T., Matters of (meta-) modeling. SoSyM, 2006. 5(4).
10. OMG. Model Driven Architecture. 2003 [cited 2006; Available from:
http://www.omg.org/mda/
11. Seidewitz, E., What models means. IEEE Software, 2003. 20(5): p. 26-32.
12. Selic, B., The pragmatics of Model-Driven Development. IEEE Software,
2003. 20(5): p. 19-25.
13. Steinmüller, W., Informationstechnologie und Gesellschaft: Einführung in
dieAngewandte Informatik. 1993, Darmstadt: Wissenschaftliche
Buchgesellschaft.
14. Stachowiak, H., Allgemeine Modelltheorie. 1973: Springer, Wien.
15. Favre, J.-M., Foundations of Model (Driven) (Reverse) Engineering :
Models - Episode I: Stories of The Fidus Papyrus and of The Solarus, in
Dagstuhl Seminar 04101 on "Language Engineering for Model-Driven
Software Development". 2004: Dagsthul, Germany.
16. Hesse, W., More matters on (meta-)modeling: remarks on Kühne's
"matters". SoSyM, 2006. 5(4): p. 387-394.
17. Mellor, S.J., K. Scott, A. Uhl, and D. Weise, MDA Distilled: Principle of
Model Driven Architecture. 2004: Addison Wesley.
18. Fowler, M., K. Scott, and G. Booch, UML distilled. Object Oriented series.
1999: Addison-Wesley.
19. Bézivin, J., In Search of a Basic Principle for Model-Driven Engineering.
Novatica Journal, 2004. Special Issue March-April 2004.
20. Favre, J.-M., Foundations of the Meta-pyramids: Languages and
Metamodels - Episode II, Story of Thotus the Baboon, in Dagstuhl Seminar
04101 on Language Engineering for Model-Driven Software Development.
2004: Dagsthul, Germany.
21. Favre, J.-M. Towards a Megamodel to Model Software Evolution Through
Software Transformation. in Proceedings of Workshop on Software
Evolution through Transformation, SETRA 2004. Rome, Italy: p.
22. Fokkinga, M.M., A Gentle Introduction to Category Theory - The
calculational approach. 1994: University of Twente.
23. Favre, J.-M., Foundations of Model (Driven) (Reverse) Engineering: Models
- Episode I: Stories of The Fidus Papyrus and of The Solarus. 2004,
Dagstuhl Seminar 04101 on "Language Engineering for Model-Driven
Software Development: Dagsthul, Germany.
24. Yu, E. and J. Mylopoulos. Understanding "Why" in Software Process
Modelling, Analysis, and Design. in Proceedings of 16th International
Conference on Software Engineering (ICSE). 1994. Sorrento, Italy: p. 159-
168.
25. Kuehne, T., Matters of (Meta-) Modeling. Software and Systems Modeling,
2006. 5(4): p. 369-385.
26. Gasevic, D., N. Kaviani, and M. Hatala. On Metamodeling in Megamodels.
in Proceedings of MODELS'07. 2007: p. 91-105.
27. Venn, J., On the Diagrammatic and Mechanical Representation of
Propositions and Reasonings. Dublin Philosophical Magazine and Journal of
Science 1880. 9(59): p. 1-18.
28. Shannon, C.E., Communication in the presence of noise. Proc. Institute of
Radio Engineers, 1949. 37(1): p. 10-21.