Skip to main content

Reasoning About Incompletely Defined Programs

  • Conference paper
Logic for Programming, Artificial Intelligence, and Reasoning (LPAR 2005)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 3835))

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.

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 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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. http://www.verifun.org

  2. 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/

  3. 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)

    Chapter  Google Scholar 

  4. Boyer, R.S., Moore, J.S.: A Computational Logic. Acad. Press, NY (1979)

    MATH  Google Scholar 

  5. 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)

    Google Scholar 

  6. Comon, H.: Inductionless Induction. In: Robinson, A., Voronkov, A. (eds.) Handb. of Autom. Reasoning, vol. I, ch.14, pp. 913–962. Elsevier, Amsterdam (2001)

    Chapter  Google Scholar 

  7. 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/

  8. Finn, S., Fourmann, M.P., Longley, J.: Partial Functions in a Total Setting. Journal of Automated Reasoning 18, 85–104 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  9. Giesl, J.: Induction Proofs with Partial Functions. J. Aut. Reason. 26, 1–49 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  10. 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)

    Google Scholar 

  11. 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)

    Chapter  Google Scholar 

  12. Jones, C.B.: Partial functions and logics: A warning. Information Processing Letters 54(2) (1995)

    Google Scholar 

  13. Jones, C.B.: TANSTAAFL (with partial functions). In: McRobbie, M.A., Slaney, J.K. (eds.) CADE 1996. LNCS, vol. 1104. Springer, Heidelberg (1996)

    Google Scholar 

  14. 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)

    Google Scholar 

  15. 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)

    Google Scholar 

  16. Kapur, D., Musser, D.R.: Proof by Consistency. Artificial Intelligence 31(2), 125–157 (1987)

    Article  MATH  MathSciNet  Google Scholar 

  17. Kapur, D., Subramaniam, M.: New Uses of Linear Arithmetic in Automated Theorem Proving by Induction. J. Automated Reasoning 16(1-2), 39–78 (1996)

    Article  MATH  MathSciNet  Google Scholar 

  18. 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)

    Google Scholar 

  19. Loeckx, J., Ehrich, H.-D., Wolf, M.: Specification of Abstract Data Types. Wiley-Teubner, New York (1996)

    MATH  Google Scholar 

  20. Manolios, P., Moore, J.S.: Partial Functions in ACL2. Journal of Automated Reasoning 31, 107–127 (2003)

    Article  MATH  MathSciNet  Google Scholar 

  21. Schieder, B., Broy, M.: Adapting Calculational Logic to the Undefined. The Computer Journal 42(2), 73–81 (1999)

    Article  MATH  Google Scholar 

  22. Walther, C.: On Proving the Termination of Algorithms by Machine. Artificial Intelligence 71(1), 101–157 (1994)

    Article  MATH  MathSciNet  Google Scholar 

  23. Walther, C., Schweitzer, S.: About veriFun. In: Baader, F. (ed.) CADE 2003. LNCS (LNAI), vol. 2741, pp. 322–327. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  24. Walther, C., Schweitzer, S.: Automated Termination Analysis for Incompletely Defined Programs. Technical Report VFR 04/03, Programmiermethodik, Technische Universität Darmstadt (2004)

    Google Scholar 

  25. Walther, C., Schweitzer, S.: Reasoning about Incompletely Defined Programs. Technical Report VFR 04/02, Programmiermethodik, Technische Universität Darmstadt (2004)

    Google Scholar 

  26. 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)

    Google Scholar 

  27. 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)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics