## Adapting Functional Programs to Higher-Order Logic

Citations: | 2 - 1 self |

### BibTeX

@MISC{Owens_adaptingfunctional,

author = {Scott Owens and Konrad Slind},

title = {Adapting Functional Programs to Higher-Order Logic},

year = {}

}

### OpenURL

### Abstract

Abstract. 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.

### Citations

847 |
A formulation of the simple theory of types
- Church
- 1940
(Show Context)
Citation Context ...fficult termination proofs. We discuss techniques that support the expression of such programs as logical functions. 1. Introduction Many higher-order logics are based on Church’s simple type theory (=-=Church, 1940-=-). These logics support general mathematical reasoning, which is not surprising since simple type theory was proposed as a foundation for mathematics. Contemporary interactive proof assistants typical... |

718 | Isabelle/HOL — A Proof Assistant for HigherOrder Logic - Nipkow, Paulson, et al. - 2002 |

530 |
A computational logic
- Boyer, Moore
- 1979
(Show Context)
Citation Context ...induction is awkward. Fortunately, the wellfounded relation used to prove termination of a function can be used to derive an induction principle customized to the recursion structure of the function (=-=Boyer and Moore, 1979-=-). This principle allows one to prove a property P of a function by assuming P holds for each recursive call and then showing that P holds for the entire function. For example, the following ‘variant-... |

500 |
T.: Introduction to HOL: A Theorem Proving Environment for Higher Order Logic: Cambridge
- Melham
- 1993
(Show Context)
Citation Context ...not surprising since simple type theory was proposed as a foundation for mathematics. Contemporary interactive proof assistants typically implement variations of simple type theory. For example, HOL (=-=Gordon and Melham, 1993-=-) adds type variables, Isabelle/HOL (Nipkow et al., 2002) provides type classes, PVS (Owre et al., 2001) adds predicate subtypes, Coq (Bertot and Castéran, 2004) is a constructive logic, and IMPS (Far... |

262 | Computer-Aided Reasoning: An Approach - Kaufmann, Manolios, et al. - 2000 |

216 | Cayenne–a language with dependent types
- Augustsson
- 1998
(Show Context)
Citation Context ... based programming language which builds on ideas in Hagino’s thesis (Hagino, 1987). Charity is explicitly founded on folds and unfolds, so its syntax disallows general recursion. The Cayenne system (=-=Augustsson, 1998-=-) incorporates a powerful (undecidable) type system so that functional programs may be specified by their types. Unlike HOL, it does not require termination proofs for recursive definitions. As the Ca... |

210 | Derivatives of regular expressions - Brzozowski |

147 |
Proving and applying program transformations expressed with second-order patterns
- Huet, Lang
- 1978
(Show Context)
Citation Context ...ess of lifting elementary types like lists and trees into domains. Remark 2. Many functional programs can be viewed as instantiations of very general patterns of recursion known as recursion schemes (=-=Huet and Lang, 1978-=-). A scheme represents a class of terminating programs each of which is obtainable by instantiating parameters in the scheme and then proving termination. For example, the class of programs described ... |

110 | Regular expression pattern matching for XML - Hosoya, Pierce - 2001 |

100 | From regular expressions to deterministic automata - Berry, Sethi - 1986 |

94 | A.: Representing Control, A - Danvy, Filinski - 1992 |

87 |
Edinburgh LCF: A Mechanised Logic
- Gordon, Milner, et al.
- 1979
(Show Context)
Citation Context ...nctional programs quite often in the course of building formalizations. Indeed, the original LCF system, for which ML was invented, was aimed at verifying functional programs using Scott’s PPλ logic (=-=Gordon et al., 1979-=-). Similarly, the NQTHM system of Boyer and Moore (1979) was also originally aimed at automating induction proofs of pure LISP programs. ACL2 superseded NQTHM. It provides a healthy subset of Common L... |

81 | Implicit Parameters: Dynamic Scoping with Static Types - Lewis, Launchbury, et al. - 2000 |

78 | IMPS: An interactive mathematical proof system
- Farmer, Guttman, et al.
- 1990
(Show Context)
Citation Context ...993) adds type variables, Isabelle/HOL (Nipkow et al., 2002) provides type classes, PVS (Owre et al., 2001) adds predicate subtypes, Coq (Bertot and Castéran, 2004) is a constructive logic, and IMPS (=-=Farmer et al., 1990-=-) supports partial functions. Each of these systems provides a library of verified mathematics to base proofs on, plus a collection of automated proof tools such as decision procedures and simplifiers... |

73 | Building reliable, high-performance communication systems from components - Liu, Kreitz, et al. - 1999 |

67 | A Categorical Programming Language
- Hagino
- 1987
(Show Context)
Citation Context ...ns, they can be seen as environments for strong functional programming. Charity (Cockett and Fukushima, 1992) is a category-theory based programming language which builds on ideas in Hagino’s thesis (=-=Hagino, 1987-=-). Charity is explicitly founded on folds and unfolds, so its syntax disallows general recursion. The Cayenne system (Augustsson, 1998) incorporates a powerful (undecidable) type system so that functi... |

52 | Verification of non-functional programs using interpretations in type theory - Filliâtre - 2003 |

