Building Flexible Refactoring Tools with XML

  • Nabor C. Mendonça UNIFOR
  • Paulo H. M. Maia UFC
  • Leonardo A. Fonseca UNIFOR
  • Rossana M. C. Andrade UFC

Resumo


Refactoring, i.e., the process of changing a software system to improve its internal quality while preserving its external behavior, is gaining increasing acceptance among software developers. Even though many refactoring tools are now available for a variety of programming languages, most of them rely on their own, closed mechanisms for representing and manipulating source code information, which makes them difficult to customize, extend and reuse. This paper makes three contributions towards the development of more flexible refactoring tools. Firstly, it proposes an XML-centric refactoring process in which XML is used as a standard way to represent, analyze and modify source code information. Secondly, it presents a concrete realization of that process, in the form of a refactoring framework, called RefaX, which builds on existing XML-based source code models and processing technologies to facilitate the development, extension and reuse of refactoring tools. Finally, it demonstrates the applicability of the proposed process and framework through two RefaX-based refactoring prototypes for Java and C++, respectively.

Referências

Badros, G. J. JavaML: A Markup Language for Java Source Code. Proc. of the 9th International World Wide Web Conference (WWW9), Amsterdam, Netherlands, May 2000.

BeaultyJ Home Page. Available at http://beautyj.berlios.de/beautyJ.html. Accessed on 04/03/2004.

Beck, K. Extreme Programming Explained: Embrace Change. Addison-Wesley, 1999.

C# Refactoring Tool home page. Available at http://dotnetrefactoring.com/. Accessed on 04/03/2004.

Carneiro, G., Mendonça, M. Relacionando Refactorings e Métricas de Código Fonte - Um Primeiro Passo para Detecção Automática de Oportunidades de Refactoring. Proc. of the XVII Simpósio Brasileiro de Engenharia de Software (SBES 2003), Manaus, Amazonas, Brasil, October 2003, pp. 51-66.

Collard, M. L, Kagdi, H. H., Maletic, J. I. An XML-Based Lightweight C++ Fact Extractor. Proc. of the 11th IEEE International Workshop on Program Comprehension (IWPC '03), Portland, USA, May 2003.

Collard, M. L. An Infrastructure to Support Meta-Differencing and Refactoring of Source Code. Proc. of the 18th IEEE International Conference on Automated Software Engineering, Doctoral Symposium, Montreal, Quebec, Canada, October 2003.

Columbus Home Page. Available at http://www.frontendart.com/. Accessed on 28/04/2004.

Exist Home Page. Available at http://exist.sourceforge.net. Accessed on 04/03/2004.

Fonseca, L. A., Mendonça, N. C., and Maia, P. H. M. Towards Reusable Code Analysis Tools Using Standard XML Technologies. Proc. of the I Workshop de Ciências da Computação e Sistemas da Informação da Região Sul (WORKCOM-SUL), Palhoça, SC, May 2004.

Fowler, M. Refactoring: Improving the Design of Existing Programs. Addison-Wesley. 1999.

Gamma, E., Helm, R., Johnson, R., Vlissides, J. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994.

Holt, R. C., Winter, A., and Schürr, A. GXL: Toward a Standard Exchange Format. Proc. of the 7th Working Conf. on Reverse Engineering (WCRE'00), Brisbane, Australia, November 2000, pp. 162-171.

IPSI-XQ Home Page. Available at [link]. Accessed on 04/03/2004.

JFactor Home page. Available at [link]. Accessed on 04/03/2004.

Jikes Home page. Available at [link]. Accessed on 04/03/2004.

Lehti, P. Design and Implementation of a Data Manipulation Processor for an XML Query Language. Ph.D. Thesis, Technical University of Darmstadt, Germany, 2001.

Maletic, J.I., Collard, M.L. and Marcus, A. Source Code Files as Structured Documents. Proc. of the10th Int. Workshop on Program Comprehension (IWPC '02), Paris, France, June 2002, pp. 289-292.

Mammas, E. and Kontogiannis, C. Towards Portable Source Code Representations Using XML. Proc. of the 7th Working Conf. on Reverse Engineering (WCRE'00), Brisbane, Australia, November 2000, pp. 172-18.

Mayrhauser, A. and Marie Vans, A. Program Comprehension During Software Maintenance and Evolution. IEEE Computer, Vol. 28, No. 8, pp. 44-55, August 1995.

Mens, T. and Tourwé, T. A Survey of Software Refactoring. IEEE Transactions on Software Engineering, Vol. 30, No. 2, February 2004.

Opdyke, W. F. Refactoring: A Program Restructuring Aid in Designing Object-Oriented Aplications Framework. Ph.D. Thesis, Univ. of Illinois at Urbana-Champaign, 1992.

Pressman, Roger S. Software Engineering - A Practitioner's Approach. McGraw-Hill, 5th Edition, 2000.

Ret4J Home Page. Available at http://www.alphaworks.ibm.com/tech/ret4j. Accessed on 04/03/2004.

Roberts, D. B. Practical Analysis for Refactoring. Ph.D. Thesis, Univ. of Illinois at Urbana-Champaign, 1999.

SAX Home page. Available at http://www.saxproject.org. Accessed on 04/03/2004.

Tamino Home Page. Available at http://www.softwareag.com/tamino. Accessed on 04/03/2004.

Tatarinovi, I., Ives, Z. G., Halevy, A. Y., Weld, D.S. Updating XML. Proc. of ACM Special Interest Group on Management of Data (SIGMOD 2001), California, USA, May 2001.

Tichelaar, S. et al. A Meta-model for Language-Independent Refactoring. Proc. of the International Symposium on Principles of Software Evolution (ISPSE 2000), Kanazawa, Japan, November 2000.

W3C. Document Object Model (DOM). Available at http://www.w3.org/DOM. Accessed on 04/03/2004.

W3C. Extensible Markup Language (XML). Available at http://www.w3.org/TR/xml. Accessed on 04/03/2004.

W3C. XML Path Language (XPath) Version 1.0. W3C Recommendation November 1999. Available at http://www.w3.org/TR/xpath. Accessed on 04/03/2004.

W3C. XQuery 1.0: An XML Query Language. W3C Working Draft 12 November 2003. Available at http://www.w3.org/TR/xquery/. Accessed on 04/03/2004.

W3C. XSL Transformations (XSLT) Version 1.0. W3C Recommendation November 1999. Available at http://www.w3.org/TR/xslt. Accessed on 04/03/2004.

XIndice Home Page. Available at http://www.xreftech.com/. Accessed on 04/03/2004.

XML:DB. XUpdate - XML Update Language Working Draft. Available at http://www.xmldb.org/xupdate/. Accessed on 04/03/2004.
Publicado
18/10/2004
Como Citar

Selecione um Formato
MENDONÇA, Nabor C.; MAIA, Paulo H. M.; FONSECA, Leonardo A.; ANDRADE, Rossana M. C.. Building Flexible Refactoring Tools with XML. In: SIMPÓSIO BRASILEIRO DE ENGENHARIA DE SOFTWARE (SBES), 18. , 2004, Brasília/DF. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2004 . p. 178-193. DOI: https://doi.org/10.5753/sbes.2004.23841.