Partial Functions in ACL2

  • Authors:
  • Panagiotis Manolios;J. Strother Moore

  • Affiliations:
  • College of Computing, CERCS Lab, Georgia Institute of Technology, 801 Atlantic Drive, Atlanta, GA 30332-0280, U.S.A. e-mail: manolios@cc.gatech.edu, http://www.cc.gatech.ed ...;Department of Computer Sciences, University of Texas at Austin, Taylor Hall 2.124, Austin, TX 78712-1188, U.S.A. e-mail: moore@cs.utexas.edu, http://www.cs.utexas.edu/users ...

  • Venue:
  • Journal of Automated Reasoning
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

We describe a method for introducing “partial functions” into ACL2, that is, functions not defined everywhere. The function “definitions” are actually admitted via the encapsulation principle: the new function symbol is constrained to satisfy the appropriate equation. This is permitted only when a witness function can be exhibited, establishing that the constraint is satisfiable. Of particular interest is the observation that every tail recursive definition can be witnessed in ACL2. We describe a macro that allows the convenient introduction of arbitrary tail recursive functions, and we discuss how such functions can be used to prove theorems about state machine models without reasoning about “clocks” or counting the number of steps until termination. Our macro for introducing “partial functions” also permits a variety of other recursive schemes, and we briefly illustrate some of them.