What about UML diagrams stored in text
Usual methods not applicable e.g., different file
contents can actually represent the same
diagram, but systems might show large
Differences between UML
Unified document model.
Common parts are uncolored.
Specific parts of each base document are
are stored as syntax trees (e.g., XML
Only consider diagrams where layout is irrelevant.
Differences between attributes of two
Simple attributes e.g., changing the name of
Multivalued/list attributes e.g.,
adding/removing attributes from list.
Computing the differences
All elements are modelled as objects, forming
an object graph.
Algorithm simultaneously goes through two
spanning trees (of the object graph) starting
from the root.
Computing the differences (2)
The composition relationships form a spanning
tree of this graph.
Computing the differences (3)
Assumption: the root is unchanged
foreach level in spanningTree
find corresponding sub-trees
insert a new pair into the queue
compare attributes and relations of the root
create new object in a unified document
Computing the differences (4)
Algorithm can distinguish between
creation/deletion and shifts.
Lot of comparisons. Algorithm seems slow.
They have some optimizations (not described).
Too many differences => Too many colors =>
Solution : restrict to only subsets of
Non-interesting areas are greyed out.
Restrictions are done based on type of
elements or history of revisions.
Need a way to present differences between
versions of UML diagrams.
Various types of differences exist and various
ways to visualize these differences.
”Layered” approach in presenting differences.