Differences bet. versions of UML diagrams

Preview:

DESCRIPTION

Presentation for one of my courses.

Citation preview

DIFFERENCES BETWEEN VERSIONS OF UML DIAGRAMS

Ohst et. Al., ESEC/FSE’03

Dr. Maibaum

Dhruv Gairola

Outline

Problem. Differences between UML diagrams. Classification of differences. Computing differences. Conclusion.

Problem

Text files easily handled by version control tools.

What about binary files? How to detect differences?

Problem (2)

Problem (3)

Problem (4)

What about UML diagrams stored in text formats?

Usual methods not applicable e.g., different file contents can actually represent the same diagram, but systems might show large changes.

Differences between UML diagrams. Unified document model. Common parts are uncolored. Specific parts of each base document

are colored. Assumptions :

Documents are stored as syntax trees (e.g., XML files).

Only consider diagrams where layout is irrelevant.

Quick preview

Quick preview (2)

SiDiff

SiDiff (2)

SiDiff (3)

Classification of differences

Intra-node differences. Structural differences.

Deletion. Creation. Shifting.

Intra-node differences

Differences between attributes of two corresponding nodes.

Simple attributes e.g., changing the name of attribute.

Multivalued/list attributes e.g., adding/removing attributes from list.

Intra-node differences (2)

Intra node differences (2)

Structural differences

Deletion/ creation/ shifting Shifts :

Modifications to layout. Structural shifts (e.g. shifting an edge) Inter-node shifts (e.g. shifting an attribute) Position shifts (e.g. reordering a list of

attributes)

Type of shifts (structural shift)

Type of shifts (inter-node shift)

Type of shifts (inter-node shift)

Type of shifts (position shift)

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

End

Computing the differences (4) Algorithm can distinguish between

creation/deletion and shifts. Lot of comparisons. Algorithm seems

slow. They have some optimizations (not described).

Coloring

Too many differences => Too many colors => Confusing.

Solution : restrict to only subsets of differences.

Non-interesting areas are greyed out. Restrictions are done based on type of

elements or history of revisions.

Coloring (2)

Conclusion

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.

Future work

3-way differences.

Recommended