Verified Transformations on Functional Programs
(Developments Related to a Paper in ESOP 2016)


This website provides the code and the proof scripts that complement the material in the paper
A Higher-Order Abstract Syntax Approach to Verified Transformations on Functional Programs.
A revised version of this paper has appeared in the 2016 European Symposium on Programming. To run the code on this page, you will need to download the Teyjus implementation of λProlog. To run the proof scripts, you need to download Version 2.0.4 of the Abella system.


Treatment of Substitution

A specific benefit of the higher-order abstract syntax (HOAS) approach is that it allows substitutions to be treated at a meta-theoretic level. However, it is sometimes necessary to make substitutions over different kinds of expressions explicit. As a prelude to the rest of the development, we show here how this can be done while still deriving benefit from an HOAS treatment.


Implementations of Transformations on Functional Programs

This section illustrates the use of the HOAS approach in defining transformations on functional programs. It does this by showing how the continuation-passing style, the closure conversion and the code hoisting transformations can be realized via λProlog programs in the context of the simply typed λ-calculus augmented with recursion.


Verification of Transformations on Functional Programs

This section provides the proof scripts in Abella that verify the implementations of the various transformations in λProlog. The initial subsections deal with library definitions and other related aspects that are common to the correctness proofs for the different transformations.

Some Library Definitions and Theorems

Properties of Typing

Properties of Evaluation

Properties of Substitutions

Verification of the CPS Transformation

Verification of the Closure Conversion Transformation

Verification of the Code Hoisting Transformation


The Complete Suite

The entire development can be downloaded as a tarball from here. Run 'make' command to compile the λProlog programs and the proof scripts. Make sure that the executables including the Teyjus compiler (tjcc) and linker (tjlink) and the Abella theorem prover (abella) are in the search path.


Acknowledgements

This material is based upon work supported by the National Science Foundation under Grant No CCF-0917140 and Grant No. CCF-1617771. The work has also received support from the University of Minnesota through a Doctoral Dissertation Fellowship and a Grant-in-Aid of Research. Any opinions, findings and conclusions or recommendations expressed in this material are those of the participants and do not necessarily reflect the views of the National Science Foundation.


The views and opinions expressed in this page are strictly those of the page author(s). The contents of this page have not been reviewed or approved by the University of Minnesota.