89 research outputs found
Types and verification for infinite state systems
Server-like or non-terminating programs are central to modern computing. It is a common requirement for these programs that they always be available to produce a behaviour. One method of showing such availability is by endowing a type-theory with constraints that demonstrate that a program will always produce some behaviour or halt. Such a constraint is often called productivity. We introduce a type theory which can be used to type-check a polymorphic functional programming language similar to a fragment of the Haskell programming language. This allows placing constraints on program terms such that they will not type-check unless they are productive. We show that using program transformation techniques, one can restructure some programs which are not provably productive in our type theory into programs which are manifestly productive. This allows greater programmer flexibility in the specification of such programs. We have demonstrated a mechanisation of some of these important results in the proof-assistant Coq. We have also written a program transformation system for this term-language in the programming language Haskell
A Light Modality for Recursion
We investigate the interplay between a modality for controlling the behaviour
of recursive functional programs on infinite structures which are completely
silent in the syntax. The latter means that programs do not contain "marks"
showing the application of the introduction and elimination rules for the
modality. This shifts the burden of controlling recursion from the programmer
to the compiler. To do this, we introduce a typed lambda calculus a la Curry
with a silent modality and guarded recursive types. The typing discipline
guarantees normalisation and can be transformed into an algorithm which infers
the type of a program.Comment: 32 pages 1 figure in pdf forma
Generativity and dynamic opacity for abstract types (extended version)
The standard formalism for explaining abstract types is existential quantification. While it provides a sufficient model for type abstraction in entirely statically typed languages, it proves to be too weak for languages enriched with forms of dynamic typing, where parametricity is violated. As an alternative approach to type abstraction that addresses this shortcoming we present a calculus for dynamic type generation. It features an explicit construct for generating new type names and relies on coercions for managing abstraction boundaries between generated types and their designated representation. Sealing is represented as a generalized form of these coercions. The calculus maintains abstractions dynamically without restricting type analysis
Linear Dependent Types in a Call-by-Value Scenario (Long Version)
Linear dependent types allow to precisely capture both the extensional
behaviour and the time complexity of lambda terms, when the latter are
evaluated by Krivine's abstract machine. In this work, we show that the same
paradigm can be applied to call-by-value evaluation. A system of linear
dependent types for Plotkin's PCF is introduced, called dlPCFV, whose types
reflect the complexity of evaluating terms in the so-called CEK machine. dlPCFV
is proved to be sound, but also relatively complete: every true statement about
the extensional and intentional behaviour of terms can be derived, provided all
true index term inequalities can be used as assumptions.Comment: 22 page
Proof-relevant resolution : the foundations of constructive proof automation
Dependent type theory is an expressive programming language. This language
allows to write programs that carry proofs of their properties. This in turn gives
high confidence in such programs, making the software trustworthy. Yet, the trustworthiness comes for a price: type inference involves an increasing number of proof
obligations.
Automation of this process becomes necessary for any system with dependent
types that aims to be usable in practice. At the same time, implementation of automation in a verified manner is prohibitively complex. Sometimes, external solvers
are used to aid the automation. These solvers may be based on classical logic and
may not be themselves verified, thus compromising the guarantees provided by constructive nature of type theory. In this thesis, we explore the idea of proof relevant
resolution that allows automation of type inference in type theory in a verifiable and
constructive manner, hence to restore the confidence in programs and the trustworthiness of software.
Technical content of this thesis is threefold. First, we propose a novel framework for proof-relevant resolution. We take two constructive logics, Horn-clause
and hereditary Harrop formulae logics as a starting point. We formulate the standard big-step operational semantics of these logics. We expose their Curry-Howard
nature by treating formulae of these logics as types and proofs as terms thus developing a theory of proof-relevant resolution. We develop small-step operational
semantics of proof-relevant resolution and prove it sound with respect to the big-step
operational semantics.
Secondly, we demonstrate our approach on an example of type inference in Logical Framework (LF). We translate a type-inference problem in LF into resolution
in proof-relevant Horn-clause logic. Such resolution provides, besides an answer
substitution to logic variables, a proof term that captures the resolution tree. We
interpret the proof term as a derivation of well-formedness judgement of the object in the original problem. This allows for a straightforward implementation of
type checking of the resolved solution since type checking is reduced to verifying the derivation captured by the proof term. The theoretical development is substantiated
by an implementation.
Finally, we demonstrate that our approach allows to reason about semantic properties of code. Type class resolution has been well-known to be a proof-relevant fragment of Horn-clause logic, and recently its coinductive extensions were introduced.
In this thesis, we show that all of these extensions amalgamate with the theoretical
framework we introduce. Our novel result here is exposing that the coinductive
extensions are actually based on hereditary Harrop logic, rather than Horn-clause
logic. We establish a number of soundness and completeness results for them. We
also discuss soundness of program transformation that are allowed by proof-relevant
presentation of type class resolution
- …