3C Clear Clean Concise UML
Previous Contents Next
communityUML 2torial
A time is used to represent some interval of time in the system or, if the modeler wishes, some moment in time.
The particular way that time is handled in a model will depend on the needs of the modeler. In any model that specifies a behavior, there is (at least) an implicit finite collection of times and a partial order on those times.
Q: Why do you want to add to UML 2 a particular way of dealing with time?
A: We don't.
Q: Why do you want to add the idea of time at all?
A: Two reasons. First, time is one of the concepts that is necessary in a modeling language. Second, because it is impossible to model behavior without some notion of time.
Q: OK, but then you must have been lying when you just said you don't want to add a particular way of dealing with time.
A: Yes, we cannot tell a lie: we were lying. UML 2 requires two things:
1) There is at least one time in every model.
2) If a model specifies behavior, it includes at least two times and a primitive concept, before.
Q: What is this primitive concept, before?
A: UML 2 uses a tiny theory of time in order to have a technique to specify changes. This is a theory in which there is a partial order of times, called before. In this order, for any given time, there may be some times that are before that time.
Q: But you said before is a primitive concept; what good is that?
A: UML 2 includes modeling invariants that make the concept, before, useful.
The relation, before, is
a binary relation of times.
The relation, before, of times is:
asymmetric (if t1 is before t2,
then t2 is not before t1),
transitive (if t1 is before t2, and
t2 is before t3, then t1 is before t3) and
irreflexive (t1 is not before t1).
Q: If time is necessary, what good is a model with only one time?
A: Well, gee, we were just trying to introduce as few restrictions as we could, and still feel comfortable. A domain model can be built, using only one time, which captures what is fixed in that domain. Of course, such a model could not specify behavior.
Q: If time is necessary, what good is a model with only on time relationship, before?
A: The 3C style is to start with a very small number of primitive concepts, and to then define the rest of the UML 2 language, exactly. With this one primitive concept, before, the UML 2 infrastructure defines after and concurrent with. The UML 2 identity symbol permits specification that one time is the same as another and that two times are different. These are the basic concepts needed to define concurrent systems.
Any UML 2 model may introduce a preferred theory of time, either explicitly in that model or by using a language extension. See Other theories of time.
Q: UML 1 seemed to get along fine without any concept of time.
A: What happened is this: The lady Time, knowing she was needed, went around and snuck in through the back. For details, see Time in UML 1.
Previous Contents Next RunningExample
The OMG
mark, UML, is a trademark of
Object Management Group, Inc. (OMG).
During development of this web site, please send
comments to Joaquin Miller. mailto:joaquin@acm.org
Copyright © 2000 Financial Systems Architects