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.
Similar content being viewed by others
References
Abid C et al (2020) 30 years of software refactoring research: a systematic literature review
Akhtar SM et al (2020) A systematic literature review on software-refactoring techniques, challenges, and practices
Alexander C (1977) A pattern language: towns, buildings, construction. Oxford University Press, Oxford
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
AlOmar EA et al (2021) On preserving the behavior in software refactoring: a systematic mapping study. Inf Softw Technol 140:106675
AlOmar EA, Mkaouer MW, Ouni A (2021) Toward the automatic classification of self-affirmed refactoring. J Syst Softw 171:110821
Arendt T, Taentzer G (2013) A tool environment for quality assurance based on the eclipse modeling framework. Autom Softw Eng 20(2):141–184
Baqais AAB, Alshayeb MJ (2020) Automatic software refactoring: a systematic literature review. Softw Qual J 28(2):459–502
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
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
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
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
Dennis G et al (2004) Automating commutativity analysis at the design level. SIGSOFT Softw Eng Notes 29(4):165–174
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
Emmerich W et al (1999) Managing standards compliance. IEEE Trans Softw Eng 25(6):836–851
Finkelstein A et al (1993) Inconsistency handling in multi-perspective specifications. In: European software engineering conference. Springer
Fowler M (2018) Refactoring: improving the design of existing code. Addison-Wesley Professional, Boston
Gamma E (1995) Design patterns: elements of reusable object-oriented software. Pearson Education India, Bengaluru
Genero M, Piattini M, Calero C (2005) A survey of metrics for UML class diagrams. J Object Technol 4(9):59–92
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
Gheyi R, Massoni T, Borba P (2005) Type-safe refactorings for alloy
Jackson D (2002) Alloy: a lightweight object modelling notation. ACM Trans Softw Eng Methodol 11(2):256–290
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
Jackson D, Shlyakhter I, Sridharan M (2001) A micromodularity mechanism. ACM SIGSOFT Softw Eng Notes 26(5):62–73
Kim DK (2015) Design pattern based model transformation with tool support. Softw Pract Exp 45(4):473–499
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
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
Markovic S (2008) Model refactoring using transformations. EPFL, Lausanne
Marković S, Baar T (2008) Refactoring OCL annotated UML class diagrams. Softw Syst Model 7(1):25–47
Massoni T, Gheyi R, Borba P (2005) Formal refactoring for UML class diagrams
Mens T, Taentzer G, Müller D (2007) Model-driven software refactoring, pp 25–27
Mens T, Tourwe T (2004) A survey of software refactoring. IEEE Trans Softw Eng 30(2):126–139
Misbhauddin M, Alshayeb M (2012) Towards a multi-view approach to model-driven refactoring. IEEE
Misbhauddin M, Alshayeb M (2015) UML model refactoring: a systematic literature review. Empir Softw Eng 20(1):206–251
Misbhauddin M, Alshayeb M (2019) An integrated metamodel-based approach to software model refactoring. Softw Syst Model 18(3):2013–2050
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
Nissen HW et al (1996) Managing multiple requirements perspectives with metamodels. IEEE Softw 13(2):37–48
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
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
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
Reimann J, Seifert M, Aßmann U (2010) Role-based generic model refactoring. Springer, Berlin
Shlyakhter I et al (2003) Debugging overconstrained declarative models using unsatisfiable cores. In: 18th IEEE international conference on automated software engineering. Proceedings
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
Sidhu BK, Singh K, Sharma N (2020) A machine learning approach to software model refactoring. Int J Comput Appl 44:166–177
Sidhu BK, Singh K, Sharma N (2022) A machine learning approach to software model refactoring. Int J Comput Appl 44(2):166–177
Sloane AM (2006) Software abstractions: logic, language, and analysis by Daniel Jackson. The MIT Press, Cambridge
Sunyé G et al (2001) Refactoring UML models. Springer, Berlin
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
Taghdiri M, Jackson D (2003) A lightweight formal analysis of a multicast key management scheme. Springer, Berlin
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
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
Wallace C (2003) Using Alloy in process modelling. Inf Softw Technol 45(15):1031–1043
Author information
Authors and Affiliations
Corresponding author
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.
1.2 A-2 Semantic of the identifiers of proposed formal model
See Table 6.
1.3 A-3 Syntax of Alloy grammar
The complete syntax of Alloy grammar is as follows [23].
Appendix B
2.1 B-1 A sample instance in Alloy modeling language
An example of TotalDynamicConsistency proposition is presented in Fig. 6.
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.
About this article
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
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11334-022-00525-8