Skip to main content
Log in

Does aspect-oriented modeling help improve the readability of UML state machines?

  • Regular Paper
  • Published:
Software & Systems Modeling Aims and scope Submit manuscript

Abstract

Aspect-oriented modeling (AOM) is a relatively recent and very active field of research, whose 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 recently published UML profile. This profile extends the UML state machine notation with mechanisms to define aspects using state machines. Readability is indirectly measured through defect identification and fixing rates in state machines, and the scores obtained when answering a comprehension questionnaire about the system behavior. 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. An initial controlled experiment and a much larger replication were conducted with trained graduate students, in two different institutions and countries, to achieve the above objective. We use two baselines of comparisons—standard UML state machines without hierarchical features (flat state machines) and standard state machines with hierarchical/concurrent features (hierarchical state machines). The results showed that defect identification and fixing rates are significantly better with AspectSM than with both flat and hierarchical state machines. However, in terms of comprehension scores and inspection effort, no significant difference was observed between any of the approaches. Results of the experiments suggest that one should use, when possible, aspect state machines along with hierarchical and/or concurrent features of UML state machines to model crosscutting behaviors.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2

Similar content being viewed by others

References

  1. Ali, M.S., Babar, M.A., Chen, L., Stol, K.-J.: A systematic review of comparative evidence of aspect-oriented programming. Inf. Softw. Technol. 52, 871–887 (2010)

    Article  Google Scholar 

  2. Chitchyan, R., Rashid, A., Sawyer, P., Bakker, J., Alarcon, M.P., Garcia, A., Tekinerdogan, B., Clarke, S., Jackson, A.: Survey of Aspect-Oriented Analysis and Design. Aspect-Oriented Software Engineering Special Interest Group, Lancaster University, AOSD-Europe-ULANC-9 (2005)

  3. Filman, R.E., Elrad, T., Clarke, S., Aksit, M.: Aspect-Oriented Software Development. Addison-Wesley Professional, Reading, MA (2004)

    Google Scholar 

  4. Yedduladoddi, R.: Aspect Oriented Software Development: An Approach to Composing UML Design Models. VDM Verlag Dr, Müller, Saarbrücken (2009)

    Google Scholar 

  5. IEEE Standard Dictionary of Measures of the Software Aspects of Dependability. IEEE Std 982.1-2005 (Revision of IEEE Std 982.1-1988), pp. 1–34 (2006)

  6. Standard for Software Quality Characteristics, International Organization for Standardization, ISO-9126-32003

  7. Software Assurance Standard, NASA Technical Standard, NASA-STD-8739.82005

  8. Binder, R.V.: Testing object-oriented systems: models, patterns, and tools. Addison-Wesley Longman Publishing Co., Inc., Reading, MA (1999)

    Google Scholar 

  9. Drusinsky, D.: Modeling and Verification using UML Statecharts: A Working Guide to Reactive System Design, Runtime Monitoring and Execution-based Model Checking, 1st edn. Newnes (2006)

  10. Ali, S., Briand, L.C., Hemmati, H.: Modeling robustness behavior using aspect-oriented modeling to support robustness testing of industrial systems. Syst. Softw. Model. (SOSYM) J. (Accepted for publication) (2011)

  11. Gomaa, H.: Designing Concurrent, Distributed, and Real-Time Applications with UML. Addison-Wesley Professional, Reading, MA (2000)

    Google Scholar 

  12. Weigert, T., Reed, R.: Specifying Telecommunications Systems with UML. In: UML for real: design of embedded real-time systems. Kluwer Academic Publishers, Dordrecht, pp. 301–322 (2003)

  13. SmartState. Available: http://www.smartstatestudio.com/. Accessed April (2012)

  14. Utting, M., Legeard, B.: Practical Model-Based Testing: A Tools Approach. Morgan-Kaufmann, London (2007)

    Google Scholar 

  15. Cavarra, R., Crichton, C., Davies, J., Hartman, A., Mounier, L.: Using UML for Automatic Test Generation Presented at the International Symposium on Software Testing and Analysis (ISSTA ’02) (2002)

  16. Pender, T.: UML Bible. Wiley, Hoboken (2003)

    Google Scholar 

  17. Whittle, J., Moreira, A., AraúJ., Jayaraman, P., Elkhodary, A., Rabbi, R.: An Expressive Aspect Composition Language for UML State Diagrams. In: Engels, G., Opdyke, B., Schmidt, D.C., Weil, F. (eds.) Model Driven Engineering Languages and Systems (2007)

  18. Tessier, F., Badri, L., Badri, M.: Towards a Formal Detection of Semantic Conflicts Between Aspects: A Model-Based Approach. Presented at the 5th Aspect-Oriented Modeling Workshop In Conjunction with UML 2004 (2004)

  19. Ibm, OCL Parser. Available: http://www-01.ibm.com/software/awdtools/library/standards/ocl-download.html. Accessed April (2012)

  20. Chiorean, D., Bortes, M., Corutiu, D., Botiza, C., Câu, A.: OCLE (V2.0 ed.). Available: http://lci.cs.ubbcluj.ro/ocle/. Accessed April (2012)

  21. Egea, M.: EyeOCL Software. Available: http://maude.sip.ucm.es/eos/. Accessed April (2012)

  22. Zhang, G.: Towards Aspect-Oriented State Machines, Presented at the 2nd Asian Workshop on Aspect-Oriented Software Development (AOASIA’06), Tokyo (2006)

  23. Zhang, G., Hö, M.: HiLA: High-Level Aspects for UML-State Machines, Presented at the Proceedings of the 14th Workshop on Aspect-Oriented Modeling (AOM@MoDELS’09) (2009)

  24. Zhang G., Hö M.M., Knapp, A.: Enhancing UML State Machines with Aspects. In: Proceedings of the 10th International Conference on Model Driven Engineering Languages and Systems (MoDELS) (2007)

  25. Xu, D., Xu, W., Nygard, K.: A State-Based Approach to Testing Aspect-Oriented Programs. Presented at the 17th International Conference on Software Engineering and Knowledge Engineering, Taiwan (2005)

  26. Laddad, R.: AspectJ in Action: Practical Aspect-Oriented Programming. Manning Publications, Greenwich (2003)

    Google Scholar 

  27. Wohlin, C., Runeson, P., Höst, M.: Experimentation in Software Engineering: An Introduction. Springer, Berlin (1999)

    Google Scholar 

  28. JMP. Available: http://www.jmp.com/. Accessed April (2012)

  29. Shull, F., Singer, J., Sjø, D.I.K.: Guide to Advanced Empirical Software Engineering. Springer, Berlin (2008)

  30. Sheskin, D.J.: Handbook of Parametric and Nonparametric Statistical Procedures. Chapman and Hall/CRC, London (2007)

    MATH  Google Scholar 

  31. McNemar’s Test. Available: http://www.fon.hum.uva.nl/Service/Statistics/McNemars_test.html. Accessed April (2012)

  32. Thomas, L.: Retrospective power analysis. Conserv. Biol. 11, 276–280 (1997)

    Article  Google Scholar 

  33. Dybå, T., Kampenes, V.B., Hannay, J.E., Sjøberg, D.I.K.: Systematic review: A systematic review of effect size in software engineering experiments. Inf. Softw. Technol. 49, 1073–1086 (2007)

    Article  Google Scholar 

  34. Höst, M., Regnell, B., Wohlin, C.: Using students as subjects—A comparative study of students and professionals in lead-time impact assessment. Empir. Softw. Eng. 5, 201–214 (2000)

    Article  MATH  Google Scholar 

  35. Arisholm, E., Sjoberg, D.I.K.: Evaluating the effect of a delegated versus centralized control style on the maintainability of object-oriented software. IEEE Trans. Softw. Eng. 30, 521–534 (2004)

    Article  Google Scholar 

  36. Holt, R.W., Boehm-Davis, D.A., Shultz, A.C.: Mental representations of programs for student and professional programmers. In: Gary, M.O., Sylvia, S., Elliot, S. (eds.) Empirical Studies of Programmers: Second Workshop, pp. 33–46. Ablex Publishing Corp, Norwood (1987)

    Google Scholar 

  37. Durr, P., Bergmans, L., Aksit, M.: A Controlled Experiment for the Assessment of Aspects-Tracing in an Industrial Context. University of Twente, CTIT, Enschede (2008)

  38. Hanenberg, S., Kleinschmager, S., Josupeit-Walter, M.: Does Aspect-Oriented Programming Increase the Development Speed for Crosscutting Code? An Empirical Study, Presented at the 2009 3rd International Symposium on Empirical Software Engineering and Measurement (2009)

  39. Walker, R.J., Baniassad, E.L.A., Murphy, G.C.: An Initial Assessment of Aspect-Oriented Programming, Presented at the 21st international Conference on Software Engineering. Los Angeles, California (1999)

  40. Bartsch, M., Harrison, R.: An exploratory study of the effect of aspect-oriented programming on maintainability. Softw. Qual. Control 16, 23–44 (2008)

    Article  Google Scholar 

  41. Ferrari, F., Burrows, R., Lemos, V., Garcia, A., Figueiredo, E., Cacho, N., Lopes, F., Temudo, N., Silva, L., Soares, S., Rashid, A., Masiero, P., Batista, T., Maldonado, J.: An exploratory study of fault-proneness in evolving aspect-oriented programs, presented at the proceedings of the 32nd ACM/IEEE international conference on software engineering? vol. 1, Cape Town (2010)

  42. Farias, K., Garcia, A., Whittle, J.: Assessing the impact of aspects on model composition effort, presented at the proceedings of the 9th international conference on aspect-oriented software development, Rennes and Saint-Malo

  43. Carton, A., Driver, C., Jackson, A., Clarke, S.: Model-Driven Theme/UML. In: Shmuel, K., Harold, O., Robert, F., Jean-Marc, J., Quel, Z. (eds.) Transactions on Aspect-Oriented Software Development VI, pp. 238–266. Springer, Berlin (2009)

    Chapter  Google Scholar 

  44. Hovsepyan, A., Scandariato, R., Baelen, S.V., Berbers, Y., Joosen, W.: From aspect-oriented models to aspect-oriented code?: the maintenance perspective, presented at the proceedings of the 9th international conference on aspect-oriented software development, Rennes and Saint-Malo

  45. Mouchawrab, S., Briand, L.C., Labiche, Y., Penta, M.D.: Assessing, comparing, and combining state machine-based testing and structural testing: a series of experiments. IEEE Trans. Softw. Eng. 37, 161–187 (2011)

    Article  Google Scholar 

  46. Briand, L.C., Penta, M.D., Labiche, Y.: Assessing and improving state-based class testing: a series of experiments. IEEE Trans. Softw. Eng. 30, 770–793 (2004)

    Article  Google Scholar 

  47. Zimmerman, M.K., Lundqvist, K., Leveson, N.: Investigating the readability of state-based formal requirements specification languages, presented at the proceedings of the 24th international conference on software engineering. Orlando, Florida (2002)

  48. IBM Rational Software Architect (RSA). Available: http://www.ibm.com/developerworks/rational/products/rsa/. Accessed April (2012)

