Skip to main content
Log in

AspectOCL: using aspects to ease maintenance of evolving constraint specification

  • Published:
Empirical Software Engineering Aims and scope Submit manuscript

Abstract

Constraints play an important role in Model-Driven Software Engineering. Industrial systems commonly exhibit cross-cutting behaviors in design artifacts. Aspect-orientation is a well-established approach to deal with cross-cutting behaviors and has been successfully used for programming and design languages. In model-driven software engineering, the presence of cross-cutting constraints makes it difficult to maintain constraints defined on the models of large-scale industrial systems. In this work, we improve our previous work on AspectOCL, which is an extension of OCL that allows modeling of cross-cutting constraints. We provide the abstract and concrete syntax of the language. We add support for new constructs such as composite aspects and invariant specification on a package. We also provide tool support for writing cross-cutting constraints using AspectOCL. To evaluate AspectOCL, we apply it on benchmark case studies from the OCL repository. The results show that by separating the cross-cutting constraints, the number of constructs in the constraint specifications can be reduced to a large amount. AspectOCL reduces the maintenance effort by up to 55% in one case study. To explore the impact on maintenance time and accuracy, we also perform a controlled experiment with 90 student subjects. The results show that AspectOCL has a small magnitude of improvement in terms of maintenance time when compared to OCL, whereas modifications to OCL specification are more accurate. The post-experiment survey indicates that the majority of subjects favored AspectOCL, but faced challenges in applying aspect-orientation to constraint specification due to a lack of prior exposure.

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
Listing 1
Fig. 3
Listing 2
Fig. 4
Listing 3
Listing 4
Listing 5
Listing 6
Listing 7
Listing 8
Listing 9
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Similar content being viewed by others

Notes

  1. https://github.com/hassansartaj/aocl

