Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Decompilation: the enumeration of types and grammars
Breuer P., Bowen J. ACM Transactions on Programming Languages and Systems16 (5):1613-1647,1994.Type:Article
Date Reviewed: Sep 1 1995

A decompiler accepts low-level object code and produces the high-level source code that compiles into the object code. This paper describes a technique for constructing decompilers using attribute grammars and functional programming.

Given the grammars for the source and object languages, the authors show how to augment the source language grammar with attributes--values passed up and down the parse tree while it is being constructed--so that the grammar efficiently generates only acceptable source code.

A decompiler is an implementation of an attribute grammar as a functional program. Some care is required when implementing infinite attributes (such as the set of “if” statements); an enumeration over a set of infinite attributes should result in all possible combinations. Defining list-manipulating operations with the proper interleaving behavior results in a straightforward translation from an attribute grammar to a functional program.

Computability and abstract execution arguments show, among other things, that desirable general decompilation algorithms also solve the halting problem, and so do not exist, and that, for a properly behaved attribute grammar, the associated decompiler properly generates the infinity of source codes.

This work represents a useful first step toward decompilation; it will be interesting to see how it can be extended, for example, to deal with optimized object code or to recover the original source code’s type structures. A familiarity with attribute grammars and functional programming speeds the reading along, but is not necessary for the diligent reader. There are several small errors (mostly typos) throughout the paper.

Reviewer:  R. Clayton Review #: CR118863 (9509-0697)
Bookmark and Share
 
Translator Writing Systems And Compiler Generators (D.3.4 ... )
 
 
Operations On Languages (F.4.3 ... )
 
 
Syntax (D.3.1 ... )
 
 
Applicative (Functional) Programming (D.1.1 )
 
 
Formal Definitions And Theory (D.3.1 )
 
 
Logic Programming (D.1.6 )
 
Would you recommend this review?
yes
no
Other reviews under "Translator Writing Systems And Compiler Generators": Date
The art of compiler design
Pittman T., Peters J., Prentice-Hall, Inc., Upper Saddle River, NJ, 1992. Type: Book (9780130481900)
Apr 1 1994
Compiler generation from denotational semantics
Paulson L., Cambridge University Press, New York, NY, 1984. Type: Book (9780521268431)
Jun 1 1985
Automatic compiler production: the front end
Reiss S. IEEE Transactions on Software Engineering SE-13(6): 609-627, 1987. Type: Article
Feb 1 1988
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy