A Higher-Order Abstract Syntax Approach to Verified Transformations on Functional Programs
نویسندگان
چکیده
We describe an approach to the verified implementation of transformations on functional programs that exploits the higher-order representation of syntax. In this approach, transformations are specified using the logic of hereditary Harrop formulas (HOHH). On the one hand, these specifications serve directly as implementations, being programs in the language λProlog. On the other hand, they can be used as input to the Abella system, which allows us to prove properties about them and thereby about the implementations. We argue that this approach is especially effective in realizing transformations that analyze binding structure. We consider in detail the case of typed closure conversion, a transformation that changes such structure in programs. We present a concise encoding of the transformation in λProlog and show how Abella can be used to prove the correctness of the encoding.
منابع مشابه
A Higher-Order Abstract Syntax Approach to the Verified Compilation of Functional Programs
This thesis concerns the verified compilation of functional programming languages. Functional programming languages, or functional languages for short, provide a high degree of abstraction in programming and their mathematical foundation makes programs written in them easy to analyze and to be proved correct. Because of these features, functional languages are playing an increasingly important ...
متن کاملStatically Verified Type-Preserving Code Transformations in Haskell
The use of typed intermediate languages can significantly increase the reliability of a compiler. By type-checking the code produced at each transformation stage, one can identify bugs in the compiler that would otherwise be much harder to find. We propose to take the use of types in compilation a step further by verifying that the transformation itself is type correct, in the sense that it is ...
متن کاملDALI: An Untyped, CBV Functional Language Supporting First-Order Datatypes with Binders
Writing (meta-)programs that manipulate other (object-) programs poses signi cant technical problems when the objectlanguage itself has a notion of binders and variable occurrences. Higher-order abstract syntax is a representation of object programs that has recently been the focus of several studies. This paper points out a number of limitations of using higher order syntax in a functional con...
متن کاملFunctional Programming with Logical Frameworks
Functional Programming with Logical Frameworks Adam Brett Poswolsky 2008 Logical frameworks are languages used to represent information. In this dissertation we present the Delphin programming language, which is a functional programming language with a logical framework supporting both higher-order abstract syntax and dependent types. Higher-order abstract syntax, or HOAS, refers to the techniq...
متن کاملProgramming Type-Safe Transformations Using Higher-Order Abstract Syntax
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 higher-order abstract syntax (HOAS) to implement a type-preserving compiler for thesyntax (HOAS) to implement a type-preserving c...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2016