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.
Similar content being viewed by others
References
Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley (1999)
Mens T. and Tourwé T. (2004). A survey of software refactoring. Trans. Softw. Eng. 30: 126–139
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)
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)
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
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
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)
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)
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)
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)
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)
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)
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)
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)
Demeyer, S., Janssens, D., Mens, T.: Simulation of a LAN. Electron. Notes Theor. Comput. Sci. 72 (2002)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Languages and Systems. Addison-Wesley (1994)
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)
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)
Corradini A., Montanari U. and Rossi F. (1996). Graph processes. Fundamenta Informaticae 26: 241–265
Habel A., Heckel R. and Taentzer G. (1996). Graph grammars with negative application conditions. Fundamenta Informaticae 26: 287–313
Opdyke, W.F.: Refactoring: A program restructuring aid in designing object-oriented application frameworks. PhD thesis, University of Illinois at Urbana-Champaign (1992)
Roberts D., Brant J. and Johnson R.E. (1997). A refactoring tool for Smalltalk. Theory Practice Object Systems 3: 253–263
Roberts, D.B.: Practical analysis for refactoring. PhD thesis, University of Illinois at Urbana-Champaign (1999)
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)
Tichelaar, S.: Modeling object-oriented software for reverse engineering and refactoring. PhD thesis, University of Bern (2001)
Mens, T., Taentzer, G., Runge, O.: Detecting structural refactoring conflicts using critical pair analysis. Electron. Notes Theor. Comput. Sci. (2004)
Taentzer, G.: Parallel and distributed graph transformation: formal description and application to communication-based systems. PhD thesis, TU Berlin (1996) Shaker Verlag
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
Mens T. (2002). A state-of-the-art survey on software merging. Trans. Softw. Eng. 28: 449–462
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)
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)
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 2004
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
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)
Mens T., Van Eetvelde N., Demeyer S. and Janssens D. (2005). Formalizing refactorings with graph transformations. Softw. Maintenance Evolut. Res. Practice 17: 247–276
Schippers, H., Van Gorp, P., Janssens, D.: Leveraging UML profiles to generate plugins from visual model transformations. Electron. Notes Theor. Comput. Sci. (2004)
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)
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)
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Dr. Francesco Parisi-Presicce.
Rights and permissions
About this article
Cite this article
Mens, T., Taentzer, G. & Runge, O. Analysing refactoring dependencies using graph transformation. Softw Syst Model 6, 269–285 (2007). https://doi.org/10.1007/s10270-006-0044-6
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10270-006-0044-6