Synchronizing Model and Program Refactoring

  • Tiago Massoni
  • Rohit Gheyi
  • Paulo Borba
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6527)

Abstract

Object models provide abstract information about software structure, but their maintenance is difficult after refactoring takes place. In Model-Driven Development (MDD), effective transferral of model refactoring changes to programs is problematic, especially if these programs are subject to developer manipulation. Consequently, code-driven approaches end up being adopted. We formalize a theory of synchronizers, which are sequences of behavior-preserving program transformations. This theory makes use of invariant-based refactoring, the key idea behind synchronizers. We also establish and prove a soundness theorem for synchronizers. By uncovering the formal requirements for correct refactoring synchronization, the proved properties point out issues – regarding consistency, refactoring automation and quality – that recur in several MDD settings that employ object models.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Fowler, M.: Refactoring—Improving the Design of Existing Code. Addison-Wesley, Reading (1999)MATHGoogle Scholar
  2. 2.
    Opdyke, W.: Refactoring Object-Oriented Frameworks. PhD thesis, UIUC (1992)Google Scholar
  3. 3.
    Jackson, D.: Software Abstractions: Logic, Language and Analysis. MIT Press, Cambridge (2006)Google Scholar
  4. 4.
    Liskov, B., Guttag, J.: Program Development in Java. Addison-Wesley, Reading (2001)MATHGoogle Scholar
  5. 5.
    Mens, T., Tourwe, T.: A survey of software refactoring. IEEE Transactions on Software Engineering 30, 126–139 (2004)CrossRefGoogle Scholar
  6. 6.
    Greenfield, J., Short, K., Cook, S., Kent, S.: Software Factories: Assembling Applications with Patterns, Models, Frameworks, and Tools. Wiley, Chichester (2004)Google Scholar
  7. 7.
    France, R.B., Rumpe, B.: Model-driven development of complex software: a research roadmap. In: FOSE 2007, pp. 37–54 (2007)Google Scholar
  8. 8.
    Hettel, T., Lawley, M., Raymond, K.: Model synchronisation: Definitions for round-trip engineering. In: Vallecillo, A., Gray, J., Pierantonio, A. (eds.) ICMT 2008. LNCS, vol. 5063, pp. 31–45. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  9. 9.
    Harrison, W., Barton, C., Raghavachari, M.: Mapping UML Designs to Java. In: Proceedings of OOPSLA 2000, pp. 178–187 (2000)Google Scholar
  10. 10.
    Lammel, R.: Coupled software transformations. In: SET, pp. 31–35 (2004)Google Scholar
  11. 11.
    Diskin, Z.: Algebraic models for bidirectional model synchronization. In: Busch, C., Ober, I., Bruel, J.-M., Uhl, A., Völter, M. (eds.) MODELS 2008. LNCS, vol. 5301, pp. 21–36. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  12. 12.
    Stevens, P.: A Landscape of Bidirectional Model Transformations. In: Lämmel, R., Visser, J., Saraiva, J. (eds.) GTTSE 2007. LNCS, vol. 5235, pp. 408–424. Springer, Heidelberg (2008)Google Scholar
  13. 13.
    Bohannon, A., Pierce, B., Vaughan, J.: Relational lenses: a language for updatable views. In: PODS, pp. 338–347 (2006)Google Scholar
  14. 14.
    Massoni, T., Gheyi, R., Borba, P.: Formal model-driven program refactoring. In: FASE-ETAPS 2008, pp. 362–376 (2008)Google Scholar
  15. 15.
    Massoni, T., Gheyi, R., Borba, P.: An approach to invariant-based program refactoring. In: Setra Workshop 2006, pp. 91–101 (2006)Google Scholar
  16. 16.
    Gheyi, R., Massoni, T., Borba, P.: A static semantics for alloy and its impact in refactorings. ENTCS 184, 209–233 (2007)MATHGoogle Scholar
  17. 17.
    Massoni, T.: A Model-Driven Approach to Formal Refactoring. PhD thesis, UFPE (2008)Google Scholar
  18. 18.
    Borba, P., Sampaio, A., Cavalcanti, A., Cornélio, M.: Algebraic Reasoning for Object-Oriented Programming. Science of Computer Programming 52, 53–100 (2004)MathSciNetCrossRefMATHGoogle Scholar
  19. 19.
    Banerjee, A., Naumann, D.A.: Ownership confinement ensures representation independence for object-oriented programs. Journal of the ACM 52, 894–960 (2005)MathSciNetCrossRefMATHGoogle Scholar
  20. 20.
    Gheyi, R., Massoni, T., Borba, P.: An abstract equivalence notion for object models. ENTCS, vol. 130, pp. 3–21 (2005)Google Scholar
  21. 21.
    Gheyi, R., Massoni, T., Borba, P.: A Complete Set of Object Modeling Laws for Alloy. In: Oliveira, M.V.M., Woodcock, J. (eds.) SBMF 2009. LNCS, vol. 5902, pp. 204–219. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  22. 22.
    Massoni, T., Gheyi, R., Borba, P.: Synchronizing model and program refactoring (2010), http://www.dsc.ufcg.edu.br/~spg/uploads/massoni-tech10.pdf
  23. 23.
    Morgan, C.: Programming from Specifications, 2nd edn. Prentice-Hall, Englewood Cliffs (1998)MATHGoogle Scholar
  24. 24.
    Clarke, D.: Object Ownership and Containment. PhD thesis, UNSW (2001)Google Scholar
  25. 25.
    Barnett, M., DeLine, R., Fähndrich, M., Leino, K.R.M., Schulte, W.: Verification of Object-Oriented Programs with Invariants. Journal of Object Technology 3, 27–56 (2004)CrossRefGoogle Scholar
  26. 26.
    Martin, A.: Machine-Assisted Theorem-Proving for Software Engineering. PhD thesis, Penbroke College (1994)Google Scholar
  27. 27.
    Antkiewicz, M., Czarnecki, K.: Design space of heterogeneous synchronization. In: GTTSE, Braga, Portugal, pp. 3–46 (2008)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Tiago Massoni
    • 1
  • Rohit Gheyi
    • 1
  • Paulo Borba
    • 2
  1. 1.Federal University of Campina GrandeBrazil
  2. 2.Federal University of PernambucoBrazil

Personalised recommendations