-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The old implementation of the solver relied on the fact that each constant fragment of a bit-vector was either all ones or all zeroes because it defined a constant zero as the smallest bit-vector, a constant one as the biggest bit-vector, and then computed the min and max elements of a set of bit-vectors to check for consistency. With the new solver based on Tarjan's union-find, this limitation is no longer necessary, and it causes the solver to needlessly split bit-vector variables involved in equalities with non-uniform constants [^1]. This patch is a simple refactoring of the bit-vector solver to use integers rather than booleans to represent the constant parts of bit-vectors, hopefully improving performance for bit-vectors with non-uniform constant parts. [^1]: For instance, solving `x = #b0000` can be done in a single swoop, but solving `x = #b0101` currently first slices `x` into `a @ b @ c @ d` and then assigns values to each of `a`, `b`, `c` and `d`.
- Loading branch information
1 parent
e96d3d4
commit c9865f4
Showing
4 changed files
with
117 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.