Skip to main content

Context-Moving Transformations for Function Verification

  • Conference paper
Logic-Based Program Synthesis and Transformation (LOPSTR 1999)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1817))

Abstract

Several induction theorem provers have been developed which support mechanized verification of functional programs. Unfortunately, a major problem is that they often fail in verifying tail recursive functions (which correspond to imperative programs). However, in practice imperative programs are used almost exclusively.

We present an automatic transformation to tackle this problem. It transforms functions which are hard to verify into functions whose correctness can be shown by the existing provers. In contrast to classical program transformations, the aim of our technique is not to increase efficiency, but to increase verifiability. Therefore, this paper introduces a novel application area for program transformations and it shows that such techniques can in fact solve some of the most urgent current challenge problems in automated verification and induction theorem proving.

This work was supported by the DFG under grant GI 274/4-1.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Arsac, J., Kodratoff, Y.: Some techniques for recursion removal from recursive functions. ACM Trans. Prog. Languages Systems 4, 295–322 (1982)

    Article  MATH  Google Scholar 

  2. Arts, T., Giesl, J.: Termination of term rewriting using dependency pairs. Theoretical Computer Science (2000) (to appear)

    Google Scholar 

  3. Aubin, R.: Mechanizing structural induction. TCS 9, 347–362 (1979)

    Article  MATH  MathSciNet  Google Scholar 

  4. Bauer, F.L., Wössner, H.: Algorithmic Language and Program Development. Springer, Heidelberg (1982)

    MATH  Google Scholar 

  5. Bouhoula, A., Rusinowitch, M.: Implicit induction in conditional theories. Journal of Automated Reasoning 14, 189–235 (1995)

    Article  MATH  MathSciNet  Google Scholar 

  6. Boyer, R.S., Moore, J.S.: A Computational Logic. Academic Press, London (1979)

    MATH  Google Scholar 

  7. Boyer, R.S., Moore, J.S.: A Computational Logic Handbook, 2nd edn. Academic Press, London (1998)

    Google Scholar 

  8. Brauburger, J., Giesl, J.: Approximating the domains of functional and imperative programs. Science of Computer Programming 35, 113–136 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  9. Bundy, A., Stevens, A., van Harmelen, F., Ireland, A., Smaill, A.: Rippling: A heuristic for guiding inductive proofs. Artif. Int. 62, 185–253 (1993)

    Article  MATH  Google Scholar 

  10. Burstall, R.M., Darlington, J.: A transformation system for developing recursive programs. Journal of the ACM 24, 44–67 (1977)

    Article  MATH  MathSciNet  Google Scholar 

  11. Cooper, D.: The equivalence of certain computations. Comp. J. 9, 45–52, 66

    Google Scholar 

  12. Darlington, J., Burstall, R.M.: A system which automatically improves programs. Acta Informatica 6, 41–60 (1976)

    Article  MATH  Google Scholar 

  13. Dijkstra, E.W.: Invariance and non-determinacy. In: Mathematical Logic and Programming Languages, ch. 9, pp. 157–165. Prentice-Hall, Englewood Cliffs (1985)

    Google Scholar 

  14. Giesl, J.: Termination analysis for functional programs using term orderings. In: Mycroft, A. (ed.) SAS 1995. LNCS, vol. 983, pp. 154–171. Springer, Heidelberg (1995)

    Google Scholar 

  15. Giesl, J.: Termination of nested and mutually recursive algorithms. Journal of Automated Reasoning 19, 1–29 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  16. Giesl, J., Walther, C., Brauburger, J.: Termination analysis for functional programs. In: Bibel, Schmitt (eds.) Automated Deduction – A Basis for Applications. Applied Logic Series 10, vol. III, pp. 135–164. Kluwer, Dordrecht (1998)

    Google Scholar 

  17. Giesl, J.: Mechanized verification of imperative and functional programs. Habilitation Thesis, TU Darmstadt (1999)

    Google Scholar 

  18. Giesl, J.: Context-moving transformations for function verification. Technical Report IBN 99/51, TU Darmstadt. Available from, http://www.inferenzsysteme.informatik.tu-darmstadt.de/~giesl/ibn-99-51.ps

  19. Giesl, J.: Induction proofs with partial functions. Journal of Automated Reasoning (to appear) Preliminary version appeared as Technical Report IBN 98/48, TU Darmstadt. Available from, http://www.inferenzsysteme.informatik.tu-darmstadt.de/~giesl/ibn-98-48.ps

  20. Harrison, P., Khoshnevisan, H.: A new approach to recursion removal. Theoretical Computer Science 93, 91–113 (1992)

    Article  MATH  MathSciNet  Google Scholar 

  21. Hesketh, J., Bundy, A., Smaill, A.: Using middle-out reasoning to control the synthesis of tail-recursive programs. In: Kapur, D. (ed.) CADE 1992. LNCS (LNAI), vol. 607, pp. 310–324. Springer, Heidelberg (1992)

    Google Scholar 

  22. Hoare, C.A.R.: An axiomatic basis for computer programming. Communications of the ACM 12, 576–583 (1969)

    Article  MATH  Google Scholar 

  23. Ireland, A., Stark, J.: On the automatic discovery of loop invariants.In: 4th NASA Langley Formal Methods Workshop, NASA Conf. Publ. 3356 (1997)

    Google Scholar 

  24. Ireland, A., Bundy, A.: Automatic verification of functions with accumulating parameters. Journal of Functional Programming 9, 225–245 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  25. Kapur, D., Musser, D.R.: Proof by consistency. AI 31, 125–158 (1987)

    MATH  MathSciNet  Google Scholar 

  26. McCarthy, J.: Recursive functions of symbolic expressions and their computation by machine. Communications of the ACM 3 (1960)

    Google Scholar 

  27. Möller, B., Schuman, S., Partsch, H.: Formal Program Development. LNCS, vol. 755. Springer, Heidelberg (1993)

    MATH  Google Scholar 

  28. Moore, J.S.: Introducing iteration into the Pure lisp theorem prover. IEEE Transactions on Software Engineering 1, 328–338 (1975)

    Google Scholar 

  29. Partsch, H.: Specification and Transformation of Programs. Springer, Heidelberg (1990)

    MATH  Google Scholar 

  30. Pettorossi, A., Proietti, M.: Rules and strategies for transforming functional and logic programs. ACM Computing Surveys 28, 360–414 (1996)

    Article  Google Scholar 

  31. Pettorossi, A., Proietti, M.: Transformations of logic programs. In: Handbook of Logic in AI and Logic Programming, vol. 5, Oxford University Pr., Oxford (1998)

    Google Scholar 

  32. Reynolds, C., Yeh, R.T.: Induction as the Basis for Program Verification. IEEE Transactions on Software Engineering SE-2(4), 244–252 (1976)

    Article  MathSciNet  Google Scholar 

  33. Stark, J., Ireland, A.: Invariant discovery via failed proof attempts. In: Flener, P. (ed.) LOPSTR 1998. LNCS, vol. 1559, p. 271. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  34. Walther, C.: Mathematical induction. In: Handbook of Logic in Artificial Intelligence and Logic Programming, vol. 2. Oxford University Press, Oxford (1994)

    Google Scholar 

  35. Wand, M.: Continuation-based program transformation strategies. Journal of the ACM 27, 164–180 (1980)

    Article  MATH  MathSciNet  Google Scholar 

  36. Zhang, H., Kapur, D., Krishnamoorthy, M.S.: A mechanizable induction principle for equational specifications. In: Lusk, E.R., Overbeek, R. (eds.) CADE 1988. LNCS, vol. 310, Springer, Heidelberg (1988)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2000 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Giesl, J. (2000). Context-Moving Transformations for Function Verification. In: Bossi, A. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 1999. Lecture Notes in Computer Science, vol 1817. Springer, Berlin, Heidelberg. https://doi.org/10.1007/10720327_17

Download citation

  • DOI: https://doi.org/10.1007/10720327_17

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-67628-7

  • Online ISBN: 978-3-540-45148-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics