experiment with custom branching solver approach #574
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR records experimental results from testing a custom branching solver approach.
The core idea was to implement a lightweight custom solver to handle branching decisions. This seemed potentially feasible, given that our current 1ms solver timeout doesn't permit much reasoning from SMT solvers. A custom solver could also enable alternative path exploration strategies; currently, we're limited to depth-first search due to the need to minimize solver context creation and switching by sharing a single solver instance.
Several quick custom solving strategies were prototyped. Initial results were promising, with many benchmark tests passing. However, some tests failed, revealing that certain cases require full SMT reasoning, like e-graphs and bitvectors, which are beyond the capabilities of this lightweight approach.
Some examples where the quick custom solver fails to prove unsat:
x == 0vsnot (x >= 0)x == 2vsmap[x] == 0 and map[2] == 1extract(31, 31, x) == 0vsx != 0 and extract(i, i, x) == 0 for all 0 <= i <= 30Some components of the custom solver have already been merged into main. The remaining experimental work is documented in this PR for future reference.