References

  • Aldawud O, Elrad T, Bader A (2003) Uml profile for aspect-oriented software development. In: Proceedings of third international workshop on aspect-oriented modeling

  • Ali S, Briand LC, Hemmati H (2012) Modeling robustness behavior using aspect-oriented modeling to support robustness testing of industrial systems. Softw Syst Model 11(4):633–670

    Article  Google Scholar 

  • Ali S, Iqbal MZ, Arcuri A, Briand LC (2013) Generating test data from ocl constraints with search techniques. IEEE Trans Softw Eng 39(10):1376–1402

    Article  Google Scholar 

  • Ali S, Yue T, Briand LC (2014a) Does aspect-oriented modeling help improve the readability of uml state machines? Softw Syst Model 13(3):1189–1221

    Article  Google Scholar 

  • Ali S, Yue T, Iqbal MZ, Panesar-Walawege RK (2014b) Insights on the use of ocl in diverse industrial applications. In: International conference on system analysis and modeling. Springer, pp 223–238

  • Ali S, Iqbal MZ, Khalid M, Arcuri A (2016) Improving the performance of ocl constraint solving with novel heuristics for logical operations: a search-based approach. Empir Softw Eng 21(6):2459–2502

    Article  Google Scholar 

  • Brambilla M, Cabot J, Wimmer M (2012) Model-driven software engineering in practice. Synthesis Lectures on Software Engineering 1(1):1–182

    Article  Google Scholar 

  • Cabot J (2007) From declarative to imperative uml/ocl operation specifications. In: International conference on conceptual modeling, Springer, pp 198–213

  • Cabot J (2014) Ocl repository. https://github.com/jcabot/ocl-repository

  • Cabot J, Gogolla M (2012) Object constraint language (ocl): a definitive guide. In: Formal methods for model-driven engineering. Springer, pp 58–90

  • Cabot J, Teniente E (2007) Transformation techniques for ocl constraints. Sci Comput Program 68(3):179–195

    Article  MathSciNet  MATH  Google Scholar 

  • Clarke S, Baniassad E (2005) Aspect-oriented analysis and design. Addison-Wesley Professional, Boston

    Google Scholar 

  • Correa A, Werner C (2004) Applying refactoring techniques to uml/ocl models. In: International conference on the unified modeling language, Springer, pp 173–187

  • Correa A, Werner C (2007) Refactoring object constraint language specifications. Softw Syst Model 6(2):113–138

    Article  Google Scholar 

  • Correa A, Werner C, Barros M (2007) An empirical study of the impact of ocl smells and refactorings on the understandability of ocl specifications. In: International conference on model driven engineering languages and systems. Springer, pp 76–90

  • Correa A, Werner C, Barros M (2009) Refactoring to improve the understandability of specifications written in object constraint language. IET software 3(2):69–90

    Article  Google Scholar 

  • Costal D, Gómez C, Queralt A, Raventós R, Teniente E (2008) Improving the definition of general constraints in uml. Softw Syst Model 7(4):469–486

    Article  Google Scholar 

  • Dou W, Bianculli D, Briand L (2014) Oclr: a more expressive, pattern-based temporal extension of ocl. In: European conference on modelling foundations and applications, Springer, pp 51–66

  • Elrad T, Filman RE, Bader A (2001) Aspect-oriented programming: introduction. Commun ACM 44(10):29–32

    Article  Google Scholar 

  • France R, Ray I, Georg G, Ghosh S (2004) Aspect-oriented approach to early design modelling. IEE Product Softw 151(4):173–185

    Article  Google Scholar 

  • Frias L, Queralt Calafat A, Olivé RA (2003) Eu-rent car rentals specification, http://hdl.handle.net/2117/97816

  • Grant ES (2012) A meta-model approach to defining uml-based domain-specific modeling language. In: Proceedings of the international multiconference of engineers and computer scientists, vol 1

  • Gray J, Bapty T, Neema S, Tuck J (2001) Handling crosscutting constraints in domain-specific modeling. Commun ACM 44(10):87–93

    Article  Google Scholar 

  • Hearnden D, Raymond K, Steel J (2003) Mql: a powerful extension to ocl for mof queries. In: 2003 Proceedings of the IEEE international enterprise distributed object computing conference. IEEE, pp 264–276

  • Hong L, Wang S, Yue T, Nygard JF, et al. (2017) Automated refactoring of ocl constraints with search. IEEE Trans Softw Eng 45(2):1–1

    Google Scholar 

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

    Article  MATH  Google Scholar 

  • Khan MU, Iqbal MZ, Ali S (2014) A heuristic-based approach to refactor crosscutting behaviors in uml state machines. In: 2014 IEEE international conference on software maintenance and evolution (ICSME). IEEE, pp 557–560

  • Khan MU, Arshad N, Iqbal MZ, Umar H (2015) Aspectocl: extending ocl for crosscutting constraints. In: European conference on modelling foundations and applications. Springer, pp 92–107

  • Kuhlmann M, Gogolla M (2008) Modeling and validating mondex scenarios described in uml and ocl with use. Form Asp Comput 20(1):79–100

    Article  Google Scholar 

  • Laddad R (2003) AspectJ in action: practical aspect-oriented programming. Manning Publications Co., Shelter Island

    Google Scholar 

  • Lengyel L, Levendovszky T, Mezei G, Forstner B, Charaf H (2006) Metamodel-based model transformation with aspect-oriented constraints. Electron Notes Theor Comput Sci 152:111–123

    Article  Google Scholar 

  • Marković S, Baar T (2008) Refactoring ocl annotated uml class diagrams. Softw Syst Model 7(1):25–47

    Article  Google Scholar 

  • Mguni K, Ayalew Y (2013) An assessment of maintainability of an aspect-oriented system. ISRN Software Engineering 2013

  • OMG (2008) Mof model to text transformation language v1.0. Object Management Group Inc. http://www.omg.org/spec/MOFM2T/

  • OMG (2017) Object constraint language specification v2.4. Object Management Group Inc. http://www.omg.org/spec/OCL/2.4/

  • Przybyłek A (2017) An empirical study on the impact of aspectj on software evolvability. Empir Softw Eng 32(4):1–33

    Google Scholar 

  • Richters M, Gogolla M (2003) Aspect-oriented monitoring of uml and ocl constraints. In: AOSD modeling with UML workshop international conference on the unified modeling language, (UML), San Francisco, USA

  • Rumpe B (2002) ≪ java ≫ ocl based on new presentation of the ocl-syntax. Object Modeling with the OCL

  • Salman I, Misirli AT, Juristo N (2015) Are students representatives of professionals in software engineering experiments?. In: Proceedings of the international conference on software engineering, vol 1. IEEE Press, pp 666–676

  • Sato Y, Chiba S, Tatsubori M (2003) A selective, just-in-time aspect weaver. In: International conference on generative programming and component engineering. Springer, pp 189–208

  • Stahl T, Volter M (2006) Model-driven software development: technology, engineering, management. Wiley, New York

    MATH  Google Scholar 

  • Störrle H (2013) Mocql: a declarative language for ad-hoc model querying. In: European conference on modelling foundations and applications. Springer, pp 3–19

  • Tairas R, Cabot J (2011) Cloning in dsls: experiments with ocl. In: SLE. Springer, pp 60–76

  • Vain J, Truscan D, Iqbal J, Tsiopoulos L (2017) On the benefits of using aspect-orientation in uppaal timed automata. In: 2017 international conference on Infocom technologies and unmanned systems (trends and future directions)(ICTUS). IEEE, pp 84–91

  • Vargha A, Delaney HD (2000) A critique and improvement of the cl common language effect size statistics of mcgraw and wong. J Educ Behav Stat 25(2):101–132

    Google Scholar 

  • Vegas S, Apa C, Juristo N (2016) Crossover designs in software engineering experiments: Benefits and perils. IEEE Trans Softw Eng 42(2):120–135

    Article  Google Scholar 

  • Warmer JB, Kleppe AG (1998) The object constraint language: precise modeling with uml (addison-wesley object technology series)

  • Warmer JB, Kleppe AG (2003) The object constraint language: getting your models ready for MDA, Addison-Wesley Professional, Boston

  • Weber D, Szymanek J, Norrie MC (2016) Unifiedocl: achieving system-wide constraint representations. In: Conceptual modeling: international conference, ER 2016, Gifu, Japan, November 14–17, 2016, Proceedings 35. Springer, pp 221–229

  • Wimmer M, Schauerhuber A, Kappel G, Retschitzegger W, Schwinger W, Kapsammer E (2011) A survey on uml-based aspect-oriented design modeling. ACM Computing Surveys (CSUR) 43(4):28

    Article  Google Scholar 

  • Wohlin C, Runeson P, Höst M, Ohlsson MC, Regnell B, Wesslén A (2012) Experimentation in software engineering, Springer Science & Business Media, Berlin

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Muhammad Uzair Khan.

