This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
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.
In investigating #82 I first tried to see how much the constant folding optimizations actually get us. Funnily enough it turns out that they make us slower. For example
Eval.Popcount
is a problem that has lots of constant folding present:The baseline with optimizations enabled is a total runtime of 2.9s with:
On the other hand with this PR the new total run time is 1.4s with:
It would thus appear that optimizing the AIG in this way is confusing the SAT solver more than it's helping it and we should consider just removing them entirely.
Note that this does not generally disable constant folding as the pre processor is still capable of partial symbolic evaluation of the terms that are given, though not at a bit precise level like the AIG.
Interestingly Bitwuzla implements all AIG optimizations from the paper: https://github.com/bitwuzla/bitwuzla/blob/main/src/lib/bitblast/aig/aig_manager.cpp#L183-L391