Decompilation: the enumeration of types and grammars

Author:

Breuer Peter T.1,Bowen Jonathan P.2

Affiliation:

1. Univ. Polite´cnica de Madrid, Madrid, Spain

2. Oxford Univ., Oxford, UK

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 has applications in the testing and validation of safety-critical software. The decompilation of an object code provides an independent demonstration of correctness that is hard to better for industrial purposes (an alternative is to prove the compiler correct). But, although compiler compilers are in common use in the software industry, a decompiler compiler is much more unusual. It turns out that a data type specification for a programming-language grammar can be remolded into a functional 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) compilers. This paper deals with methods and theory, together with an application 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 stopping, is shown to have no recursive solution, but methods of abstract interpretation can be used to guarantee the adequacy and completeness of our technique in practical instances, including the decompiler for the language presented here.

Publisher

Association for Computing Machinery (ACM)

Subject

Software

Reference33 articles.

1. ABELSON H. SUSSMAN G. J. AND SUSSMAN J. 1985. Structure and Interpretation of Computer Programs. MIT Press Cambridge Mass. ABELSON H. SUSSMAN G. J. AND SUSSMAN J. 1985. Structure and Interpretation of Computer Programs. MIT Press Cambridge Mass.

2. ABRAMSKY S. AND HANKIN C. EDS. 1987. Abstract Interpretation of Declarative Languages. Ellis Horwood Computers and Their Applications. Halsted Press New York. ABRAMSKY S. AND HANKIN C. EDS. 1987. Abstract Interpretation of Declarative Languages. Ellis Horwood Computers and Their Applications. Halsted Press New York.

3. BOOLOS G. AND JEFFREY R. C. 1989. Computability and Logic. 3rd ed. Cambridge University Press New York. BOOLOS G. AND JEFFREY R. C. 1989. Computability and Logic. 3rd ed. Cambridge University Press New York.

4. From programs to object code and back again using logic programming: Compilation and decompilation;BOWEN J. P.;J. Softw. Maint. Res. Pract.,1993

Cited by 11 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. On the use of statistical machine translation for suggesting variable names for decompiled code: The Pharo case;Journal of Computer Languages;2024-06

2. A comparison of code similarity analysers;Empirical Software Engineering;2017-10-25

3. CPR: cross platform binary code reuse via platform independent trace program;Proceedings of the 26th ACM SIGSOFT International Symposium on Software Testing and Analysis;2017-07-10

4. Type Inference on Executables;ACM Computing Surveys;2016-05-02

5. Processor Rescue;Communications in Computer and Information Science;2015

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3