首页    期刊浏览 2024年12月13日 星期五
登录注册

文章基本信息

  • 标题:A Symmetric Approach to Compilation and Decompilation
  • 本地全文:下载
  • 作者:Mads Sig Ager ; Olivier Danvy ; Mayer Goldberg
  • 期刊名称:BRICS Report Series
  • 印刷版ISSN:0909-0878
  • 出版年度:2002
  • 卷号:9
  • 期号:37
  • 出版社:Aarhus University
  • 摘要:Just as specializing a source interpreter can achieve compilation from a source language to a target language, we observe that specializing a target interpreter can achieve compilation from the target language to the source language. In both cases, the key issue is the choice of whether to perform an evaluation or to emit code that represents this evaluation. We substantiate this observation by specializing two source interpreters and two target interpreters. We first consider a source language of arithmetic expressions and a target language for a stack machine, and then the lambda-calculus and the SECD-machine language. In each case, we prove that the target-to-source compiler is a left inverse of the source-to-target compiler, i.e., it is a decompiler. In the context of partial evaluation, compilation by source-interpreter specialization is classically referred to as a Futamura projection. By symmetry, it seems logical to refer to decompilation by target-interpreter specialization as a Futamura embedding.
国家哲学社会科学文献中心版权所有