Abstract
We present a method for verifying recursive functional programs by defining a verification condition generator (VCG) which covers the most frequent type of recursive programs. These programs may operate on arbitrary domains. We prove soundness and completeness of the VCG and this provides a warranty that any system based on our results will be sound. We introduce here the notion of completeness of a VCG as a duality of soundness. Completeness is important for the following two reasons: theoretically, it is the dual of soundness and practically, it helps debugging. Any counterexample for the failing verification condition will carry over to a counterexample for the given program and specification. Moreover, the failing proof gives information about the place of the bug. Furthermore, we introduce a specialized strategy for termination. The termination problem is reduced to the termination of a simplified version of the program. The conditions for the simplified versions are identical for special classes of functional programs, thus they are highly reusable.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
This approach is in fact borrowed from the Theorema system.
References
de Bakker, J.W., Scott, D.: A Theory of Programs. In IBM Seminar, Vienna, Austria (1969)
Bernhard, B., Reiner, H., Peter, H.S. (ed.): Verification of Object-Oriented Software: The KeY Approach. vol. 4334, LNCS, Springer (2007)
Bertot, Y., Casteran, P.: Interactive Theorem Proving and Program Development. Coq’Art: The Calculus of Inductive Constructions. Springer, Berlin (2004)
Blanqui, F., Hinderer, S., Coupet-Grimal, S., Delobel, W., Kroprowski, A.: CoLoR, a Coq Library on Rewriting and Termination. In: Geser, A., Søndergaard, H. (eds.) Proceedings of 8th International Workshop on Termination, Seattle, WA, USA (2006)
Boyer, R.S., Moore, J.S.: A Computational Logic Handbook. Academic Press Professional, Incorporation, San Diego, CA, USA (1988)
Buchberger, B.: Algorithm Supported Mathematical Theory Exploration: A Personal View and Stragegy. In: Buchberger, B. John Campbell, (eds.) Proceedings of AISC 2004 (7th International Conference on Artificial Intelligence and Symbolic Computation), Springer Lecture Notes in Artificial Intelligence, vol. 3249, pp. 236–250. Springer, Berlin 22–24 (2004)
Buchberger, B.: Ein Algorithmus zum Auffinden der Basiselemente des Restklassenringes nach einem nulldimensionalen Polynomideal (An Algorithm for Finding the Basis Elements in the Residue Class Ring Modulo a Zero Dimensional Polynomial Ideal). PhD thesis, Mathematical Institute, University of Innsbruck, Austria (1965). (English translation Journal of Symbolic Computation 41 (2006) 475–511).
Buchberger, B.: Gröbner-Bases: An Algorithmic Method in Polynomial Ideal Theory. In: Bose, N.K. (eds.) Multidimensional Systems Theory – Progress, Directions and Open Problems in Multidimensional Systems, pp. 184–232. Reidel Publishing Company, Dodrecht, Boston, Lancaster (1985)
Buchberger, B.: Towards the Automated Synthesis of a Groebner Bases Algorithm. RACSAM – Revista de la Real Academia de Ciencias (Review of the Spanish Royal Academy of Science), Serie A: Mathematicas, 98(1), 65–75 (2004)
Buchberger, B., Affenzeller, M., Ferscha, A., Haller, M., Jebelean, T., Klement, E.P., Paule, P., Pomberger, G., Schreiner, W., Stubenrauch, R., Wagner, R., Weiß, G., Windsteiger, W.: Hagenberg Research. Springer, 1st edition (2009)
Buchberger, B., Craciun, A., Jebelean, T., Kovacs, L., Kutsia, T., Nakagawa, K., Piroi, F., Popov, N., Robu, J., Rosenkranz, M., Windsteiger, W.: Theorema: Towards Computer-Aided Mathematical Theory Exploration. J. Appl. Logic pp. 470–504 (2006)
Buchberger, B., Dupre, C., Jebelean, T., Kriftner, F., Nakagawa, K., Vasaru, D., Windsteiger, W.: The Theorema Project: A Progress Report. In Calculemus 2000: Integration of Symbolic Computation and Mechanized Reasoning, Calculemus (2000)
Buchberger, B., Lichtenberger, F.: Mathematics for Computer Science I – The Method of Mathematics (in German). Springer, 2nd edition (1981)
Chlipala, A.: A Verified Compiler for an Impure Functional Language. In Proceedings of the 37th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’10), pp. 237–248. New York, NY, USA (2010)
Floyd, R.W.: Assigning Meanings to Programs. In Proceedings of Symphosia in Applied Mathematics 19, pp. 19–37 (1967)
Gordon, M.: From LCF to HOL: A Short History. pp. 169–185. MIT Press, MA, USA (2000)
Greibach, S.A.: Theory of Program Structures: Schemes, Semantics, Verification. Springer, New York, Secaucus, NJ, USA (1985)
Hildebrand, B.F.: Introduction to Numerical Analysis: 2nd Edition. Dover Publications, New York, NY, USA (1987)
Hoare, C.A.R.: An axiomatic basis for computer programming. Comm. ACM 12(10), 576–580 (1969)
Homeier, P.V., Martin, D.F.: Secure Mechanical Verification of Mutually Recursive Procedures. Inf. Comput. 187(1), 1–19 (2003)
Neil, I.: Computability and Complexity. In: Edward, N. Zalta, (eds) The Stanford Encyclopedia of Philosophy (Fall 2008 Edition). http://plato.stanford.edu/archives/fall2008/entries/computability
Kaufmann, M., Moore, J.S.: An Industrial Strength Theorem Prover for a Logic Based on Common Lisp. Software Eng. 23(4), 203–213 (1997)
Langford, W.J., Broadbent, T.A.A., Goodstein, R.L.: Obituary: Professor Eric Harold Neville. Math. Gaz. 48(364), 131–145 (1964)
Rustan, K., Leino, M., Peter, M., Jan, S.: Verification of Concurrent Programs with Chalice. In: Aldini, A., Barthe, G., Gorrieri, R. (eds.) Foundations of Security Analysis and Design V, pp. 195–222. Springer, New York (2009)
Loeckx, J., Sieber, K.: The Foundations of Program Verification. Teubner, 2nd edition (1987)
Luckham, D.C., Park, D.M.R., Paterson, M.: On Formalised Computer Programs. J. Comput. Syst. Sci. 4(3), 220–249 (1970)
Manna, Z.: Mathematical Theory of Computation. McGraw-Hill, New York (1974)
Matthews, J., Moore, J.S., Ray, S., Vroon, D.: Verification Condition Generation Via Theorem Proving. In: Hermann, M., Voronkov, A. (eds.) In Proceedings of the 13th International Conference on Logic for Programming, Artificial Intelligence, and Reasoning (LPAR 2006), LNCS, vol. 4246, pp. 362–376. Phnom Penh, Cambodia (2006)
Meyer, B.: Applying design by contract. Computer 25(10), 40–51 (1992)
Neville, E.H.: Iterative Interpolation. J. Indian Math. Soc. 20, 87–120 (1934)
Peter, R.: Rekursive Funktionen in der Komputer-Theorie. Verlag d. ungarisch. Akademie d. Wiss., Budapest (1976)
Press, W.H., Teukolsky, S.A., Vetterling, W.T., Flannery, B.P.: Numerical Recipes in C: The Art of Scientific Computing. Cambridge University Press, 2 edition (1992)
PVS group: PVS Specification and Verification System. http://pvs.csl.sri.com (2004)
Smith, D.R.: Top-Down Synthesis of Divide-and-Conquer algorithms. Artif. Intell. 27(1), 43–96 (1985)
van der Voort, M.: Introducing Well-founded Function Definitions in HOL. In Higher Order Logic Theorem Proving and its Applications: Proceedings of the IFIP TC10/WG10.2 Workshop, pp. 117–132 (1992)
Walter, S.B., Lawrence, H.L.: Theory of Computation. Wiley, New York, NY, USA (1974)
Wiedijk, F. (ed.): The Seventeen Provers of the World, Foreword by Dana, S. Scott, Lecture Notes in Computer Science. vol. 3600, Springer (2006)
Zee, K., Kuncak, V., Rinard, M.C.: Full Functional Verification of Linked Data Structures. In Proceedings of the 30th ACM Conference on Programming Language Design and Implementation, pp. 349–361 (2008)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag/Wien
About this chapter
Cite this chapter
Popov, N., Jebelean, T. (2012). Sound and Complete Verification Condition Generator for Functional Recursive Programs. In: Langer, U., Paule, P. (eds) Numerical and Symbolic Scientific Computing. Texts & Monographs in Symbolic Computation. Springer, Vienna. https://doi.org/10.1007/978-3-7091-0794-2_11
Download citation
DOI: https://doi.org/10.1007/978-3-7091-0794-2_11
Published:
Publisher Name: Springer, Vienna
Print ISBN: 978-3-7091-0793-5
Online ISBN: 978-3-7091-0794-2
eBook Packages: Computer ScienceComputer Science (R0)