Repository navigation
cec: guard the SOP derivation behind ABC_USE_CUDD - #9
TrevorHansen wants to merge 1 commit into
Conversation
extractSOP(), computeISOPs() and Cec_DeriveSOPs() call Cudd_zddIsop(), Cudd_Ref(), Extra_bddCountCubes() and friends unconditionally, so a build made with ABC_USE_NO_CUDD=1 leaves ten undefined references in cecSatG2.c.o and does not link. That object is always pulled in: the Cec4_* entry points it defines are referenced from giaDup.c, giaEquiv.c, cecChoice.c and others. ABC_USE_CUDD is how the rest of the tree guards code that needs the BDD package -- aigSplit.c, giaClp.c, giaSupp.c and ifDsd.c among others already do this. Guard the three functions and their single call site the same way. With CUDD enabled nothing changes; without it, Cec_SimGenRun() skips the SOP derivation rather than failing to link.
|
Do not merge this as it stands - I found a hazard in it. Guarding out char * pSopInfo = pMan->vTTISOPs->pArray + Vec_IntEntry( pMan->vTTLut, ObjId );That is reached from Doing this properly means guarding the whole SimGen feature - The immediate build problem is handled on the STP side instead, by building ABC with CUDD (stp/stp#1051); the measured cost is 2.2MB of archive and no change to the emitted CNF. The underlying defect is real and also present on |
|
fixed downstream. |
Building this branch with
ABC_USE_NO_CUDD=1, as STP'scmake/FindABC.cmakedoes, fails to link:extractSOP(),computeISOPs()andCec_DeriveSOPs()call into CUDD unconditionally, andcecSatG2.c.ois always pulled into the link because theCec4_*entry points it defines are referenced fromgiaDup.c,giaEquiv.c,cecChoice.cand others. So the whole no-CUDD configuration is broken, not just an unused corner of it.ABC_USE_CUDDis how the rest of the tree handles this -aigSplit.c,giaClp.c,giaSupp.c,ifDsd.cand others already guard their BDD code with it, and the Makefile defines it exactly when the CUDD modules are compiled. This guards the three functions and their single call site the same way.With CUDD enabled nothing changes. Without it,
Cec_SimGenRun()skips the SOP derivation instead of failing to link.Verified by compiling
cecSatG2.cboth ways - ten undefined CUDD references become zero without CUDD, and the file is unchanged with it - and by building the whole library withABC_USE_NO_CUDD=1. The one remaining undefined CUDD symbol in the archive,Abc_EnumerateCubeStatesZddinabc.c.o, is pre-existing and never pulled into a link.This affects upstream too: the same file on
berkeley-abc/abcmaster has the same ten undefined references in a no-CUDD build.