![]() |
|
The scenario-based approach to specification and programming uses powerful extensions of sequence diagrams, such as ''LSCs ''(live sequence charts), to model system behavior. Previous work in this area presents interesting challenges related to the scalability of the approach and to better tool support for analysis, execution, and comprehension. The ideas presented here suggest new semantic-rich ways of viewing sequence diagrams and LSCs for better comprehension of both a single large chart and a full multi-chart specification, in a variety of software engineering tasks. Our method uses an order on the elements, calculated based on a specific task, that enables semantic zooming and scrolling of different parts of a chart, providing visual hints about context. The ideas may be useful for other types of code.
The semantic navigation algorithm has been implemeted in the Play-Engine tool and more recently in the PlayGo Eclipse-based product.
One implementation of semantic navigation has been implemented in the Play-Engine tool [1].
In this implementation, an order based on interdependencies is used to navigate in an ATM specification with some large charts.
Figure 1: A large LSC in the Play-Engine
While zooming, the background is changed to indicate missing information and placeholders appear as horizontal rectangles with their grayscale color indicating how much information (e.g., messages) are hidden by them, as demonstrated in figure 2 below.
Figure 2: A zoomed LSC. The background is changed to indicate missing information. The placeholders appear as horizontal rectangles with their grayscale color indicating how much information (e.g., messages) are hidden by them. Additionally, a last change marker indicates where in the chart the last change created by the semantic zoom has been drawn. Notice how the subchart structure is kept.
We provide a demo clip of the Play-Engine tool during semantic zoom.
Note: The scrolling is slow and is not part of the semantic zoom but rather of the editor.
In PlayGo LSCs are compliant with the UML sequence diagrams, they do not have a prechart and mainchart parts but have properties on the messages that add the LSCs modalities (hot/cold and monitor/execute) and allow execution with a compiler [3].
Figure 3: A sample LSC in PlayGo of the same ATM example
Figure 4: A Zoomed LSC. Notice how background change, the placeholders as gray state-invariant elements, again, with grayscale color indicating the number of messages hidden, and a dotted green round rectangle as the last change marker
The following clip shows Semantic Navigation in PlayGo.
Note: The clip has been edited to remove slow refresh rate of the editor.
PlayGo tool with semantic zoom is still in testing phase, and will be available in the future. Please contact the first author for a preliminary beta version.
[1] D. Harel and R. Marelly, Come, Let's Play: Scenario-Based Programming Using LSCs and the Play-Engine, Springer-Verlag, 2003. (See the special book webpage)
[2] D. Harel, S. Maoz, S. Szekely and D. Barkan, "PlayGo: Towards a Comprehensive Tool for Scenario Based Programming", in Proceedings of the IEEE/ACM 25th Int. Conf. on Automated Software Engineering (ASE 2010), Antwerp, Belgium, pp. 359-360.
[3] D. Harel, A. Kleinbort, and S. Maoz, "S2A: A Compiler for Multi-Modal UML Sequence Diagrams", Proc. Fundamental Approaches to Software Engineering (FASE'07), 2007, pp. 121-124.
Last updated: 3 April, 2011