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.
Similar content being viewed by others
References
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.
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.
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.
Boyer, R. S. and Moore, J S.: A Computational Logic Handbook, 2nd edn, Academic Press,1997.
Boyer, R. S. and Yu, Y.: Automated proofs of object code for a widely used microprocessor, J. ACM 43(1) (1996), 166-192.
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.
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.
Cutland, N. J.: Computability: An Introduction to Recursive Function Theory, Cambridge University Press, 1980.
Gamboa, R.: Mechanically verifying real-valued algorithms in ACL2, Ph.D. thesis, The University of Texas at Austin, 1999.
Giesl, J.: Induction proofs with partial functions, J. Automated Reasoning 26(1) (2001), 1-49.
Greve, D., Wilding, M. and Hardin, D.: High-speed, analyzable simulators, in Kaufmann et al. [14], pp. 113-135.
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.
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.
Kaufmann, M., Manolios, P. and Moore, J S. (eds): Computer-Aided Reasoning: ACL2 Case Studies, Kluwer Academic Publishers, Dordrecht, June 2000.
Kaufmann, M., Manolios, P. and Moore, J S.: Computer-Aided Reasoning: An Approach, Kluwer Academic Publishers, Dordrecht, July 2000.
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.
Kaufmann, M. and Moore, J S.: Structured theory development for a mechanized logic, J. Automated Reasoning 26(2) (2001), 161-203.
Lindholm, T. and Yellin, F.: The Java Virtual Machine Specification, 2nd edn, Addison-Wesley, 1999.
Manolios, P.: Homepage of Panagiotis Manolios, 2003. See URLhttp://www.cc.-gatech.edu/~manolios.
Moore, J S.: Homepage of J Strother Moore, 2003. See URL http://www.cs.utexas.edu/-users/moore.
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.
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.
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.
Rogers, H., Jr.: Theory of Recursive Functions and Effective Computability, 1st paperback edn, MIT Press, 1987.
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.
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.
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.
Russinoff, D. M. and Flatau, A.: RTL verification: A floating-point multiplier, in Kaufmann et al. [14], pp. 201-231.
Steele, G. L., Jr.: Common Lisp The Language, 2nd edn, Digital Press, Burlington, MA, 1990.
Wirsching, G. J.: The Dynamical System Generated by the 3n+1 Function, Lecture Notes in Math. 1681, Springer-Verlag, New York, 1998.
Author information
Authors and Affiliations
Rights 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
Issue Date:
DOI: https://doi.org/10.1023/B:JARS.0000009505.07087.34