Adapting functional programs to higher order logic

Higher-order logic proof systems combine functional programming with logic, providing functional programmers with a comfortable setting for the formalization of programs, specifications, and proofs. However, a possibly unfamiliar aspect of working in such an environment is that formally establishing program termination is necessary. In many cases, termination can be automatically proved, but there are useful programs that diverge and others that always terminate but have difficult termination proofs. We discuss techniques that support the expression of such programs as logical functions.

[1]  Eduardo Giménez,et al.  Structural Recursive Definitions in Type Theory , 1998, ICALP.

[2]  Alonzo Church,et al.  A formulation of the simple theory of types , 1940, Journal of Symbolic Logic.

[3]  Matthew Wilding,et al.  High-speed, analyzable simulators , 2000 .

[4]  Jeremy Gibbons,et al.  The under-appreciated unfold , 1998, ICFP '98.

[5]  Luca Cardelli,et al.  Greedy Regular Expression Matching , 2004, ICALP.

[6]  Konrad Slind,et al.  Automatic Formal Synthesis of Hardware from Higher Order Logic , 2006, Electron. Notes Theor. Comput. Sci..

[7]  John Launchbury,et al.  Implicit parameters: dynamic scoping with static types , 2000, POPL '00.

[8]  Simon Thompson Regular Expressions and Automata using Haskell , 2000 .

[9]  M. Gordon,et al.  Introduction to HOL: a theorem proving environment for higher order logic , 1993 .

[10]  Joe Hurd,et al.  Applications of Polytypism in Theorem Proving , 2003, TPHOLs.

[11]  Jürgen Giesl,et al.  Termination Analysis for Functional Programs using Term Orderings , 1995, SAS.

[12]  Konrad Slind Reasoning about terminating functional programs , 1999 .

[13]  Pierre Castéran,et al.  Interactive Theorem Proving and Program Development , 2004, Texts in Theoretical Computer Science An EATCS Series.

[14]  Neil D. Jones,et al.  The size-change principle for program termination , 2001, POPL '01.

[15]  Panagiotis Manolios,et al.  Termination Analysis with Calling Context Graphs , 2006, CAV.

[16]  Panagiotis Manolios,et al.  Partial Functions in ACL2 , 2003, Journal of Automated Reasoning.

[17]  D. A. Turner,et al.  Elementary Strong Functional Programming , 1995, FPLE.

[18]  Natarajan Shankar Steps Toward Mechanizing Program Transformations Using PVS , 1996, Sci. Comput. Program..

[19]  Alan Bundy,et al.  Depth-First Search , 1984 .

[20]  Hanbing Liu,et al.  Executable JVM model for analytical reasoning: a study , 2003, IVME '03.

[21]  Yves Bertot,et al.  Interactive Theorem Proving and Program Development: Coq'Art The Calculus of Inductive Constructions , 2010 .

[22]  José-Luis Ruiz-Reina,et al.  Efficient execution in an automated reasoning environment , 2008, J. Funct. Program..

[23]  Tobias Nipkow,et al.  Random testing in Isabelle/HOL , 2004, Proceedings of the Second International Conference on Software Engineering and Formal Methods, 2004. SEFM 2004..

[24]  Panagiotis Manolios,et al.  Computer-Aided Reasoning , 2000, Advances in Formal Methods.

[25]  M. Douglas McIlroy Enumerating the strings of regular languages , 2004, J. Funct. Program..

[26]  Tobias Nipkow,et al.  Executing Higher Order Logic , 2000, TYPES.

[27]  Ken Thompson,et al.  Programming Techniques: Regular expression search algorithm , 1968, Commun. ACM.

[28]  Konrad Slind Wellfounded Schematic Definitions , 2000, CADE.

[29]  Christoph Kreitz,et al.  Building reliable, high-performance communication systems from components , 2000, OPSR.

[30]  Tatsuya Hagino,et al.  A categorical programming language , 2020, ArXiv.

[31]  Robert Harper,et al.  Proof-directed debugging , 1999, Journal of Functional Programming.

[32]  Thorsten Altenkirch,et al.  Under Consideration for Publication in J. Functional Programming a Predicative Analysis of Structural Recursion , 2022 .

[33]  Eric van der Vlist,et al.  Relax NG , 2003 .

[34]  Gérard Berry,et al.  From Regular Expressions to Deterministic Automata , 1986, Theor. Comput. Sci..

[35]  Guodong Li,et al.  Structure of a Proof-Producing Compiler for a Subset of Higher Order Logic , 2007, ESOP.

[36]  Peter Dybjer,et al.  Combining Testing and Proving in Dependent Type Theory , 2003, TPHOLs.

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

[38]  Tobias Nipkow,et al.  A Proof Assistant for Higher-Order Logic , 2002 .

[39]  Matthew Flatt,et al.  Lexer and Parser Generators in Scheme , 2004 .

[40]  Benjamin C. Pierce,et al.  Regular expression pattern matching for XML , 2003, J. Funct. Program..

[41]  John Matthews,et al.  Verifying BDD Algorithms through Monadic Interpretation , 2002, VMCAI.

[42]  Natarajan Shankar,et al.  Static Analysis for Safe Destructive Updates in a Functional Language , 2001, LOPSTR.

[43]  Christoph Kreitz,et al.  Building reliable, high-performance networks with the Nuprl proof development system , 2004, Journal of Functional Programming.

[44]  Olivier Danvy,et al.  Abstracting control , 1990, LISP and Functional Programming.

[45]  Robert S. Boyer,et al.  Computational Logic , 1990, ESPRIT Basic Research Series.

[46]  Janusz A. Brzozowski,et al.  Derivatives of Regular Expressions , 1964, JACM.

[47]  Gérard P. Huet,et al.  Proving and applying program transformations expressed with second-order patterns , 1978, Acta Informatica.

[48]  Konrad Slind Derivation and Use of Induction Schemes in Higher-Order Logic , 1997, TPHOLs.

[49]  Jürgen Giesl Termination of Nested and Mutually Recursive Algorithms , 2004, Journal of Automated Reasoning.

[50]  John Harrison,et al.  Inductive Definitions: Automation and Application , 1995, TPHOLs.

[51]  Jean-Christophe Filliâtre,et al.  Verification of non-functional programs using interpretations in type theory , 2003, J. Funct. Program..

[52]  Olivier Danvy,et al.  Defunctionalization at work , 2001, PPDP '01.

[53]  Thierry Coquand,et al.  Constructions: A Higher Order Proof System for Mechanizing Mathematics , 1985, European Conference on Computer Algebra.

[54]  Piotr Rudnicki,et al.  On Equivalents of Well-Foundedness , 1999, Journal of Automated Reasoning.

[55]  Panagiotis Manolios,et al.  Computer-aided reasoning : ACL2 case studies , 2000 .

[56]  Hongwei Xi Dependent Types for Program Termination Verification , 2002, High. Order Symb. Comput..

[57]  William M. Farmer,et al.  IMPS: An Interactive Mathematical Proof System , 1990, CADE.

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

[59]  Tobias Nipkow,et al.  Verified Lexical Analysis , 1998, TPHOLs.

[60]  Lennart Augustsson,et al.  Cayenne—a language with dependent types , 1998, ICFP '98.