[Paper Review] Bit-Blasting ACL2 Theorems
This paper introduces GL, a framework for automating the proving of finite ACL2 theorems using bit-blasting with BDDs or SAT solvers. It enables users to verify complex arithmetic and bitwise operations—such as x86 integer and floating-point units—by symbolically executing terms and checking for nil outcomes, significantly reducing manual effort and enabling scalable, debuggable verification with counterexample generation.
Interactive theorem proving requires a lot of human guidance. Proving a property involves (1) figuring out why it holds, then (2) coaxing the theorem prover into believing it. Both steps can take a long time. We explain how to use GL, a framework for proving finite ACL2 theorems with BDD- or SAT-based reasoning. This approach makes it unnecessary to deeply understand why a property is true, and automates the process of admitting it as a theorem. We use GL at Centaur Technology to verify execution units for x86 integer, MMX, SSE, and floating-point arithmetic.
Motivation & Objective
- To reduce the manual effort and deep semantic understanding required in interactive theorem proving for hardware verification.
- To enable automatic verification of finite ACL2 theorems using BDD- or SAT-based reasoning, bypassing the need for detailed proof construction.
- To provide a scalable, efficient, and debuggable alternative to traditional ACL2 proof methods for finite verification problems.
- To support practical verification of complex arithmetic and bitwise operations in production-scale hardware designs.
- To offer a formally verified proof procedure within ACL2, minimizing trusted code surface beyond the ACL2 kernel and its hons/memoization extension.
Proposed method
- GL symbolically encodes ACL2 objects as Boolean expressions, representing integers and operations via symbolic bit-level abstractions.
- It performs symbolic execution of ACL2 terms, producing a symbolic object that captures all possible output values.
- The framework uses a def-gl-thm macro to automate theorem proving by checking that the symbolic result cannot be nil under given hypotheses.
- Users specify variable bindings via :g-bindings, which define the symbolic representation of input variables over finite bit-widths.
- GL supports both BDD and SAT backends, allowing users to switch based on problem characteristics for optimal performance.
- The system integrates with ACL2’s logic and is formally verified, ensuring soundness through ACL2’s proof-checking capabilities.
Experimental results
Research questions
- RQ1Can bit-blasting with BDDs or SAT solvers be effectively used to automate the proving of finite ACL2 theorems?
- RQ2To what extent can GL reduce the need for deep semantic understanding of why a property holds in hardware verification?
- RQ3How does GL’s performance and scalability compare to exhaustive testing and traditional ACL2 proof methods for large finite problems?
- RQ4Can GL generate clear counterexamples when proofs fail, improving debuggability compared to opaque ACL2 proof failures?
- RQ5How can GL be extended to support complex arithmetic and bitwise operations in practical hardware verification workflows?
Key findings
- GL proved the correctness of a 32-bit bit-counting algorithm in 0.09 seconds, while exhaustive testing took 143 seconds, demonstrating significant performance gains.
- The framework scaled efficiently to 64-bit and 128-bit versions of the bit-counting algorithm, which exhaustive testing cannot handle due to exponential blowup.
- GL completed proofs for hundreds of bitwise and arithmetic operations on scalar and packed integers in x86 integer, MMX, SSE, and floating-point units at Centaur Technology.
- The use of symbolic execution and bit-blasting enabled GL to avoid the need for custom arithmetic books or lemmas, even without understanding the algorithm’s semantics.
- GL’s counterexample generation capability significantly improves debuggability compared to failed ACL2 proofs, which often lack clear feedback.
- GL outperformed ACL2’s built-in BDD system and was faster than LCF-style SAT integration in comparable benchmarks, despite not being mechanically verified in the same way.
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.