Abstract
This report describes a tool for reasoning about lazy functional programs written in a subset of Haskell. A first-order logic language for formulating theorems is defined. The syntax of the logic language is included in the functional language syntax; the semantics is classical. Structural induction and case analysis axioms are generated internally for suitable user-defined data types.
The logic language is given an operational semantics, which is implemented by the theorem proving tool. The operational semantics involves depth-first search, with limited backtracking. Proof can be goal-directed (backwards) or forward. Special care has been taken to restrict the search space. For example, induction is applied only where requested by the user. Pattern-matching is used instead of unification.
The theorem prover is in a sense ‘automatic’, as there is no user involvement in the proof of a goal. The approach taken can be called declarative theorem proving, since the user cannot manipulate a proof state using a sequence of tactics. The theorem prover can be regarded as an interpreter for a declarative language.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
R.S. Bird. A calculus of functions for program derivation. In David A. Turner, editor, Research Topics in Functional Programming, pages 287–308. Addison—Wesley, 1990.
Robert Boyer and J. S. Moore. A Computational Logic Handbook. Academic Press, 1988.
P.J. Brumfitt. Metamorph - a formal methods toolkit with application to the design of digital hardware. Journal of Functional Programming, 2 (4): 437–473, October 1992.
Lawrence C. Paulson. The foundation of a generic theorem prover. Journal of Automated Reasoning, 5: 363–397, 1989.
S.L. Peyton Jones. The Implementation of Functional Programming Languages. Prentice-Hall International Series in Computer Science. Prentice-Hall International (UK) Ltd, London, 1987.
S.L. Peyton Jones and D.R. Lester. Implementing Functional Languages: A Practical Approach. Prentice Hall International, Hemel Hempstead, UK, 1992.
David A. Plaisted. Mechanical theorem proving. In R.B. Banerji, editor, Formal Techniques in Artificial Intelligence. Elsevier Science Publishers B.V., Amsterdam, The Netherlands, 1990.
C. Runciman, I. Toyn, and M. Firth. An incremental, exploratory and transformational environment for lazy functional programming. Journal of Functional Programming, 3 (1): 93–117, January 1993.
R. Turner. Constructive Foundations for Functional Languages. McGraw—Hill, London, 1991.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1995 Springer-Verlag London
About this paper
Cite this paper
Mintchev, S. (1995). Mechanized Reasoning about Functional Programs. In: Hammond, K., Turner, D.N., Sansom, P.M. (eds) Functional Programming, Glasgow 1994. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3573-9_11
Download citation
DOI: https://doi.org/10.1007/978-1-4471-3573-9_11
Publisher Name: Springer, London
Print ISBN: 978-3-540-19914-4
Online ISBN: 978-1-4471-3573-9
eBook Packages: Springer Book Archive