在编译器中验证开销注释
Certifying cost annotations in compilers
摘要:
我们讨论的问题,建立一个编译器,它可以解除在一个可证明的正确的方式的执行成本的目标代码的成本注释的源代码上的信息。为此,我们需要一个清晰而灵活的画面:(i)成本注释的含义,(ii)证明它们合理和精确的方法,以及(iii)这种证明可以组成的方式。我们对这三个问题提出了一个所谓的标签方法。作为第一步,我们研究其应用程序的玩具编译器。这个正式的研究表明,标签的方法具有良好的组合性和可扩展性的属性。为了提供进一步的证据,这种说法,我们报告我们的成功经验,在实现和测试的标签方法的顶部上的原型编译器OCAML(一个大片段)的C语言。
英文摘要:
We discuss the problem of building a compiler which can lift in a provably correct way pieces of information on the execution cost of the object code to cost annotations on the source code. To this end, we need a clear and flexible picture of: (i) the meaning of cost annotations, (ii) the method to prove them sound and precise, and (iii) the way such proofs can be composed. We propose a so-called labelling approach to these three questions. As a first step, we examine its application to a toy compiler. This formal study suggests that the labelling approach has good compositionality and scalability properties. In order to provide further evidence for this claim, we report our successful experience in implementing and testing the labelling approach on top of a prototype compiler written in OCAML for (a large fragment of) the C language.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。