AspectOCL: Extending OCL for Crosscutting Constraints

  • Muhammad Uzair Khan
  • Numra Arshad
  • Muhammad Zohaib Iqbal
  • Hafsa Umar
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9153)


Constraints play an important role in Model Driven Software Engineering. Industrial systems commonly exhibit crosscutting behaviors in design artifacts. While modeling of crosscutting behaviors has been addressed in literature, the modeling of crosscutting constraints remains a problem. Presence of crosscutting constraints makes it difficult to maintain constraints defined on the models of large-scale industrial systems. Multiple elements in a model may share common crosscutting constraints with minor variation. Aspect orientation is well-established approach to model crosscutting behavior. Current OCL specification does not support writing crosscutting constraints separately as aspects. In this paper, we propose an extension of OCL language that brings benefits of aspect orientation to OCL constraints. In our language, crosscutting constraints are specified as aspects, which can be woven in OCL constraints. We demonstrate our proposed language through application on a published open source case study. Results show that specifying crosscutting constraints as aspects can reduce the number of constraints to be specified.


Model driven software engineering Crosscutting constraints Object constraint language Aspect orientation Unified modeling language 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Völter, M., Stahl, T., Bettin, J., Haase, A., Helsen, S.: Model-driven software development: technology, engineering, management. John Wiley & Sons (2013)Google Scholar
  2. 2.
    Brambilla, M., Cabot, J., Wimmer, M.: Model-driven software engineering in practice. Synthesis Lectures on Software Engineering 1, 1–182 (2012)CrossRefGoogle Scholar
  3. 3.
    Warmer, J.B., Kleppe, A.G.: The Object Constraint Language: Precise Modeling With Uml (Addison-Wesley Object Technology Series) (1998)Google Scholar
  4. 4.
    Specification, O.M.G.A.: Object Constraint Language (May 2006)Google Scholar
  5. 5.
    Ali, S., Yue, T., Zohaib Iqbal, M., Panesar-Walawege, R.K.: Insights on the use of OCL in diverse industrial applications. In: Amyot, D., Fonseca i Casas, P., Mussbacher, G. (eds.) SAM 2014. LNCS, vol. 8769, pp. 223–238. Springer, Heidelberg (2014)Google Scholar
  6. 6.
    Ali, S., Iqbal, M.Z., Arcuri, A., Briand, L.: Generating Test Data from OCL Constraints with Search Techniques. IEEE Trans. Softw. Eng. 39(10), 1376–1402 (2013)CrossRefGoogle Scholar
  7. 7.
    Gray, J., Bapty, T., Neema, S., Tuck, J.: Handling crosscutting constraints in domain-specific modeling. Communications of the ACM 44, 87–93 (2001)CrossRefGoogle Scholar
  8. 8.
    Lengyel, L., Levendovszky, T., Mezei, G., Forstner, B., Charaf, H.: Metamodel-based model transformation with aspect-oriented constraints. Electronic Notes in Theoretical Computer Science 152, 111–123 (2006)CrossRefGoogle Scholar
  9. 9.
    Murphy, G.C., Walker, R.J., Baniassad, E.L.A., Robillard, M.P., Lai, A., Kersten, M.A.: Does aspect-oriented programming work? Communications of the ACM 44, 75–77 (2001)CrossRefGoogle Scholar
  10. 10.
    Ali, S., Yue, T., Briand, L.C.: Does Aspect-Oriented Modeling Help Improve the Readability of UML State Machines? Software & Systems Modeling, Springer 13(3), 1189–1221 (2014)CrossRefGoogle Scholar
  11. 11.
    Clarke, S., Baniassad, E.: Aspect-oriented analysis and design. Addison-Wesley Professional (2005)Google Scholar
  12. 12.
    Laddad, R.: AspectJ in Action: Practical Aspect-Oriented Programming. Manning Publications (2003)Google Scholar
  13. 13.
    Elrad, T., Filman, R.E., Bader, A.: Aspect-oriented programming: Introduction. Communications of the ACM 44, 29–32 (2001)CrossRefGoogle Scholar
  14. 14.
    Mguni, K., Ayalew, Y.: An Assessment of Maintainability of an Aspect-Oriented System. International Scholarly Research Notices (2013)Google Scholar
  15. 15.
    Ali, S., Briand, L.C., Hemmati, H.: Modeling Robustness Behavior Using Aspect-Oriented Modeling to Support Robustness Testing of Industrial Systems. Software and Systems Modeling 11(4), 633–670 (2012)CrossRefGoogle Scholar
  16. 16.
    Khan, M.U., Iqbal, M.Z., Ali, S.: A Heuristic-Based Approach to Refactor Crosscutting Behaviors in UML State Machines. In: 2014 IEEE International Conference on Software Maintenance and Evolution (ICSME), pp. 557–560. IEEE (2014)Google Scholar
  17. 17.
    France, R., Ray, I., Georg, G., Ghosh, S.: Aspect-oriented approach to early design modelling. IEE Proceedings-Software 151, 173–185 (2004)CrossRefGoogle Scholar
  18. 18.
    Steinberg, D., Budinsky, F., Merks, E., Paternostro, M.: EMF: eclipse modeling framework. Pearson Education (2008)Google Scholar
  19. 19.
    Wilson, B.: EU-Rent Car Rentals Case Study. Model Systems & Brian Wilson Associates (1994)Google Scholar
  20. 20.
    Tairas, R., Cabot, J.: Cloning in DSLs: experiments with OCL. In: Sloane, A., Aßmann, U. (eds.) SLE 2011. LNCS, vol. 6940, pp. 60–76. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  21. 21.
    Cabot, J., Gogolla, M.: Object constraint language (OCL): a definitive guide. In: Bernardo, M., Cortellessa, V., Pierantonio, A. (eds.) SFM 2012. LNCS, vol. 7320, pp. 58–90. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  22. 22.
    Costal, D., Gómez, C., Queralt, A., Raventós, R., Teniente, E.: Improving the definition of general constraints in UML. Softw Syst Model 7, 469–486 (2008)CrossRefGoogle Scholar
  23. 23.
  24. 24.
    Wimmer, M., Schauerhuber, A., Kappel, G., Retschitzegger, W., Schwinger, W., Kapsammer, E.: A survey on UML-based aspect-oriented design modeling. ACM Computing Surveys (CSUR) 43, 28 (2011)CrossRefGoogle Scholar
  25. 25.
    Richters, M., Gogolla, M.: Aspect-oriented monitoring of UML and OCL constraints. In: AOSD Modeling With UML Workshop, 6th International Conference on the Unified Modeling Language (UML), San Francisco, USA. Citeseer (2003)Google Scholar
  26. 26.
    Dou, W., Bianculli, D., Briand, L.: OCLR: a more expressive, pattern-based temporal extension of OCL. In: Van Cabot, J., Rubin, J. (eds.) ECMFA 2014. LNCS, vol. 8569, pp. 51–166. Springer, Heidelberg (2014)Google Scholar
  27. 27.
    Hearnden, D., Raymond, K., Steel, J.: MQL: a powerful extension to OCL for MOF queries. In: Proceedings Seventh IEEE International Enterprise Distributed Object Computing Conference, 2003. pp. 264–276. IEEE (2003)Google Scholar
  28. 28.
    Störrle, H.: MOCQL: a declarative language for ad-hoc model querying. In: Van Gorp, P., Ritter, T., Rose, L.M. (eds.) ECMFA 2013. LNCS, vol. 7949, pp. 3–19. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  29. 29.
    Rumpe, B.: ≪ Java≫ OCL Based on New Presentation of the OCL-Syntax. In: Clark, T., Warmer, J. (eds.) ECMFA 2013. LNCS, vol. 2263, pp. 189–212. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  30. 30.
    Aldawud, O., Elrad, T., Bader, A.: UML profile for aspect-oriented software development. In: Proceedings of Third International Workshop on Aspect-Oriented Modeling. Citeseer (2003)Google Scholar
  31. 31.
    Usman, M., Iqbal, M.Z., Khan, M.U.: A model-driven approach to generate mobile applications for multiple platforms. In: 21st Asia-Pacific Software Engineering Conference (APSEC), pp. 111–118 (2014)Google Scholar
  32. 32.
    Jilani, A.A., Iqbal, M.Z., Khan, M.U.: A search based test data generation approach for model transformations. In: Di Ruscio, D., Varró, D. (eds.) ICMT 2014. LNCS, vol. 8568, pp. 17–24. Springer, Heidelberg (2014)Google Scholar
  33. 33.
    Frias, L., Queralt, A., Ramon, A.O.: EU-Rent car rentals specification (2003)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Muhammad Uzair Khan
    • 1
  • Numra Arshad
    • 1
  • Muhammad Zohaib Iqbal
    • 1
    • 2
  • Hafsa Umar
    • 1
  1. 1.Software Quality Engineering and Testing Lab (QUEST)National University of Computer and Emerging ScienceIslamabadPakistan
  2. 2.Software Verification and Validation LabInterdisciplinary Centre for Security, Reliability and TrustLuxembourgLuxembourg

Personalised recommendations