首页> 外文会议>ACM conference on LISP and functional programming >From operational semantics to abstract machines: preliminary results
【24h】

From operational semantics to abstract machines: preliminary results

机译:从操作语义到抽象机:初步结果

获取原文

摘要

The operational semantics of functional programming languages is frequently presented using inference rules within simple meta-logics. Such presentations of semantics can be high-level and perspicuous since meta-logics often handle numerous syntactic details in a declarative fashion. This is particularly true of the meta-logic we consider here, which includes simply typed λ-terms, quantification at higher types, and β-conversion. Evaluation of functional programming languages is also often presented using low-level descriptions based on abstract machines: simple term rewriting systems in which few high-level features are present. In this paper, we illustrate how a high-level description of evaluation using inference rules can be systematically transformed into a low-level abstract machine by removing dependencies on high-level features of the meta-logic until the resulting inference rules are so simple that they can be immediately identified as specifying an abstractmachine. In particular, we present in detail the transformation of two inference rules specifying call-by-name evaluation of the untyped λ-calculus into the Krivine machine, a stack-based abstract machine that implements such evaluation. The initial specification uses the meta-logic's β-conversion to perform substitutions. The resulting machine uses de Bruijn numerals and closures instead of formal substitution. We also comment on a similar construction of a simplified SECD machine implementing call-by-value evaluation. This approach to abstract machine construction provides a semantics-directed method for motivating, proving correct, and extending such abstract machines.

机译:

功能编程语言的操作语义经常使用简单的元逻辑中的推理规则来表示。由于元逻辑通常以声明方式处理大量的句法细节,因此语义的这种表示可能是高级的和明显的。对于我们在这里考虑的元逻辑,尤其如此,其中包括简单键入的λ项,较高类型的量化和β转换。通常使用基于抽象机器的低级描述来提供对功能编程语言的评估:简单的术语重写系统,其中几乎没有高级功能。在本文中,我们说明了如何通过消除对元逻辑高级特征的依赖,直到得出的推理规则如此简单,以至于可以将使用推理规则的评估的高级描述系统地转换为低级抽象机器。它们可以立即被标识为指定了抽象机。特别是,我们详细介绍了两个推理规则的转换,这些规则将指定无类型λ演算的按名称进行调用的评估转换为Krivine机器,Krivine机器是实现此类评估的基于堆栈的抽象机器。初始规范使用元逻辑的β转换来执行替换。生成的机器使用de Bruijn数字和闭包代替形式代换。我们还评论了简化的SECD机器的类似构造,该机器实现了按值打电话的评估。这种抽象机构建方法为激励,证明正确和扩展这种抽象机提供了一种语义指导的方法。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号