|Authors||S. Ali, T. Yue and L. Briand|
|Title||Does Aspect-Oriented Modeling Help Improve the Readability of UML State Machines?|
|Project(s)||The Certus Centre (SFI)|
|Publication Type||Technical reports|
|Year of Publication||2011|
|Publisher||Simula Research Laboratory|
Aspect-oriented Modeling (AOM) is a relatively recent and very active field of research, which application has however been limited in practice. AOM is assumed to yield several potential benefits such as enhanced modularization, easier evolution, increased reusability, and improved readability of models, as well as reduced modeling effort. However, credible, solid empirical evidence of such benefits is lacking. We evaluate the “readability” of state machines when modeling crosscutting behavior using AOM and more specifically AspectSM, a UML profile extending the UML state machine notation to provide mechanisms to define aspects using state machines. With AspectSM, crosscutting behavior is modeled using so-called “aspect state machines”. Their readability is compared with that of system state machines directly modeling crosscutting and standard behavior together. A controlled experiment was conducted with 25 trained, graduate students to achieve the above objective. Readability is defined based on the identification of defects seeded in state machines and the score obtained when answering a comprehension questionnaire about the system behavior. We use two baselines of comparisons-standard UML state machines without hierarchical features (flat state machines) and standard state machines with hierarchical features (hierarchical state machines)-in order to assess the role of hierarchies in the benefits brought by AspectSM. The results showed that defect identification with AspectSM is significantly better than that with both flat and hierarchical state machines. In terms of the comprehension questionnaire, the AspectSM scores are better than flat state machines, but worse than hierarchical state machines. Regarding the effort for inspecting the state machines, no significant difference could be observed. Conclusion: Results of the experiment suggest using hierarchical features of UML state machines for crosscutting concerns where this is possible and resort otherwise to aspect state machines or use them together for better readability.