Download references

Acknowledgments

Lionel Briand was in part supported by a PEARL grant from the Fonds National de la Recherche, Luxembourg.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Shaukat Ali.

Appendices

Appendix A: Models for elevator control system (ECS)

In this Appendix, we provide the description and models for one of the case studies that we used in the replication: the Elevator Control System (ECS). Note that we provide this information only for one crosscutting behavior EmergencyCall (Call) of ECS, to provide an idea of how the models developed using different modeling approaches look like and to demonstrate that these models are semantically equivalent. The crosscutting behavior EmergencyCall is an important robustness behavior of an elevator. Whenever the elevator is operating, an emergency call can be made at any time. When a call is made, it is dialed to the control room and if the call is successful, the person in the elevator can talk to a person in the control room. When the person in the elevator is done talking, he/she can disconnect the call from the control room. Notice that all these operations related to the emergency call are performed concurrently to the operation of the elevator. All the diagrams used in the experiments and shown in Figs. 3, 4, and 5 were drawn using IBM Rational Software Architect (RSA) [48] and therefore, the diagrams conform to the RSA graphical notations. In addition, the experiment participants were trained to understand these graphical notations.

Fig. 3
figure 3

Base state machine for ECS

Fig. 4
figure 4

Aspect state machine for EmergencyCall

