Mariano Ceccato, Paolo Tonella, Cristina Matteotti

Goto Elimination Strategies in the Migration of Legacy Code to Java


Abstract

Legacy systems are often large and difficult to maintain, but rewriting them from scratch is usually not a viable option. Reenginering remains the only way to modernize them. We have been recently involved in a migration project aiming at porting an old, large (8 MLOC) legacy banking system to a modern architecture. The goal of the project is: (1) moving from an old, proprietary language to Java; (2) replacing ISAM indexed files with a relational database; (3) upgrading the character oriented interface to a modern GUI.

One of the steps in the migration process deals with the elimination of unstructured code (unconditional jumps such as GOTO statements). In this paper we present four alternative strategies for GOTO elimination that we evaluated in the project. Each has pros and cons, but when used in a real case, it turned out that one produced completely unreadable code, hence it was discarded. The final choice was a combination of the three remaining strategies.

PDF version of the paper.

Valid XHTML 1.0!

Maintainer: ceccato at itc dot it