ibm Rational Rhapsody 7.5 — Sequence comparison algorithm

Animation for selected classes Animation for selected classes As part of the reverse engineering workflow, you might want to animate selected classes without the defining configurations. To accomplish this, after reverse engineering create one or more sequence diagrams, drag reverse engineered classes onto these diagrams, and select the ones to animate. The resulting animation shows the communication between the selected classes. Sequence diagram comparison During the development process, sequence diagrams (SDs) are used for the following primary purposes: Љ In the early system requirements phase, they are used for use case description.

Љ In the implementation phase, they verify that all conditions are met in terms of communication between classes. Љ In the testing phase, they capture the actual system trace. Therefore, there is a need to facilitate comparison between SDs because, in principle at least, they should be identical. The execution message sequence should match the specification message sequence. The Sequence Diagram Comparison tool enables you to perform comparisons, for example between hypothetical and actual message sequences. You could also use this tool to compare two runs for regression testing.

If all execution SDs are identical to their corresponding specification (nonanimated) SDs, the system satisfies the requirements as captured in the use cases. However, if there are differences, you need to determine whether the specification was inaccurate or an error exists in the implementation. In both cases, you should correct the modeling error (either in the statechart or the SD) and then repeat the testing cycle to determine whether you have fixed the problem. Sequence comparison algorithm When comparing sequences, the following message parameters are used to determine whether the messages in the two SDs are identical:

Љ Departure time Љ Arrival time Љ Arguments One simple approach involves comparing the exact position of every message and stopping at the first difference. However, this is probably too naive a comparison. For example, if there is a time offset in one SD, this kind of comparison would stop at the first message. Rational Rhapsody 707