How to make ad hoc proof automation less ad hoc

17Citations
Citations of this article
25Readers
Mendeley users who have this article in their library.

Abstract

Most interactive theorem provers provide support for some form of user-customizable proof automation. In a number of popular systems, such as Coq and Isabelle, this automation is achieved primarily through tactics, which are programmed in a separate language from that of the prover's base logic. While tactics are clearly useful in practice, they can be difficult to maintain and compose because, unlike lemmas, their behavior cannot be specified within the expressive type system of the prover itself. We propose a novel approach to proof automation in Coq that allows the user to specify the behavior of custom automated routines in terms of Coq's own type system. Our approach involves a sophisticated application of Coq's canonical structures, which generalize Haskell type classes and facilitate a flexible style of dependently-typed logic programming. Specifically, just as Haskell type classes are used to infer the canonical implementation of an overloaded term at a given type, canonical structures can be used to infer the canonical proof of an overloaded lemma for a given instantiation of its parameters. We present a series of design patterns for canonical structure programming that enable one to carefully and predictably coax Coq's type inference engine into triggering the execution of user-supplied algorithms during unification, and we illustrate these patterns through several realistic examples drawn from Hoare Type Theory. We assume no prior knowledge of Coq and describe the relevant aspects of Coq type inference from first principles. © Cambridge University Press 2013.

References Powered by Scopus

Formal verification of a realistic compiler

919Citations
N/AReaders
Get full text

How to make ad-hoc polymorphism less ad hoc

510Citations
N/AReaders
Get full text

SeL4: Formal verification of an operating-system kernel

221Citations
N/AReaders
Get full text

Cited by Powered by Scopus

A metaprogramming framework for formal verification

61Citations
N/AReaders
Get full text

Eisbach: A Proof Method Language for Isabelle

29Citations
N/AReaders
Get full text

ELPI: Fast, embeddable, λprolog interpreter

28Citations
N/AReaders
Get full text

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Cite

CITATION STYLE

APA

Gonthier, G., Ziliani, B., Nanevski, A., & Dreyer, D. (2013). How to make ad hoc proof automation less ad hoc. In Journal of Functional Programming (Vol. 23, pp. 357–401). https://doi.org/10.1017/S0956796813000051

Readers' Seniority

Tooltip

PhD / Post grad / Masters / Doc 12

60%

Researcher 4

20%

Professor / Associate Prof. 3

15%

Lecturer / Post doc 1

5%

Readers' Discipline

Tooltip

Computer Science 19

86%

Philosophy 1

5%

Environmental Science 1

5%

Engineering 1

5%

Save time finding and organizing research with Mendeley

Sign up for free