Repository navigation
Conversation
Gia_ManFromIfAig() rebuilds the AIG without structural hashing. When a
mapped node's cut collapses to one of its own leaves, the node takes that
leaf's literal instead of a new one. A later cut can then have both as
leaves, and Gia_ManBuildFromMiniInt() asked Gia_ManAppendAnd() for an AND
of a literal and its complement, failing its same-variable assertion. Only
the x & x case was folded. &dsdb goes through the same code.
Use Gia_ManAppendAnd2(), which also folds x & !x and constant operands. It
differs from the old code only for those operands.
Add test/sopb_shared_leaf.{aig,sh}: an 89-node AIG on which &sopb -C 3
aborted. Run it in both POSIX workflows.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
&sopbcan abort with:To reproduce on current master:
Cause
The assert requires that the two inputs of a new AND come from different nodes.
Gia_ManBuildFromMiniInt()calledGia_ManAppendAnd()withxand!x, which are the same node.Fix
In the unhashed (
fHash=0) branch ofGia_ManBuildFromMiniInt(), callGia_ManAppendAnd2()instead ofGia_ManAppendAnd().Gia_ManAppendAnd2()returns 0 forx & !x, and also foldsx & xand constant inputs, before callingGia_ManAppendAnd(), so the assert can no longer fire.Note that since
Gia_ManAppendAnd2()already foldsx & x, the separateiLit0 == iLit1branch became redundant, so this change removes it.Test
test/sopb_shared_leaf.aigis reduced from a case that triggered the assert and passes with this change.