Abstract
We consider automated reasoning about recursive partial functions with decidable domain, i.e. functions computed by incompletely defined but terminating functional programs. Incomplete definitions provide an elegant and easy way to write and to reason about programs which may halt with a run time error by throwing an exception or printing an error message, e.g. when attempting to divide by zero. We investigate the semantics of incompletely defined programs, define an interpreter for those programs and discuss the termination of incompletely defined procedures. We then analyze which problems need to be solved if a theorem prover designed for verification of completely defined programs is modified to work for incompletely defined programs as well. We also discuss how to reason about stuck computations which arise when calling incompletely defined procedures with invalid arguments. Our method of automated reasoning about incompletely defined programs has been implemented in the verification tool \(\surd{\rm eriFun}\). We conclude by discussing experiences obtained in several case studies with this implementation and also compare and relate our proposal to other work.
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
Arthan, R.D.: Undefinedness in Z: Issues for Specification and Proof. In: Proc. CADE 13 Workshop on Mechanization of Partial Functions New Brunswick, NJ (1996), available from, http://www.cs.bham.ac.uk/~mmk/cade96-partiality/
Autexier, S., Hutter, D., Mantel, H., Schairer, A.: inka 5.0 - A Logic Voyager. In: Ganzinger, H. (ed.) CADE 1999. LNCS (LNAI), vol. 1632, pp. 207–211. Springer, Heidelberg (1999)
Boyer, R.S., Moore, J.S.: A Computational Logic. Acad. Press, NY (1979)
Bundy, A., van Harmelen, F., Horn, C., Smaill, A.: The Oyster-Clam System. In: Stickel, M.E. (ed.) CADE 1990. LNCS, vol. 449, pp. 647–648. Springer, Heidelberg (1990)
Comon, H.: Inductionless Induction. In: Robinson, A., Voronkov, A. (eds.) Handb. of Autom. Reasoning, vol. I, ch.14, pp. 913–962. Elsevier, Amsterdam (2001)
Farmer, W.M.: Mechanizing the Traditional Approach to Partial Functions. In: Proc. CADE 13 Workshop on Mechanization of Partial Functions New Brunswick, NJ (1996), available from, http://www.cs.bham.ac.uk/~mmk/cade96-partiality/
Finn, S., Fourmann, M.P., Longley, J.: Partial Functions in a Total Setting. Journal of Automated Reasoning 18, 85–104 (1997)
Giesl, J.: Induction Proofs with Partial Functions. J. Aut. Reason. 26, 1–49 (2001)
Giesl, J., Walther, C., Brauburger, J.: Termination Analysis for Functional Programs. In: Bibel, W., Schmitt, P. (eds.) Automated Deduction - A Basis for Applications, vol. 3, pp. 135–164. Kluwer Acad. Publ., Dordrecht (1998)
Gries, D., Schneider, F.B.: Avoiding the Undefined by Underspecification. In: van Leeuwen, J. (ed.) Computer Science Today. LNCS, vol. 1000, pp. 366–373. Springer, Heidelberg (1995)
Jones, C.B.: Partial functions and logics: A warning. Information Processing Letters 54(2) (1995)
Jones, C.B.: TANSTAAFL (with partial functions). In: McRobbie, M.A., Slaney, J.K. (eds.) CADE 1996. LNCS, vol. 1104. Springer, Heidelberg (1996)
Kapur, D.: Constructors Can Be Partial, Too. In: Veroff, R. (ed.) Automated Reasoning and Its Applications – Essays in Honor of Larry Wos, pp. 177–210. The MIT Press, Cambridge (1997)
Kapur, D., Musser, D.R.: Inductive Reasoning with Incomplete Specifications. In: Symposium on Logic in Computer Science, Cambridge, MA, vol. 720, pp. 367–377. IEEE Computer Society Press, Los Alamitos (1986)
Kapur, D., Musser, D.R.: Proof by Consistency. Artificial Intelligence 31(2), 125–157 (1987)
Kapur, D., Subramaniam, M.: New Uses of Linear Arithmetic in Automated Theorem Proving by Induction. J. Automated Reasoning 16(1-2), 39–78 (1996)
Kaufmann, M., Moore, J.S.: ACL2: An Industrial Strength Version of NQTHM. In: Compass 1996: 11th Annual Conf. on Computer Assurance, Maryland, National Institute of Standards and Technology (1996)
Loeckx, J., Ehrich, H.-D., Wolf, M.: Specification of Abstract Data Types. Wiley-Teubner, New York (1996)
Manolios, P., Moore, J.S.: Partial Functions in ACL2. Journal of Automated Reasoning 31, 107–127 (2003)
Schieder, B., Broy, M.: Adapting Calculational Logic to the Undefined. The Computer Journal 42(2), 73–81 (1999)
Walther, C.: On Proving the Termination of Algorithms by Machine. Artificial Intelligence 71(1), 101–157 (1994)
Walther, C., Schweitzer, S.: About veriFun. In: Baader, F. (ed.) CADE 2003. LNCS (LNAI), vol. 2741, pp. 322–327. Springer, Heidelberg (2003)
Walther, C., Schweitzer, S.: Automated Termination Analysis for Incompletely Defined Programs. Technical Report VFR 04/03, Programmiermethodik, Technische Universität Darmstadt (2004)
Walther, C., Schweitzer, S.: Reasoning about Incompletely Defined Programs. Technical Report VFR 04/02, Programmiermethodik, Technische Universität Darmstadt (2004)
Walther, C., Schweitzer, S.: Verification in the Classroom. Journal of Automated Reasoning - Special Issue on Automated Reasoning and Theorem Proving in Education 32(1), 35–73 (2004)
Walther, C., Schweitzer, S.: Automated Termination Analysis for Incompletely Defined Programs. In: Baader, F., Voronkov, A. (eds.) LPAR 2004. LNCS (LNAI), vol. 3452, pp. 332–346. Springer, Heidelberg (2005)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Walther, C., Schweitzer, S. (2005). Reasoning About Incompletely Defined Programs. In: Sutcliffe, G., Voronkov, A. (eds) Logic for Programming, Artificial Intelligence, and Reasoning. LPAR 2005. Lecture Notes in Computer Science(), vol 3835. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11591191_30
Download citation
DOI: https://doi.org/10.1007/11591191_30
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-30553-8
Online ISBN: 978-3-540-31650-3
eBook Packages: Computer ScienceComputer Science (R0)