Skip to main content
Log in

Automatic pattern-based consistency checking in model refactoring: introducing a formal behavioral preserving method

  • Original Article
  • Published:
Innovations in Systems and Software Engineering Aims and scope Submit manuscript

Abstract

Evolution is one of the most important parts of the software development process. One of the negative consequences of software development is design erosion. Refactoring is a technique that aims to prevent this issue. Therefore, refactoring is an important software development process to promote software quality without changing its external behavior. Refactoring at the model level is the same as refactoring at the code level and has similar advantages, and the only difference is that refactoring at the model level, due to its formation over the initial steps of software development process, has a greater impact on cost reduction and efficiency improvement. Timely and consistent utilization of this procedure in a software project has extremely positive long-term impacts, especially when this is done by its technical tools. Then, refactoring will be a rapid, easy, and safe way to promote software system quality. The main idea of this study is the automatic checking of consistency in model refactoring in order to retain model behavior using Alloy modeling language. Thus, by employing structural and behavioral patterns as a reusable and well-defined component, as well as consistency rules, this objective can be achieved.

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
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

References

  1. Abid C et al (2020) 30 years of software refactoring research: a systematic literature review

  2. Akhtar SM et al (2020) A systematic literature review on software-refactoring techniques, challenges, and practices

  3. Alexander C (1977) A pattern language: towns, buildings, construction. Oxford University Press, Oxford

    Google Scholar 

  4. Alkhazi B et al (2020) On the value of quality attributes for refactoring ATL model transformations: a multi-objective approach. Inf Softw Technol 120:106243

    Article  Google Scholar 

  5. AlOmar EA et al (2021) On preserving the behavior in software refactoring: a systematic mapping study. Inf Softw Technol 140:106675

    Article  Google Scholar 

  6. AlOmar EA, Mkaouer MW, Ouni A (2021) Toward the automatic classification of self-affirmed refactoring. J Syst Softw 171:110821

    Article  Google Scholar 

  7. Arendt T, Taentzer G (2013) A tool environment for quality assurance based on the eclipse modeling framework. Autom Softw Eng 20(2):141–184

    Article  Google Scholar 

  8. Baqais AAB, Alshayeb MJ (2020) Automatic software refactoring: a systematic literature review. Softw Qual J 28(2):459–502

    Article  Google Scholar 

  9. Ben Ammar B, Bhiri MT (2015) Pattern-based model refactoring for the introduction association relationship. J King Saud Univ Comput Inf Sci 27(2):170–180

    Google Scholar 

  10. Brooks FP (1995) The mythical man-month, chapter no silver bullet-essence and accident in software engineering, vol 15. Addison Wesley Longman Inc., New York, pp 177–203

    Google Scholar 

  11. Cortellessa V, Eramo R, Tucci M (2020) From software architecture to analysis models and back: model-driven refactoring aimed at availability improvement. Inf Softw Technol 127:106362

    Article  Google Scholar 

  12. Cunha A, Garis A, Riesco D (2015) Translating between Alloy specifications and UML class diagrams annotated with OCL. Softw Syst Model 14(1):5–25

    Article  Google Scholar 

  13. Dennis G et al (2004) Automating commutativity analysis at the design level. SIGSOFT Softw Eng Notes 29(4):165–174

    Article  Google Scholar 

  14. Einarsson HÞ, Neukirchen H (2012) An approach and tool for synchronous refactoring of UML diagrams and models using model-to-model transformations. ACM, New York

    Book  Google Scholar 

  15. Emmerich W et al (1999) Managing standards compliance. IEEE Trans Softw Eng 25(6):836–851

    Article  Google Scholar 

  16. Finkelstein A et al (1993) Inconsistency handling in multi-perspective specifications. In: European software engineering conference. Springer

  17. Fowler M (2018) Refactoring: improving the design of existing code. Addison-Wesley Professional, Boston

    Google Scholar 

  18. Gamma E (1995) Design patterns: elements of reusable object-oriented software. Pearson Education India, Bengaluru

    Google Scholar 

  19. Genero M, Piattini M, Calero C (2005) A survey of metrics for UML class diagrams. J Object Technol 4(9):59–92

    Article  Google Scholar 

  20. Georg G, Bieman J, France RB (2001) Using alloy and UML/OCL to specify run-time configuration management: a case study. In: Workshop of the pUML-group held together with the «UML»2001 on practical UML-based rigorous development methods—countering or integrating the eXtremists. GI. pp 128–141

  21. Gheyi R, Massoni T, Borba P (2005) Type-safe refactorings for alloy

  22. http://alloytools.org/

  23. Jackson D (2002) Alloy: a lightweight object modelling notation. ACM Trans Softw Eng Methodol 11(2):256–290

    Article  MathSciNet  Google Scholar 

  24. Jackson D, Schechter I, Shlyakhter I (2000) Alcoa: the alloy constraint analyzer. In: Proceedings of the 2000 international conference on software engineering. ICSE 2000 the New Millennium

  25. Jackson D, Shlyakhter I, Sridharan M (2001) A micromodularity mechanism. ACM SIGSOFT Softw Eng Notes 26(5):62–73

    Article  Google Scholar 

  26. Kim DK (2015) Design pattern based model transformation with tool support. Softw Pract Exp 45(4):473–499

    Article  Google Scholar 

  27. Le HA, Dao T-H, Truong N-T (2017) A formal approach to checking consistency in software refactoring. Mob Netw Appl 22(2):356–366

    Article  Google Scholar 

  28. Mansoor U et al (2017) Multi-view refactoring of class and activity diagrams using a multi-objective evolutionary algorithm. Softw Qual J 25(2):473–501

    Article  Google Scholar 

  29. Markovic S (2008) Model refactoring using transformations. EPFL, Lausanne

    Google Scholar 

  30. Marković S, Baar T (2008) Refactoring OCL annotated UML class diagrams. Softw Syst Model 7(1):25–47

    Article  Google Scholar 

  31. Massoni T, Gheyi R, Borba P (2005) Formal refactoring for UML class diagrams

  32. Mens T, Taentzer G, Müller D (2007) Model-driven software refactoring, pp 25–27

  33. Mens T, Tourwe T (2004) A survey of software refactoring. IEEE Trans Softw Eng 30(2):126–139

    Article  Google Scholar 

  34. Misbhauddin M, Alshayeb M (2012) Towards a multi-view approach to model-driven refactoring. IEEE

  35. Misbhauddin M, Alshayeb M (2015) UML model refactoring: a systematic literature review. Empir Softw Eng 20(1):206–251

    Article  Google Scholar 

  36. Misbhauddin M, Alshayeb M (2019) An integrated metamodel-based approach to software model refactoring. Softw Syst Model 18(3):2013–2050

    Article  Google Scholar 

  37. Moeini A, Rafe V, Mahdian F (2010) An approach to refactoring legacy systems. In: 2010 3rd international conference on advanced computer theory and engineering (ICACTE). IEEE

  38. Nissen HW et al (1996) Managing multiple requirements perspectives with metamodels. IEEE Softw 13(2):37–48

    Article  Google Scholar 

  39. Nuseibeh B, Kramer J, Finkelstein A (1994) A framework for expressing the relationships between multiple views in requirements specification. IEEE Trans Softw Eng 20(10):760–773

    Article  Google Scholar 

  40. Pérez-Castillo R, Fernández-Ropero M, Piattini M (2019) Business process model refactoring applying IBUPROFEN. An industrial evaluation. J Syst Softw 147:86–103

    Article  Google Scholar 

  41. Ranjini K, Kanthimathi A, Yasmine YJ (2011) Design of adaptive road traffic control system through unified modeling Language. Int J Comput Appl 14(7):36–41

    Google Scholar 

  42. Reimann J, Seifert M, Aßmann U (2010) Role-based generic model refactoring. Springer, Berlin

    Book  Google Scholar 

  43. Shlyakhter I et al (2003) Debugging overconstrained declarative models using unsatisfiable cores. In: 18th IEEE international conference on automated software engineering. Proceedings

  44. Sidhu BK, Singh K, Sharma N (2018) Refactoring UML models of object-oriented software: a systematic review. Int J Softw Eng Knowl Eng 28(09):1287–1319

    Article  Google Scholar 

  45. Sidhu BK, Singh K, Sharma N (2020) A machine learning approach to software model refactoring. Int J Comput Appl 44:166–177

    Google Scholar 

  46. Sidhu BK, Singh K, Sharma N (2022) A machine learning approach to software model refactoring. Int J Comput Appl 44(2):166–177

    Google Scholar 

  47. Sloane AM (2006) Software abstractions: logic, language, and analysis by Daniel Jackson. The MIT Press, Cambridge

    Google Scholar 

  48. Sunyé G et al (2001) Refactoring UML models. Springer, Berlin

    Book  Google Scholar 

  49. Shah SMA, Anastasakis K, Bordbar B (2002) From UML to alloy and back again. In: Models in software engineering. lecture notes in computer science, vol 6002. Springer

  50. Taghdiri M, Jackson D (2003) A lightweight formal analysis of a multicast key management scheme. Springer, Berlin

    Book  Google Scholar 

  51. Tanhaei M (2020) A model transformation approach to perform refactoring on software architecture using refactoring patterns based on stakeholder requirements. AUT J Math Comput 1(2):179–216

    Google Scholar 

  52. Van Der Straeten R, Jonckers V, Mens T (2007) A formal approach to model refactoring and model refinement. Softw Syst Model 6(2):139–162

    Article  Google Scholar 

  53. Wallace C (2003) Using Alloy in process modelling. Inf Softw Technol 45(15):1031–1043

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Shohreh Ajoudanian.

Additional information

Publisher's Note

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

Appendices

Appendix A

1.1 A-1 Most used symbols in Alloy

The most used symbols in Alloy are shown in Table 5.

Table 5 Most used symbols in Alloy

1.2 A-2 Semantic of the identifiers of proposed formal model

See Table 6.

Table 6 Semantic of the identifiers of proposed formal model in Sect. 4

1.3 A-3 Syntax of Alloy grammar

The complete syntax of Alloy grammar is as follows [23].

figure n

Appendix B

2.1 B-1 A sample instance in Alloy modeling language

An example of TotalDynamicConsistency proposition is presented in Fig. 6.

Fig. 6
figure 6

A sample instance in Alloy modeling language (automatically generated by Alloy Analyzer)

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Ghaedi Heidari, S., Ajoudanian, S. Automatic pattern-based consistency checking in model refactoring: introducing a formal behavioral preserving method. Innovations Syst Softw Eng 20, 65–84 (2024). https://doi.org/10.1007/s11334-022-00525-8

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11334-022-00525-8

Keywords

Navigation