Holcf '11: a definitional domain theory for verifying functional programs

HOLCF is an interactive theorem proving system that uses the mathematics of domain theory to reason about programs written in functional programming languages. This thesis introduces HOLCF '11, a thoroughly revised and extended version of HOLCF that advances the state of the art in program verification: HOLCF '11 can reason about many program definitions that are beyond the scope of other formal proof tools, while providing a high degree of proof automation. The soundness of the system is ensured by adhering to a definitional approach: New constants and types are defined in terms of previous concepts, without introducing new axioms. Major features of HOLCF '11 include two high-level definition packages: the Fixrec package for defining recursive functions, and the Domain package for defining recursive datatypes. Each of these uses the domain-theoretic concept of least fixed points to translate user-supplied recursive specifications into safe low-level definitions. Together, these tools make it easy for users to translate a wide variety of functional programs into the formalism of HOLCF. Theorems generated by the tools also make it easy for users to reason about their programs, with a very high level of confidence in the soundness of the results. As a case study, we present a fully mechanized verification of a model of concurrency based on powerdomains. The formalization depends on many features unique to HOLCF '11, and is the first verification of such a model in a formal proof tool.

[1]  Richard S. Bird,et al.  Nested Datatypes , 1998, MPC.

[2]  Stefan Berghofer,et al.  Inductive Datatypes in HOL - Lessons Learned in Formal-Logic Engineering , 1999, TPHOLs.

[3]  Nils Anders Danielsson,et al.  Fast and loose reasoning is morally correct , 2006, POPL '06.

[4]  Nick Benton,et al.  Some Domain Theory and Denotational Semantics in Coq , 2009, TPHOLs.

[5]  Michael J. C. Gordon,et al.  Edinburgh LCF: A mechanised logic of computation , 1979 .

[6]  Franz Regensburger,et al.  HOLCF: Higher Order Logic of Computable Functions , 1995, TPHOLs.

[7]  Dragan Macos,et al.  A study of evaluation order semantics in expressions with side effects , 2000, J. Funct. Program..

[8]  Carl A. Gunter Profinite Solutions For Recursive Domain Equations , 1985 .

[9]  Sten Agerholm,et al.  A HOL Basis for Reasoning about Functional Programs , 1994 .

[10]  Simon Peyton Jones,et al.  The Implementation of Functional Programming Languages (Prentice-hall International Series in Computer Science) , 1987 .

[11]  Burkhart Wolff,et al.  Building Formal Method Tools in the Isabelle/Isar Framework , 2007, TPHOLs.

[12]  Carl A. Gunter Universal Profinite Domains , 1987, Inf. Comput..

[13]  Lawrence Charles Paulson,et al.  Isabelle/HOL: A Proof Assistant for Higher-Order Logic , 2002 .

[14]  Peyton Jones,et al.  Haskell 98 language and libraries : the revised report , 2003 .

[15]  Michael J. C. Gordon,et al.  From LCF to HOL: a short history , 2000, Proof, Language, and Interaction.

[16]  Conor McBride,et al.  Applicative programming with effects , 2008, J. Funct. Program..

[17]  Wolfgang Breuer,et al.  X, Y, Z , 2003 .

[18]  Andy Gill Introducing the Haskell equational reasoning assistant , 2006, Haskell '06.

[19]  Paul Hudak,et al.  Modular domain specific languages and tools , 1998, Proceedings. Fifth International Conference on Software Reuse (Cat. No.98TB100203).

[20]  Graham Hutton,et al.  Proof Methods for Corecursive Programs , 2005, Fundam. Informaticae.

[21]  Brian Huffman Stream Fusion , 2009, Arch. Formal Proofs.

[22]  Elsa L. Gunter A Broader Class of Trees for Recursive Type Definitions for HOL , 1993, HUG.

[23]  Franz Regensburger,et al.  HOLCF: eine konservative Erweiterung von HOL um LCF , 1994 .

[24]  Gordon D. Plotkin,et al.  A Powerdomain Construction , 1976, SIAM J. Comput..

[25]  Graham Hutton,et al.  The generic approximation lemma , 2001, Inf. Process. Lett..

[26]  Lawrence C. Paulson Mechanizing Coinduction and Corecursion in Higher-Order Logic , 1997, J. Log. Comput..

[27]  Peter Thiemann Towards a Denotational Semantics for Concurrent State TransformersPeter , 1995 .

[28]  Tobias Nipkow,et al.  Proof Pearl: Defining Functions over Finite Sets , 2005, TPHOLs.

[29]  P. J. Landin,et al.  The next 700 programming languages , 1966, CACM.

[30]  T. Melham Automating recursive type definitions in higher order logic , 1989 .

[31]  Alexander Krauss,et al.  Partial and Nested Recursive Function Definitions in Higher-order Logic , 2010, Journal of Automated Reasoning.

[32]  Chang Liu,et al.  Term rewriting and all that , 2000, SOEN.

[33]  Eduardo Giménez,et al.  An Application of Co-inductive Types in Coq: Verification of the Alternating Bit Protocol , 1995, TYPES.

[34]  Simon L. Peyton Jones,et al.  A semantics for imprecise exceptions , 1999, PLDI '99.

[35]  Florian Kammüller,et al.  Locales - A Sectioning Concept for Isabelle , 1999, TPHOLs.

[36]  Brian Huffman,et al.  Reasoning with Powerdomains in Isabelle / HOLCF , 2008 .

[37]  Carl A. Gunter,et al.  Semantic Domains , 1991, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[38]  Dana S. Scott,et al.  A Type-Theoretical Alternative to ISWIM, CUCH, OWHY , 1993, Theor. Comput. Sci..

[39]  Brian Huffman A Purely Definitional Universal Domain , 2009, TPHOLs.

[40]  Nikolaos Papaspyrou,et al.  A Resumption Monad Transformer and its Applications in the Semantics of Concurrency , 2006 .

[41]  Richard S. Bird,et al.  Introduction to functional programming using haskeu , 1998 .

[42]  Lawrence C. Paulson,et al.  Logic and computation - interactive proof with Cambridge LCF , 1987, Cambridge tracts in theoretical computer science.

[43]  Andrew M. Pitts,et al.  A co-Induction Principle for Recursively Defined Domains , 1994, Theor. Comput. Sci..

[44]  Brian Huffman,et al.  Axiomatic Constructor Classes in Isabelle/HOLCF , 2005, TPHOLs.

[45]  William L. Harrison,et al.  Fine Control of Demand in Haskell , 2002, MPC.

[46]  Johanna Heitzer (a+b)² = a²+b² ?! , 2012 .

[47]  A. Karimi,et al.  Master‟s thesis , 2011 .

[48]  Olaf Müller,et al.  A verification environment for I-O-automata based on formalized meta-theory , 1998 .

[49]  Tobias Nipkow,et al.  HOLCF = HOL + LCF , 1999, Journal of Functional Programming.

[50]  Konrad Slind,et al.  Function Definition in Higher-Order Logic , 1996, TPHOLs.

[51]  Marinus J. Plasmeijer,et al.  Theorem Proving for functional Programmers - Sparkle: A Functional Theorem Prover , 2001 .

[52]  姜乐 a:b:c≠a÷b÷c , 1994 .

[53]  Lawrence C. Paulson,et al.  Deriving Structural Induction in LCF , 1984, Semantics of Data Types.

[54]  Carl A. Gunter Semantics of programming languages: structures and techniques , 1993, Choice Reviews Online.

[55]  Richard S. Bird,et al.  Introduction to functional programming , 1988, Prentice Hall International series in computer science.

[56]  Clemens Ballarin Tutorial to locales and locale interpretation , 2005 .

[57]  Paul Hudak,et al.  Monad transformers and modular interpreters , 1995, POPL '95.

[58]  Samson Abramsky,et al.  Domain theory , 1995, LICS 1995.

[59]  Alexander Krauss,et al.  Recursive Definitions of Monadic Functions , 2010, PAR@ITP.