214 research outputs found
A Case Study on Logical Relations using Contextual Types
Proofs by logical relations play a key role to establish rich properties such
as normalization or contextual equivalence. They are also challenging to
mechanize. In this paper, we describe the completeness proof of algorithmic
equality for simply typed lambda-terms by Crary where we reason about logically
equivalent terms in the proof environment Beluga. There are three key aspects
we rely upon: 1) we encode lambda-terms together with their operational
semantics and algorithmic equality using higher-order abstract syntax 2) we
directly encode the corresponding logical equivalence of well-typed
lambda-terms using recursive types and higher-order functions 3) we exploit
Beluga's support for contexts and the equational theory of simultaneous
substitutions. This leads to a direct and compact mechanization, demonstrating
Beluga's strength at formalizing logical relations proofs.Comment: In Proceedings LFMTP 2015, arXiv:1507.0759
A Computational Approach to Reflective Meta-Reasoning about Languages with Bindings
We present a foundation for a computational meta-theory of languages with bindings implemented in a computer-aided formal reasoning environment. Our theory provides the ability to reason abstractly about operators, languages, open-ended languages, classes of languages, etc. The theory is based on the ideas of higher-order abstract syntax, with an appropriate induction principle parameterized over the language (i.e. a set of operators) being used. In our approach, both the bound and free variables are treated uniformly and this uniform treatment extends naturally to variable-length bindings. The implementation is reflective, namely there is a natural mapping between the meta-language of the theorem-prover and the object language of our theory. The object language substitution operation is mapped to the meta-language substitution and does not need to be defined recursively. Our approach does not require designing a custom type theory; in this paper we describe the implementation of this foundational theory within a general-purpose type theory. This work is fully implemented in the MetaPRL theorem prover, using the pre-existing NuPRL-like Martin-Lof-style computational type theory. Based on this implementation, we lay out an outline for a framework for programming language experimentation and exploration as well as a general reflective reasoning framework. This paper also includes a short survey of the existing approaches to syntactic reflection
Parametric Compositional Data Types
In previous work we have illustrated the benefits that compositional data
types (CDTs) offer for implementing languages and in general for dealing with
abstract syntax trees (ASTs). Based on Swierstra's data types \'a la carte,
CDTs are implemented as a Haskell library that enables the definition of
recursive data types and functions on them in a modular and extendable fashion.
Although CDTs provide a powerful tool for analysing and manipulating ASTs, they
lack a convenient representation of variable binders. In this paper we remedy
this deficiency by combining the framework of CDTs with Chlipala's parametric
higher-order abstract syntax (PHOAS). We show how a generalisation from
functors to difunctors enables us to capture PHOAS while still maintaining the
features of the original implementation of CDTs, in particular its modularity.
Unlike previous approaches, we avoid so-called exotic terms without resorting
to abstract types: this is crucial when we want to perform transformations on
CDTs that inspect the recursively computed CDTs, e.g. constant folding.Comment: In Proceedings MSFP 2012, arXiv:1202.240
Cut Elimination for a Logic with Induction and Co-induction
Proof search has been used to specify a wide range of computation systems. In
order to build a framework for reasoning about such specifications, we make use
of a sequent calculus involving induction and co-induction. These proof
principles are based on a proof theoretic (rather than set-theoretic) notion of
definition. Definitions are akin to logic programs, where the left and right
rules for defined atoms allow one to view theories as "closed" or defining
fixed points. The use of definitions and free equality makes it possible to
reason intentionally about syntax. We add in a consistent way rules for pre and
post fixed points, thus allowing the user to reason inductively and
co-inductively about properties of computational system making full use of
higher-order abstract syntax. Consistency is guaranteed via cut-elimination,
where we give the first, to our knowledge, cut-elimination procedure in the
presence of general inductive and co-inductive definitions.Comment: 42 pages, submitted to the Journal of Applied Logi
- …