4,688 research outputs found
Theorem proving support in programming language semantics
We describe several views of the semantics of a simple programming language
as formal documents in the calculus of inductive constructions that can be
verified by the Coq proof system. Covered aspects are natural semantics,
denotational semantics, axiomatic semantics, and abstract interpretation.
Descriptions as recursive functions are also provided whenever suitable, thus
yielding a a verification condition generator and a static analyser that can be
run inside the theorem prover for use in reflective proofs. Extraction of an
interpreter from the denotational semantics is also described. All different
aspects are formally proved sound with respect to the natural semantics
specification.Comment: Propos\'e pour publication dans l'ouvrage \`a la m\'emoire de Gilles
Kah
Mendler-style Iso-(Co)inductive predicates: a strongly normalizing approach
We present an extension of the second-order logic AF2 with iso-style
inductive and coinductive definitions specifically designed to extract programs
from proofs a la Krivine-Parigot by means of primitive (co)recursion
principles. Our logic includes primitive constructors of least and greatest
fixed points of predicate transformers, but contrary to the common approach, we
do not restrict ourselves to positive operators to ensure monotonicity, instead
we use the Mendler-style, motivated here by the concept of monotonization of an
arbitrary operator on a complete lattice. We prove an adequacy theorem with
respect to a realizability semantics based on saturated sets and
saturated-valued functions and as a consequence we obtain the strong
normalization property for the proof-term reduction, an important feature which
is absent in previous related work.Comment: In Proceedings LSFA 2011, arXiv:1203.542
Existential witness extraction in classical realizability and via a negative translation
We show how to extract existential witnesses from classical proofs using
Krivine's classical realizability---where classical proofs are interpreted as
lambda-terms with the call/cc control operator. We first recall the basic
framework of classical realizability (in classical second-order arithmetic) and
show how to extend it with primitive numerals for faster computations. Then we
show how to perform witness extraction in this framework, by discussing several
techniques depending on the shape of the existential formula. In particular, we
show that in the Sigma01-case, Krivine's witness extraction method reduces to
Friedman's through a well-suited negative translation to intuitionistic
second-order arithmetic. Finally we discuss the advantages of using call/cc
rather than a negative translation, especially from the point of view of an
implementation.Comment: 52 pages. Accepted in Logical Methods for Computer Science (LMCS),
201
Virtual Evidence: A Constructive Semantics for Classical Logics
This article presents a computational semantics for classical logic using
constructive type theory. Such semantics seems impossible because classical
logic allows the Law of Excluded Middle (LEM), not accepted in constructive
logic since it does not have computational meaning. However, the apparently
oracular powers expressed in the LEM, that for any proposition P either it or
its negation, not P, is true can also be explained in terms of constructive
evidence that does not refer to "oracles for truth." Types with virtual
evidence and the constructive impossibility of negative evidence provide
sufficient semantic grounds for classical truth and have a simple computational
meaning. This idea is formalized using refinement types, a concept of
constructive type theory used since 1984 and explained here. A new axiom
creating virtual evidence fully retains the constructive meaning of the logical
operators in classical contexts.
Key Words: classical logic, constructive logic, intuitionistic logic,
propositions-as-types, constructive type theory, refinement types, double
negation translation, computational content, virtual evidenc
Type classes for efficient exact real arithmetic in Coq
Floating point operations are fast, but require continuous effort on the part
of the user in order to ensure that the results are correct. This burden can be
shifted away from the user by providing a library of exact analysis in which
the computer handles the error estimates. Previously, we [Krebbers/Spitters
2011] provided a fast implementation of the exact real numbers in the Coq proof
assistant. Our implementation improved on an earlier implementation by O'Connor
by using type classes to describe an abstract specification of the underlying
dense set from which the real numbers are built. In particular, we used dyadic
rationals built from Coq's machine integers to obtain a 100 times speed up of
the basic operations already. This article is a substantially expanded version
of [Krebbers/Spitters 2011] in which the implementation is extended in the
various ways. First, we implement and verify the sine and cosine function.
Secondly, we create an additional implementation of the dense set based on
Coq's fast rational numbers. Thirdly, we extend the hierarchy to capture order
on undecidable structures, while it was limited to decidable structures before.
This hierarchy, based on type classes, allows us to share theory on the
naturals, integers, rationals, dyadics, and reals in a convenient way. Finally,
we obtain another dramatic speed-up by avoiding evaluation of termination
proofs at runtime.Comment: arXiv admin note: text overlap with arXiv:1105.275
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
Realizability Toposes from Specifications
We investigate a framework of Krivine realizability with I/O effects, and
present a method of associating realizability models to specifications on the
I/O behavior of processes, by using adequate interpretations of the central
concepts of `pole' and `proof-like term'. This method does in particular allow
to associate realizability models to computable functions.
Following recent work of Streicher and others we show how these models give
rise to triposes and toposes
- …