Academic Commons


Translating Between Programming Languages Using A Canonical Representation And Attribute Grammar Inversion

Farrow, Rodney; Yellin, Daniel

Automatic translation between programming languages is an important tool for increasing program reusability. Often the need arises to transport a large software system from one source language environment to another. Performing such a translation by hand is a large undertaking, costly in manpower and very error-prone. For this reason, several researchers have built automated tools to aid them in particular such projects [3, 1]. In this paper we present a new methodology for building source-to-source translators. This methodology involves designing a canonical form to represent programs of all source languages involved, and using attribute grammars (AGs) and automatic AG-inversion to build bidirectional translators between the various source languages and the canonical form. To test the feasibility of these ideas, we have created a system to translate between the C and Pascal programming languages.



More About This Work

Academic Units
Computer Science
Department of Computer Science, Columbia University
Columbia University Computer Science Technical Reports, CUCS-247-86
Published Here
November 2, 2011