Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(&put): &put bug with choices #350

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

wjrforcyber
Copy link
Contributor

@wjrforcyber wjrforcyber commented Dec 17, 2024

Related: #349

This PR fix the bug when &put is used with choice network.
It used to fail on an assert:

ABC command line: "read_aiger i10.aig; strash; choice; ps; &get; &ps; &put; ps".

i10                           : i/o =  257/  224  lat =    0  and =   3764 (choice = 541)  lev = 51
i10      : i/o =    257/    224  and =    3764  lev =   51 (16.05)  mem = 0.05 MB
cst =       0  cls =    541  lit =     587  unused =    2893  proof =     0
Error: Transforming AIG with 541 choice nodes.
Assertion failed: (pTemp->pData != NULL), function Abc_NtkFromDarChoices, file abcDar.c, line 1227.
[1]    69583 abort      ./abc -c "read_aiger i10.aig; strash; choice; ps; &get; &ps; &put; ps"

After fix (cec checked):

ABC command line: "read_aiger i10.aig; strash; choice; ps; &get; &ps; &put; ps; cec -n i10.aig".

i10                           : i/o =  257/  224  lat =    0  and =   3764 (choice = 541)  lev = 51
i10      : i/o =    257/    224  and =    3764  lev =   51 (16.05)  mem = 0.05 MB
cst =       0  cls =    541  lit =     587  unused =    2893  proof =     0
Warning: Transforming AIG with 541 choice nodes.
i10                           : i/o =  257/  224  lat =    0  and =   3764 (choice = 541)  lev = 51
Warning: The choice nodes in the original AIG are removed by strashing.
Networks are equivalent.  Time =     0.32 sec

The reason would be some choices are not even created when comparing, so assign the relations after creating the whole network would be good to go.

@alanminko alanminko merged commit 01c6102 into berkeley-abc:master Dec 23, 2024
9 checks passed
@wjrforcyber wjrforcyber deleted the put_bug_on_choice branch December 25, 2024 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants