You are on page 1of 8

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/3248044

What models mean

Article  in  IEEE Software · October 2003


DOI: 10.1109/MS.2003.1231147 · Source: IEEE Xplore

CITATIONS READS
236 1,445

1 author:

Ed Seidewitz
Independent
59 PUBLICATIONS   595 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Parameterized relativistic quantum theory View project

Executable UML and Alf Action Language Implementation View project

All content following this page was uploaded by Ed Seidewitz on 26 January 2012.

The user has requested enhancement of the downloaded file.


focus
model-driven development

What Models Mean


Ed Seidewitz, InteliData Technologies

f today’s software developers use models at all, they use them

I mostly as simple sketches of design ideas, often discarding them


once they’ve written the code. This is sufficient for traditional
code-centric development. With a model-driven approach, how-
ever, the models themselves become the primary artifacts in the devel-
opment of software. In this case, a clear, common understanding of the
semantics of our modeling languages is at least as important as a clear,

common understanding of the semantics of tions for key terms that will let us cut through
our programming languages. some of this topic’s more confusing aspects.
There has been, and continues to be, a To understand the intent behind these defi-
great deal of discussion within the software nitions, we must also look at how other disci-
community on modeling and metamodeling plines use models. After all, we should realize
and the relationships between modeling lan- that, with a true model-driven approach to
guages and metamodeling languages. Such re- software development, we are using models in
lationships’ circular nature makes them partic- much the same way that other scientific and
ularly hard to discuss clearly, often hiding engineering disciplines use them. So, I’ve illus-
many important but subtle issues at the foun- trated the definitions with simple (nontechni-
dation of what we do when we model. cal) discussions of modeling in Newtonian
To address these issues as clearly as possi- physics and its application to engineering.
ble, I examine a set of questions whose an- The article’s primary goal is, however, to
swers, taken together, will help us understand discuss the modeling of software. Since the
the fundamental question, “What do models Object Management Group first specified the
mean?” The result is a set of careful defini- Unified Modeling Language in 1997, UML
has become the common modeling language
of the software development community.
(UML’s current version is 1.5;1 the draft spec-
A model’s meaning has two aspects: the model’s relationship to ifications for Version 2.0 are entering the
what’s being modeled and to other models derivable from it. OMG “finalization” process.2,3) Thus, any
Carefully considering both aspects can help us understand how to discussion of software models must employ
use models to reason about the systems we build and how to use UML terms, as I do in this article.
metamodels to specify languages for expressing models. Nevertheless, we begin first not with an in-

26 IEEE SOFTWARE Published by the IEEE Computer Society 0740-7459/03/$17.00 © 2003 IEEE

Authorized licensed use limited to: University of Maryland College Park. Downloaded on September 1, 2009 at 08:29 from IEEE Xplore. Restrictions apply.
quiry into the modeling language but with an software system. In this case, if the as-built
even more basic question. software’s structure or behavior deviates from

What is a model?
the design specification, it’s the software that’s An
invalid (at least relative to this specification).
A model is a set of statements about some interpretation
system under study. Here, statement means How is a model interpreted? of a model
some expression about the SUS that can be An interpretation of a model is a mapping
considered true or false (although no truth of the model’s elements to elements of the SUS
gives a model
value has to necessarily be assigned at any par- such that we can determine the truth value of meaning.
ticular point in time). statements in the model from the SUS, to some
We can use a model to describe an SUS. In level of accuracy. Colloquially, an interpreta-
this case, we consider the model correct if all tion of a model gives the model meaning rela-
its statements are true for the SUS. tive to the SUS. If this mapping is invertible, so
Models are usually descriptive in tradi- that we can map the SUS elements to model el-
tional scientific disciplines. A common kind of ements, then we can also construct a model as
model in Newtonian physics might describe a a representation of an SUS, such that all the
set of physical objects—say the planets in the statements in the representation are true for
solar system, which would be the SUS in this the SUS under the interpretation mapping.
case. Such a model makes statements on the Newtonian physics represents a particle’s
positions, velocities, and masses of the planets position and velocity in 3D space as vectors of
at some point in time as they orbit the sun. three numbers. The interpretation of, say, the
The model is correct if those statements corre- position vector, is that some element of the
spond to observations of the actual planets. universe identified as a particle will be found
We can similarly use a UML model to de- at the x, y, z Cartesian coordinates given by
scribe an existing software system’s structure the vector’s three numbers, relative to some
and operation. Suppose that the SUS is an ob- origin point. Such an interpretation is a com-
ject-oriented software system. We could use a mon, generally accepted convention among
UML class model to make statements about scientists and engineers who use Newtonian
the system’s classes and how they’re related. models (although it is not the only conven-
Additional models could make statements on tion—you could instead use r, θ, φ polar co-
how we expect instances of those classes to in- ordinates, for example).
teract, resulting in state changes over some pe- The interpretation of, say, a UML class
riod. These models would be correct if the ac- model is not as conventionally fixed as in the
tual system’s structure and behavior are case of Newtonian models. Instead, the inter-
consistent with those described in the models. pretation might be given by an accepted com-
Alternatively, we can use a model as a spec- munity profile for using UML, or it might be
ification for an SUS or a class of SUS. In this simply the consequence of (perhaps implicit)
case, we consider a specific SUS valid relative local design conventions. For example, a
to this specification if no statement in the UML profile for Java might interpret a UML
model is false for the SUS. class model as specifying that there are Java
Models usually serve as specifications in classes corresponding to the UML classes and
traditional engineering disciplines. For exam- that references between instances of those
ple, the physical objects in a Newtonian model Java classes implement associations in the
could be spacecraft rather than planets. In this class model. On the other hand, a UML pro-
case, the model might specify beforehand file for business modeling would have a very
what trajectories the spacecraft should take, different interpretation of a class model, in
rather than describe their trajectories after the terms of business entities such as workers and
fact. If the spacecraft deviate from the in- resources.
tended trajectories, the spacecrafts’ design and
operation, not the model, are likely invalid. How is a model used?
When we construct software, we also gen- A theory is a way to deduce new statements
erally use models as specifications. So, the about an SUS from the statements already in
same UML models we used descriptively might some model of the SUS. We can consider this
also serve as a design specification for the OO as a way to extend the original model or as a

September/October 2003 IEEE SOFTWARE 27

Authorized licensed use limited to: University of Maryland College Park. Downloaded on September 1, 2009 at 08:29 from IEEE Xplore. Restrictions apply.
way to determine whether the model conforms How is a model expressed?
to the theory. In the latter case, any statements A modeling language lets us express the
Given a model deduced from some subset of the model must statements in models of some class of SUS.
be consistent with any other statements in the Because computer science has traditionally
that conforms model. Two statements in a model are consis- focused so much on languages, the concept of
to a theory, tent if they can both be true for the SUS (that a modeling language sometimes receives more
is, the truth of one statement does not neces- prominence than the concept of a model itself.
we can make sarily imply the falsity of the other). This is not usually so in other scientific and
deductions. Given a model that conforms to a theory, engineering disciplines. Nevertheless, the lan-
we can use an interpretation of the model to guages used for modeling in those disciplines
make deductions about an SUS by making de- are just as important as the languages used in
ductions within the model using the theory. If software modeling.
we’re modeling descriptively, we consider a In Newtonian physics, vector calculus is the
theory correct if deductions made about the primary modeling language. Although you don’t
SUS using the theory correspond to what is ac- find books on “Newton’s Modeling Language,”
tually observed of the SUS (to some level of ac- you can certainly find textbooks on vector cal-
curacy). On the other hand, for a specification culus, even ones targeted at practicing scientists
model, we assume that the theory is correct, so and engineers rather than mathematicians. In-
that all statements deducible from the specifi- deed, Newton more or less had to invent differ-
cation also effectively become part of the spec- ential calculus to first present his theory.
ification. That is, not only can no statement in For software modeling, UML has become
the specification model itself be false for a the de facto modeling language. In fact, the
valid SUS, but also no statements deducible class of SUS covered by UML has grown be-
from the specification can be false. yond just software systems. UML now covers
For example, given the positions, velocities, any SUS for which it’s useful to make state-
and masses of two particles at a particular ments about the data maintained or the be-
point in time, we can use Newton’s theory of havior the system exhibits relative to its envi-
gravity to deduce the particles’ trajectories ronment—including such things as businesses
over time under the influence of their mutual and even hardware.
gravitational attraction. Alternatively, given a
model of the two particles’ trajectories, we can What is a metamodel?
determine whether the trajectories are consis- A metamodel is a specification model for a
tent with the Newtonian theory of gravity. class of SUS where each SUS in the class is it-
These models predict how actual particles will self a valid model expressed in a certain mod-
move. Newtonian theory is correct up to the eling language. That is, a metamodel makes
level of accuracy at which relativistic effects statements about what can be expressed in the
become significant. valid models of a certain modeling language.
Similarly, given a UML class model of an Computer science’s language focus leads to
OO system and the system’s initial state, the the concept of a metamodel being much more
“theory of UML class modeling,” such as it is prominent in software modeling than in other
given by UML semantics, lets us deduce how modeling disciplines. It does, however, appear
instances of those classes will interact and in other disciplines, implicitly or explicitly (al-
how their states will evolve under a given set though the term metalanguage is more com-
of external stimuli. Also given a UML interac- mon than metamodel in, say, mathematical
tion model for the system, such a theory lets us logic). For example, mathematics provides the
deduce whether this model is consistent with metamodel for vector calculus, and hence for
the class model. We could use these models to Newtonian physics, usually as expressed in
predict the operation of the software system various mathematical textbooks.
(objects as instances of classes). For descrip- The metamodel concept for software mod-
tive models, UML semantics are correct to the eling is also particularly important because it
extent that, for example, hardware limitations forms the basis for the UML definition. The
and failures can be ignored. For specification UML specification document is indeed a meta-
models, the software system is valid if it doesn’t model for UML. That is, it includes a set of
violate any prediction. statements that must not be false for any valid

28 IEEE SOFTWARE h t t p : / / c o m p u t e r. o r g / s o f t w a r e

Authorized licensed use limited to: University of Maryland College Park. Downloaded on September 1, 2009 at 08:29 from IEEE Xplore. Restrictions apply.
UML model. (This metamodel, in its entirety, language’s metamodel. Because a metamodel
includes all the concrete graphical notation, is a specification, a valid model in the model-
abstract syntax, and semantics for UML.) ing language must not violate any statement Given its
deducible using the theory from the explicit
How is a metamodel interpreted? metamodel statements. metamodel
Because a metamodel is a model of a mod- One way to look at this is to consider the representation,
eling language, an interpretation of a meta- metamodel’s statements as postulates about
model is a mapping of the metamodel’s ele- the modeling language. Then, given the meta-
we can
ments to the modeling language’s elements, model representation of a model, we can de- determine
such that we can determine the truth value of
statements in the metamodel for any model
termine, using the theory, whether the model’s
representation is consistent with the meta-
whether a
expressed in the modeling language. Because a model (in the sense defined in the earlier dis- model is valid.
metamodel is a specification, a model in the cussion of theory). If it’s consistent, the model
modeling language is valid only if none of is valid; otherwise, the model isn’t.
these statements are false. For example, mathematical theories are rig-
If the interpretation mapping for a meta- orous systems for making deductions about
model is invertible, we can also uniquely map mathematical statements. In formal mathe-
elements of the modeling language back to el- matics, the deduction system is actually more
ements of the metamodeling language. In this important than any meaning the statements
case, given any model, we can invert the inter- might have.
pretation mapping to create a metamodel rep- In the UML metamodel, the abstract syntax
resentation of the model—that is, a set of true constrains the allowable structure of and rela-
statements about the model in the metamodel- tionships between model elements represented
ing language. as instances of metaclasses. This is the theory
To continue the example of mathematics as of the syntactic metamodel. If the instances in
the metamodel for vector calculus, textbook the metamodel representation of a UML
definitions provide the mapping of general model meet these constraints, the UML model
mathematical concepts to the elements of vec- is well formed; otherwise it isn’t.
tor calculus. A statement in vector calculus is It’s common mental shorthand to identify a
valid if it is well formed relative to these defi- UML model element directly with its abstract-
nitions. (Interestingly enough, the more formal syntax metamodel representation (for example,
these definitions, the less meaning they actually the class X with its representation as an instance
impart—indeed, the term formal indicates the of the metaclass Class) and to loosely refer to
importance of form over meaning.) the model element as being directly “an instance
The abstract syntax metamodel for UML is of” the metaclass (for example, class X “is an in-
basically a data model of how to store or in- stance of” the metaclass Class). However,
terchange data on a UML model’s syntactic strictly speaking, the concept of “instance of”
structure. We interpret this metamodel by has meaning only within the theory of the meta-
mapping instances of the metaclasses in the modeling language, not between a metamodel-
metamodel (where both the metaclasses and ing-language element (the metaclass Class) and
their instances are expressed in the metamod- a modeling-language element (the class X).
eling language) to the syntactic elements of the
UML graphical notation (that is, elements of How is a metamodel expressed?
the modeling language). This is an invertible Because a metamodel is a model, we ex-
mapping, so that we can also map syntactic el- press it in some modeling language. A single
ements of the UML graphical notation back to modeling language might have more than one
their representations as instances of meta- metamodel, with each expressed in a different
classes (which is indeed how the mapping is modeling language.
usually specified). Of particular interest for our purposes is
when a modeling language’s metamodel uses
How is a metamodel used? that same modeling language. That is, the
A theory of a metamodel is a way to deduce statements in the metamodel are expressed in
new statements about a modeling language the same language the metamodel is describ-
from the statements already in the modeling ing. We call this a reflexive metamodel.

September/October 2003 IEEE SOFTWARE 29

Authorized licensed use limited to: University of Maryland College Park. Downloaded on September 1, 2009 at 08:29 from IEEE Xplore. Restrictions apply.
A minimal reflexive metamodel uses the Layer M3 is a specification of the modeling
minimum number of elements of the modeling language used to express metamodels in M2. In
Interpretation language (for the purposes of that metamodel). OMG, this is always the MOF metamodeling
That is, every statement about the modeling language. This metamodeling language is reflex-
crosses language that must be stated in the metamodel ively specified, so no higher layers are needed.
metalayers; (for its purpose) can be expressed using this In terms of the OMG metamodeling layers,
minimal set of modeling elements. But, if any interpretation crosses metalayers. For exam-
a theory element were removed from the set, some es- ple, the interpretation mapping for UML maps
resides in sential statements couldn’t be expressed. from the model elements, which are in M1, to
a single As Kurt Gödel showed, we can use state-
ments of number theory to make statements
the SUS elements, which are in M0. Similarly,
there are interpretation mappings from meta-
metalayer. about number theory itself (for example, “This model elements in M2 to model elements in
proof is false”), given an appropriate encoding M1 and from meta-metamodel elements in
of number-theoretic statements as numbers.4 M3 to metamodel elements in M2.
This allows number theory to express a reflex- On the other hand, a theory resides in a sin-
ive metamodel for itself. Because, in principle, gle metalayer. For example, a theory of UML
we can reduce all mathematical statements to allows some models to be deduced from other
set theory, and mathematical statements can models (for example, instance models from
themselves be expressed using mathematics, set class models), entirely in M1. Similarly, a the-
theory (in principle) provides a minimal reflex- ory of the UML abstract syntax allows a UML
ive metamodel for all of mathematics. model’s validity to be determined entirely in
In a similar vein, we can use UML’s object- M2, after the model is mapped to its meta-
modeling features to make statements about model representation.
its abstract syntax, given an appropriate rep-
resentation of UML’s surface notation as ob- How is a reflexive metamodel
ject structures. This abstract-syntax represen- interpreted?
tation is, essentially, the abstract parse tree for Because a reflexive metamodel is expressed
any concrete surface notation. The abstract in the same modeling language it describes, its
syntax’s metamodel elements are then classes, interpretation provides a mapping of the model-
and the interpretation mapping identifies ing language onto itself. Generally, this mapping
model elements with instances of those classes. will be from the entire modeling language to a
We can express the entire UML abstract syn- subset. We can then iterate this mapping, each
tax using a minimal subset of UML’s static- time producing a smaller subset, until we reach
structure modeling constructs (for UML 1.5, the minimal reflexive metamodel that maps
this subset includes classes, packages, associa- completely onto itself rather than a subset.
tions, generalizations, and dependencies). An interpretation of a minimal reflexive
Other metamodeling languages used in the metamodel maps the metamodel onto itself.
UML specification are the Object Constraint This means that any statement in the minimal
Language and English. reflexive metamodel can be represented in
OMG has defined metamodels for lan- terms of elements of the minimal reflexive
guages other than UML, such as its Common metamodel. However, the interpretation of
Warehouse Metamodel,5 used for modeling this representation is itself expressed reflex-
data warehouses. The common basis for all ively as a mapping to yet another representa-
OMG metamodels is the OMG Meta-Object tion in terms of the minimal reflexive meta-
Facility. As the framework used for defining model. This circularity means that, for a
specific modeling languages, the MOF spec- minimal reflexive metamodel, the interpreta-
ification adopts a four-layer metamodeling tion mapping really provides no useful expres-
architecture:6 sion of the metamodel’s meaning.
The problem here is that, even though the
■ M0—What is to be modeled interpretation mapping maps the set of model-
■ M1—Models (for example, a UML model) ing elements in a minimal reflexive metamodel
■ M2—Metamodels (for example, an abstract- into that same set, it does not map any given
syntax model in the UML specification) model into itself. Instead, on each iteration of
■ M3—The meta-metamodel the mapping, it generates increasingly compli-

30 IEEE SOFTWARE h t t p : / / c o m p u t e r. o r g / s o f t w a r e

Authorized licensed use limited to: University of Maryland College Park. Downloaded on September 1, 2009 at 08:29 from IEEE Xplore. Restrictions apply.
cated representations of the original model. As the SUS’s observable properties. This lets us test
I noted earlier, the fundamental thing we need that the SUS is correctly built by observing
is a theory that lets us use the metamodel rep- whether it has these properties. To make these Understanding
resentation of a model to determine whether deductions, we need a theory; to relate the de-
the model is well formed. To break the circu- duced properties back to the as-built SUS, we the interplay
larity, however, this theory cannot depend on need to use the interpretation mapping again. between model
any reflexive interpretation mapping of the When we’re metamodeling, the metamodel
metamodel. Instead, it ultimately must be pro- is a specification and the SUS is a modeling
and metamodel,
vided in terms of more basic concepts (per- language. In the case of UML, we gain con- and between
haps via a formal mathematic semantics or an
explicit set of axioms and deduction rules).
ceptual economy by using UML reflexively as
the metamodeling language for its own ab-
theory and
stract syntax. However, this reflexivity tends interpretation,
So, what do models mean? to lead, in many discussions, to a conflation of is crucial.
A model’s meaning has two aspects. The the two aspects of meaning, which should
first is the model’s relationship to the thing be- strictly be understood as distinct, even in re-
ing modeled. This is meaning in the sense of flexive use.
“This class model means that the Java pro- For example, the “instance of” relationship,
gram must contain these classes.” I’ve called which is formally defined only within the the-
this an interpretation of the model. Multiple ory of the UML modeling language, tends to
interpretations of the same model can exist— get identified with the interpretation mapping
for example, you could interpret a certain log- from metaclass instances to UML model ele-
ical class model as the design for either a Java ments. But simply providing the interpretation
program or for a C++ program. mapping (meaning in the first sense) doesn’t
The second aspect is the model’s relationship provide a formal definition of what “instance
to other models derivable from it. This is mean- of” means in the metamodel (meaning in the
ing in the sense of “This class model means that second sense). To provide an appropriate
instances of these classes are related in this grounding for any deductions based on our
way.” I’ve called this a theory of the modeling metamodel, we must understand the meaning
language; this is often called the modeling lan- of “instance of” within the theory of our meta-
guage’s “semantics” (although the definition of modeling language, independently of the inter-
interpretation in this article is closer to how the pretation mapping we happen to use between
term semantics is used in the study of natural the metamodel and modeling elements.
languages). Once again, multiple theories for a This is, admittedly, a somewhat subtle, eso-
single modeling language can exist—for exam- teric point. However, it’s an example of the
ple, one theory might provide the “standard ex- care we must take when discussing our model-
ecution semantics” for UML, while another is ing languages’ underpinnings. Understanding
tailored to mirror Java semantics. the interplay between model and metamodel,
Both these aspects of meaning are impor- and between theory and interpretation, is cru-
tant for the very reasons we do modeling. cial as we create the foundations on which to
If we’re modeling descriptively, we’ll gener- build widespread model-driven development.
ally create a model representation from a given Such concerns are certainly not unique to
SUS. The resulting model’s interpretation is our discipline, as I’ve tried to show. But they
then exactly a description of the SUS. We create are, perhaps, even more important to us than
such a model so that we can analyze the SUS by to other communities, with the peculiar com-
reasoning about the model. To reason about the bination of mathematics, logic, and engineer-
model, we need a theory; to relate the results of ing that provides material for our field. And,
this reasoning back to the SUS, we need to use of course, they remain for us areas of active
the interpretation mapping again. research and inquiry, not yet resolved into
If we’re modeling as a specification, then commonly accepted tenets.
we’ll generally create one or more SUS intended This article has attempted to take another
to meet that specification. The specification’s step toward such a common foundational un-
interpretation determines the constraints on derstanding. For, in the end, models are really
how we may construct a valid SUS. We then just tools, and they mean what we need them
want to be able to deduce from the specification to mean to build successful systems.

