[Paper Review] How Can I Do That with ACL2? Recent Enhancements to ACL2
This paper summarizes key enhancements to ACL2 from versions 3.6 to 4.3, focusing on practical improvements for users. It introduces major features like uniform treatment of equality variants (e.g., member and member-equal), the defattach utility for runtime execution of encapsulated functions, and improved handling of mbe and logic-exec separation. These changes reduce redundancy in rule libraries and enhance both interactive proof and program execution capabilities.
The last several years have seen major enhancements to ACL2 functionality, largely driven by requests from its user community, including utilities now in common use such as 'make-event', 'mbe', and trust tags. In this paper we provide user-level summaries of some ACL2 enhancements introduced after the release of Version 3.5 (in May, 2009, at about the time of the 2009 ACL2 workshop) up through the release of Version 4.3 in July, 2011, roughly a couple of years later. Many of these features are not particularly well known yet, but most ACL2 users could take advantage of at least some of them. Some of the changes could affect existing proof efforts, such as a change that treats pairs of functions such as 'member' and 'member-equal' as the same function.
Motivation & Objective
- To raise awareness of underappreciated but impactful ACL2 enhancements introduced between versions 3.6 and 4.3.
- To address the need for reduced duplication in rule libraries by unifying functions that differ only in equality tests (e.g., member vs. member-equal).
- To enable runtime execution of encapsulated functions and customization of built-in behavior via the defattach utility.
- To improve the integration of programming, proof, and system-level features in ACL2, supporting industrial use and user-driven development.
Proposed method
- Introduce and explain the mbe (mutual belief evaluation) macro, which separates logic and execution components, allowing the prover to reason with the :logic component while enabling efficient execution.
- Implement uniform treatment of equality variants by making functions like member and member-equal logically equivalent through macro expansion into member-equal calls.
- Introduce the defattach utility to allow runtime binding of functions to executable counterparts, enabling evaluation of encapsulated functions and customization of built-in prover behavior.
- Extend the reduction of mbe forms to additional contexts, including guard holders, to ensure consistent logical treatment across the system.
- Provide detailed examples and documentation links (e.g., :DOC equality-variants, :DOC defattach) to guide users in adopting new features.
- Use real-world examples (e.g., fold with binary-*) to demonstrate practical benefits of defattach and improved proof automation.
Experimental results
Research questions
- RQ1How can ACL2 users eliminate redundant rule sets for functions that differ only in equality testing, such as member and member-equal?
- RQ2What mechanisms enable the execution of encapsulated functions during proof development without compromising logical soundness?
- RQ3How can users customize the behavior of built-in ACL2 prover functions, such as rewriting heuristics, through runtime attachment?
- RQ4In what ways do recent ACL2 changes improve the integration of programming, proof, and system infrastructure?
- RQ5What are the practical implications of treating member and member-equal as logically equivalent functions?
Key findings
- The logical treatment of member and member-equal is now unified: calls to member are macroexpanded into member-equal in the logic, eliminating the need for separate rule sets.
- After ACL2 version 4.2, the theorem (defthm member-equal-reverse (iff (member-equal a (reverse x)) (member-equal a x))) is proved automatically, demonstrating improved proof automation.
- The defattach utility enables runtime evaluation of encapsulated functions by binding them to executable counterparts, as shown with (defattach ac-fn binary-*), allowing evaluation of (fold ’(2 3 4 5) 1) to return 120.
- Attachments are not used during proofs, ensuring logical soundness, and can be safely disabled in logical contexts like defconst forms.
- The mbe macro now supports broader context reduction, including guard holders, improving consistency in logical reasoning.
- The changes significantly reduce user burden in maintaining parallel rule libraries and enhance usability for industrial and interactive formal verification.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.