Skip to content

Fix(choices): On pSibls#530

Open
wjrforcyber wants to merge 1 commit into
berkeley-abc:masterfrom
wjrforcyber:choice_fix
Open

Fix(choices): On pSibls#530
wjrforcyber wants to merge 1 commit into
berkeley-abc:masterfrom
wjrforcyber:choice_fix

Conversation

@wjrforcyber

@wjrforcyber wjrforcyber commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #528 .
Fixes #466 .

An additional parameter -s for pSibls.

Usage showcase

It will not affect current usage, performance or structure when do &get and &put.
Eg,

./abc -c "read_aiger i10.aig; strash; dch; &get; &put; ps"   
======== ABC command line "read_aiger i10.aig; strash; dch; &get; &put; ps"
Warning: Transforming AIG with 602 choice nodes.
i10                           : i/o =  257/  224  lat =    0  and =   4206 (choice = 602)  lev = 33
./abc -c "read_aiger i10.aig; strash; dch; &get -s; &put; ps"
======== ABC command line "read_aiger i10.aig; strash; dch; &get -s; &put; ps"
Warning: Transforming AIG with 602 choice nodes.
i10                           : i/o =  257/  224  lat =    0  and =   4206 (choice = 602)  lev = 33

Even after the fix when use &if in ABC9 with choices from ABC,

./abc -c "read_aiger i10.aig; strash; dch; &get; &if -K 4; &put;"      
======== ABC command line "read_aiger i10.aig; strash; dch; &get; &if -K 4; &put;"
Assertion failed: (Gia_ObjLevel(p, pObj) > 0), function Gia_ManChoiceLevel, file giaIf.c, line 836.
[1]    84890 abort      ./abc -c "read_aiger i10.aig; strash; dch; &get; &if -K 4; &put;"

will still crash (since it is not correct). Use -s instead (trigger pSibls transformation).

./abc -c "read_aiger i10.aig; strash; dch; &get -s; &ps; &if -K 4; &ps"      
======== ABC command line "read_aiger i10.aig; strash; dch; &get -s; &ps; &if -K 4; &ps"
i10      : i/o =    257/    224  and =    4206  lev =   38 (11.36)  mem = 0.06 MB  ch =  719
cst =       0  cls =    602  lit =     719  unused =    3142  proof =     0
i10      : i/o =    257/    224  and =    2255  lev =   34 (11.54)  mem = 0.03 MB
Mapping (K=4)  :  lut =    741  edge =    2439  lev =   12 (5.70)  mem = 0.03 MB

Could see ch = printed out now.

Signed-off-by: JingrenWang <wjrforcyber@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant