-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CVC5 unable to reason about "power" function #49
Comments
Just to add a bit more information: z3 also support exponential natively. I can see that the definition and the properties of |
Hello Rod and Jason, thanks for this investigation. I will bring this up with the Why3 team who is maintaining the prover drivers. Johannes |
Hello, |
Here's an example. power.smt2 is a VC generated by SPARK Pro (line 1499 of mlkem.adb in the LibMLKEM repo). CVC5 1.2.0 is completely defeated by this. pow2.smt2 is the same file, but replacing "(power 2 " by "(int.pow2 " in 4 places. CVC5 says "unsat" in about 0.04 seconds on my laptop. It would be interesting to try this change on your entire test suite and see what happens... |
Hi Claire, I agree with everything you said. I think the best thing to do is to have options to choose different generated VCs, and let the application layers to worry about which version is the best for them. The current generated |
Dear AdaCore,
I'm experimenting with verification of some cryptographic code (in this case the LibMLKEM library). We have found that CVC5 1.2.0 is very poor at reasoning about the "power" theory for integers, and we have to fall back on AltErgo to discharge those VCs.
BUT... we find that CVC5 has a built-in "int.pow2" operator, which it is able to reason with. If I remove the "power" theory from the SMT file, and change all instances of
(power 2 i)
to(int.pow2 i)
then CVC5 proves my VCs almost instantly. Perhaps gnatprove could be changed to use "int.pow2" where possible when --prover=cvc5 is selected?This is using GNATProve 14.1.0 on macOS.
I can send example SMT files if you'd like to see an example.
The text was updated successfully, but these errors were encountered: