Programming type-safe transformations using higher-order abstract syntax

6Citations
Citations of this article
4Readers
Mendeley users who have this article in their library.
Get full text

Abstract

Compiling syntax to native code requires complex code transformations which rearrange the abstract 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 higherorder abstract 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. © Springer International Publishing 2013.

Cite

CITATION STYLE

APA

Savary-Belanger, O., Monnier, S., & Pientka, B. (2013). Programming type-safe transformations using higher-order abstract syntax. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 8307 LNCS, pp. 243–258). https://doi.org/10.1007/978-3-319-03545-1_16

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free