首页> 外文会议>International conference on certified programs and proofs >Programming Type-Safe Transformations Using Higher-Order Syntax
【24h】

Programming Type-Safe Transformations Using Higher-Order Syntax

机译:使用高阶语法对类型安全的转换进行编程

获取原文

摘要

Compiling syntax to native code requires complex code transformations which rearrange the syntax tree. This can be particularly challenging for languages containing binding constructs, and often leads to subtle, hard to find errors. In this paper, we exploit higher-order syntax (HOAS) to implement a type-preserving compiler for the simply-typed lambda-calculus, including transformations such as closure conversion and hoisting, in the dependently-typed language Beluga. Unlike previous implementations, which have to abandon HOAS locally in favor of a first-order binder representation, we are able to take advantage of HOAS throughout the compiler pipeline, so that we do not have to include any lemmas about binder manipulation. Scope and type safety of the code transformations are statically guaranteed, and our implementation directly mirrors the proofs of type preservation. Our work demonstrates that HOAS encodings offer substantial benefits to certified programming.
机译:将语法编译为本地代码需要复杂的代码转换,这些转换会重新排列语法树。对于包含绑定结构的语言而言,这可能尤其具有挑战性,并且通常会导致难以发现的细微错误。在本文中,我们利用高阶语法(HOAS)为依赖类型的语言Beluga为简单类型的lambda演算实现类型保留的编译器,包括诸如闭包转换和提升的转换。与以前的实现必须先在本地放弃HOAS以便采用一阶活页夹表示法不同,我们能够在整个编译器管道中利用HOAS,因此我们不必包括有关活页夹操作的任何难题。静态地保证了代码转换的范围和类型安全,并且我们的实现直接反映了类型保留的证据。我们的工作表明,HOAS编码为经过认证的编程提供了实质性的好处。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号