September/October 2003 IEEE SOFTWARE 31

Authorized licensed use limited to: University of Maryland College Park. Downloaded on September 1, 2009 at 08:29 from IEEE Xplore. Restrictions apply.
About the Author References
1. OMG Unified Modeling Language Specification, ver.
1.5, OMG document formal/03-03-01, Object Manage-
Ed Seidewitz is the chief architect at InteliData Technologies Corporation, where he’s ment Group, Mar. 2003; www.omg.org/technology/
responsible for the model-driven approach being used to architect and develop the company’s documents/formal/uml.htm.
InteliWorks line of banking software. He first became involved with development of object- 2. Unified Modeling Language: Infrastructure, ver. 2.0,
oriented software systems and methodologies while working at NASA’s Goddard Space Flight OMG document ad/03-03-01, Object Management
Center. He has used UML since the prestandardized 0.9 version and has been heavily involved Group, 2003.
in the OMG process subsequent to UML’s adoption. He has a BS in aeronautics and astronautics 3. Unified Modeling Language: Superstructure, ver. 2.0,
and in computer science and engineering from the Massachusetts Institute of Technology. He’s OMG document ad/03-04-01, Object Management
a member of the ACM. Contact him at InteliData Technologies, 11600 Sunrise Valley Dr., Res- Group, 2003.
ton, VA 20191; eseidewitz@intelidata.com. 4. K. Gödel, On Formally Undecidable Propositions of Prin-
cipia Mathematica and Related Systems, Dover, 1962.
5. Common Warehouse Metamodel (CWM) Specification,
ver. 1.1, OMG document ptc/02-01-07, Object Manage-
ment Group, 4 Feb. 2002; www.omg.org/technology/
Acknowledgments documents/formal/cwm.htm.
I conceived this article while reflecting on UML 2.0 6. Meta Object Facility (MOF) Specification, ver. 1.4,
proposals and ongoing threads on OMG mailing lists. A OMG document formal/02-04-03, Object Management
particular inspiration was the “3C” proposal.7 I greatly Group, Apr. 2002, Section 2.2; www.omg.org/technol-
thank Ed Barkmeyer, Steve Cook, Andy Evans, William ogy/documents/formal/mof.htm.
Frank, Dave Frankel, Steve Mellor, Joaquin Miller, Jim 7. OMG Unified Modeling Language Specification (re-
Rumbaugh, and Bran Selic for reviewing earlier versions vised submission), 3C: Clear, Clean, Concise, ver.
and participating in lively email discussions of the arti- 2.0.13, OMG document ad/02-09-15, Object Manage-
ment Group, 9 Sept. 2002.
cle’s topics. This enjoyable interaction culminated in the
informal paper “What Do Models Mean?” made avail- 8. E. Seidewitz, “What Do Models Mean?” OMG document
able to the OMG community.8 Steve Mellor suggested I ad/03-03-31, Object Management Group, Mar. 2003.
write a new version of the paper for this special issue. I
thank Steve for his vote of confidence and for working For more information on this or any other computing topic, please visit our
with me to adapt the paper to a wider audience. digital library at http://computer.org/publications/dlib.

32 IEEE SOFTWARE h t t p : / / c o m p u t e r. o r g / s o f t w a r e

Authorized
View publication licensed
stats use limited to: University of Maryland College Park. Downloaded on September 1, 2009 at 08:29 from IEEE Xplore. Restrictions apply.

You might also like