3,045 research outputs found
Structural abstract interpretation, A formal study using Coq
interpreters are tools to compute approximations for behaviors of a program.
These approximations can then be used for optimisation or for error detection.
In this paper, we show how to describe an abstract interpreter using the
type-theory based theorem prover Coq, using inductive types for syntax and
structural recursive programming for the abstract interpreter's kernel. The
abstract interpreter can then be proved correct with respect to a Hoare logic
for the programming language
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
Mechanized semantics
The goal of this lecture is to show how modern theorem provers---in this
case, the Coq proof assistant---can be used to mechanize the specification of
programming languages and their semantics, and to reason over individual
programs and over generic program transformations, as typically found in
compilers. The topics covered include: operational semantics (small-step,
big-step, definitional interpreters); a simple form of denotational semantics;
axiomatic semantics and Hoare logic; generation of verification conditions,
with application to program proof; compilation to virtual machine code and its
proof of correctness; an example of an optimizing program transformation (dead
code elimination) and its proof of correctness
TRX: A Formally Verified Parser Interpreter
Parsing is an important problem in computer science and yet surprisingly
little attention has been devoted to its formal verification. In this paper, we
present TRX: a parser interpreter formally developed in the proof assistant
Coq, capable of producing formally correct parsers. We are using parsing
expression grammars (PEGs), a formalism essentially representing recursive
descent parsing, which we consider an attractive alternative to context-free
grammars (CFGs). From this formalization we can extract a parser for an
arbitrary PEG grammar with the warranty of total correctness, i.e., the
resulting parser is terminating and correct with respect to its grammar and the
semantics of PEGs; both properties formally proven in Coq.Comment: 26 pages, LMC
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
- …