Skip to main content
Log in

A Formal Approach to Checking Consistency in Software Refactoring

  • Published:
Mobile Networks and Applications Aims and scope Submit manuscript

Abstract

In software development, refactoring is a process that improves the system internal structure without altering its external behavior. Applying design patterns, which are common reusable solutions of several kinds of problems is widely adopted. This technique, however, raises a challenging issue that after applying design patterns the software system may not preserve some certain behavioral properties. This paper proposes a new approach to checking consistency between original software system and its evolution at both design and implementation phases. First, we formalize elements of software designs and programs. Methods, based on these formalizations, are proposed for verifying the design and implementation of the system. Finally, the paper presents a case study of Adaptive Road Traffic Control system to illustrate the proposed approach in detail.

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
Fig. 6
Fig. 7

Similar content being viewed by others

References

  1. Object management group. ocl 2.4 specification. (2014)

  2. Advice leaflet 1: The “scoot” urban traffic control system: http://www.scoot-utc.com, (2016)

  3. Alexander C, Ishikawa S, Silverstein M (1977) Pattern languages. Center for Environmental Structure 2:1977

    Google Scholar 

  4. Beckert B, Keller U, Schmitt PH (2002) Translating the object constraint language into first-order predicate logic. In: Proceedings, VERIFY, workshop at federated logic conferences (FLoC), pp 113–123

  5. Bottoni P, Parisi-Presicce F, Taentzer G (2003) Coordinated distributed diagram transformation for software evolution. Electron Notes Theor Comput Sci 72(4):59–70

    Article  Google Scholar 

  6. Bottoni P, Parisi-Presicce F, Taentzer G (2003) Coordinated distributed diagram transformation for software evolution1 1partially supported by the ec under research and training network segravis. Electron Notes Theor Comput Sci 72(4):59–70

    Article  Google Scholar 

  7. Burdy L, Cheon Y, Cok DR, Ernst MD, Kiniry JR, Leavens GT, Rustan K, Leino M, Poll E (2005) An overview of jml tools and applications. Int J Softw Tools Technol Transfer 7(3):212–232

    Article  Google Scholar 

  8. Cabot J, Gogolla M (2012) Object constraint language (ocl): a definitive guide. In: Proceedings of the 12th international conference on formal methods for the design of computer, communication, and software systems: formal methods for model-driven engineering, SFM’12. Springer, Berlin, Heidelberg, pp 58–90

    Google Scholar 

  9. Cok DR (2011) Openjml: Jml for java 7 by extending openjdk. In: NASA formal methods symposium. Springer, pp 472–479

  10. De Moura L, Bjørner N (2008) Z3: an efficient smt solver. In: Proceedings of the theory and practice of software, 14th international conference on tools and algorithms for the construction and analysis of systems, TACAS’08/ETAPS’08. Springer, Berlin, Heidelberg, pp 337–340

    Google Scholar 

  11. Dong J, Sheng Y, Zhang K (2006) A model transformation approach for design pattern evolutions. In: 13th annual IEEE international symposium and workshop on engineering of computer based systems, 2006. ECBS 2006, pp 10–92

  12. Van Eetvelde N, Janssens D (2003) A hierarchical program representation for refactoring, vol 82. UNIGRA’03, Uniform Approaches to Graphical Process Specification Techniques (Satellite Event for {ETAPS} 2003)

  13. Gamma E, Helm R, Johnson R, Vlissides J (1995) Design patterns: elements of reusable object-oriented software. Addison-Wesley Longman Publishing Co., Inc., Boston

    MATH  Google Scholar 

  14. He J (2005) Consistency checking of uml requirements. In: Proceedings of the 10th IEEE international conference on engineering of complex computer systems, ICECCS ’05. IEEE Computer Society, Washington, DC, USA, pp 411–420

    Google Scholar 

  15. Leavens GT, Baker AL, Ruby C (2006) Preliminary design of jml: a behavioral interface specification language for java. ACM SIGSOFT Software Engineering Notes 31(3):1–38

    Article  Google Scholar 

  16. Leavens GT, Poll E, Clifton C, Cheon Y, Ruby C, Cok D, Müller P, Kiniry J, Chalin P, Zimmerman DM, Dietl W, et al. (2008) Available from http://www.jmlspecs.org/

  17. Marché C, Paulin-Mohring C, Urbain X (2004) The krakatoa tool for certificationof java/javacard programs annotated in jml. J Logic Algebraic Program 58(1):89–106

    Article  MATH  Google Scholar 

  18. Matsumoto T, Sakunkonchak T, Saito H, Fujita M (2003) Verification of behavioral consistency in c by using symbolic simulation and program slicer. In: Model checking for dependable software-intensive systems workshop, pp 80–84

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

    Article  Google Scholar 

  20. Mens T, Demeyer S, Janssens D (2002) ForMalising behaviour preserving program transformations. In: Corradini A, Ehrig H, Kreowski H -J, Rozenberg G (eds) Graph transformation, volume 2505 of lecture notes in computer science. Springer, Berlin Heidelberg, pp 286–301

    Google Scholar 

  21. Opdyke WF (1992) Refactoring: a program restructuring aid in designing object-oriented application frameworks. PhD thesis, University of Illinois at Urbana-Champaign

  22. Rasch H, Wehrheim H (2003) Checking consistency in uml diagrams: classes and state machines. In: Najm E, Nestmann U, Stevens P (eds) Formal methods for open object-based distributed systems, volume 2884 of lecture notes in computer science. Springer, Berlin Heidelberg, pp 229–243

    Google Scholar 

  23. Van Der Straeten R, Mens T, Simmonds J, Jonckers V (2003) Using description logic to maintain consistency between uml models. In: Stevens P, Whittle J, Booch G (eds) ÇUMLÈ 2003 - the unified modeling language. Modeling languages and applications, volume 2863 of lecture notes in computer science. Springer, Berlin Heidelberg, pp 326–340

    Google Scholar 

  24. Ward MP, Bennett KH (1995) Formal methods to aid the evolution of software. Int J Softw Eng Knowl Eng 5:25–47

    Article  Google Scholar 

  25. Zhao C, Kong J, Zhang K (2007) Design pattern evolution and verification using graph transformation. In: 40th annual hawaii international conference on system sciences, 2007. HICSS 2007, pp 290a–290a

Download references

Acknowledgments

This work is partly supported by the project no. 102.03–2014.40 granted by Vietnam National Foundation for Science and Technology Development (Nafosted).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hong Anh Le.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Le, H.A., Dao, TH. & Truong, NT. A Formal Approach to Checking Consistency in Software Refactoring. Mobile Netw Appl 22, 356–366 (2017). https://doi.org/10.1007/s11036-017-0807-z

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11036-017-0807-z

Keywords

Navigation