Skip to content

Retry SMT queries in Booster when deciding predicates #3889

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

Merged
merged 54 commits into from
Jun 4, 2024

Conversation

geo2a
Copy link
Contributor

@geo2a geo2a commented May 23, 2024

Fixes #3884

  • refactor the SMT modules to allow re-initializing the solver dynamically:

    • SMTContext now carries the prelude and SMTOptions
    • the closeContext function only closes the solver handle, and does not close the solver transcript handle. The new destroyContext function does both.
    • The SMT monad is is changed to have StateT SMTContext. The Booster.SMT.Interface.restartSolver function restarts the solver with modified options, altering the context. Note that it does not touch the transcript handle, i.e. it will persist the sovler restarts.
  • the getModelFor and checkPredicates functions now have logic to retry with doubled timeout when the solver returns unknown.

I'm checking-in the integration test that I was using when developing. I ran the server with --smt-timeout 1 to observe the retry mechanism kicking-in, but I do not think it is a good idea to try to force it to retry the queries in CI. The test may still be useful when working on the SMT code in future.

@geo2a geo2a changed the title Retry SMT qauesies in Booster when deciding predicates Retry SMT queries in Booster when deciding predicates May 23, 2024
@geo2a geo2a force-pushed the georgy-retry-smt-in-booster branch 2 times, most recently from 6390939 to 005e42a Compare May 27, 2024 12:42
@geo2a geo2a added the booster Relates to booster code label May 27, 2024
@geo2a geo2a force-pushed the georgy-retry-smt-in-booster branch from 458bbfc to d9f1318 Compare May 27, 2024 19:52
@geo2a geo2a force-pushed the georgy-retry-smt-in-booster branch from aaaa4c1 to b22c9f8 Compare May 29, 2024 14:34
@geo2a
Copy link
Contributor Author

geo2a commented May 29, 2024

No difference in KEVM performance:

Test georgy-retry-smt-in-booster time master-7f482b016 time (georgy-retry-smt-in-booster/master-7f482b016) time
benchmarks/storagevar00-spec.k 50.06 51.85 0.9654773384763742
mcd/dai-symbol-pass-spec.k 57.66 59.72 0.965505693235097
benchmarks/storagevar01-spec.k 51.36 49.32 1.0413625304136254
TOTAL 159.07999999999998 160.89 0.9887500776928336

@geo2a geo2a marked this pull request as draft May 29, 2024 16:29
@geo2a
Copy link
Contributor Author

geo2a commented Jun 3, 2024

The test-log-simplify-json integration test failure has been solved by e867eed --- we should wait until the server is stopped before we compare the log file to the golden one.

@geo2a geo2a marked this pull request as ready for review June 3, 2024 07:29
Copy link
Contributor

@goodlyrottenapple goodlyrottenapple left a comment

Choose a reason for hiding this comment

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

Looks great! Left some minor comments

@geo2a geo2a added the automerge label Jun 3, 2024
@rv-jenkins rv-jenkins merged commit 7ff00a1 into master Jun 4, 2024
6 checks passed
@rv-jenkins rv-jenkins deleted the georgy-retry-smt-in-booster branch June 4, 2024 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge booster Relates to booster code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retry Booster's SMT queries
4 participants