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.
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
Arsac, J., Kodratoff, Y.: Some techniques for recursion removal from recursive functions. ACM Trans. Prog. Languages Systems 4, 295–322 (1982)
Arts, T., Giesl, J.: Termination of term rewriting using dependency pairs. Theoretical Computer Science (2000) (to appear)
Aubin, R.: Mechanizing structural induction. TCS 9, 347–362 (1979)
Bauer, F.L., Wössner, H.: Algorithmic Language and Program Development. Springer, Heidelberg (1982)
Bouhoula, A., Rusinowitch, M.: Implicit induction in conditional theories. Journal of Automated Reasoning 14, 189–235 (1995)
Boyer, R.S., Moore, J.S.: A Computational Logic. Academic Press, London (1979)
Boyer, R.S., Moore, J.S.: A Computational Logic Handbook, 2nd edn. Academic Press, London (1998)
Brauburger, J., Giesl, J.: Approximating the domains of functional and imperative programs. Science of Computer Programming 35, 113–136 (1999)
Bundy, A., Stevens, A., van Harmelen, F., Ireland, A., Smaill, A.: Rippling: A heuristic for guiding inductive proofs. Artif. Int. 62, 185–253 (1993)
Burstall, R.M., Darlington, J.: A transformation system for developing recursive programs. Journal of the ACM 24, 44–67 (1977)
Cooper, D.: The equivalence of certain computations. Comp. J. 9, 45–52, 66
Darlington, J., Burstall, R.M.: A system which automatically improves programs. Acta Informatica 6, 41–60 (1976)
Dijkstra, E.W.: Invariance and non-determinacy. In: Mathematical Logic and Programming Languages, ch. 9, pp. 157–165. Prentice-Hall, Englewood Cliffs (1985)
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)
Giesl, J.: Termination of nested and mutually recursive algorithms. Journal of Automated Reasoning 19, 1–29 (1997)
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)
Giesl, J.: Mechanized verification of imperative and functional programs. Habilitation Thesis, TU Darmstadt (1999)
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
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
Harrison, P., Khoshnevisan, H.: A new approach to recursion removal. Theoretical Computer Science 93, 91–113 (1992)
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)
Hoare, C.A.R.: An axiomatic basis for computer programming. Communications of the ACM 12, 576–583 (1969)
Ireland, A., Stark, J.: On the automatic discovery of loop invariants.In: 4th NASA Langley Formal Methods Workshop, NASA Conf. Publ. 3356 (1997)
Ireland, A., Bundy, A.: Automatic verification of functions with accumulating parameters. Journal of Functional Programming 9, 225–245 (1999)
Kapur, D., Musser, D.R.: Proof by consistency. AI 31, 125–158 (1987)
McCarthy, J.: Recursive functions of symbolic expressions and their computation by machine. Communications of the ACM 3 (1960)
Möller, B., Schuman, S., Partsch, H.: Formal Program Development. LNCS, vol. 755. Springer, Heidelberg (1993)
Moore, J.S.: Introducing iteration into the Pure lisp theorem prover. IEEE Transactions on Software Engineering 1, 328–338 (1975)
Partsch, H.: Specification and Transformation of Programs. Springer, Heidelberg (1990)
Pettorossi, A., Proietti, M.: Rules and strategies for transforming functional and logic programs. ACM Computing Surveys 28, 360–414 (1996)
Pettorossi, A., Proietti, M.: Transformations of logic programs. In: Handbook of Logic in AI and Logic Programming, vol. 5, Oxford University Pr., Oxford (1998)
Reynolds, C., Yeh, R.T.: Induction as the Basis for Program Verification. IEEE Transactions on Software Engineering SE-2(4), 244–252 (1976)
Stark, J., Ireland, A.: Invariant discovery via failed proof attempts. In: Flener, P. (ed.) LOPSTR 1998. LNCS, vol. 1559, p. 271. Springer, Heidelberg (1999)
Walther, C.: Mathematical induction. In: Handbook of Logic in Artificial Intelligence and Logic Programming, vol. 2. Oxford University Press, Oxford (1994)
Wand, M.: Continuation-based program transformation strategies. Journal of the ACM 27, 164–180 (1980)
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)
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
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