12 research outputs found
Full reduction at full throttle
International audienceEmerging trends in proof styles and new applications of interactive proof assistants exploit the computational facilities of the provided proof language, reaping enormous benefits in proof size and convenience to the user. However, the resulting proof objects really put the proof assistant to the test in terms of computational time required to check them. We present a novel translation of the terms of the full Calculus of (Co)Inductive Constructions to OCAML programs. Building on this translation, we further present a new fully featured version of COQ that offloads much of the computation required during proof checking to a vanilla, state of the art and fine tuned compiler. This modular scheme yields substantial performance improvements over existing systems at a reduced implementation cost. The work presented here builds on previous work described in [GL02], but we place particular emphasis in this paper on the fact that this scheme is in fact an instance of untyped normalization by evaluation [FR04, Lin05, AHN08, Boe10]
Computing Persistent Homology within Coq/SSReflect
Persistent homology is one of the most active branches of Computational
Algebraic Topology with applications in several contexts such as optical
character recognition or analysis of point cloud data. In this paper, we report
on the formal development of certified programs to compute persistent Betti
numbers, an instrumental tool of persistent homology, using the Coq proof
assistant together with the SSReflect extension. To this aim it has been
necessary to formalize the underlying mathematical theory of these algorithms.
This is another example showing that interactive theorem provers have reached a
point where they are mature enough to tackle the formalization of nontrivial
mathematical theories
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
Rigorous Polynomial Approximation using Taylor Models in Coq
International audienceOne of the most common and practical ways of representing a real function on machines is by using a polynomial approximation. It is then important to properly handle the error introduced by such an approximation. The purpose of this work is to offer guaranteed error bounds for a specific kind of rigorous polynomial approximation called Taylor model. We carry out this work in the Coq proof assistant, with a special focus on genericity and efficiency for our implementation. We give an abstract interface for rigorous polynomial approximations, parameter- ized by the type of coefficients and the implementation of polynomials, and we instantiate this interface to the case of Taylor models with inter- val coefficients, while providing all the machinery for computing them. We compare the performances of our implementation in Coq with those of the Sollya tool, which contains an implementation of Taylor models written in C. This is a milestone in our long-term goal of providing fully formally proved and efficient Taylor models
Meta-F*: Proof Automation with SMT, Tactics, and Metaprograms
We introduce Meta-F*, a tactics and metaprogramming framework for the F*
program verifier. The main novelty of Meta-F* is allowing the use of tactics
and metaprogramming to discharge assertions not solvable by SMT, or to just
simplify them into well-behaved SMT fragments. Plus, Meta-F* can be used to
generate verified code automatically.
Meta-F* is implemented as an F* effect, which, given the powerful effect
system of F*, heavily increases code reuse and even enables the lightweight
verification of metaprograms. Metaprograms can be either interpreted, or
compiled to efficient native code that can be dynamically loaded into the F*
type-checker and can interoperate with interpreted code. Evaluation on
realistic case studies shows that Meta-F* provides substantial gains in proof
development, efficiency, and robustness.Comment: Full version of ESOP'19 pape
Towards a certified computation of homology groups for digital images
International audienceIn this paper we report on a project to obtain a verified computation of homology groups of digital images. The methodology is based on program- ming and executing inside the COQ proof assistant. Though more research is needed to integrate and make efficient more processing tools, we present some examples partially computed in COQ from real biomedical images
Accelerating Verified-Compiler Development with a Verified Rewriting Engine
Compilers are a prime target for formal verification, since compiler bugs
invalidate higher-level correctness guarantees, but compiler changes may become
more labor-intensive to implement, if they must come with proof patches. One
appealing approach is to present compilers as sets of algebraic rewrite rules,
which a generic engine can apply efficiently. Now each rewrite rule can be
proved separately, with no need to revisit past proofs for other parts of the
compiler. We present the first realization of this idea, in the form of a
framework for the Coq proof assistant. Our new Coq command takes normal proved
theorems and combines them automatically into fast compilers with proofs. We
applied our framework to improve the Fiat Cryptography toolchain for generating
cryptographic arithmetic, producing an extracted command-line compiler that is
about 1000 faster while actually featuring simpler compiler-specific
proofs.Comment: 13th International Conference on Interactive Theorem Proving (ITP
2022
Unboxed data constructors -- or, how cpp decides a halting problem
We propose a new language feature for ML-family languages, the ability to
selectively *unbox* certain data constructors, so that their runtime
representation gets compiled away to just the identity on their argument.
Unboxing must be statically rejected when it could introduce *confusions*,
that is, distinct values with the same representation.
We discuss the use-case of big numbers, where unboxing allows to write code
that is both efficient and safe, replacing either a safe but slow version or a
fast but unsafe version.
We explain the static analysis necessary to reject incorrect unboxing
requests.
We present our prototype implementation of this feature for the OCaml
programming language, discuss several design choices and the interaction with
advanced features such as Guarded Algebraic Datatypes.
Our static analysis requires expanding type definitions in type expressions,
which is not necessarily normalizing in presence of recursive type definitions.
In other words, we must decide normalization of terms in the first-order
lambda-calculus with recursion. We provide an algorithm to detect
non-termination on-the-fly during reduction, with proofs of correctness and
completeness.
Our termination-monitoring algorithm turns out to be closely related to the
normalization strategy for macro expansion in the `cpp` preprocessor.Comment: Author version, to appear at POPL 202
Programming Languages and Systems
This open access book constitutes the proceedings of the 31st European Symposium on Programming, ESOP 2022, which was held during April 5-7, 2022, in Munich, Germany, as part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2022. The 21 regular papers presented in this volume were carefully reviewed and selected from 64 submissions. They deal with fundamental issues in the specification, design, analysis, and implementation of programming languages and systems