Additional information

Communicated by: Paul Grünbacher

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendix A: Cross-cutting OCL Constraints and AspectOCL Constraints

Appendix A: Cross-cutting OCL Constraints and AspectOCL Constraints

1.1 A.1 DBLP

Listing 10
figure s

Cross-cutting OCL constraints

Listing 11
figure t

AspectOCL constraint

1.2 A.2 DresdenOCL SEPA Example

Listing 12
figure u

Cross-cutting OCL constraints

Listing 13
figure v

AspectOCL constraint

1.3 A.3 EU-Rental

Listing 14
figure w

Cross-cutting OCL constraints

Listing 15
figure x

AspectOCL constraint

1.4 A.4 Mondex-Imperative

Listing 16
figure y

Cross-cutting OCL constraints

Listing 17
figure z

AspectOCL constraint

1.5 A.5 OS Commerce

Listing 18
figure aa

Cross-cutting OCL constraints

Listing 19
figure ab

AspectOCL constraint

1.6 A.6 Royal and Loyal

Listing 20
figure ac

Cross-cutting OCL constraints

Listing 21
figure ad

AspectOCL constraint

1.7 A.7 Sudoku

Listing 22
figure ae

Cross-cutting OCL constraints

Listing 23
figure af

AspectOCL constraint

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Khan, M.U., Sartaj, H., Iqbal, M.Z. et al. AspectOCL: using aspects to ease maintenance of evolving constraint specification. Empir Software Eng 24, 2674–2724 (2019). https://doi.org/10.1007/s10664-019-09717-6

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10664-019-09717-6

Keywords

Navigation