Another Look at Nested Recursion

  • Konrad Slind
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1869)

Abstract

Functions specified by nested recursions are difficult to define and reason about. We present several ameliorative techniques that use deduction in a classical higher-order logic. First, we discuss how an apparent circular dependency between the proof of nested termination conditions and the definition of the specified function can be avoided. Second, we propose a method that allows the specified function to be defined in the absence of a termination relation. Finally, we show how our techniques extend to nested program schemes, where a termination relation cannot be found until schematic parameters have been filled in. In each of these techniques, suitable induction theorems are automatically derived.

Keywords

Termination Condition Termination Relation Auxiliary Function Recursive Function Unification Algorithm 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    S. Agerholm. LCF examples in HOL. The Computer Journal, 38(2):121–130, July 1995.CrossRefGoogle Scholar
  2. 2.
    Richard Boulton and Konrad Slind. Automatic derivation and application of induction schemes for mutually recursive functions. In Proceedings of the First International Conference on Computational Logic (CL2000), London, UK, July 2000. To appear. Available at http://www.cl.cam.ac.uk/users/kxs/papers/mutual.html.
  3. 3.
    Ana Bove. Programming in Martin-Löf Type Theory. Unification: A non-trivial Example. Master’s thesis, Chalmers University of Technology, 1999. Licentiate Thesis.Google Scholar
  4. 4.
    Robert S. Boyer and J Strother Moore. A Computational Logic. Academic Press, 1979.Google Scholar
  5. 5.
    Robert S. Boyer and J Strother Moore. A Computational Logic Handbook. Academic Press, 1988.Google Scholar
  6. 6.
    Simon Finn, Mike Fourman, and John Longley. Partial functions in a total setting. Journal of Automated Reasoning, 18(1):85–104, February 1997.MATHCrossRefGoogle Scholar
  7. 7.
    Juergen Giesl. Termination of nested and mutually recursive algorithms. Journal of Automated Reasoning, 19(1):1–29, August 1997.MATHCrossRefGoogle Scholar
  8. 8.
    Jürgen Giesl. Automatisierung von Terminieringsbeweisen für rekursiv defininierte Algorithmen. PhD thesis, Technische Hochshule Darmstadt, 1995.Google Scholar
  9. 9.
    Deepak Kapur and M. Subramaniam. Automating induction over mutually recursive functions. In Proceedings of the 5th International Conference on Algebraic Methodology and Software Technology (AMAST’96), volume 1101 of Lecture Notes in Computer Science. Springer-Verlag, 1996.CrossRefGoogle Scholar
  10. 10.
    Zohar Manna and Richard Waldinger. Deductive synthesis of the unification algorithm. Science of Computer Programming, 1:5–48, 1981.MATHCrossRefGoogle Scholar
  11. 11.
    Conor McBride. Dependently Typed Functional Programs and their Proofs. PhD thesis, University of Edinburgh, 1999.Google Scholar
  12. 12.
    Bengt Nordstrom. Terminating general recursion. BIT, 28:605–619, 1988.CrossRefGoogle Scholar
  13. 13.
    S. Owre, J. M. Rushby, N. Shankar, and D.J. Stringer-Calvert. PVS System Guide. SRI Computer Science Laboratory, September 1998. Available at http://pvs.csl.sri.com/manuals.html.
  14. 14.
    Lawrence Paulson. Verifying the unification algorithm in LCF. Science of Computer Programming, 3:143–170, 1985.CrossRefGoogle Scholar
  15. 15.
    Lawrence Paulson. ML for the working programmer. Cambridge University Press, second edition, 1996.Google Scholar
  16. 16.
    Joseph Rouyer. Développement d’algorithme d’unification dans le Calcul des Constructions avecs types inductifs. Technical Report 1795, INRIA-Lorraine, November 1992.Google Scholar
  17. 17.
    Konrad Slind. Function definition in higher order logic. In Theorem Proving in Higher Order Logics, number 1125 in Lecture Notes in Computer Science, Turku, Finland, August 1996. Springer-Verlag.Google Scholar
  18. 18.
    Konrad Slind. Derivation and use of induction schemes in higher order logic. In Theorem Proving in Higher Order Logics, number 1275 in Lecture Notes in Computer Science, Murrary Hill, New Jersey, USA, August 1997. Springer-Verlag.CrossRefGoogle Scholar
  19. 19.
    Konrad Slind. 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.
  20. 20.
    Konrad Slind. Wellfounded schematic definitions. In David McAllester, editor, Proceedings of the Seventeenth International Conference on Automated Deduction CADE-17, volume 1831, Pittsburgh, Pennsylvania, June 2000. Springer-Verlag.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2000

Authors and Affiliations

  • Konrad Slind
    • 1
  1. 1.Cambridge University Computer LaboratoryUK

Personalised recommendations