How to make ad hoc proof automation less ad hoc

How to make ad hoc proof automation less ad hoc
复制标题

如何减少临时证明自动化

DOI:
10.1145/2034773.2034798
复制
发表时间:
2011
期刊:
Proceedings of the 16th ACM SIGPLAN international conference on Functional programming
影响因子:
--
通讯作者:
Manuela G. López
Manuela G. López
中科院分区:
--
文献类型:
--
作者:
E. Alés;F. Gullo;E. Arias;R. Olivares;Antonio G. García;E. Wanke;Manuela G. López

文献摘要

被引文献

相似文献

大多数交互式定理证明器都支持某种形式的用户自定义证明自动化。在许多流行的系统中,如Coq和Isabelle,这种自动化主要是通过策略来实现的,这些策略是用与证明器的基本逻辑不同的语言编程的。虽然策略在实践中很有用,但它们很难维护和组合,因为与引理不同,它们的行为不能在证明器本身的表达类型系统中指定。我们提出了一种新的方法来证明在Coq自动化,允许用户指定的行为的自定义自动化例程在Coq自己的类型系统。我们的方法涉及到一个复杂的应用程序Coq的规范结构,概括Haskell类型的类,并促进依赖类型的逻辑编程的灵活风格。具体地说,正如Haskell类型类用于推断重载项在给定类型下的规范实现,规范结构可以用于推断重载引理的规范证明,用于其参数的给定实例化。我们提出了一系列规范结构编程的设计模式,使人们能够仔细和可预测地哄Coq的类型推理引擎触发执行用户提供的算法在统一过程中,我们说明这些模式通过几个现实的例子从霍尔类型理论。我们假设没有先验知识的Coq和描述的Coq型推理的第一原则的相关方面。
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.