Software Engineering - Old Questions
11. What is source code translation? Explain the program translation process with diagram.
The simplest form of software re-engineering is program translation where source code in one programming language is automatically translated to source code in some other language. The structure and organisation of the program itself is unchanged. The target language may be an updated version of the original language (e.g. COBOL-74 to COBOL-85) or may be a translation to a completely different language (e.g. FORTRAN to C).
Program translation process:
Fig: Program translation process
The above figure illustrates the process of source code translation. There may be no need
to understand the operation of the software in detail or to modify the system
architecture. The analysis involved can focus on programming language
considerations such as the equivalence of program control constructs.
Source code translation is only economically realistic if an automated
translator is available to do the bulk of the translation. This may be a specially
written program, a bought-in tool to convert from one language to another or a
pattern matching system. In the latter case, a set of instructions how to make the
translation from one representation to another has to be written. Parameterised
patterns in the source language are defined and associated with equivalent patterns in
the target language.