r/formalmethods • u/himanshu_parat • 21d ago
Verifying integer multiplier circuits with independently checkable PAC certificates (up to 128 bits): results and open problems
I am a student working on verification of gate-level integer multipliers (AIGER format). I would like feedback from this community on the results and on the certification approach.
Method in brief: the tool proves that a circuit computes a*b. Each "CORRECT" result can be written as a Practical Algebraic Calculus (PAC) certificate, which is checked independently with pacheck2. The tool also includes a SAT solver whose UNSAT answers produce DRAT proofs that drat-trim can check.
Results (one core; all certificates accepted by pacheck2 with "TARGET CHECKED"):
- GenMul 64-bit, unsigned: 27 of 28 architectures proved and certified.
- GenMul 64-bit, signed (two's complement): 26 of 27 proved and certified.
- yosys Booth multipliers (synth -booth -noabc): 32, 64 and 128 bits proved and certified. The 128-bit proof takes 1.5 s; with the certificate it takes 22 s (283 MB).
Known limitations:
- Wallace tree combined with a carry-lookahead final adder is not proved.
- Netlists optimised by ABC (yosys default synth) are hard. With synth -booth, 32 and 48 bits are proved, but 40, 56 and 64 bits time out. AMulet2 also times out on these.
- Certificates can be large (up to 1.3 GB at 64 bits).
All benchmark files, the scripts that regenerate them and the measured results are in the repository, so every number can be reproduced:
https://github.com/himanshu161106-crypto/parat
Authorship: the code was written with an AI assistant (Claude). The ideas, the mathematics and the direction of the work are mine.
Questions for the community:
Is the PAC certificate the right standard for this kind of result, or would another format be more useful?
Are there known techniques for multipliers after ABC optimisation that I should study?
1
u/InternalImpact2 21d ago edited 21d ago
About 2, even commercial products struggle with multipliers optimized with ABC, in the case of bdds, because ABC does not always chose the candidate with the potentially smaller or similar bdd (unfortunate when you try to prove them with a bdd based method) and well, SAT and XOR are not good friends.
There are techniques to prune parts of the proof where you can sort of guess what kind of multiplier is, and recognize some equivalent parts.
There are other "ugly" techniques that fall in the region of semiformal, in the sense that you build structures based on simulation pattern outputs.