Software & Systems Modeling

, Volume 6, Issue 3, pp 269–285

Analysing refactoring dependencies using graph transformation

Special Section Paper

Abstract

Refactoring is a widely accepted technique to improve the structure of object-oriented software. Nevertheless, existing tool support remains restricted to automatically applying refactoring transformations. Deciding what to refactor and which refactoring to apply still remains a difficult manual process, due to the many dependencies and interrelationships between relevant refactorings. In this paper, we represent refactorings as graph transformations, and we propose the technique of critical pair analysis to detect the implicit dependencies between refactorings. The results of this analysis can help the developer to make an informed decision of which refactoring is most suitable in a given context and why. We report on several experiments we carried out in the AGG graph transformation tool to support our claims.

Keywords

Refactoring Graph transformation Critical pair analysis Dependency analysis AGG 

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 (1999)Google Scholar
  2. 2.
    Mens T. and Tourwé T. (2004). A survey of software refactoring. Trans. Softw. Eng. 30: 126–139 CrossRefGoogle Scholar
  3. 3.
    Sunyé, G., Pollet, D., LeTraon, Y., Jézéquel, J.-M.: Refactoring UML models. In: Proc. UML 2001. Lecture Notes in Computer Science, vol. 2185, pp. 134–138. Springer Heidelberg (2001)Google Scholar
  4. 4.
    Boger, M., Sturm, T., Fragemann, P.: Refactoring browser for UML. In: Proc. 3rd Int’l Conf. on eXtreme Programming and Flexible Processes in Software Engineering, pp. 77–81. Alghero, Sardinia (2002)Google Scholar
  5. 5.
    Van Gorp P., Stenten H., Mens T. and Demeyer S. (2003). Towards automating source-consistent UML refactorings. In: Stevens, P., Whittle, J., and Booch, G. (eds) UML 2003—The Unified Modeling Language. Lecture Notes in Computer Science, vol. 2863, pp 144–158. Springer, Heidelberg Google Scholar
  6. 6.
    Porres I. (2003). Model refactorings as rule-based update transformations. In: Stevens, P., Whittle, J. and Booch, G. (eds) UML 2003—The Unified Modeling Language. Lecture Notes in Computer Science, vol. 2863, pp 159–174. Springer, Heidelberg Google Scholar
  7. 7.
    Correa, A., Werner, C.: Applying refactoring techniques to UML/OCL models. In: Proc. Int’l Conf. UML 2004. Lecture Notes in Computer Science, vol. 3273, pp. 173–187. Springer, Heidelberg (2004)Google Scholar
  8. 8.
    Tourwé, T., Mens, T.: Identifying refactoring opportunities using logic meta programming. In: Proc. 7th European Conf. Software Maintenance and Re-engineering (CSMR 2003). pp. 91–100. IEEE Computer Society Press (2003)Google Scholar
  9. 9.
    van Emden, E., Moonen, L.: Java quality assurance by detecting code smells. In: Proc. 9th Working Conf. Reverse Engineering. pp. 97–107 IEEE Computer Society Press (2002)Google Scholar
  10. 10.
    Marinescu, R.: Using object-oriented metrics for automatic design flaws in large scale systems. In: Demeyer, S., Bosch, J., (eds.) Object-Oriented Technology (ECOOP’ 98 Workshop Reader). Lecture Notes in Computer Science, vol. 1543, pp. 252–253. Springer, Heidelberg (1998)Google Scholar
  11. 11.
    Simon, F., Frank Steinbrückner, Lewerentz, C.: Metrics based refactoring. In: Proc. European Conf. Software Maintenance and Reengineering, pp. 30–38. IEEE Computer Society Press (2001)Google Scholar
  12. 12.
    Bottoni, P., Taentzer, G., Schürr, A.: Efficient parsing of visual languages based on critical pair analysis and contextual layered graph transformation. In: Proc. IEEE Symp. Visual Languages, pp. 59–60 (2000)Google Scholar
  13. 13.
    Hausmann, J.H., Heckel, R., Taentzer, G.: Detection of conflicting functional requirements in a use case-driven approach. In: Proc. Int’l Conf. Software Engineering, pp. 105–115. ACM Press (2002)Google Scholar
  14. 14.
    Heckel, R., Jochen Malte Küster, Taentzer, G.: Confluence of typed attributed graph transformation systems. In: Graph Transformation. Lecture Notes in Computer Science, vol. 2505, pp. 161–176. Springer, Heidelberg (2002)Google Scholar
  15. 15.
    Demeyer, S., Janssens, D., Mens, T.: Simulation of a LAN. Electron. Notes Theor. Comput. Sci. 72 (2002)Google Scholar
  16. 16.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Languages and Systems. Addison-Wesley (1994)Google Scholar
  17. 17.
    Plump, D.: Hypergraph rewriting: critical pairs and undecidability of confluence. In: Sleep, M., Plasmeijer, M., van Eekelen, M.C. (eds.) Term Graph Rewriting, pp. 201–214. Wiley (1993)Google Scholar
  18. 18.
    Ehrig, H., Prange, U., Taentzer, G.: Fundamental theory for typed attributed graph transformation. In: Parisi-Presicce, F., Bottoni, P., Engels, G. (eds.) Proc. 2nd Int’l Conf. Graph Transformation (ICGT’ 04), Rome, Italy. Lecture Notes in Computer Science, vol. 3256, pp. 161–177. Springer, Heidelberg (2004)Google Scholar
  19. 19.
    Corradini A., Montanari U. and Rossi F. (1996). Graph processes. Fundamenta Informaticae 26: 241–265 MATHGoogle Scholar
  20. 20.
    Habel A., Heckel R. and Taentzer G. (1996). Graph grammars with negative application conditions. Fundamenta Informaticae 26: 287–313 MATHGoogle Scholar
  21. 21.
    Opdyke, W.F.: Refactoring: A program restructuring aid in designing object-oriented application frameworks. PhD thesis, University of Illinois at Urbana-Champaign (1992)Google Scholar
  22. 22.
    Roberts D., Brant J. and Johnson R.E. (1997). A refactoring tool for Smalltalk. Theory Practice Object Systems 3: 253–263 CrossRefGoogle Scholar
  23. 23.
    Roberts, D.B.: Practical analysis for refactoring. PhD thesis, University of Illinois at Urbana-Champaign (1999)Google Scholar
  24. 24.
    Tichelaar, S., Ducasse, S., Demeyer, S., Nierstrasz, O.: A meta-model for language-independent refactoring. In: Proc. Int’l Symp. Principles of Software Evolution, pp. 157–169. IEEE Computer Society Press (2000)Google Scholar
  25. 25.
    Tichelaar, S.: Modeling object-oriented software for reverse engineering and refactoring. PhD thesis, University of Bern (2001)Google Scholar
  26. 26.
    Mens, T., Taentzer, G., Runge, O.: Detecting structural refactoring conflicts using critical pair analysis. Electron. Notes Theor. Comput. Sci. (2004)Google Scholar
  27. 27.
    Taentzer, G.: Parallel and distributed graph transformation: formal description and application to communication-based systems. PhD thesis, TU Berlin (1996) Shaker VerlagGoogle Scholar
  28. 28.
    Mens T., VanDer Straeten R. and D’Hondt M. (2006). Detecting and resolving model inconsistencies using transformation dependency analysis. In: Nierstrasz, O., Whittle, J., Harel, D., and Reggio, G. (eds) Model Driven Engineering. Languages and Systems Lecture Notes in Computer Science, vol. 4199, pp 200–214. Springer, Heidelberg CrossRefGoogle Scholar
  29. 29.
    Mens T. (2002). A state-of-the-art survey on software merging. Trans. Softw. Eng. 28: 449–462 CrossRefGoogle Scholar
  30. 30.
    Westfechtel, B.: Structure-oriented merging of revisions of software documents. In: Proc. Int’l Workshop on Software Configuration Management, pp. 68–79. ACM Press (1991)Google Scholar
  31. 31.
    Mens, T.: Conditional graph rewriting as a domain-independent formalism for software evolution. In: Proc. Int’l Conf. Agtive 1999: Applications of Graph Transformations with Industrial Relevance. Lecture Notes in Computer Science, vol. 1779, pp. 127–143. Springer, Heidelberg (2000)Google Scholar
  32. 32.
    Van Eetvelde, N., Janssens, D.: Extending graph rewriting for refactoring. In: Graph Transformations. Lecture Notes in Computer Science, vol. 3526, pp. 399–415. Springer, Heidelberg (2004) Proc. Second Int’l Conf. Graph Transformation (ICGT), Rome, Italy, September–October 2004Google Scholar
  33. 33.
    Bottoni P., Parisi-Presicce F. and Taentzer G. (2004). Specifying integrated refactoring with distributed graph transformation. In: Pfaltz, J., Nagl, M., and Boehlen, B. (eds) Application of Graph Transformations with Industrial Relevance (AGTIVE’ 03) Lecture Notes in Computer Science, vol. 3062, pp 220–235. Springer, Heidelberg Google Scholar
  34. 34.
    Bottoni, P., Parisi-Presicce, P., Taentzer, G.: Specifying coherent refactoring of software artefacts with distributed graph transformations. In: Bommel, P. (ed.) Transformation of Knowledge, Information, and Data: Theory and Applications. Idea Group Publishing (2005)Google Scholar
  35. 35.
    Mens T., Van Eetvelde N., Demeyer S. and Janssens D. (2005). Formalizing refactorings with graph transformations. Softw. Maintenance Evolut. Res. Practice 17: 247–276 CrossRefGoogle Scholar
  36. 36.
    Schippers, H., Van Gorp, P., Janssens, D.: Leveraging UML profiles to generate plugins from visual model transformations. Electron. Notes Theor. Comput. Sci. (2004)Google Scholar
  37. 37.
    Zhang, J., Yuehua Lin, J.G.: Generic and domain-specific model refactoring using a model transformation engine. In: Model-driven Software Development—Research and Practice in Software Engineering. Springer, Heidelberg (2005)Google Scholar
  38. 38.
    Lambers, L., Ehrig, H., Orejas, F.: Efficient detection of conflicts in graph-based model transformation. In: Proc. International Workshop on Graph and Model Transformation (GraMoT’05). Electronic Notes in Theoretical Computer Science, vol. 152, pp. 97–109. Elsevier Science (2006)Google Scholar

Copyright information

© Springer-Verlag 2007

Authors and Affiliations

  1. 1.Software Engineering LabUniversité de Mons-HainautMonsBelgium
  2. 2.Faculty of Mathematics and Computer SciencePhilipps- Universität MarburgMarburgGermany
  3. 3.Technische Universität BerlinBerlinGermany

Personalised recommendations