Abstract
A program scheme looks like a recursive function definition, except that it has free variables ‘on the right hand side’. As is well-known, equalities between schemes can capture powerful program transformations, e.g., translation to tail-recursive form. In this paper, we present a simple and general way to define program schemes, based on a particular form of the wellfounded recursion theorem. Each program scheme specifies a schematic induction theorem, which is automatically derived by formal proof from the wellfounded induction theorem. We present a few examples of how formal program transformations are expressed and proved in our approach. The mechanization reported here has been incorporated into both the HOL and Isabelle/HOL systems.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Anderson, P., Basin, D.: Program development schemata as derived rules. Journal of Symbolic Computation (2000) (to appear)
Augustsson, L.: Compiling pattern matching. In: Jouannnaud, J.P. (ed.) Functional Programming and Computer Architecture LNCS, vol. 201, pp. 368–381. Springer, Heidelberg (1985)
Barras, B., Boutin, S., Cornes, C., Courant, J., Coscoy, Y., Delahaye, D., Rauglaudre, D.d., Filliatre, J.-C., Gimenez, E., Herbelin, H., Huet, G., Laulhere, H., Munoz, C., Murthy, C., Parent-Vigouroux, C., Loiseleur, P., Mohring, C.P., Saibi, A., Werner, B.: The Coq Proof Assistant Reference Manual. In: INRIA, 6th edn (December 1999) accessible at, http://pauillac.inria.fr/coq/doc/main.html
Bird, R.: Functional algorithm design. In: Möller, B. (ed.) MPC 1995. LNCS, vol. 947, pp. 17–21. Springer, Heidelberg (1995)
Boyer, R.S., Moore, J.S.: A Computational Logic. Academic Press, London (1979)
Burstall, R., Darlington, J.: A transformation system for developing recursive programs. Journal of the Association for Computing Machinery 24(1), 44–67 (1977)
Church, A.: A formulation of the Simple Theory of Types. Journal of Symbolic Logic 5, 56–68 (1940)
Dershowitz, N., Manna, Z.: Proving termination with multiset orderings. CACM 22(8), 465–476 (1979)
Dold, A.: Representing, verifying and applying software development steps using the PVS system. In: Alagar, V.S., Nivat, M. (eds.) AMAST 1995. LNCS, vol. 936, pp. 431–435. Springer, Heidelberg (1995)
Dold, A.: Software development in PVS using generic development steps. In: Proceedings of a Seminar on Generic Programming (April 1998) (to appear in Springer LNCS)
Farmer, W.: Recursive definitions in IMPS (1997) (available by anonymous FTP at ftp.harvard.edu, in directory imps/doc, file name recursivedefinitions. dvi.gz)
Flener, P., Lau, K.-K., Ornaghi, M.: On correct program schemas. In: Fuchs, N.E. (ed.) LOPSTR 1997. LNCS, vol. 1463, pp. 124–143. Springer, Heidelberg (1998)
Gordon, M., Melham, T.: Introduction to HOL, a theorem proving environment for higher order logic. Cambridge University Press, Cambridge (1993)
Hardware Verification Group. Hol98 User’s Manual. University of Cambridge (December 1999) accessible at, http://www.ftp.cl.cam.ac.uk/ftp/hvg/hol98
Harrison, J.: Inductive definitions: automation and application. In: Schubert, E.T., Alves-Foss, J., Windley, P. (eds.) HUG 1995. LNCS, vol. 971, pp. 200–213. Springer, Heidelberg (1995)
Harrison, J.: HOL-Light: A tutorial introduction. In: Srivas, M., Camilleri, A. (eds.) FMCAD 1996. LNCS, vol. 1166, pp. 265–269. Springer, Heidelberg (1996)
Harrison, J.: Theorem Proving with the Real Numbers. In: CPHC/BCS Distinguished Dissertations. Springer, Heidelberg (1998)
Huet, G., Lang, B.: Proving and applying program transformations expressed with second-order patterns. Informatica 11, 31–55 (1978)
Lewis, J.R., Shields, M.B., Meijer, E., Launchbury, J.: Implicit parameters: Dynamic scoping with static types. In: Reps, T. (ed.) ACM Symposium on Principles of Programming Languages, Boston, Massachusetss, USA. ACM Press, New York (2000)
Maranget, L.: Two techniques for compiling lazy pattern matching. Technical Report 2385, INRIA (October 1994)
Melham, T.: A package for inductive relation definitions in HOL. In: Archer, M., Joyce, J.J., Levitt, K.N., Windley, P.J. (eds.) Proceedings of the 1991 InternationalWorkshop on the HOL Theorem Proving System and its Applications, pp. 350–357. IEEE Computer Society Press, Davis, California, USA (1991)
Owre, S., Rushby, J.M., Shankar, N., Stringer-Calvert, D.J.: PVS Sys- tem Guide. SRI Computer Science Laboratory (September 1998) available at, http://pvs.csl.sri.com/manuals.html
Partsch, H.A.: Specification and Transformation of Programs: A Formal Approach to Software Development. In: Texts and Monographs in Computer Science. Springer, Heidelberg (1990)
Paulson, L.: A fixedpoint approach to implementing (co)inductive definitions. In: Bundy, A. (ed.) CADE 1994. LNCS(LNAI), vol. 814, pp. 148–161. Springer, Heidelberg (1994)revised version available at, http://www.cl.cam.ac.uk/users/lcp/papers/recur.html under title ‘A Fixedpoint Approach to (Co)inductive and Co(datatype) Definitions’
Paulson, L.: Isabelle: A Generic Theorem Prover. LNCS, vol. 828. Springer, Heidelberg (1994) up-to-date reference manual can be found at, http://www.cl.cam.ac.uk/Research/HVG/Isabelle/dist/
Pepper, P., Smith, D.R.: A high-level derivation of global search algorithms (with constraint propagation). Science of Computer Programming 8(2- 3), 247–271 (1997)
Persson, H.: Type Theory and the Integrated Logic of Programs. PhD thesis. Chalmers University of Technology (June 1999)
Rudnicki, P., Trybulec, A.: On equivalents of well-foundedness. Journal of Automated Reasoning 23(3), 197–234 (1999)
Shankar, N.: Steps towards mechanizing program transformations using PVS. In: Möller, B. (ed.) MPC 1995. LNCS, vol. 947, pp. 50–66. Springer, Heidelberg (1995)
Slind, K.: Function definition in higher order logic. In: von Wright, J., Harrison, J., Grundy, J. (eds.) TPHOLs 1996. LNCS, vol. 1125. Springer, Heidelberg (1996)
Slind, K.: Derivation and use of induction sche mes in higher order logic. In: Gunter, E.L., Felty, A.P. (eds.) TPHOLs 1997. LNCS, vol. 1275. Springer, Heidelberg (1997)
Slind, K.: Reasoning about Terminating Functional Programs. PhD thesis, Institut für Informatik, Technische Universität München (1999) accessible at, http://www.cl.cam.ac.uk/users/kxs/papers
Wand, M.: Continuation-based program transformation strategies. Journal of the ACM 1(27), 164–180 (1980)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Slind, K. (2000). Wellfounded Schematic Definitions. In: McAllester, D. (eds) Automated Deduction - CADE-17. CADE 2000. Lecture Notes in Computer Science(), vol 1831. Springer, Berlin, Heidelberg. https://doi.org/10.1007/10721959_4
Download citation
DOI: https://doi.org/10.1007/10721959_4
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-67664-5
Online ISBN: 978-3-540-45101-3
eBook Packages: Springer Book Archive