208 research outputs found
A Lambda Term Representation Inspired by Linear Ordered Logic
We introduce a new nameless representation of lambda terms inspired by
ordered logic. At a lambda abstraction, number and relative position of all
occurrences of the bound variable are stored, and application carries the
additional information where to cut the variable context into function and
argument part. This way, complete information about free variable occurrence is
available at each subterm without requiring a traversal, and environments can
be kept exact such that they only assign values to variables that actually
occur in the associated term. Our approach avoids space leaks in interpreters
that build function closures.
In this article, we prove correctness of the new representation and present
an experimental evaluation of its performance in a proof checker for the
Edinburgh Logical Framework.
Keywords: representation of binders, explicit substitutions, ordered
contexts, space leaks, Logical Framework.Comment: In Proceedings LFMTP 2011, arXiv:1110.668
A Comparative Study of Coq and HOL
This paper illustrates the differences between the style of theory mechanisation of Coq and of HOL. This comparative study is based on the mechanisation of fragments of the theory of computation in these systems. Examples from these implementations are given to support some of the arguments discussed in this paper. The mechanisms for specifying definitions and for theorem proving are discussed separately, building in parallel two pictures of the different approaches of mechanisation given by these systems
POPLMark reloaded: Mechanizing proofs by logical relations
We propose a new collection of benchmark problems in mechanizing the metatheory of programming languages, in order to compare and push the state of the art of proof assistants. In particular, we focus on proofs using logical relations (LRs) and propose establishing strong normalization of a simply typed calculus with a proof by Kripke-style LRs as a benchmark. We give a modern view of this well-understood problem by formulating our LR on well-typed terms. Using this case study, we share some of the lessons learned tackling this problem in different dependently typed proof environments. In particular, we consider the mechanization in Beluga, a proof environment that supports higher-order abstract syntax encodings and contrast it to the development and strategies used in general-purpose proof assistants such as Coq and Agda. The goal of this paper is to engage the community in discussions on what support in proof environments is needed to truly bring mechanized metatheory to the masses and engage said community in the crafting of future benchmarks
Multi-level Contextual Type Theory
Contextual type theory distinguishes between bound variables and
meta-variables to write potentially incomplete terms in the presence of
binders. It has found good use as a framework for concise explanations of
higher-order unification, characterize holes in proofs, and in developing a
foundation for programming with higher-order abstract syntax, as embodied by
the programming and reasoning environment Beluga. However, to reason about
these applications, we need to introduce meta^2-variables to characterize the
dependency on meta-variables and bound variables. In other words, we must go
beyond a two-level system granting only bound variables and meta-variables.
In this paper we generalize contextual type theory to n levels for arbitrary
n, so as to obtain a formal system offering bound variables, meta-variables and
so on all the way to meta^n-variables. We obtain a uniform account by
collapsing all these different kinds of variables into a single notion of
variabe indexed by some level k. We give a decidable bi-directional type system
which characterizes beta-eta-normal forms together with a generalized
substitution operation.Comment: In Proceedings LFMTP 2011, arXiv:1110.668
Proof-irrelevant model of CC with predicative induction and judgmental equality
We present a set-theoretic, proof-irrelevant model for Calculus of
Constructions (CC) with predicative induction and judgmental equality in
Zermelo-Fraenkel set theory with an axiom for countably many inaccessible
cardinals. We use Aczel's trace encoding which is universally defined for any
function type, regardless of being impredicative. Direct and concrete
interpretations of simultaneous induction and mutually recursive functions are
also provided by extending Dybjer's interpretations on the basis of Aczel's
rule sets. Our model can be regarded as a higher-order generalization of the
truth-table methods. We provide a relatively simple consistency proof of type
theory, which can be used as the basis for a theorem prover
Practical Normalization by Evaluation for EDSLs
Embedded domain-specific languages (eDSLs) are typically implemented in a rich host language, such as Haskell, using a combination of deep and shallow embedding techniques. While such a combination enables programmers to exploit the execution mechanism of Haskell to build and specialize eDSL programs, it blurs the distinction between the host language and the eDSL. As a consequence, extension with features such as sums and effects requires a significant amount of ingenuity from the eDSL designer. In this paper, we demonstrate that Normalization by Evaluation (NbE) provides a principled framework for building, extending, and customizing eDSLs. We present a comprehensive treatment of NbE for deeply embedded eDSLs in Haskell that involves a rich set of features such as sums, arrays, exceptions and state, while addressing practical concerns about normalization such as code expansion and the addition of domain-specific features
Characteristic Bisimulation for Higher-Order Session Processes
Characterising contextual equivalence is a long-standing issue for higher-order (process) languages. In the setting of a higher-order pi-calculus with sessions, we develop characteristic bisimilarity, a typed bisimilarity which fully characterises contextual equivalence. To our knowledge, ours is the first characterisation of its kind. Using simple values inhabiting (session) types, our approach distinguishes from untyped methods for characterising contextual equivalence in higher-order processes: we show that observing as inputs only a precise finite set of higher-order values suffices to reason about higher-order session processes. We demonstrate how characteristic bisimilarity can be used to justify optimisations in session protocols with mobile code communication
On Irrelevance and Algorithmic Equality in Predicative Type Theory
Dependently typed programs contain an excessive amount of static terms which
are necessary to please the type checker but irrelevant for computation. To
separate static and dynamic code, several static analyses and type systems have
been put forward. We consider Pfenning's type theory with irrelevant
quantification which is compatible with a type-based notion of equality that
respects eta-laws. We extend Pfenning's theory to universes and large
eliminations and develop its meta-theory. Subject reduction, normalization and
consistency are obtained by a Kripke model over the typed equality judgement.
Finally, a type-directed equality algorithm is described whose completeness is
proven by a second Kripke model.Comment: 36 pages, superseds the FoSSaCS 2011 paper of the first author,
titled "Irrelevance in Type Theory with a Heterogeneous Equality Judgement
- …