Skip to content

Comments

[PARKED] Use uninterpreted functions for 2-phase solving approach#996

Open
gustavo-grieco wants to merge 127 commits intomainfrom
poc-div-encoding
Open

[PARKED] Use uninterpreted functions for 2-phase solving approach#996
gustavo-grieco wants to merge 127 commits intomainfrom
poc-div-encoding

Conversation

@gustavo-grieco
Copy link
Collaborator

@gustavo-grieco gustavo-grieco commented Jan 30, 2026

Description

A crude prototype for #995 The system now does 2-phase solving. It can now deal with these two ABDK verification problems:

make verify-hevm T=prove_div_negative_divisor
make verify-hevm T=prove_div_values

Once abstraction-refinement is turned on. See this repo for details.

This change needs a flag to be set in the CLI for it to be enabled.

Checklist

  • tested locally
  • added automated tests
  • updated the docs
  • updated the changelog

Copy link
Collaborator

@msooseth msooseth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some thoughts and comments. I'm reluctant because:

  • There are all these axioms and they'll take time to review
  • I am not sure we need 3 phases

There are some thought-provoking parts here, though:

  • The improvement to the concrete SMT translation (i.e. even forgetting about all this abstraction)
  • The axioms may truly reflect that we have more information at hand than the SMT solver, and adding them may actually be sufficient, without the abstraction-refinement?

These 2 could actually be added as-is to the system, I think!

@msooseth
Copy link
Collaborator

msooseth commented Feb 2, 2026

Can you also maybe fix the failures of the checks? I think it's failing only on warnings, so they should be easy to fix, and then we can see if the fuzz tests go through!

@gustavo-grieco
Copy link
Collaborator Author

Keep in mind that abstract arithmetics are not enabled by default, I don't know if we should enable it for all the test 🤔

@gustavo-grieco gustavo-grieco marked this pull request as ready for review February 3, 2026 11:04
@msooseth msooseth changed the title [RFC] Use uninterpreted functions for division Use uninterpreted functions for (S)Mod/(S)Div in a 2-phase solving approach Feb 10, 2026
@msooseth msooseth force-pushed the poc-div-encoding branch 5 times, most recently from 6bf8f15 to dc02430 Compare February 16, 2026 16:36
@msooseth msooseth changed the title Use uninterpreted functions for (S)Mod/(S)Div in a 2-phase solving approach Use uninterpreted functions for 2+1-phase solving approach Feb 16, 2026
@msooseth msooseth changed the title Use uninterpreted functions for 2+1-phase solving approach Use uninterpreted functions for 2-phase solving approach Feb 18, 2026
Copy link
Collaborator

@msooseth msooseth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two notes about what times out without this abstraction-refinement. The tests actually prove they time out

]
, testGroup "Abstract-Arith"
-- "make verify-hevm T=prove_div_negative_divisor" in https://github.com/gustavo-grieco/abdk-math-64.64-verification
[ testCase "prove_div_values-abdk" $ do
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blishko what timed out before.

-- without abstract arith, we time out
liftIO $ assertBool "Must be unknown" (all isUnknown res)
-- "make verify-hevm T=prove_div_negative_divisor" in https://github.com/gustavo-grieco/abdk-math-64.64-verification
, testCase "prove_div_negative_divisor" $ do
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blishko what timed out before.

@msooseth msooseth changed the title Use uninterpreted functions for 2-phase solving approach [PARKED] Use uninterpreted functions for 2-phase solving approach Feb 23, 2026
@msooseth
Copy link
Collaborator

Let's park this for now. I wanna hear back from the Bitwuzla developers and I'm also a bit tired of trying to make this work :) We can come back to this another time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants