【24h】

How to Make Ad Hoc Proof Automation Less Ad Hoc

机译:如何减少临时证明自动化的临时性

获取原文
获取原文并翻译 | 示例

摘要

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.
机译:大多数交互式定理证明者都支持某种形式的用户可定制的证明自动化。在许多流行的系统中,例如Coq和Isabelle,这种自动化主要是通过战术来实现的,而战术是用与证明者的基本逻辑不同的语言编程的。尽管战术在实践中显然很有用,但它们可能难以维护和组合,因为与引理不同,它们的行为无法在证明者本身的表达类型系统中指定。我们提出了一种新的Coq证明自动化方法,该方法允许用户根据Coq自己的类型系统指定自定义自动化例程的行为。我们的方法涉及Coq规范结构的复杂应用程序,该规范结构对Haskell类型类进行泛化,并促进了灵活的依赖类型逻辑编程样式。具体地说,就像使用Haskell类型类来推断给定类型的重载项的规范实现一样,对于给定的参数实例化,可以使用规范结构来推断重载引理的规范证明。我们提供了一系列用于规范结构编程的设计模式,这些模式使人们能够仔细且可预测地哄骗Coq的类型推断引擎在统一期间触发用户提供的算法的执行,并通过从Hoare类型理论中得出的几个实际示例来说明这些模式。我们假设没有Coq的先验知识,并从第一条原则描述了Coq类型推断的相关方面。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号