Reasoning about incompletely defined programs

  • Authors:
  • Christoph Walther;Stephan Schweitzer

  • Affiliations:
  • Fachgebiet Programmiermethodik, Technische Universität Darmstadt;Fachgebiet Programmiermethodik, Technische Universität Darmstadt

  • Venue:
  • LPAR'05 Proceedings of the 12th international conference on Logic for Programming, Artificial Intelligence, and Reasoning
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

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.