An Experiment in Automatic Conversion of Legacy Java Programs to C#

Source-to-source transformation is an important tool for migrating key legacy programs to modern languages and platforms and giving them new life. Many organizations cannot do without their legacy systems on the one hand, but are stuck in an old technology on the other hand. Converting to a newer programming language can ease integration with modern technologies, give access to a wider developers population and/or lower maintenance costs. Serious language conversion efforts use automated tools, since manual conversion is out of question for non- trivial programs. We present our experiment in building a Java to C# transformer, Java2C#, that partially converts legacy Java code (version 1.1 or earlier) to C#. Java2C# is written in TXL, a language specially designed for program transformation, using tree re-writing. We explore and discuss the challenges and issues to consider when automatically transforming Java to C# and when building automated language transformers in general.

[1]  Chris Verhoef,et al.  The Realities of Language Conversions , 2000, IEEE Softw..

[2]  Kevin A. Schneider,et al.  Software engineering by source transformation - experience with TXL , 2001, Proceedings First IEEE International Workshop on Source Code Analysis and Manipulation.

[3]  Christian S. Collberg,et al.  A Taxonomy of Obfuscating Transformations , 1997 .

[4]  James R. Cordy,et al.  TXL - A Language for Programming Language Tools and Applications , 2004, LDTA@ETAPS.

[5]  Maxim Mossienko Automated Cobol to Java recycling , 2003, Seventh European Conference onSoftware Maintenance and Reengineering, 2003. Proceedings..

[6]  Kevin A. Schneider,et al.  Grammar programming in TXL , 2002, Proceedings. Second IEEE International Workshop on Source Code Analysis and Manipulation.

[7]  Kevin A. Schneider,et al.  Using design recovery techniques to transform legacy systems , 2001, Proceedings IEEE International Conference on Software Maintenance. ICSM 2001.

[8]  James R. Cordy,et al.  The TXL Programming Language-Version 10 , 2000 .

[9]  Harry M. Sneed,et al.  Risks involved in reengineering projects , 1999, Sixth Working Conference on Reverse Engineering (Cat. No.PR00303).

[10]  Bernhard Westfechtel,et al.  Graph-based tools for re-engineering , 2002, J. Softw. Maintenance Res. Pract..