48 | The under-appreciated unfold
- Gibbons, Jones
- 1998
(Show Context)
Citation Context .../unfold combinations (Shankar, 1995; Slind, 2000) used to justify deforestation optimizations in compilers for functional languages. However, unfold is also useful as a general programming technique (=-=Gibbons and Jones, 1998-=-). In the following, we show that working in HOL does not impede this kind of development. Motivated by the breadth-first traversal example of Gibbons and Jones (1998), we use unfold to define breadth... |

40 | Random testing in Isabelle/HOL - Berghofer, Nipkow - 2004 |

39 | Termination of nested and mutually recursive algorithms
- Giesl
- 1997
(Show Context)
Citation Context ... Type Theory frameworks includes Abel and Altenkirch (2002) as well as Xi (2002). Some of the most advanced work on termination for functional programs comes from term rewriting systems (Giesl, 1995; =-=Giesl, 1997-=-). The recent approach to automatically proving termination of Lee et al. (2001) is also promising, and has been incorporated into a termination tool for ACL2 definitions (Manolios and Vroon, 2006). R... |

31 | Termination analysis for functional programs using term orderings
- Giesl
- 1995
(Show Context)
Citation Context ...lated work in Type Theory frameworks includes Abel and Altenkirch (2002) as well as Xi (2002). Some of the most advanced work on termination for functional programs comes from term rewriting systems (=-=Giesl, 1995-=-; Giesl, 1997). The recent approach to automatically proving termination of Lee et al. (2001) is also promising, and has been incorporated into a termination tool for ACL2 definitions (Manolios and Vr... |

31 | Partial functions in ACL2 - Manolios, Moore |

26 | High-speed, analyzable simulators - Greve, Wilding, et al. - 2000 |

26 | Termination analysis with calling context graphs - Manolios, Vroon - 2006 |

23 | Proof-Directed Debugging - HARPER - 1999 |

22 | About Charity
- Cockett, Fukushima
- 1992
(Show Context)
Citation Context ...onal Programming (Turner, 1995), which emphasizes total functions; since higher-order logics are based on total functions, they can be seen as environments for strong functional programming. Charity (=-=Cockett and Fukushima, 1992-=-) is a category-theory based programming language which builds on ideas in Hagino’s thesis (Hagino, 1987). Charity is explicitly founded on folds and unfolds, so its syntax disallows general recursion... |

22 |
Inductive definitions: automation and application
- Harrison
- 1995
(Show Context)
Citation Context ...ecursion equations for length as a logical theorem. These steps have been mechanized for HOL-4 and Isabelle/HOL (Slind, 1999). For further discussion of wellfounded recursion in theorem provers, see (=-=Harrison, 1995-=-; Rudnicki and Trybulec, 1999). 2.2. Termination Relations There exists a wide variety of wellfounded relations and combinators, such as <lex, to combine them. For example, every inductively defined d... |

17 | Building reliable, high-performance networks with the Nuprl proof development system - Kreitz |

14 |
On equivalents of well-foundedness
- Rudnicki, Trybulec
- 1999
(Show Context)
Citation Context ...ns for length as a logical theorem. These steps have been mechanized for HOL-4 and Isabelle/HOL (Slind, 1999). For further discussion of wellfounded recursion in theorem provers, see (Harrison, 1995; =-=Rudnicki and Trybulec, 1999-=-). 2.2. Termination Relations There exists a wide variety of wellfounded relations and combinators, such as <lex, to combine them. For example, every inductively defined datatype has a wellfounded rel... |

13 | Greedy regular expression matching - Frisch, Cardelli - 2005 |

13 | Verified Lexical Analysis - NIPKOW - 1998 |

11 | Verifying BDD algorithms through monadic interpretation - Krstic, Matthews - 2002 |

10 | Steps Towards Mechanizing Program Transformations Using PVS
- Shankar
- 1996
(Show Context)
Citation Context ...are hedged about by abstract termination requirements. In this way, one can for example easily prove the (constrained) paper.tex; 22/03/2007; 15:07; p.14sfusion theorems for fold/unfold combinations (=-=Shankar, 1995-=-; Slind, 2000) used to justify deforestation optimizations in compilers for functional languages. However, unfold is also useful as a general programming technique (Gibbons and Jones, 1998). In the fo... |

7 | 2004), Interactive Theorem Proving and Program Development: Coq’art: the Calculus of Inductive Constructions - Bertot, Pierre |

6 | Ben-Amram: 2001, ‘The Size-Change Principle for Program Termination - Lee, Jones, et al. - 2001 |

2 | Altenkirch: 2002, ‘A Predicative Analysis of Structural Recursion - Abel, T |

2 | Nipkow: 2002, ‘Executing Higher Order Logic - Berghofer, T |

2 | Recursive definition over coinductive types - Matthews - 1999 |

1 | Nielsen: 2001, ‘Defunctionalization at Work’. Technical Report RS-01-23, BRICS. Extended version of an article appearing - Danvy, R |

1 | Takeyama: 2003, ‘Combining Testing and Proving in Dependent Type Theory - Dybjer, Haiyan, et al. |

1 | Alves-Foss (eds - Schubert, J |

1 | 2000b, Computer-Aided Reasoning: Case Studies - Kaufmann, Manolios, et al. |

1 | Enumerating the strings of regular languages (Functional Pearl - McIlroy |

1 | Laboratory. Available at http://pvs. csl.sri.com/documentation.shtml - Owre, Shankar, et al. |