Skip to content

new IC3: recycle frame solvers after 2000 queries - #2020

Open
kroening wants to merge 1 commit into
mainfrom
kroening/ic3-solver-recycling
Open

kroening wants to merge 1 commit into
mainfrom
kroening/ic3-solver-recycling

Conversation

@kroening

Copy link
Copy Markdown
Collaborator

Summary

  • Track query count per frame solver
  • After 2000 queries, rebuild the solver from base CNF + current frame clauses
  • Adds SOLVER_RECYCLE_LIMIT constant and frame_solver_queries vector

Individual benefit

Prevents 2-5× gradual slowdown in later frames. Frame solvers accumulate deactivated variables from releaseVar calls; after many queries the internal variable tables bloat, degrading unit propagation performance. Recycling restores a clean solver state.

Synergies

Test plan

  • regression/ebmc/new-ic3 passes
  • Builds with -Werror (GCC)

Frame solvers accumulate deactivated variables from releaseVar calls.
After 2000 queries, the internal variable tables become bloated,
slowing unit propagation. Recycling rebuilds the solver from the
base CNF plus current frame clauses, restoring performance.

The limit of 2000 balances the cost of rebuilding (replaying the
base CNF + frame clauses) against the degradation from accumulated
dead variables. On large benchmarks this prevents a gradual 2-5x
slowdown in later frames.
@tautschnig

Copy link
Copy Markdown
Collaborator

Why is 2000 the right number? And is that really the most appropriate solution? Is there no proper reset capability? I can't firmly say that this approach taken here is wrong, but it does not seem convincing.

This branch has not been deployed

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants