可扩展语言元理论推理的模块化方法
A Modular Approach to Metatheoretic Reasoning for Extensible Languages
AI总结:
本文提出一种模块化方法,通过分解证明和基于先验约束的泛型推理,解决可扩展语言中元理论性质的模块化证明问题,并展示其正确性。
摘要:
本文关注可扩展语言元理论的发展。其出发点是一种观点,即针对特定应用领域定制的编程语言应通过从开放库中组合独立开发的宿主语言扩展组件来构建。在这一视角的阐述中,静态分析(如类型化)和动态语义(如求值)通过关系来描述,这些关系的规范分布在宿主语言和扩展之间,并以基于规则的方式给出。元理论性质确保静态分析准确评估运行时行为,在此上下文中由这些关系上的公式表示。这些性质可能对语言是基本的,由宿主语言引入,也可能涉及单个扩展引入的分析。我们揭示了模块化元理论的问题,即相关性质的证明可以通过在库中每个组件内独立推理来构建。为解决此问题,我们提出两个孪生思想:围绕语言片段分解证明,以及基于对其行为施加的广泛先验约束对扩展进行泛型推理。我们通过展示如何为通过组合独立部分获得的任何语言自动构建性质的完整证明来确立这些推理风格的正确性。通过将讨论置于一种通过最小不动点定义编码归纳规则规范的逻辑中,赋予其数学精确性。我们还基于所发展的思想勾勒了一个用于可扩展语言元理论推理的实用系统结构。
英文摘要:
This paper concerns the development of metatheory for extensible languages. It uses as its starting point a view that programming languages tailored to specific application domains are to be constructed by composing components from an open library of independently-developed extensions to a host language. In the elaboration of this perspective, static analyses (such as typing) and dynamic semantics (such as evaluation) are described via relations whose specifications are distributed across the host language and extensions and are given in a rule-based fashion. Metatheoretic properties, which ensure that static analyses accurately gauge runtime behavior, are represented in this context by formulas over such relations. These properties may be fundamental to the language, introduced by the host language, or they may pertain to analyses introduced by individual extensions. We expose the problem of modular metatheory, i.e., the notion that proofs of relevant properties can be constructed by reasoning independently within each component in the library. To solve this problem, we propose the twin ideas of decomposing proofs around language fragments and of reasoning generically about extensions based on broad, a priori constraints imposed on their behavior. We establish the soundness of these styles of reasoning by showing how complete proofs of the properties can be automatically constructed for any language obtained by composing the independent parts. Mathematical precision is given to our discussions by framing them within a logic that encodes inductive rule-based specifications via least fixed-point definitions. We also sketch the structure of a practical system for metatheoretic reasoning for extensible languages based on the ideas developed.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。