Skip to main content
Log in

Partial Functions in ACL2

  • Published:
Journal of Automated Reasoning Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Bevier, W. R., Hunt, W. A., Jr., Moore, J S. and Young, W. D.: An approach to systems verification, J. Automated Reasoning 5(4) (1989), 411-428.

    Google Scholar 

  2. Boyer, R. S., Goldschlag, D. M., Kaufmann, M. and Moore, J S.: Functional instantiation in first order logic, in V. Lifschitz (ed.), Artificial Intelligence and Mathematical Theory of Computation: Papers in Honor of John McCarthy, Academic Press, 1991, pp. 7-26.

  3. Boyer, R. S. and Moore, J S.: Mechanized formal reasoning about programs and computing machines, in R. Veroff (ed.), Automated Reasoning and Its Applications: Essays in Honor of Larry Wos, MIT Press, 1996, pp. 147-176.

  4. Boyer, R. S. and Moore, J S.: A Computational Logic Handbook, 2nd edn, Academic Press,1997.

  5. Boyer, R. S. and Yu, Y.: Automated proofs of object code for a widely used microprocessor, J. ACM 43(1) (1996), 166-192.

    Article  MATH  MathSciNet  Google Scholar 

  6. Brock, B., Kaufmann, M. and Moore, J S.: ACL2 theorems about commercial microprocessors, in M. Srivas and A. Camilleri (eds), Formal Methods in Computer-Aided Design (FMCAD’96),Springer-Verlag, New York, 1996, pp. 275-293.

    Chapter  Google Scholar 

  7. Cohen, R. M.: The defensive Java Virtual Machine specification, version 0.53, Technical Report, Electronic Data Systems Corp, Austin Technical Services Center, Austin, TX, 1997.

    Google Scholar 

  8. Cutland, N. J.: Computability: An Introduction to Recursive Function Theory, Cambridge University Press, 1980.

  9. Gamboa, R.: Mechanically verifying real-valued algorithms in ACL2, Ph.D. thesis, The University of Texas at Austin, 1999.

  10. Giesl, J.: Induction proofs with partial functions, J. Automated Reasoning 26(1) (2001), 1-49.

    Article  MATH  MathSciNet  Google Scholar 

  11. Greve, D., Wilding, M. and Hardin, D.: High-speed, analyzable simulators, in Kaufmann et al. [14], pp. 113-135.

  12. Greve, D. A.: Symbolic simulation of the JEM1 microprocessor, in Formal Methods in Computer-Aided Design - FMCAD, Lecture Notes in Comput. Sci., SpringerVerlag, New York, 1998.

    Google Scholar 

  13. Hardin, D., Wilding, M. and Greve, D.: Transforming the theorem prover into a digital design tool: From concept car to off-road vehicle, in A. J. Hu and M. Y. Vardi (eds), Computer-Aided Verification - CAV’ 98, Lecture Notes in Comput. Sci. 1427, Springer-Verlag, New York, 1998. See URL http://pobox.com/users/hokie/docs/concept.ps.

    Chapter  Google Scholar 

  14. Kaufmann, M., Manolios, P. and Moore, J S. (eds): Computer-Aided Reasoning: ACL2 Case Studies, Kluwer Academic Publishers, Dordrecht, June 2000.

    Google Scholar 

  15. Kaufmann, M., Manolios, P. and Moore, J S.: Computer-Aided Reasoning: An Approach, Kluwer Academic Publishers, Dordrecht, July 2000.

    Google Scholar 

  16. Kaufmann, M. and Moore, J S.: A precise description of the ACL2 logic, Technical Report, Department of Computer Sciences, University of Texas at Austin, 1997. See URLhttp://-www.cs.utexas.edu/users/moore/publications/acl2-papers.html#Foundations.

  17. Kaufmann, M. and Moore, J S.: Structured theory development for a mechanized logic, J. Automated Reasoning 26(2) (2001), 161-203.

    Article  MATH  MathSciNet  Google Scholar 

  18. Lindholm, T. and Yellin, F.: The Java Virtual Machine Specification, 2nd edn, Addison-Wesley, 1999.

  19. Manolios, P.: Homepage of Panagiotis Manolios, 2003. See URLhttp://www.cc.-gatech.edu/~manolios.

  20. Moore, J S.: Homepage of J Strother Moore, 2003. See URL http://www.cs.utexas.edu/-users/moore.

  21. Moore, J S.: Proving theorems about Java-like byte code, in E. R. Olderog and B. Steffen (eds), Correct System Design - Recent Insights and Advances, Lecture Notes inComput. Sci. 1710, Springer-Verlag, 1999, pp. 139-162.

  22. Moore, J S.: Inductive assertions and operational semantics, Technical Report, Department of Computer Sciences, University of Texas at Austin, 2003. See URL http://www.cs.-utexas.edu/users/moore/publications/trecia/index.html.

  23. Moore, J S., Lynch, T. and Kaufmann, M.: A mechanically checked proof of the AMD5K86 floating-point division program, IEEE Trans. Comput. 47(9) (1998), 913-926.

    Article  MathSciNet  Google Scholar 

  24. Rogers, H., Jr.: Theory of Recursive Functions and Effective Computability, 1st paperback edn, MIT Press, 1987.

  25. Russinoff, D. M.: A mechanically checked proof of correctness of theAMD5K86 floating-point square root microcode, Formal Methods in System Design. Special Issue on Arithmetic Circuits, 1997.

  26. Russinoff, D. M.: A mechanically checked proof of IEEE compliance of aregister-transferlevel specification of the AMD-K7 floating-point multiplication, division, and square root instructions, London Math. Soc. J. Comput. Math. 1 (1998), 148-200.

    MATH  MathSciNet  Google Scholar 

  27. Russinoff, D. M.: A mechanically checked proof of correctness of the AMD-K5 floating-point square root microcode, Formal Methods in System Design 14 (1999), 75-125.

    Article  Google Scholar 

  28. Russinoff, D. M. and Flatau, A.: RTL verification: A floating-point multiplier, in Kaufmann et al. [14], pp. 201-231.

  29. Steele, G. L., Jr.: Common Lisp The Language, 2nd edn, Digital Press, Burlington, MA, 1990.

    MATH  Google Scholar 

  30. Wirsching, G. J.: The Dynamical System Generated by the 3n+1 Function, Lecture Notes in Math. 1681, Springer-Verlag, New York, 1998.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Manolios, P., Moore, J.S. Partial Functions in ACL2. Journal of Automated Reasoning 31, 107–127 (2003). https://doi.org/10.1023/B:JARS.0000009505.07087.34

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/B:JARS.0000009505.07087.34

Navigation