Fig. 5
figure 5

EmergencyCall modeled with the Hierarchical approach

The base state machine of ECS is shown in Fig. 3, which controls movements of an elevator in a building. The specification of the elevator is obtained from [11]. From the Idle state, call the RequestUp trigger (method of the ECS class), and then the elevator goes to the DoorClosingToMoveUp state representing the behavior of the system when the door is closing and moving up. Similarly, from the Idle state, when the RequestDown trigger is fired, the elevator goes to the DoorClosingToMoveDown state. From ElevatorAtFloor, if no trigger is fired within 5 s, the elevator state machine transits to the Idle state (modeled as a time event). Similarly, different states and transitions are modeled in the base state machine.

Aspect state machine for the EmergencyCall aspect is shown in Fig. 4. Stereotype \(\ll \) Aspect \(\gg \) is applied to the EmergencyCall state machine, indicating that it is an aspect state machine. The attributes for \(\ll \) Aspect \(\gg \) contain the following information: the name of the aspect state machine and the name of the base state machine (ElevatorControl in this example). State SelectedStates is stereotyped as \(\ll \) Pointcut \(\gg \), which shows that this state selects states from the base state machine. Stereotype \(\ll \) Pointcut \(\gg \) has two attributes: the name of the pointcut (SelectedStates in this case) and its type (SelectionType:All meaning that it selects all states of the base state machine). New transitions are added in the base state machine, with trigger named as EmergencyCallPressed stereotyped with \(\ll \) Introduction \(\gg \), from all the states of ElevatorControl to a newly introduced state named as DialingToControlRoom stereotyped with \(\ll \) Introduction \(\gg \). A new transition with trigger DialSuccessful is added from DialingToControlRoom to a newly introduced state Connected. Finally, from Connected, a newly introduced transition with trigger DisconnectCall is added to a newly introduced state DisconnectingFromControlRoom. Note that in Fig. 4, a new region is introduced: EmergencyCall, which is orthogonal to the normal operation of ElevatorControl.

The EmergencyCall behavior modeled using the Hierarchical approach is shown in Fig. 5. The behavior of ElevatorControl is modeled in a composite state (i.e., ElevatorControl) in Fig. 5. From the boundary of the ElevatorControl composite state, a transition with trigger EmergencyCallPressed goes to DialingToControlRoom. This means that from any of the states in ElevatorControl, whenever EmergencyCallPressed is pressed, the emergency call is made. An equivalent design of EmergencyCall using flat state machines is shown in Fig. 6.

Fig. 6
figure 6

EmergencyCall modeled with the Flat approach

Appendix B: Comprehension questionnaire for replication

  1. 1.

    Explain the possible subsequent scenario when Saturn is in a videoconference with three endpoints and audio quality is within the allowed threshold value?

  2. 2.

    Explain the possible subsequent scenario when Saturn is Idle and audio quality is greater than the allowed threshold?

  3. 3.

    Explain the possible subsequent scenario when Saturn could not recover audio quality and is in a videoconference with one endpoint?

  4. 4.

    Explain the possible subsequent scenario when Saturn is connected to one endpoint and Do Not Disturb mode is turned On?

  5. 5.

    Explain the possible subsequent scenario when Saturn is in Do Not Disturb mode and is connected to two endpoints and two more endpoints are dialing to Saturn at the same time?

  6. 6.

    Explain possible subsequent scenario when Saturn is in Connected state for \(m\) minutes?

  7. 7.

    Explain the possible subsequent scenario when Saturn is in StandbyOn and an endpoint dials to it?

  8. 8.

    Explain the possible subsequent scenario when Saturn is Idle and an endpoint dials to it with H254 videoconference protocol?

  9. 9.

    Explain the possible subsequent scenario when Saturn is in a videoconference with two endpoints with SIP protocol and a third endpoint dials to Saturn with H323 videoconference protocol?

  10. 10.

    Explain the scenario when Saturn is in a videoconference with six endpoints with SIP protocol and another endpoint dials to Saturn with H323 videoconference protocol?

Rights and permissions

Reprints and permissions

About this article

Cite this article

Ali, S., Yue, T. & Briand, L.C. Does aspect-oriented modeling help improve the readability of UML state machines?. Softw Syst Model 13, 1189–1221 (2014). https://doi.org/10.1007/s10270-012-0293-5

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10270-012-0293-5

Keywords

Navigation