DECOMPILATION - THE ENUMERATION OF TYPES AND GRAMMARS

Citation
Pt. Breuer et Jp. Bowen, DECOMPILATION - THE ENUMERATION OF TYPES AND GRAMMARS, ACM transactions on programming languages and systems, 16(5), 1994, pp. 1613-1647
Citations number
33
Categorie Soggetti
Computer Sciences","Computer Science Software Graphycs Programming
ISSN journal
01640925
Volume
16
Issue
5
Year of publication
1994
Pages
1613 - 1647
Database
ISI
SICI code
0164-0925(1994)16:5<1613:D-TEOT>2.0.ZU;2-8
Abstract
While a compiler produces low-level object code from high-level source code, a decompiler produces high-level code from low-level code and h as applications in the testing and validation of safety-critical softw are. The decompilation of an object code provides an independent demon stration of correctness that is hard to better for industrial purposes (an alternative is to prove the compiler correct). But, although comp iler compilers are in common use in the software industry, a decompile r compiler is much more unusual. It turns out that a data type specifi cation for a programming-language grammar can be remolded into a funct ional program that enumerates all of the abstract syntax trees of the grammar. This observation is the springboard for a general method for compiling decompilers from the specifications of(nonoptimizing) compil ers. This paper deals with methods and theory, together with an applic ation of the technique. The correctness of a decompiler generated from a simple Occam-like compiler specification is demonstrated. The basic problem of enumerating the syntax trees of grammars, and then stoppin g, is shown to have no recursive solution, but methods of abstract int erpretation can be used to guarantee the adequacy and completeness of our technique in practical instances, including the decompiler for the language presented here.