A UML Example: A Patient Information Management System
The use of mathematical and physical models in object
C++ limitations on object models
Ways of organizing
Over time we have evolved a number of ways of organizing our knowledge
of the world.
- These organizing principles enable us to cope with large complex environments.
- It seems that the most fundamental aspect of organization is the object
(so fundamental we are not often aware that it is our invention).
- The object is a piece of the world which we consider isolatable, so
that its interaction with other pieces is small.
- This seemingly obvious concept has been shown to be fraught with logical
inconsistencies by Leibniz (1646-1716) in this theory of monads.
A simple example relevent to C++ programs is that it is difficult if not
impossible to consistently form transitive closure on pointers.
- There are a number of general relationships for organizing concepts.
- Abstraction - removing detail
- Differentiation - types and subtypes
- Composition - part/whole relations
- Causation - an object is created or mutated
due to the action of another object.
- Temporal Sequence - historical ordering
- These principles allow us to segregate and group entities and actions.
- Groupings are often hierarchical in nature where the ordering on the
hierarchy is abstraction.
- Recent developments in system design (e.g., UML, OMT, etc.) are based
on making these organizing principles explicit.
- "In general any software implementation must take into account
the organization, inter-relationships, and layout of structures in order
to obtain the complex macroscopic behavior of the system being created"
[Pierre-Alain Muller Instant UML 1997]
as a source of abstraction
- Long before the existence of computers or computer languages, we had
developed powerful mechanisms of abstraction in our creation of mathematics
and mathematical reasoning.
- Abstraction is the process of comparing two concepts and identifying
those attributes or characteristics which they have in common.
- The most sucessful form of mathematical abstraction is the development
of predicate logic and the associated set theory in the last century.
- A set element is some uniquely segmentable and identifiable object.
A set is a collection or group of such elements. All of mathematics can
be considered a refinement of these two abstract concepts.
- An example of the use of mathematics to guide the abstraction of object
designs is offered by the Image Understanding Environment (IUE).
- The IUE is a second-generation version of TargetJr with a more consistent
mathematical motivation for the classes. A key centerpiece of the IUE design
is the SpatialObject.
- The underlying concept: spatial object is a point
set in tuples of R.
- This model is the most common representation for geometry and geometric
relations and is the basic framework for the analytical development of
- The spatial_object supports the basic methods which can be associated
with a point set, such as Boolean operations, transformations and in the
case of continuous manifolds, differential geometry.
There are many ways we could consider specializing the concept of a
- Intrinsic dimension
- the number of parameters needed to generate all members of the set.
- Embedding dimension
- the number of dimensions of the coordinate system in which the points
- Continuity - whether
or not a point has neighbors and how neigborhoods are defined.
- Implicitness - whether
or not the pointset is generated by a continuous parametric mapping or
instead by a system of implicit algebraic equations.
Combinations of these dimensions can generate a large spectrum of classes,
any of which might arise in applications. A key advantage of the mathematical
design approach is that applications are built using mathematical principles
and therefore the critical specialization dimensions are known in advance.
structure of spatial object
The order of
In the IUE, the sub-classes were generated according to the
following sequence of specialization dimensions:
- Intrinsic dimension
- Embedding dimension
Interestingly, TargetJr has a similar order of specialization One major
difference is that TargetJr does not distinguish classes on embedding dimension
The argument for this specialization is that many operations that make
sense in 3-d cannot even be done in 2-d. Additionally, curves, such as
the ellipse, can live in both 2-d and 3-d. How do we know whether or not
to pay attention to the third coordinate?
The argument against is that many operations are shared across embedding
dimension and it is clumbersome to multiply the number of classes by two.
Also there is the headache of continually dealing with incompatible 2-d
vectors and 3-d vectors which arise from the location coordinates of spatial
hieararchy for the line segment
specialization and object languages
- More abstract => Larger set: According
to mathematical abstraction, the more abstract concepts imply larger classes
of point sets. In mathematics, one applies constraints of various kinds
to the membership predicates of point sets in order to generate any interesting
mathematical issues. For example:
A pointset S is said to be convex if for
any pair of points P and Q the entire line segment [PQ] lies
entirely inside S.
- More generic => more attributes: More
generic point sets have a larger set of attributes. For example, a general
surface has a local curvature defined, which is zero for the special case
of a curved surface, a plane. This constraint has to be somehow imposed
on the mathematically motivated object model so that planes cannot have
the curvature inadvertently set to a non-zero value.
- More generic => fewer constraints: According
to object language abstraction, more abstract objects have fewer and less
constrained attributes. In typical C++ book examples, a special case of
the rectangle is the square which doesn't need to maintain both length
and width attributes.
- Less parameters for special case! This
direct conflict has impeded the development object-oriented systems which
directly mirror mathematical thinking.
the circle and the ellipse
Another example of specialization on intrinsic dimension is the topology
- So far we have only considered structural entities.
- How about mapping entities.
- A final example of controlling specialization is illustrated by the
IUE transform network.
A coordinate_system is the representation for
a mathematical coordinate space. Among other things, it knows about its
dimensionality and can know its relation to other coordinate systems.
- The key data members of a coordinate system are:
- int dimensionality
- array_1d< IUE_coordinate_axis_descr >
- digraph_vas_node< IUE_coordinate_system*,
IUE_coordinate_transform* >* cs_graph_node_pointer
- An axis descriptor must include a dimension type such as Length, Angle,
Time, and Wavelength, and a unit type such as Radians or Feet. It may also
contain an optional user_supplied name and an optional axis function.
- In the IUE, coordinate systems are first differentiated on the mathematical
nature of the transform and then on embedding dimension.
- TargetJr does not embrace a formal representation of coordinate systems
and transforms. There are significant computational consequences in carrying
through the transitive analysis of coordinate transforms. For example,
each time a point is projected into an image the transform network must
The IUE CoordinateSystem
The IUE Transform
Which one doesn't
The first and last sensor types generate a 2-d image. The stereo camera
in the middle does not produce a simple image. Instead, there is an epi-polar
mapping between the left and right images which induces a 3-d structure.