ruby_abc 0.0.3 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.yardopts +7 -0
- data/LICENSE +51 -52
- data/README.md +96 -37
- data/bin/ruby_abc +103 -0
- data/ext/ruby_abc/extconf.rb +58 -0
- data/ext/{ruby_abc.c → ruby_abc/ruby_abc.c} +45 -72
- data/ext/ruby_abc/ruby_abc.map +6 -0
- data/ext/{ruby_abc_wrapper.c → ruby_abc/ruby_abc_wrapper.c} +0 -0
- data/ext/ruby_abc/ruby_abc_wrapper.h +39 -0
- data/lib/ruby_abc/version.rb +4 -0
- data/lib/ruby_abc.rb +247 -225
- data/share/bash_completion/ruby_abc.bash-completion.sh +24 -0
- data/share/osu018.genlib +66 -0
- data/share/simple.genlib +25 -0
- data/test/test_ruby_abc.rb +1 -1
- metadata +19 -1727
- data/Rakefile +0 -83
- data/bin/rubyabc_synthesis +0 -71
- data/ext/abc/CMakeLists.txt +0 -103
- data/ext/abc/Makefile +0 -213
- data/ext/abc/abc.rc +0 -146
- data/ext/abc/abcexe.dsp +0 -103
- data/ext/abc/abclib.dsp +0 -5948
- data/ext/abc/abcspace.dsw +0 -44
- data/ext/abc/arch_flags.c +0 -17
- data/ext/abc/copyright.txt +0 -23
- data/ext/abc/depends.sh +0 -13
- data/ext/abc/i10.aig +0 -752
- data/ext/abc/lib/pthread.h +0 -1369
- data/ext/abc/lib/sched.h +0 -178
- data/ext/abc/lib/semaphore.h +0 -166
- data/ext/abc/lib/x64/pthreadVC2.dll +0 -0
- data/ext/abc/lib/x64/pthreadVC2.lib +0 -0
- data/ext/abc/lib/x86/pthreadVC2.dll +0 -0
- data/ext/abc/lib/x86/pthreadVC2.lib +0 -0
- data/ext/abc/readme.md +0 -111
- data/ext/abc/readmeaig +0 -47
- data/ext/abc/src/aig/aig/aig.h +0 -713
- data/ext/abc/src/aig/aig/aigCanon.c +0 -701
- data/ext/abc/src/aig/aig/aigCheck.c +0 -168
- data/ext/abc/src/aig/aig/aigCuts.c +0 -673
- data/ext/abc/src/aig/aig/aigDfs.c +0 -1136
- data/ext/abc/src/aig/aig/aigDoms.c +0 -1154
- data/ext/abc/src/aig/aig/aigDup.c +0 -1335
- data/ext/abc/src/aig/aig/aigFact.c +0 -734
- data/ext/abc/src/aig/aig/aigFanout.c +0 -194
- data/ext/abc/src/aig/aig/aigFrames.c +0 -140
- data/ext/abc/src/aig/aig/aigInter.c +0 -301
- data/ext/abc/src/aig/aig/aigJust.c +0 -316
- data/ext/abc/src/aig/aig/aigMan.c +0 -486
- data/ext/abc/src/aig/aig/aigMem.c +0 -610
- data/ext/abc/src/aig/aig/aigMffc.c +0 -316
- data/ext/abc/src/aig/aig/aigObj.c +0 -536
- data/ext/abc/src/aig/aig/aigOper.c +0 -606
- data/ext/abc/src/aig/aig/aigOrder.c +0 -176
- data/ext/abc/src/aig/aig/aigPack.c +0 -404
- data/ext/abc/src/aig/aig/aigPart.c +0 -1613
- data/ext/abc/src/aig/aig/aigPartReg.c +0 -629
- data/ext/abc/src/aig/aig/aigPartSat.c +0 -618
- data/ext/abc/src/aig/aig/aigRepar.c +0 -403
- data/ext/abc/src/aig/aig/aigRepr.c +0 -559
- data/ext/abc/src/aig/aig/aigRet.c +0 -975
- data/ext/abc/src/aig/aig/aigRetF.c +0 -214
- data/ext/abc/src/aig/aig/aigScl.c +0 -708
- data/ext/abc/src/aig/aig/aigShow.c +0 -368
- data/ext/abc/src/aig/aig/aigSplit.c +0 -330
- data/ext/abc/src/aig/aig/aigTable.c +0 -277
- data/ext/abc/src/aig/aig/aigTest.c +0 -39
- data/ext/abc/src/aig/aig/aigTiming.c +0 -356
- data/ext/abc/src/aig/aig/aigTruth.c +0 -103
- data/ext/abc/src/aig/aig/aigTsim.c +0 -526
- data/ext/abc/src/aig/aig/aigUtil.c +0 -1575
- data/ext/abc/src/aig/aig/aigWin.c +0 -189
- data/ext/abc/src/aig/aig/aig_.c +0 -53
- data/ext/abc/src/aig/aig/module.make +0 -31
- data/ext/abc/src/aig/gia/gia.c +0 -52
- data/ext/abc/src/aig/gia/gia.h +0 -1667
- data/ext/abc/src/aig/gia/giaAgi.c +0 -238
- data/ext/abc/src/aig/gia/giaAig.c +0 -676
- data/ext/abc/src/aig/gia/giaAig.h +0 -78
- data/ext/abc/src/aig/gia/giaAiger.c +0 -1479
- data/ext/abc/src/aig/gia/giaAigerExt.c +0 -326
- data/ext/abc/src/aig/gia/giaBalAig.c +0 -1095
- data/ext/abc/src/aig/gia/giaBalLut.c +0 -982
- data/ext/abc/src/aig/gia/giaBalMap.c +0 -326
- data/ext/abc/src/aig/gia/giaBidec.c +0 -305
- data/ext/abc/src/aig/gia/giaCCof.c +0 -349
- data/ext/abc/src/aig/gia/giaCSat.c +0 -1105
- data/ext/abc/src/aig/gia/giaCSatOld.c +0 -804
- data/ext/abc/src/aig/gia/giaCTas.c +0 -1790
- data/ext/abc/src/aig/gia/giaCTas2.c +0 -208
- data/ext/abc/src/aig/gia/giaCex.c +0 -392
- data/ext/abc/src/aig/gia/giaClp.c +0 -422
- data/ext/abc/src/aig/gia/giaCof.c +0 -1002
- data/ext/abc/src/aig/gia/giaCone.c +0 -590
- data/ext/abc/src/aig/gia/giaConstr.c +0 -52
- data/ext/abc/src/aig/gia/giaCut.c +0 -646
- data/ext/abc/src/aig/gia/giaDfs.c +0 -582
- data/ext/abc/src/aig/gia/giaDup.c +0 -4791
- data/ext/abc/src/aig/gia/giaEdge.c +0 -1000
- data/ext/abc/src/aig/gia/giaEmbed.c +0 -1876
- data/ext/abc/src/aig/gia/giaEnable.c +0 -650
- data/ext/abc/src/aig/gia/giaEquiv.c +0 -2416
- data/ext/abc/src/aig/gia/giaEra.c +0 -602
- data/ext/abc/src/aig/gia/giaEra2.c +0 -1963
- data/ext/abc/src/aig/gia/giaEsop.c +0 -541
- data/ext/abc/src/aig/gia/giaFalse.c +0 -552
- data/ext/abc/src/aig/gia/giaFanout.c +0 -338
- data/ext/abc/src/aig/gia/giaForce.c +0 -1106
- data/ext/abc/src/aig/gia/giaFrames.c +0 -996
- data/ext/abc/src/aig/gia/giaFront.c +0 -295
- data/ext/abc/src/aig/gia/giaFx.c +0 -487
- data/ext/abc/src/aig/gia/giaGiarf.c +0 -1079
- data/ext/abc/src/aig/gia/giaGig.c +0 -506
- data/ext/abc/src/aig/gia/giaGlitch.c +0 -786
- data/ext/abc/src/aig/gia/giaHash.c +0 -816
- data/ext/abc/src/aig/gia/giaHcd.c +0 -689
- data/ext/abc/src/aig/gia/giaIf.c +0 -2536
- data/ext/abc/src/aig/gia/giaIff.c +0 -444
- data/ext/abc/src/aig/gia/giaIiff.c +0 -62
- data/ext/abc/src/aig/gia/giaIiff.h +0 -54
- data/ext/abc/src/aig/gia/giaIso.c +0 -1331
- data/ext/abc/src/aig/gia/giaIso2.c +0 -776
- data/ext/abc/src/aig/gia/giaIso3.c +0 -167
- data/ext/abc/src/aig/gia/giaJf.c +0 -1805
- data/ext/abc/src/aig/gia/giaKf.c +0 -1341
- data/ext/abc/src/aig/gia/giaLf.c +0 -2301
- data/ext/abc/src/aig/gia/giaMan.c +0 -1126
- data/ext/abc/src/aig/gia/giaMem.c +0 -598
- data/ext/abc/src/aig/gia/giaMf.c +0 -1741
- data/ext/abc/src/aig/gia/giaMffc.c +0 -313
- data/ext/abc/src/aig/gia/giaMfs.c +0 -477
- data/ext/abc/src/aig/gia/giaMini.c +0 -574
- data/ext/abc/src/aig/gia/giaMuxes.c +0 -915
- data/ext/abc/src/aig/gia/giaNf.c +0 -2420
- data/ext/abc/src/aig/gia/giaOf.c +0 -1866
- data/ext/abc/src/aig/gia/giaPack.c +0 -207
- data/ext/abc/src/aig/gia/giaPat.c +0 -135
- data/ext/abc/src/aig/gia/giaPf.c +0 -1354
- data/ext/abc/src/aig/gia/giaProp.c +0 -176
- data/ext/abc/src/aig/gia/giaQbf.c +0 -701
- data/ext/abc/src/aig/gia/giaResub.c +0 -292
- data/ext/abc/src/aig/gia/giaRetime.c +0 -304
- data/ext/abc/src/aig/gia/giaRex.c +0 -545
- data/ext/abc/src/aig/gia/giaSat.c +0 -427
- data/ext/abc/src/aig/gia/giaSat3.c +0 -136
- data/ext/abc/src/aig/gia/giaSatEdge.c +0 -537
- data/ext/abc/src/aig/gia/giaSatLE.c +0 -1083
- data/ext/abc/src/aig/gia/giaSatLut.c +0 -1225
- data/ext/abc/src/aig/gia/giaSatMap.c +0 -554
- data/ext/abc/src/aig/gia/giaSatoko.c +0 -274
- data/ext/abc/src/aig/gia/giaScl.c +0 -300
- data/ext/abc/src/aig/gia/giaScript.c +0 -783
- data/ext/abc/src/aig/gia/giaShow.c +0 -1164
- data/ext/abc/src/aig/gia/giaShrink.c +0 -154
- data/ext/abc/src/aig/gia/giaShrink6.c +0 -492
- data/ext/abc/src/aig/gia/giaShrink7.c +0 -373
- data/ext/abc/src/aig/gia/giaSim.c +0 -905
- data/ext/abc/src/aig/gia/giaSim2.c +0 -706
- data/ext/abc/src/aig/gia/giaSort.c +0 -273
- data/ext/abc/src/aig/gia/giaSpeedup.c +0 -805
- data/ext/abc/src/aig/gia/giaSplit.c +0 -578
- data/ext/abc/src/aig/gia/giaStg.c +0 -528
- data/ext/abc/src/aig/gia/giaStr.c +0 -1865
- data/ext/abc/src/aig/gia/giaSupMin.c +0 -165
- data/ext/abc/src/aig/gia/giaSupp.c +0 -886
- data/ext/abc/src/aig/gia/giaSweep.c +0 -777
- data/ext/abc/src/aig/gia/giaSweeper.c +0 -1185
- data/ext/abc/src/aig/gia/giaSwitch.c +0 -829
- data/ext/abc/src/aig/gia/giaTim.c +0 -1017
- data/ext/abc/src/aig/gia/giaTis.c +0 -213
- data/ext/abc/src/aig/gia/giaTruth.c +0 -639
- data/ext/abc/src/aig/gia/giaTsim.c +0 -757
- data/ext/abc/src/aig/gia/giaUnate.c +0 -255
- data/ext/abc/src/aig/gia/giaUtil.c +0 -2136
- data/ext/abc/src/aig/gia/module.make +0 -89
- data/ext/abc/src/aig/hop/cudd2.c +0 -360
- data/ext/abc/src/aig/hop/cudd2.h +0 -86
- data/ext/abc/src/aig/hop/hop.h +0 -356
- data/ext/abc/src/aig/hop/hopBalance.c +0 -401
- data/ext/abc/src/aig/hop/hopCheck.c +0 -115
- data/ext/abc/src/aig/hop/hopDfs.c +0 -591
- data/ext/abc/src/aig/hop/hopMan.c +0 -169
- data/ext/abc/src/aig/hop/hopMem.c +0 -120
- data/ext/abc/src/aig/hop/hopObj.c +0 -277
- data/ext/abc/src/aig/hop/hopOper.c +0 -378
- data/ext/abc/src/aig/hop/hopTable.c +0 -232
- data/ext/abc/src/aig/hop/hopTruth.c +0 -274
- data/ext/abc/src/aig/hop/hopUtil.c +0 -578
- data/ext/abc/src/aig/hop/hop_.c +0 -53
- data/ext/abc/src/aig/hop/module.make +0 -10
- data/ext/abc/src/aig/ioa/ioa.h +0 -87
- data/ext/abc/src/aig/ioa/ioaReadAig.c +0 -465
- data/ext/abc/src/aig/ioa/ioaUtil.c +0 -146
- data/ext/abc/src/aig/ioa/ioaWriteAig.c +0 -599
- data/ext/abc/src/aig/ioa/module.make +0 -3
- data/ext/abc/src/aig/ivy/attr.h +0 -418
- data/ext/abc/src/aig/ivy/ivy.h +0 -562
- data/ext/abc/src/aig/ivy/ivyBalance.c +0 -414
- data/ext/abc/src/aig/ivy/ivyCanon.c +0 -149
- data/ext/abc/src/aig/ivy/ivyCheck.c +0 -278
- data/ext/abc/src/aig/ivy/ivyCut.c +0 -995
- data/ext/abc/src/aig/ivy/ivyCutTrav.c +0 -478
- data/ext/abc/src/aig/ivy/ivyDfs.c +0 -498
- data/ext/abc/src/aig/ivy/ivyDsd.c +0 -831
- data/ext/abc/src/aig/ivy/ivyFanout.c +0 -314
- data/ext/abc/src/aig/ivy/ivyFastMap.c +0 -1569
- data/ext/abc/src/aig/ivy/ivyFraig.c +0 -2972
- data/ext/abc/src/aig/ivy/ivyHaig.c +0 -535
- data/ext/abc/src/aig/ivy/ivyMan.c +0 -552
- data/ext/abc/src/aig/ivy/ivyMem.c +0 -121
- data/ext/abc/src/aig/ivy/ivyMulti.c +0 -312
- data/ext/abc/src/aig/ivy/ivyMulti8.c +0 -432
- data/ext/abc/src/aig/ivy/ivyObj.c +0 -481
- data/ext/abc/src/aig/ivy/ivyOper.c +0 -298
- data/ext/abc/src/aig/ivy/ivyResyn.c +0 -201
- data/ext/abc/src/aig/ivy/ivyRwr.c +0 -618
- data/ext/abc/src/aig/ivy/ivyRwrAlg.c +0 -413
- data/ext/abc/src/aig/ivy/ivySeq.c +0 -1142
- data/ext/abc/src/aig/ivy/ivyShow.c +0 -343
- data/ext/abc/src/aig/ivy/ivyTable.c +0 -272
- data/ext/abc/src/aig/ivy/ivyUtil.c +0 -824
- data/ext/abc/src/aig/ivy/ivy_.c +0 -53
- data/ext/abc/src/aig/ivy/module.make +0 -22
- data/ext/abc/src/aig/miniaig/abcOper.h +0 -249
- data/ext/abc/src/aig/miniaig/miniaig.h +0 -346
- data/ext/abc/src/aig/miniaig/minilut.h +0 -288
- data/ext/abc/src/aig/miniaig/module.make +0 -1
- data/ext/abc/src/aig/miniaig/ndr.h +0 -521
- data/ext/abc/src/aig/saig/module.make +0 -26
- data/ext/abc/src/aig/saig/saig.h +0 -200
- data/ext/abc/src/aig/saig/saigCone.c +0 -181
- data/ext/abc/src/aig/saig/saigConstr.c +0 -484
- data/ext/abc/src/aig/saig/saigConstr2.c +0 -1013
- data/ext/abc/src/aig/saig/saigDual.c +0 -240
- data/ext/abc/src/aig/saig/saigDup.c +0 -600
- data/ext/abc/src/aig/saig/saigGlaCba.c +0 -840
- data/ext/abc/src/aig/saig/saigGlaPba.c +0 -589
- data/ext/abc/src/aig/saig/saigGlaPba2.c +0 -558
- data/ext/abc/src/aig/saig/saigInd.c +0 -409
- data/ext/abc/src/aig/saig/saigIoa.c +0 -405
- data/ext/abc/src/aig/saig/saigIso.c +0 -628
- data/ext/abc/src/aig/saig/saigIsoFast.c +0 -353
- data/ext/abc/src/aig/saig/saigIsoSlow.c +0 -1224
- data/ext/abc/src/aig/saig/saigMiter.c +0 -1317
- data/ext/abc/src/aig/saig/saigOutDec.c +0 -205
- data/ext/abc/src/aig/saig/saigPhase.c +0 -1081
- data/ext/abc/src/aig/saig/saigRefSat.c +0 -986
- data/ext/abc/src/aig/saig/saigRetFwd.c +0 -248
- data/ext/abc/src/aig/saig/saigRetMin.c +0 -705
- data/ext/abc/src/aig/saig/saigRetStep.c +0 -236
- data/ext/abc/src/aig/saig/saigScl.c +0 -115
- data/ext/abc/src/aig/saig/saigSimFast.c +0 -451
- data/ext/abc/src/aig/saig/saigSimMv.c +0 -956
- data/ext/abc/src/aig/saig/saigSimSeq.c +0 -518
- data/ext/abc/src/aig/saig/saigStrSim.c +0 -976
- data/ext/abc/src/aig/saig/saigSwitch.c +0 -573
- data/ext/abc/src/aig/saig/saigSynch.c +0 -665
- data/ext/abc/src/aig/saig/saigTempor.c +0 -256
- data/ext/abc/src/aig/saig/saigTrans.c +0 -428
- data/ext/abc/src/aig/saig/saigUnfold2.c +0 -497
- data/ext/abc/src/aig/saig/saigWnd.c +0 -816
- data/ext/abc/src/aig/saig/saig_.c +0 -52
- data/ext/abc/src/base/abc/abc.h +0 -1064
- data/ext/abc/src/base/abc/abcAig.c +0 -1505
- data/ext/abc/src/base/abc/abcBarBuf.c +0 -513
- data/ext/abc/src/base/abc/abcBlifMv.c +0 -1167
- data/ext/abc/src/base/abc/abcCheck.c +0 -953
- data/ext/abc/src/base/abc/abcDfs.c +0 -1910
- data/ext/abc/src/base/abc/abcFanOrder.c +0 -652
- data/ext/abc/src/base/abc/abcFanio.c +0 -366
- data/ext/abc/src/base/abc/abcFunc.c +0 -1273
- data/ext/abc/src/base/abc/abcHie.c +0 -843
- data/ext/abc/src/base/abc/abcHieCec.c +0 -764
- data/ext/abc/src/base/abc/abcHieGia.c +0 -582
- data/ext/abc/src/base/abc/abcHieNew.c +0 -1635
- data/ext/abc/src/base/abc/abcInt.h +0 -60
- data/ext/abc/src/base/abc/abcLatch.c +0 -778
- data/ext/abc/src/base/abc/abcLib.c +0 -400
- data/ext/abc/src/base/abc/abcMinBase.c +0 -841
- data/ext/abc/src/base/abc/abcNames.c +0 -802
- data/ext/abc/src/base/abc/abcNetlist.c +0 -511
- data/ext/abc/src/base/abc/abcNtk.c +0 -2298
- data/ext/abc/src/base/abc/abcObj.c +0 -1075
- data/ext/abc/src/base/abc/abcRefs.c +0 -457
- data/ext/abc/src/base/abc/abcShow.c +0 -458
- data/ext/abc/src/base/abc/abcSop.c +0 -1356
- data/ext/abc/src/base/abc/abcUtil.c +0 -3269
- data/ext/abc/src/base/abc/abc_.c +0 -52
- data/ext/abc/src/base/abc/module.make +0 -23
- data/ext/abc/src/base/abci/abc.c +0 -44490
- data/ext/abc/src/base/abci/abcAttach.c +0 -409
- data/ext/abc/src/base/abci/abcAuto.c +0 -256
- data/ext/abc/src/base/abci/abcBalance.c +0 -629
- data/ext/abc/src/base/abci/abcBidec.c +0 -156
- data/ext/abc/src/base/abci/abcBm.c +0 -2050
- data/ext/abc/src/base/abci/abcBmc.c +0 -122
- data/ext/abc/src/base/abci/abcCas.c +0 -128
- data/ext/abc/src/base/abci/abcCascade.c +0 -1062
- data/ext/abc/src/base/abci/abcCollapse.c +0 -957
- data/ext/abc/src/base/abci/abcCut.c +0 -700
- data/ext/abc/src/base/abci/abcDar.c +0 -4807
- data/ext/abc/src/base/abci/abcDarUnfold2.c +0 -69
- data/ext/abc/src/base/abci/abcDebug.c +0 -213
- data/ext/abc/src/base/abci/abcDec.c +0 -666
- data/ext/abc/src/base/abci/abcDetect.c +0 -1264
- data/ext/abc/src/base/abci/abcDress.c +0 -214
- data/ext/abc/src/base/abci/abcDress2.c +0 -500
- data/ext/abc/src/base/abci/abcDress3.c +0 -320
- data/ext/abc/src/base/abci/abcDsd.c +0 -710
- data/ext/abc/src/base/abci/abcEco.c +0 -58
- data/ext/abc/src/base/abci/abcEspresso.c +0 -255
- data/ext/abc/src/base/abci/abcExact.c +0 -3024
- data/ext/abc/src/base/abci/abcExtract.c +0 -752
- data/ext/abc/src/base/abci/abcFlop.c +0 -40
- data/ext/abc/src/base/abci/abcFpga.c +0 -288
- data/ext/abc/src/base/abci/abcFpgaFast.c +0 -195
- data/ext/abc/src/base/abci/abcFraig.c +0 -816
- data/ext/abc/src/base/abci/abcFx.c +0 -1207
- data/ext/abc/src/base/abci/abcFxu.c +0 -292
- data/ext/abc/src/base/abci/abcGen.c +0 -830
- data/ext/abc/src/base/abci/abcHaig.c +0 -557
- data/ext/abc/src/base/abci/abcIf.c +0 -830
- data/ext/abc/src/base/abci/abcIfMux.c +0 -422
- data/ext/abc/src/base/abci/abcIfif.c +0 -349
- data/ext/abc/src/base/abci/abcIvy.c +0 -1149
- data/ext/abc/src/base/abci/abcLog.c +0 -242
- data/ext/abc/src/base/abci/abcLut.c +0 -793
- data/ext/abc/src/base/abci/abcLutmin.c +0 -785
- data/ext/abc/src/base/abci/abcMap.c +0 -1064
- data/ext/abc/src/base/abci/abcMeasure.c +0 -483
- data/ext/abc/src/base/abci/abcMerge.c +0 -358
- data/ext/abc/src/base/abci/abcMffc.c +0 -1252
- data/ext/abc/src/base/abci/abcMfs.c +0 -469
- data/ext/abc/src/base/abci/abcMini.c +0 -237
- data/ext/abc/src/base/abci/abcMiter.c +0 -1196
- data/ext/abc/src/base/abci/abcMulti.c +0 -660
- data/ext/abc/src/base/abci/abcMv.c +0 -381
- data/ext/abc/src/base/abci/abcNpn.c +0 -392
- data/ext/abc/src/base/abci/abcNpnSave.c +0 -740
- data/ext/abc/src/base/abci/abcNtbdd.c +0 -619
- data/ext/abc/src/base/abci/abcOdc.c +0 -1132
- data/ext/abc/src/base/abci/abcOrder.c +0 -136
- data/ext/abc/src/base/abci/abcPart.c +0 -1206
- data/ext/abc/src/base/abci/abcPlace.c +0 -260
- data/ext/abc/src/base/abci/abcPrint.c +0 -2008
- data/ext/abc/src/base/abci/abcProve.c +0 -354
- data/ext/abc/src/base/abci/abcQbf.c +0 -319
- data/ext/abc/src/base/abci/abcQuant.c +0 -436
- data/ext/abc/src/base/abci/abcReach.c +0 -327
- data/ext/abc/src/base/abci/abcRec3.c +0 -1433
- data/ext/abc/src/base/abci/abcReconv.c +0 -776
- data/ext/abc/src/base/abci/abcRefactor.c +0 -418
- data/ext/abc/src/base/abci/abcRenode.c +0 -326
- data/ext/abc/src/base/abci/abcReorder.c +0 -117
- data/ext/abc/src/base/abci/abcRestruct.c +0 -1511
- data/ext/abc/src/base/abci/abcResub.c +0 -1957
- data/ext/abc/src/base/abci/abcRewrite.c +0 -420
- data/ext/abc/src/base/abci/abcRpo.c +0 -442
- data/ext/abc/src/base/abci/abcRr.c +0 -1005
- data/ext/abc/src/base/abci/abcSat.c +0 -1020
- data/ext/abc/src/base/abci/abcSaucy.c +0 -3346
- data/ext/abc/src/base/abci/abcScorr.c +0 -454
- data/ext/abc/src/base/abci/abcSense.c +0 -216
- data/ext/abc/src/base/abci/abcSpeedup.c +0 -965
- data/ext/abc/src/base/abci/abcStrash.c +0 -848
- data/ext/abc/src/base/abci/abcSweep.c +0 -1030
- data/ext/abc/src/base/abci/abcSymm.c +0 -246
- data/ext/abc/src/base/abci/abcTim.c +0 -637
- data/ext/abc/src/base/abci/abcTiming.c +0 -1398
- data/ext/abc/src/base/abci/abcUnate.c +0 -178
- data/ext/abc/src/base/abci/abcUnreach.c +0 -366
- data/ext/abc/src/base/abci/abcVerify.c +0 -1109
- data/ext/abc/src/base/abci/abcXsim.c +0 -231
- data/ext/abc/src/base/abci/abciUnfold2.c +0 -186
- data/ext/abc/src/base/abci/fahout_cut.c +0 -358
- data/ext/abc/src/base/abci/module.make +0 -75
- data/ext/abc/src/base/acb/acb.c +0 -52
- data/ext/abc/src/base/acb/acb.h +0 -1038
- data/ext/abc/src/base/acb/acbAbc.c +0 -302
- data/ext/abc/src/base/acb/acbAig.c +0 -52
- data/ext/abc/src/base/acb/acbCom.c +0 -735
- data/ext/abc/src/base/acb/acbFunc.c +0 -56
- data/ext/abc/src/base/acb/acbMfs.c +0 -1644
- data/ext/abc/src/base/acb/acbPar.h +0 -70
- data/ext/abc/src/base/acb/acbPush.c +0 -372
- data/ext/abc/src/base/acb/acbSets.c +0 -54
- data/ext/abc/src/base/acb/acbSets.h +0 -61
- data/ext/abc/src/base/acb/acbUtil.c +0 -479
- data/ext/abc/src/base/acb/module.make +0 -8
- data/ext/abc/src/base/bac/bac.c +0 -52
- data/ext/abc/src/base/bac/bac.h +0 -1017
- data/ext/abc/src/base/bac/bacBac.c +0 -298
- data/ext/abc/src/base/bac/bacBlast.c +0 -587
- data/ext/abc/src/base/bac/bacCom.c +0 -728
- data/ext/abc/src/base/bac/bacLib.c +0 -52
- data/ext/abc/src/base/bac/bacNtk.c +0 -603
- data/ext/abc/src/base/bac/bacOper.c +0 -365
- data/ext/abc/src/base/bac/bacPrs.h +0 -363
- data/ext/abc/src/base/bac/bacPrsBuild.c +0 -356
- data/ext/abc/src/base/bac/bacPrsTrans.c +0 -211
- data/ext/abc/src/base/bac/bacPtr.c +0 -470
- data/ext/abc/src/base/bac/bacPtrAbc.c +0 -486
- data/ext/abc/src/base/bac/bacReadBlif.c +0 -453
- data/ext/abc/src/base/bac/bacReadSmt.c +0 -42
- data/ext/abc/src/base/bac/bacReadVer.c +0 -875
- data/ext/abc/src/base/bac/bacWriteBlif.c +0 -236
- data/ext/abc/src/base/bac/bacWriteSmt.c +0 -52
- data/ext/abc/src/base/bac/bacWriteVer.c +0 -703
- data/ext/abc/src/base/bac/module.make +0 -15
- data/ext/abc/src/base/cba/cba.c +0 -52
- data/ext/abc/src/base/cba/cba.h +0 -1024
- data/ext/abc/src/base/cba/cbaBlast.c +0 -1069
- data/ext/abc/src/base/cba/cbaCba.c +0 -58
- data/ext/abc/src/base/cba/cbaCom.c +0 -731
- data/ext/abc/src/base/cba/cbaNtk.c +0 -1183
- data/ext/abc/src/base/cba/cbaPrs.h +0 -520
- data/ext/abc/src/base/cba/cbaReadBlif.c +0 -646
- data/ext/abc/src/base/cba/cbaReadVer.c +0 -2182
- data/ext/abc/src/base/cba/cbaTypes.h +0 -169
- data/ext/abc/src/base/cba/cbaWriteBlif.c +0 -218
- data/ext/abc/src/base/cba/cbaWriteVer.c +0 -1016
- data/ext/abc/src/base/cba/module.make +0 -8
- data/ext/abc/src/base/cmd/cmd.c +0 -2611
- data/ext/abc/src/base/cmd/cmd.h +0 -81
- data/ext/abc/src/base/cmd/cmdAlias.c +0 -126
- data/ext/abc/src/base/cmd/cmdApi.c +0 -127
- data/ext/abc/src/base/cmd/cmdAuto.c +0 -684
- data/ext/abc/src/base/cmd/cmdFlag.c +0 -110
- data/ext/abc/src/base/cmd/cmdHist.c +0 -180
- data/ext/abc/src/base/cmd/cmdInt.h +0 -92
- data/ext/abc/src/base/cmd/cmdLoad.c +0 -209
- data/ext/abc/src/base/cmd/cmdPlugin.c +0 -773
- data/ext/abc/src/base/cmd/cmdStarter.c +0 -259
- data/ext/abc/src/base/cmd/cmdUtils.c +0 -756
- data/ext/abc/src/base/cmd/module.make +0 -10
- data/ext/abc/src/base/exor/exor.c +0 -958
- data/ext/abc/src/base/exor/exor.h +0 -189
- data/ext/abc/src/base/exor/exorBits.c +0 -425
- data/ext/abc/src/base/exor/exorCubes.c +0 -190
- data/ext/abc/src/base/exor/exorLink.c +0 -749
- data/ext/abc/src/base/exor/exorList.c +0 -1156
- data/ext/abc/src/base/exor/exorUtil.c +0 -228
- data/ext/abc/src/base/exor/module.make +0 -6
- data/ext/abc/src/base/io/io.c +0 -3157
- data/ext/abc/src/base/io/ioAbc.h +0 -172
- data/ext/abc/src/base/io/ioInt.h +0 -57
- data/ext/abc/src/base/io/ioJson.c +0 -270
- data/ext/abc/src/base/io/ioReadAiger.c +0 -599
- data/ext/abc/src/base/io/ioReadBaf.c +0 -177
- data/ext/abc/src/base/io/ioReadBblif.c +0 -348
- data/ext/abc/src/base/io/ioReadBench.c +0 -391
- data/ext/abc/src/base/io/ioReadBlif.c +0 -1707
- data/ext/abc/src/base/io/ioReadBlifAig.c +0 -1019
- data/ext/abc/src/base/io/ioReadBlifMv.c +0 -2363
- data/ext/abc/src/base/io/ioReadDsd.c +0 -313
- data/ext/abc/src/base/io/ioReadEdif.c +0 -240
- data/ext/abc/src/base/io/ioReadEqn.c +0 -244
- data/ext/abc/src/base/io/ioReadPla.c +0 -600
- data/ext/abc/src/base/io/ioReadPlaMo.c +0 -813
- data/ext/abc/src/base/io/ioReadVerilog.c +0 -102
- data/ext/abc/src/base/io/ioUtil.c +0 -871
- data/ext/abc/src/base/io/ioWriteAiger.c +0 -956
- data/ext/abc/src/base/io/ioWriteBaf.c +0 -173
- data/ext/abc/src/base/io/ioWriteBblif.c +0 -116
- data/ext/abc/src/base/io/ioWriteBench.c +0 -340
- data/ext/abc/src/base/io/ioWriteBlif.c +0 -1410
- data/ext/abc/src/base/io/ioWriteBlifMv.c +0 -476
- data/ext/abc/src/base/io/ioWriteBook.c +0 -998
- data/ext/abc/src/base/io/ioWriteCnf.c +0 -120
- data/ext/abc/src/base/io/ioWriteDot.c +0 -854
- data/ext/abc/src/base/io/ioWriteEqn.c +0 -257
- data/ext/abc/src/base/io/ioWriteGml.c +0 -121
- data/ext/abc/src/base/io/ioWriteList.c +0 -293
- data/ext/abc/src/base/io/ioWritePla.c +0 -460
- data/ext/abc/src/base/io/ioWriteSmv.c +0 -265
- data/ext/abc/src/base/io/ioWriteVerilog.c +0 -662
- data/ext/abc/src/base/io/module.make +0 -31
- data/ext/abc/src/base/main/abcapis.h +0 -106
- data/ext/abc/src/base/main/abcapis_old.h +0 -84
- data/ext/abc/src/base/main/libSupport.c +0 -211
- data/ext/abc/src/base/main/main.c +0 -12
- data/ext/abc/src/base/main/main.h +0 -171
- data/ext/abc/src/base/main/mainFrame.c +0 -742
- data/ext/abc/src/base/main/mainInit.c +0 -168
- data/ext/abc/src/base/main/mainInt.h +0 -207
- data/ext/abc/src/base/main/mainLib.c +0 -93
- data/ext/abc/src/base/main/mainMC.c +0 -203
- data/ext/abc/src/base/main/mainReal.c +0 -386
- data/ext/abc/src/base/main/mainUtils.c +0 -294
- data/ext/abc/src/base/main/module.make +0 -7
- data/ext/abc/src/base/pla/module.make +0 -7
- data/ext/abc/src/base/pla/pla.c +0 -52
- data/ext/abc/src/base/pla/pla.h +0 -297
- data/ext/abc/src/base/pla/plaCom.c +0 -507
- data/ext/abc/src/base/pla/plaFxch.c +0 -854
- data/ext/abc/src/base/pla/plaHash.c +0 -347
- data/ext/abc/src/base/pla/plaMan.c +0 -300
- data/ext/abc/src/base/pla/plaMerge.c +0 -55
- data/ext/abc/src/base/pla/plaRead.c +0 -224
- data/ext/abc/src/base/pla/plaSimple.c +0 -339
- data/ext/abc/src/base/pla/plaWrite.c +0 -112
- data/ext/abc/src/base/test/module.make +0 -1
- data/ext/abc/src/base/test/test.c +0 -70
- data/ext/abc/src/base/ver/module.make +0 -4
- data/ext/abc/src/base/ver/ver.h +0 -122
- data/ext/abc/src/base/ver/verCore.c +0 -3037
- data/ext/abc/src/base/ver/verFormula.c +0 -479
- data/ext/abc/src/base/ver/verParse.c +0 -131
- data/ext/abc/src/base/ver/verStream.c +0 -450
- data/ext/abc/src/base/ver/verWords.c +0 -53
- data/ext/abc/src/base/ver/ver_.c +0 -53
- data/ext/abc/src/base/wlc/module.make +0 -17
- data/ext/abc/src/base/wlc/wlc.c +0 -274
- data/ext/abc/src/base/wlc/wlc.h +0 -392
- data/ext/abc/src/base/wlc/wlcAbc.c +0 -275
- data/ext/abc/src/base/wlc/wlcAbs.c +0 -1912
- data/ext/abc/src/base/wlc/wlcAbs2.c +0 -410
- data/ext/abc/src/base/wlc/wlcBlast.c +0 -1692
- data/ext/abc/src/base/wlc/wlcCom.c +0 -1559
- data/ext/abc/src/base/wlc/wlcGraft.c +0 -573
- data/ext/abc/src/base/wlc/wlcJson.c +0 -54
- data/ext/abc/src/base/wlc/wlcNtk.c +0 -1268
- data/ext/abc/src/base/wlc/wlcPth.c +0 -173
- data/ext/abc/src/base/wlc/wlcReadSmt.c +0 -1784
- data/ext/abc/src/base/wlc/wlcReadVer.c +0 -1308
- data/ext/abc/src/base/wlc/wlcShow.c +0 -337
- data/ext/abc/src/base/wlc/wlcSim.c +0 -251
- data/ext/abc/src/base/wlc/wlcStdin.c +0 -255
- data/ext/abc/src/base/wlc/wlcUif.c +0 -290
- data/ext/abc/src/base/wlc/wlcWin.c +0 -166
- data/ext/abc/src/base/wlc/wlcWriteVer.c +0 -450
- data/ext/abc/src/bdd/bbr/bbr.h +0 -93
- data/ext/abc/src/bdd/bbr/bbrCex.c +0 -172
- data/ext/abc/src/bdd/bbr/bbrImage.c +0 -1327
- data/ext/abc/src/bdd/bbr/bbrNtbdd.c +0 -218
- data/ext/abc/src/bdd/bbr/bbrReach.c +0 -615
- data/ext/abc/src/bdd/bbr/bbr_.c +0 -52
- data/ext/abc/src/bdd/bbr/module.make +0 -4
- data/ext/abc/src/bdd/cas/cas.h +0 -66
- data/ext/abc/src/bdd/cas/casCore.c +0 -1265
- data/ext/abc/src/bdd/cas/casDec.c +0 -512
- data/ext/abc/src/bdd/cas/module.make +0 -3
- data/ext/abc/src/bdd/cudd/Makefile +0 -124
- data/ext/abc/src/bdd/cudd/cuBdd.make +0 -41
- data/ext/abc/src/bdd/cudd/cudd.h +0 -1054
- data/ext/abc/src/bdd/cudd/cudd.make +0 -42
- data/ext/abc/src/bdd/cudd/cuddAPI.c +0 -4444
- data/ext/abc/src/bdd/cudd/cuddAddAbs.c +0 -588
- data/ext/abc/src/bdd/cudd/cuddAddApply.c +0 -949
- data/ext/abc/src/bdd/cudd/cuddAddFind.c +0 -316
- data/ext/abc/src/bdd/cudd/cuddAddInv.c +0 -209
- data/ext/abc/src/bdd/cudd/cuddAddIte.c +0 -647
- data/ext/abc/src/bdd/cudd/cuddAddNeg.c +0 -296
- data/ext/abc/src/bdd/cudd/cuddAddWalsh.c +0 -399
- data/ext/abc/src/bdd/cudd/cuddAndAbs.c +0 -384
- data/ext/abc/src/bdd/cudd/cuddAnneal.c +0 -822
- data/ext/abc/src/bdd/cudd/cuddApa.c +0 -979
- data/ext/abc/src/bdd/cudd/cuddApprox.c +0 -2213
- data/ext/abc/src/bdd/cudd/cuddBddAbs.c +0 -725
- data/ext/abc/src/bdd/cudd/cuddBddCorr.c +0 -515
- data/ext/abc/src/bdd/cudd/cuddBddIte.c +0 -1328
- data/ext/abc/src/bdd/cudd/cuddBridge.c +0 -1021
- data/ext/abc/src/bdd/cudd/cuddCache.c +0 -1100
- data/ext/abc/src/bdd/cudd/cuddCheck.c +0 -887
- data/ext/abc/src/bdd/cudd/cuddClip.c +0 -566
- data/ext/abc/src/bdd/cudd/cuddCof.c +0 -335
- data/ext/abc/src/bdd/cudd/cuddCompose.c +0 -1760
- data/ext/abc/src/bdd/cudd/cuddDecomp.c +0 -2185
- data/ext/abc/src/bdd/cudd/cuddEssent.c +0 -1475
- data/ext/abc/src/bdd/cudd/cuddExact.c +0 -1028
- data/ext/abc/src/bdd/cudd/cuddExport.c +0 -1384
- data/ext/abc/src/bdd/cudd/cuddGenCof.c +0 -2175
- data/ext/abc/src/bdd/cudd/cuddGenetic.c +0 -957
- data/ext/abc/src/bdd/cudd/cuddGroup.c +0 -2173
- data/ext/abc/src/bdd/cudd/cuddHarwell.c +0 -576
- data/ext/abc/src/bdd/cudd/cuddInit.c +0 -319
- data/ext/abc/src/bdd/cudd/cuddInt.h +0 -1232
- data/ext/abc/src/bdd/cudd/cuddInteract.c +0 -437
- data/ext/abc/src/bdd/cudd/cuddLCache.c +0 -1465
- data/ext/abc/src/bdd/cudd/cuddLevelQ.c +0 -569
- data/ext/abc/src/bdd/cudd/cuddLinear.c +0 -1373
- data/ext/abc/src/bdd/cudd/cuddLiteral.c +0 -272
- data/ext/abc/src/bdd/cudd/cuddMatMult.c +0 -715
- data/ext/abc/src/bdd/cudd/cuddPriority.c +0 -2035
- data/ext/abc/src/bdd/cudd/cuddRead.c +0 -525
- data/ext/abc/src/bdd/cudd/cuddRef.c +0 -816
- data/ext/abc/src/bdd/cudd/cuddReorder.c +0 -2143
- data/ext/abc/src/bdd/cudd/cuddSat.c +0 -1338
- data/ext/abc/src/bdd/cudd/cuddSign.c +0 -326
- data/ext/abc/src/bdd/cudd/cuddSolve.c +0 -374
- data/ext/abc/src/bdd/cudd/cuddSplit.c +0 -694
- data/ext/abc/src/bdd/cudd/cuddSubsetHB.c +0 -1337
- data/ext/abc/src/bdd/cudd/cuddSubsetSP.c +0 -1657
- data/ext/abc/src/bdd/cudd/cuddSymmetry.c +0 -1706
- data/ext/abc/src/bdd/cudd/cuddTable.c +0 -3179
- data/ext/abc/src/bdd/cudd/cuddUtil.c +0 -3929
- data/ext/abc/src/bdd/cudd/cuddWindow.c +0 -1031
- data/ext/abc/src/bdd/cudd/cuddZddCount.c +0 -357
- data/ext/abc/src/bdd/cudd/cuddZddFuncs.c +0 -1638
- data/ext/abc/src/bdd/cudd/cuddZddGroup.c +0 -1344
- data/ext/abc/src/bdd/cudd/cuddZddIsop.c +0 -919
- data/ext/abc/src/bdd/cudd/cuddZddLin.c +0 -975
- data/ext/abc/src/bdd/cudd/cuddZddMisc.c +0 -286
- data/ext/abc/src/bdd/cudd/cuddZddPort.c +0 -389
- data/ext/abc/src/bdd/cudd/cuddZddReord.c +0 -1668
- data/ext/abc/src/bdd/cudd/cuddZddSetop.c +0 -1166
- data/ext/abc/src/bdd/cudd/cuddZddSymm.c +0 -1707
- data/ext/abc/src/bdd/cudd/cuddZddUtil.c +0 -1071
- data/ext/abc/src/bdd/cudd/license +0 -32
- data/ext/abc/src/bdd/cudd/module.make +0 -61
- data/ext/abc/src/bdd/cudd/r7x8.1.mat +0 -53
- data/ext/abc/src/bdd/cudd/r7x8.1.out +0 -377
- data/ext/abc/src/bdd/cudd/testcudd.c +0 -1073
- data/ext/abc/src/bdd/dsd/dsd.h +0 -134
- data/ext/abc/src/bdd/dsd/dsdApi.c +0 -102
- data/ext/abc/src/bdd/dsd/dsdCheck.c +0 -319
- data/ext/abc/src/bdd/dsd/dsdInt.h +0 -99
- data/ext/abc/src/bdd/dsd/dsdLocal.c +0 -342
- data/ext/abc/src/bdd/dsd/dsdMan.c +0 -119
- data/ext/abc/src/bdd/dsd/dsdProc.c +0 -1613
- data/ext/abc/src/bdd/dsd/dsdTree.c +0 -1181
- data/ext/abc/src/bdd/dsd/module.make +0 -6
- data/ext/abc/src/bdd/epd/epd.c +0 -1347
- data/ext/abc/src/bdd/epd/epd.h +0 -196
- data/ext/abc/src/bdd/epd/module.make +0 -1
- data/ext/abc/src/bdd/extrab/extraBdd.h +0 -317
- data/ext/abc/src/bdd/extrab/extraBddAuto.c +0 -1563
- data/ext/abc/src/bdd/extrab/extraBddCas.c +0 -1235
- data/ext/abc/src/bdd/extrab/extraBddImage.c +0 -1162
- data/ext/abc/src/bdd/extrab/extraBddKmap.c +0 -876
- data/ext/abc/src/bdd/extrab/extraBddMisc.c +0 -2591
- data/ext/abc/src/bdd/extrab/extraBddSymm.c +0 -1474
- data/ext/abc/src/bdd/extrab/extraBddThresh.c +0 -693
- data/ext/abc/src/bdd/extrab/extraBddTime.c +0 -660
- data/ext/abc/src/bdd/extrab/extraBddUnate.c +0 -646
- data/ext/abc/src/bdd/extrab/module.make +0 -9
- data/ext/abc/src/bdd/llb/llb.c +0 -52
- data/ext/abc/src/bdd/llb/llb.h +0 -96
- data/ext/abc/src/bdd/llb/llb1Cluster.c +0 -356
- data/ext/abc/src/bdd/llb/llb1Constr.c +0 -313
- data/ext/abc/src/bdd/llb/llb1Core.c +0 -222
- data/ext/abc/src/bdd/llb/llb1Group.c +0 -474
- data/ext/abc/src/bdd/llb/llb1Hint.c +0 -226
- data/ext/abc/src/bdd/llb/llb1Man.c +0 -218
- data/ext/abc/src/bdd/llb/llb1Matrix.c +0 -430
- data/ext/abc/src/bdd/llb/llb1Pivot.c +0 -254
- data/ext/abc/src/bdd/llb/llb1Reach.c +0 -904
- data/ext/abc/src/bdd/llb/llb1Sched.c +0 -257
- data/ext/abc/src/bdd/llb/llb2Bad.c +0 -138
- data/ext/abc/src/bdd/llb/llb2Core.c +0 -777
- data/ext/abc/src/bdd/llb/llb2Driver.c +0 -222
- data/ext/abc/src/bdd/llb/llb2Dump.c +0 -104
- data/ext/abc/src/bdd/llb/llb2Flow.c +0 -1376
- data/ext/abc/src/bdd/llb/llb2Image.c +0 -482
- data/ext/abc/src/bdd/llb/llb3Image.c +0 -1095
- data/ext/abc/src/bdd/llb/llb3Nonlin.c +0 -872
- data/ext/abc/src/bdd/llb/llb4Cex.c +0 -320
- data/ext/abc/src/bdd/llb/llb4Cluster.c +0 -452
- data/ext/abc/src/bdd/llb/llb4Image.c +0 -863
- data/ext/abc/src/bdd/llb/llb4Map.c +0 -123
- data/ext/abc/src/bdd/llb/llb4Nonlin.c +0 -1185
- data/ext/abc/src/bdd/llb/llb4Sweep.c +0 -589
- data/ext/abc/src/bdd/llb/llbInt.h +0 -212
- data/ext/abc/src/bdd/llb/module.make +0 -22
- data/ext/abc/src/bdd/mtr/module.make +0 -2
- data/ext/abc/src/bdd/mtr/mtr.h +0 -187
- data/ext/abc/src/bdd/mtr/mtrBasic.c +0 -453
- data/ext/abc/src/bdd/mtr/mtrGroup.c +0 -734
- data/ext/abc/src/bdd/mtr/mtrInt.h +0 -94
- data/ext/abc/src/bdd/reo/module.make +0 -8
- data/ext/abc/src/bdd/reo/reo.h +0 -234
- data/ext/abc/src/bdd/reo/reoApi.c +0 -294
- data/ext/abc/src/bdd/reo/reoCore.c +0 -441
- data/ext/abc/src/bdd/reo/reoProfile.c +0 -370
- data/ext/abc/src/bdd/reo/reoShuffle.c +0 -230
- data/ext/abc/src/bdd/reo/reoSift.c +0 -346
- data/ext/abc/src/bdd/reo/reoSwap.c +0 -905
- data/ext/abc/src/bdd/reo/reoTest.c +0 -256
- data/ext/abc/src/bdd/reo/reoTransfer.c +0 -206
- data/ext/abc/src/bdd/reo/reoUnits.c +0 -190
- data/ext/abc/src/bool/bdc/bdc.h +0 -98
- data/ext/abc/src/bool/bdc/bdcCore.c +0 -374
- data/ext/abc/src/bool/bdc/bdcDec.c +0 -751
- data/ext/abc/src/bool/bdc/bdcInt.h +0 -165
- data/ext/abc/src/bool/bdc/bdcSpfd.c +0 -1184
- data/ext/abc/src/bool/bdc/bdcTable.c +0 -134
- data/ext/abc/src/bool/bdc/bdc_.c +0 -54
- data/ext/abc/src/bool/bdc/module.make +0 -5
- data/ext/abc/src/bool/dec/dec.h +0 -725
- data/ext/abc/src/bool/dec/decAbc.c +0 -358
- data/ext/abc/src/bool/dec/decFactor.c +0 -403
- data/ext/abc/src/bool/dec/decMan.c +0 -88
- data/ext/abc/src/bool/dec/decPrint.c +0 -289
- data/ext/abc/src/bool/dec/decUtil.c +0 -148
- data/ext/abc/src/bool/dec/module.make +0 -5
- data/ext/abc/src/bool/deco/deco.h +0 -714
- data/ext/abc/src/bool/deco/module.make +0 -1
- data/ext/abc/src/bool/kit/cloud.c +0 -993
- data/ext/abc/src/bool/kit/cloud.h +0 -254
- data/ext/abc/src/bool/kit/kit.h +0 -655
- data/ext/abc/src/bool/kit/kitAig.c +0 -126
- data/ext/abc/src/bool/kit/kitBdd.c +0 -243
- data/ext/abc/src/bool/kit/kitCloud.c +0 -378
- data/ext/abc/src/bool/kit/kitDec.c +0 -343
- data/ext/abc/src/bool/kit/kitDsd.c +0 -3285
- data/ext/abc/src/bool/kit/kitFactor.c +0 -344
- data/ext/abc/src/bool/kit/kitGraph.c +0 -402
- data/ext/abc/src/bool/kit/kitHop.c +0 -200
- data/ext/abc/src/bool/kit/kitIsop.c +0 -365
- data/ext/abc/src/bool/kit/kitPerm.c +0 -357
- data/ext/abc/src/bool/kit/kitPla.c +0 -535
- data/ext/abc/src/bool/kit/kitSop.c +0 -579
- data/ext/abc/src/bool/kit/kitTruth.c +0 -2224
- data/ext/abc/src/bool/kit/kit_.c +0 -53
- data/ext/abc/src/bool/kit/module.make +0 -11
- data/ext/abc/src/bool/lucky/lucky.c +0 -705
- data/ext/abc/src/bool/lucky/lucky.h +0 -44
- data/ext/abc/src/bool/lucky/luckyFast16.c +0 -872
- data/ext/abc/src/bool/lucky/luckyFast6.c +0 -285
- data/ext/abc/src/bool/lucky/luckyInt.h +0 -136
- data/ext/abc/src/bool/lucky/luckyRead.c +0 -333
- data/ext/abc/src/bool/lucky/luckySimple.c +0 -307
- data/ext/abc/src/bool/lucky/luckySwap.c +0 -402
- data/ext/abc/src/bool/lucky/luckySwapIJ.c +0 -102
- data/ext/abc/src/bool/lucky/module.make +0 -7
- data/ext/abc/src/bool/rpo/literal.h +0 -297
- data/ext/abc/src/bool/rpo/module.make +0 -1
- data/ext/abc/src/bool/rpo/rpo.c +0 -383
- data/ext/abc/src/bool/rpo/rpo.h +0 -61
- data/ext/abc/src/bool/rsb/module.make +0 -2
- data/ext/abc/src/bool/rsb/rsb.h +0 -65
- data/ext/abc/src/bool/rsb/rsbDec6.c +0 -770
- data/ext/abc/src/bool/rsb/rsbInt.h +0 -84
- data/ext/abc/src/bool/rsb/rsbMan.c +0 -99
- data/ext/abc/src/demo.c +0 -181
- data/ext/abc/src/generic.c +0 -52
- data/ext/abc/src/generic.h +0 -63
- data/ext/abc/src/map/amap/amap.h +0 -97
- data/ext/abc/src/map/amap/amapCore.c +0 -110
- data/ext/abc/src/map/amap/amapGraph.c +0 -399
- data/ext/abc/src/map/amap/amapInt.h +0 -376
- data/ext/abc/src/map/amap/amapLib.c +0 -374
- data/ext/abc/src/map/amap/amapLiberty.c +0 -1103
- data/ext/abc/src/map/amap/amapMan.c +0 -104
- data/ext/abc/src/map/amap/amapMatch.c +0 -622
- data/ext/abc/src/map/amap/amapMerge.c +0 -541
- data/ext/abc/src/map/amap/amapOutput.c +0 -186
- data/ext/abc/src/map/amap/amapParse.c +0 -480
- data/ext/abc/src/map/amap/amapPerm.c +0 -380
- data/ext/abc/src/map/amap/amapRead.c +0 -494
- data/ext/abc/src/map/amap/amapRule.c +0 -462
- data/ext/abc/src/map/amap/amapUniq.c +0 -317
- data/ext/abc/src/map/amap/module.make +0 -13
- data/ext/abc/src/map/cov/cov.h +0 -109
- data/ext/abc/src/map/cov/covBuild.c +0 -544
- data/ext/abc/src/map/cov/covCore.c +0 -1030
- data/ext/abc/src/map/cov/covInt.h +0 -654
- data/ext/abc/src/map/cov/covMan.c +0 -149
- data/ext/abc/src/map/cov/covMinEsop.c +0 -304
- data/ext/abc/src/map/cov/covMinMan.c +0 -118
- data/ext/abc/src/map/cov/covMinSop.c +0 -620
- data/ext/abc/src/map/cov/covMinUtil.c +0 -343
- data/ext/abc/src/map/cov/covTest.c +0 -422
- data/ext/abc/src/map/cov/module.make +0 -7
- data/ext/abc/src/map/fpga/fpga.c +0 -288
- data/ext/abc/src/map/fpga/fpga.h +0 -175
- data/ext/abc/src/map/fpga/fpgaCore.c +0 -194
- data/ext/abc/src/map/fpga/fpgaCreate.c +0 -584
- data/ext/abc/src/map/fpga/fpgaCut.c +0 -1186
- data/ext/abc/src/map/fpga/fpgaCutUtils.c +0 -476
- data/ext/abc/src/map/fpga/fpgaFanout.c +0 -146
- data/ext/abc/src/map/fpga/fpgaGENERIC.c +0 -51
- data/ext/abc/src/map/fpga/fpgaInt.h +0 -389
- data/ext/abc/src/map/fpga/fpgaLib.c +0 -255
- data/ext/abc/src/map/fpga/fpgaMatch.c +0 -800
- data/ext/abc/src/map/fpga/fpgaSwitch.c +0 -156
- data/ext/abc/src/map/fpga/fpgaTime.c +0 -267
- data/ext/abc/src/map/fpga/fpgaTruth.c +0 -171
- data/ext/abc/src/map/fpga/fpgaUtils.c +0 -990
- data/ext/abc/src/map/fpga/fpgaVec.c +0 -413
- data/ext/abc/src/map/fpga/module.make +0 -13
- data/ext/abc/src/map/if/if.h +0 -689
- data/ext/abc/src/map/if/ifCache.c +0 -100
- data/ext/abc/src/map/if/ifCheck.c +0 -204
- data/ext/abc/src/map/if/ifCom.c +0 -372
- data/ext/abc/src/map/if/ifCore.c +0 -200
- data/ext/abc/src/map/if/ifCount.h +0 -521
- data/ext/abc/src/map/if/ifCut.c +0 -1479
- data/ext/abc/src/map/if/ifData2.c +0 -52
- data/ext/abc/src/map/if/ifDec07.c +0 -1125
- data/ext/abc/src/map/if/ifDec08.c +0 -507
- data/ext/abc/src/map/if/ifDec10.c +0 -506
- data/ext/abc/src/map/if/ifDec16.c +0 -2374
- data/ext/abc/src/map/if/ifDec75.c +0 -341
- data/ext/abc/src/map/if/ifDelay.c +0 -447
- data/ext/abc/src/map/if/ifDsd.c +0 -2838
- data/ext/abc/src/map/if/ifLibBox.c +0 -401
- data/ext/abc/src/map/if/ifLibLut.c +0 -505
- data/ext/abc/src/map/if/ifMan.c +0 -720
- data/ext/abc/src/map/if/ifMap.c +0 -680
- data/ext/abc/src/map/if/ifMatch2.c +0 -62
- data/ext/abc/src/map/if/ifReduce.c +0 -466
- data/ext/abc/src/map/if/ifSat.c +0 -548
- data/ext/abc/src/map/if/ifSelect.c +0 -601
- data/ext/abc/src/map/if/ifSeq.c +0 -397
- data/ext/abc/src/map/if/ifTest.c +0 -352
- data/ext/abc/src/map/if/ifTime.c +0 -525
- data/ext/abc/src/map/if/ifTruth.c +0 -339
- data/ext/abc/src/map/if/ifTune.c +0 -1452
- data/ext/abc/src/map/if/ifUtil.c +0 -632
- data/ext/abc/src/map/if/if_.c +0 -52
- data/ext/abc/src/map/if/module.make +0 -26
- data/ext/abc/src/map/mapper/mapper.c +0 -185
- data/ext/abc/src/map/mapper/mapper.h +0 -201
- data/ext/abc/src/map/mapper/mapperCanon.c +0 -277
- data/ext/abc/src/map/mapper/mapperCore.c +0 -231
- data/ext/abc/src/map/mapper/mapperCreate.c +0 -587
- data/ext/abc/src/map/mapper/mapperCut.c +0 -1178
- data/ext/abc/src/map/mapper/mapperCutUtils.c +0 -279
- data/ext/abc/src/map/mapper/mapperFanout.c +0 -146
- data/ext/abc/src/map/mapper/mapperInt.h +0 -469
- data/ext/abc/src/map/mapper/mapperLib.c +0 -258
- data/ext/abc/src/map/mapper/mapperMatch.c +0 -664
- data/ext/abc/src/map/mapper/mapperRefs.c +0 -540
- data/ext/abc/src/map/mapper/mapperSuper.c +0 -456
- data/ext/abc/src/map/mapper/mapperSwitch.c +0 -229
- data/ext/abc/src/map/mapper/mapperTable.c +0 -407
- data/ext/abc/src/map/mapper/mapperTime.c +0 -459
- data/ext/abc/src/map/mapper/mapperTree.c +0 -1042
- data/ext/abc/src/map/mapper/mapperTruth.c +0 -315
- data/ext/abc/src/map/mapper/mapperUtils.c +0 -898
- data/ext/abc/src/map/mapper/mapperVec.c +0 -344
- data/ext/abc/src/map/mapper/module.make +0 -17
- data/ext/abc/src/map/mio/exp.h +0 -343
- data/ext/abc/src/map/mio/mio.c +0 -728
- data/ext/abc/src/map/mio/mio.h +0 -242
- data/ext/abc/src/map/mio/mioApi.c +0 -254
- data/ext/abc/src/map/mio/mioForm.c +0 -307
- data/ext/abc/src/map/mio/mioFunc.c +0 -327
- data/ext/abc/src/map/mio/mioInt.h +0 -160
- data/ext/abc/src/map/mio/mioParse.c +0 -504
- data/ext/abc/src/map/mio/mioRead.c +0 -780
- data/ext/abc/src/map/mio/mioSop.c +0 -333
- data/ext/abc/src/map/mio/mioUtils.c +0 -1752
- data/ext/abc/src/map/mio/module.make +0 -7
- data/ext/abc/src/map/mpm/module.make +0 -11
- data/ext/abc/src/map/mpm/mpm.c +0 -55
- data/ext/abc/src/map/mpm/mpm.h +0 -98
- data/ext/abc/src/map/mpm/mpmAbc.c +0 -350
- data/ext/abc/src/map/mpm/mpmCore.c +0 -115
- data/ext/abc/src/map/mpm/mpmDsd.c +0 -1055
- data/ext/abc/src/map/mpm/mpmGates.c +0 -307
- data/ext/abc/src/map/mpm/mpmInt.h +0 -265
- data/ext/abc/src/map/mpm/mpmLib.c +0 -74
- data/ext/abc/src/map/mpm/mpmMan.c +0 -207
- data/ext/abc/src/map/mpm/mpmMap.c +0 -872
- data/ext/abc/src/map/mpm/mpmMig.c +0 -204
- data/ext/abc/src/map/mpm/mpmMig.h +0 -358
- data/ext/abc/src/map/mpm/mpmPre.c +0 -1029
- data/ext/abc/src/map/mpm/mpmTruth.c +0 -239
- data/ext/abc/src/map/mpm/mpmUtil.c +0 -52
- data/ext/abc/src/map/scl/module.make +0 -11
- data/ext/abc/src/map/scl/scl.c +0 -2042
- data/ext/abc/src/map/scl/scl.h +0 -58
- data/ext/abc/src/map/scl/sclBufSize.c +0 -518
- data/ext/abc/src/map/scl/sclBuffer.c +0 -1010
- data/ext/abc/src/map/scl/sclCon.h +0 -293
- data/ext/abc/src/map/scl/sclDnsize.c +0 -378
- data/ext/abc/src/map/scl/sclLib.h +0 -770
- data/ext/abc/src/map/scl/sclLibScl.c +0 -848
- data/ext/abc/src/map/scl/sclLibUtil.c +0 -1078
- data/ext/abc/src/map/scl/sclLiberty.c +0 -1697
- data/ext/abc/src/map/scl/sclLoad.c +0 -238
- data/ext/abc/src/map/scl/sclSize.c +0 -915
- data/ext/abc/src/map/scl/sclSize.h +0 -594
- data/ext/abc/src/map/scl/sclTime.h +0 -234
- data/ext/abc/src/map/scl/sclUpsize.c +0 -1045
- data/ext/abc/src/map/scl/sclUtil.c +0 -320
- data/ext/abc/src/map/super/module.make +0 -3
- data/ext/abc/src/map/super/super.c +0 -333
- data/ext/abc/src/map/super/super.h +0 -62
- data/ext/abc/src/map/super/superAnd.c +0 -701
- data/ext/abc/src/map/super/superGENERIC.c +0 -51
- data/ext/abc/src/map/super/superGate.c +0 -1473
- data/ext/abc/src/map/super/superInt.h +0 -64
- data/ext/abc/src/map/super/superWrite.c +0 -81
- data/ext/abc/src/misc/avl/avl.c +0 -621
- data/ext/abc/src/misc/avl/avl.doc +0 -166
- data/ext/abc/src/misc/avl/avl.h +0 -91
- data/ext/abc/src/misc/bar/bar.c +0 -193
- data/ext/abc/src/misc/bar/bar.h +0 -78
- data/ext/abc/src/misc/bar/module.make +0 -1
- data/ext/abc/src/misc/bbl/bblif.c +0 -1518
- data/ext/abc/src/misc/bbl/bblif.h +0 -285
- data/ext/abc/src/misc/bbl/module.make +0 -1
- data/ext/abc/src/misc/bzlib/CHANGES +0 -319
- data/ext/abc/src/misc/bzlib/LICENSE +0 -42
- data/ext/abc/src/misc/bzlib/blocksort.c +0 -1098
- data/ext/abc/src/misc/bzlib/bzip2.txt +0 -391
- data/ext/abc/src/misc/bzlib/bzlib.c +0 -1588
- data/ext/abc/src/misc/bzlib/bzlib.h +0 -287
- data/ext/abc/src/misc/bzlib/bzlib_private.h +0 -513
- data/ext/abc/src/misc/bzlib/compress.c +0 -677
- data/ext/abc/src/misc/bzlib/crctable.c +0 -109
- data/ext/abc/src/misc/bzlib/decompress.c +0 -631
- data/ext/abc/src/misc/bzlib/huffman.c +0 -210
- data/ext/abc/src/misc/bzlib/link.txt +0 -2
- data/ext/abc/src/misc/bzlib/manual.html +0 -2540
- data/ext/abc/src/misc/bzlib/module.make +0 -7
- data/ext/abc/src/misc/bzlib/randtable.c +0 -89
- data/ext/abc/src/misc/espresso/cofactor.c +0 -389
- data/ext/abc/src/misc/espresso/cols.c +0 -319
- data/ext/abc/src/misc/espresso/compl.c +0 -685
- data/ext/abc/src/misc/espresso/contain.c +0 -450
- data/ext/abc/src/misc/espresso/cubehack.c +0 -143
- data/ext/abc/src/misc/espresso/cubestr.c +0 -157
- data/ext/abc/src/misc/espresso/cvrin.c +0 -816
- data/ext/abc/src/misc/espresso/cvrm.c +0 -544
- data/ext/abc/src/misc/espresso/cvrmisc.c +0 -147
- data/ext/abc/src/misc/espresso/cvrout.c +0 -614
- data/ext/abc/src/misc/espresso/dominate.c +0 -103
- data/ext/abc/src/misc/espresso/equiv.c +0 -99
- data/ext/abc/src/misc/espresso/espresso.c +0 -144
- data/ext/abc/src/misc/espresso/espresso.h +0 -786
- data/ext/abc/src/misc/espresso/essen.c +0 -184
- data/ext/abc/src/misc/espresso/exact.c +0 -186
- data/ext/abc/src/misc/espresso/expand.c +0 -700
- data/ext/abc/src/misc/espresso/gasp.c +0 -233
- data/ext/abc/src/misc/espresso/gimpel.c +0 -112
- data/ext/abc/src/misc/espresso/globals.c +0 -81
- data/ext/abc/src/misc/espresso/hack.c +0 -646
- data/ext/abc/src/misc/espresso/indep.c +0 -139
- data/ext/abc/src/misc/espresso/irred.c +0 -445
- data/ext/abc/src/misc/espresso/main.c +0 -751
- data/ext/abc/src/misc/espresso/main.h +0 -122
- data/ext/abc/src/misc/espresso/map.c +0 -122
- data/ext/abc/src/misc/espresso/matrix.c +0 -579
- data/ext/abc/src/misc/espresso/mincov.c +0 -383
- data/ext/abc/src/misc/espresso/mincov.h +0 -11
- data/ext/abc/src/misc/espresso/mincov_int.h +0 -55
- data/ext/abc/src/misc/espresso/module.make +0 -39
- data/ext/abc/src/misc/espresso/opo.c +0 -629
- data/ext/abc/src/misc/espresso/pair.c +0 -685
- data/ext/abc/src/misc/espresso/part.c +0 -127
- data/ext/abc/src/misc/espresso/primes.c +0 -175
- data/ext/abc/src/misc/espresso/reduce.c +0 -263
- data/ext/abc/src/misc/espresso/rows.c +0 -319
- data/ext/abc/src/misc/espresso/set.c +0 -825
- data/ext/abc/src/misc/espresso/setc.c +0 -488
- data/ext/abc/src/misc/espresso/sharp.c +0 -252
- data/ext/abc/src/misc/espresso/sminterf.c +0 -49
- data/ext/abc/src/misc/espresso/solution.c +0 -119
- data/ext/abc/src/misc/espresso/sparse.c +0 -151
- data/ext/abc/src/misc/espresso/sparse.h +0 -143
- data/ext/abc/src/misc/espresso/sparse_int.h +0 -121
- data/ext/abc/src/misc/espresso/unate.c +0 -446
- data/ext/abc/src/misc/espresso/util_old.h +0 -309
- data/ext/abc/src/misc/espresso/verify.c +0 -198
- data/ext/abc/src/misc/extra/extra.h +0 -417
- data/ext/abc/src/misc/extra/extraUtilBitMatrix.c +0 -420
- data/ext/abc/src/misc/extra/extraUtilCanon.c +0 -691
- data/ext/abc/src/misc/extra/extraUtilCube.c +0 -279
- data/ext/abc/src/misc/extra/extraUtilDsd.c +0 -1271
- data/ext/abc/src/misc/extra/extraUtilEnum.c +0 -680
- data/ext/abc/src/misc/extra/extraUtilFile.c +0 -887
- data/ext/abc/src/misc/extra/extraUtilMemory.c +0 -628
- data/ext/abc/src/misc/extra/extraUtilMisc.c +0 -2580
- data/ext/abc/src/misc/extra/extraUtilPerm.c +0 -933
- data/ext/abc/src/misc/extra/extraUtilPrime.c +0 -602
- data/ext/abc/src/misc/extra/extraUtilProgress.c +0 -185
- data/ext/abc/src/misc/extra/extraUtilReader.c +0 -390
- data/ext/abc/src/misc/extra/extraUtilSupp.c +0 -532
- data/ext/abc/src/misc/extra/extraUtilTruth.c +0 -1153
- data/ext/abc/src/misc/extra/extraUtilUtil.c +0 -421
- data/ext/abc/src/misc/extra/extraZddTrunc.c +0 -338
- data/ext/abc/src/misc/extra/module.make +0 -14
- data/ext/abc/src/misc/hash/hash.h +0 -70
- data/ext/abc/src/misc/hash/hashFlt.h +0 -339
- data/ext/abc/src/misc/hash/hashGen.h +0 -367
- data/ext/abc/src/misc/hash/hashInt.h +0 -302
- data/ext/abc/src/misc/hash/hashPtr.h +0 -339
- data/ext/abc/src/misc/hash/module.make +0 -1
- data/ext/abc/src/misc/mem/mem.c +0 -605
- data/ext/abc/src/misc/mem/mem.h +0 -75
- data/ext/abc/src/misc/mem/mem2.h +0 -271
- data/ext/abc/src/misc/mem/module.make +0 -1
- data/ext/abc/src/misc/mvc/module.make +0 -15
- data/ext/abc/src/misc/mvc/mvc.c +0 -51
- data/ext/abc/src/misc/mvc/mvc.h +0 -739
- data/ext/abc/src/misc/mvc/mvcApi.c +0 -238
- data/ext/abc/src/misc/mvc/mvcCompare.c +0 -374
- data/ext/abc/src/misc/mvc/mvcContain.c +0 -178
- data/ext/abc/src/misc/mvc/mvcCover.c +0 -256
- data/ext/abc/src/misc/mvc/mvcCube.c +0 -180
- data/ext/abc/src/misc/mvc/mvcDivide.c +0 -442
- data/ext/abc/src/misc/mvc/mvcDivisor.c +0 -95
- data/ext/abc/src/misc/mvc/mvcList.c +0 -367
- data/ext/abc/src/misc/mvc/mvcLits.c +0 -350
- data/ext/abc/src/misc/mvc/mvcMan.c +0 -82
- data/ext/abc/src/misc/mvc/mvcOpAlg.c +0 -168
- data/ext/abc/src/misc/mvc/mvcOpBool.c +0 -156
- data/ext/abc/src/misc/mvc/mvcPrint.c +0 -225
- data/ext/abc/src/misc/mvc/mvcSort.c +0 -146
- data/ext/abc/src/misc/mvc/mvcUtils.c +0 -873
- data/ext/abc/src/misc/nm/module.make +0 -2
- data/ext/abc/src/misc/nm/nm.h +0 -96
- data/ext/abc/src/misc/nm/nmApi.c +0 -278
- data/ext/abc/src/misc/nm/nmInt.h +0 -94
- data/ext/abc/src/misc/nm/nmTable.c +0 -310
- data/ext/abc/src/misc/parse/module.make +0 -2
- data/ext/abc/src/misc/parse/parse.h +0 -62
- data/ext/abc/src/misc/parse/parseCore.c +0 -536
- data/ext/abc/src/misc/parse/parseEqn.c +0 -362
- data/ext/abc/src/misc/parse/parseInt.h +0 -77
- data/ext/abc/src/misc/parse/parseStack.c +0 -248
- data/ext/abc/src/misc/st/module.make +0 -2
- data/ext/abc/src/misc/st/st.c +0 -561
- data/ext/abc/src/misc/st/st.h +0 -121
- data/ext/abc/src/misc/st/stmm.c +0 -627
- data/ext/abc/src/misc/st/stmm.h +0 -147
- data/ext/abc/src/misc/tim/module.make +0 -5
- data/ext/abc/src/misc/tim/tim.c +0 -39
- data/ext/abc/src/misc/tim/tim.h +0 -184
- data/ext/abc/src/misc/tim/timBox.c +0 -326
- data/ext/abc/src/misc/tim/timDump.c +0 -201
- data/ext/abc/src/misc/tim/timInt.h +0 -148
- data/ext/abc/src/misc/tim/timMan.c +0 -807
- data/ext/abc/src/misc/tim/timTime.c +0 -267
- data/ext/abc/src/misc/tim/timTrav.c +0 -185
- data/ext/abc/src/misc/util/abc_global.h +0 -416
- data/ext/abc/src/misc/util/abc_namespaces.h +0 -58
- data/ext/abc/src/misc/util/module.make +0 -8
- data/ext/abc/src/misc/util/utilBridge.c +0 -564
- data/ext/abc/src/misc/util/utilCex.c +0 -574
- data/ext/abc/src/misc/util/utilCex.h +0 -84
- data/ext/abc/src/misc/util/utilColor.c +0 -124
- data/ext/abc/src/misc/util/utilDouble.h +0 -222
- data/ext/abc/src/misc/util/utilFile.c +0 -221
- data/ext/abc/src/misc/util/utilFloat.h +0 -226
- data/ext/abc/src/misc/util/utilIsop.c +0 -1139
- data/ext/abc/src/misc/util/utilMem.c +0 -341
- data/ext/abc/src/misc/util/utilMem.h +0 -73
- data/ext/abc/src/misc/util/utilNam.c +0 -622
- data/ext/abc/src/misc/util/utilNam.h +0 -80
- data/ext/abc/src/misc/util/utilSignal.c +0 -68
- data/ext/abc/src/misc/util/utilSignal.h +0 -58
- data/ext/abc/src/misc/util/utilSort.c +0 -789
- data/ext/abc/src/misc/util/utilTruth.h +0 -3076
- data/ext/abc/src/misc/util/util_hack.h +0 -46
- data/ext/abc/src/misc/vec/module.make +0 -1
- data/ext/abc/src/misc/vec/vec.h +0 -74
- data/ext/abc/src/misc/vec/vecAtt.h +0 -298
- data/ext/abc/src/misc/vec/vecBit.h +0 -636
- data/ext/abc/src/misc/vec/vecFlt.h +0 -826
- data/ext/abc/src/misc/vec/vecHash.h +0 -280
- data/ext/abc/src/misc/vec/vecHsh.h +0 -590
- data/ext/abc/src/misc/vec/vecInt.h +0 -2078
- data/ext/abc/src/misc/vec/vecMem.h +0 -431
- data/ext/abc/src/misc/vec/vecPtr.h +0 -1160
- data/ext/abc/src/misc/vec/vecQue.h +0 -374
- data/ext/abc/src/misc/vec/vecSet.h +0 -299
- data/ext/abc/src/misc/vec/vecStr.h +0 -1072
- data/ext/abc/src/misc/vec/vecVec.h +0 -646
- data/ext/abc/src/misc/vec/vecWec.h +0 -738
- data/ext/abc/src/misc/vec/vecWrd.h +0 -1205
- data/ext/abc/src/misc/zlib/README +0 -115
- data/ext/abc/src/misc/zlib/adler32.c +0 -168
- data/ext/abc/src/misc/zlib/algorithm.txt +0 -209
- data/ext/abc/src/misc/zlib/compress_.c +0 -76
- data/ext/abc/src/misc/zlib/crc32.c +0 -433
- data/ext/abc/src/misc/zlib/crc32.h +0 -445
- data/ext/abc/src/misc/zlib/deflate.c +0 -1784
- data/ext/abc/src/misc/zlib/deflate.h +0 -346
- data/ext/abc/src/misc/zlib/gzclose.c +0 -33
- data/ext/abc/src/misc/zlib/gzguts.h +0 -147
- data/ext/abc/src/misc/zlib/gzlib.c +0 -517
- data/ext/abc/src/misc/zlib/gzread.c +0 -641
- data/ext/abc/src/misc/zlib/gzwrite.c +0 -520
- data/ext/abc/src/misc/zlib/infback.c +0 -631
- data/ext/abc/src/misc/zlib/inffast.c +0 -351
- data/ext/abc/src/misc/zlib/inffast.h +0 -15
- data/ext/abc/src/misc/zlib/inffixed.h +0 -98
- data/ext/abc/src/misc/zlib/inflate.c +0 -1457
- data/ext/abc/src/misc/zlib/inflate.h +0 -126
- data/ext/abc/src/misc/zlib/inftrees.c +0 -337
- data/ext/abc/src/misc/zlib/inftrees.h +0 -66
- data/ext/abc/src/misc/zlib/license +0 -31
- data/ext/abc/src/misc/zlib/link.txt +0 -1
- data/ext/abc/src/misc/zlib/module.make +0 -15
- data/ext/abc/src/misc/zlib/trees.c +0 -1216
- data/ext/abc/src/misc/zlib/trees.h +0 -132
- data/ext/abc/src/misc/zlib/uncompr.c +0 -67
- data/ext/abc/src/misc/zlib/zconf.h +0 -432
- data/ext/abc/src/misc/zlib/zlib.h +0 -1619
- data/ext/abc/src/misc/zlib/zutil.c +0 -318
- data/ext/abc/src/misc/zlib/zutil.h +0 -288
- data/ext/abc/src/opt/cgt/cgt.h +0 -87
- data/ext/abc/src/opt/cgt/cgtAig.c +0 -601
- data/ext/abc/src/opt/cgt/cgtCore.c +0 -328
- data/ext/abc/src/opt/cgt/cgtDecide.c +0 -300
- data/ext/abc/src/opt/cgt/cgtInt.h +0 -123
- data/ext/abc/src/opt/cgt/cgtMan.c +0 -179
- data/ext/abc/src/opt/cgt/cgtSat.c +0 -98
- data/ext/abc/src/opt/cgt/module.make +0 -5
- data/ext/abc/src/opt/csw/csw.h +0 -69
- data/ext/abc/src/opt/csw/cswCore.c +0 -100
- data/ext/abc/src/opt/csw/cswCut.c +0 -608
- data/ext/abc/src/opt/csw/cswInt.h +0 -160
- data/ext/abc/src/opt/csw/cswMan.c +0 -130
- data/ext/abc/src/opt/csw/cswTable.c +0 -166
- data/ext/abc/src/opt/csw/csw_.c +0 -53
- data/ext/abc/src/opt/csw/module.make +0 -4
- data/ext/abc/src/opt/cut/abcCut.c +0 -498
- data/ext/abc/src/opt/cut/cut.h +0 -172
- data/ext/abc/src/opt/cut/cutApi.c +0 -202
- data/ext/abc/src/opt/cut/cutCut.c +0 -364
- data/ext/abc/src/opt/cut/cutExpand.c +0 -189
- data/ext/abc/src/opt/cut/cutInt.h +0 -165
- data/ext/abc/src/opt/cut/cutList.h +0 -215
- data/ext/abc/src/opt/cut/cutMan.c +0 -320
- data/ext/abc/src/opt/cut/cutMerge.c +0 -662
- data/ext/abc/src/opt/cut/cutNode.c +0 -1004
- data/ext/abc/src/opt/cut/cutOracle.c +0 -424
- data/ext/abc/src/opt/cut/cutPre22.c +0 -994
- data/ext/abc/src/opt/cut/cutSeq.c +0 -232
- data/ext/abc/src/opt/cut/cutTruth.c +0 -232
- data/ext/abc/src/opt/cut/module.make +0 -9
- data/ext/abc/src/opt/dar/dar.h +0 -116
- data/ext/abc/src/opt/dar/darBalance.c +0 -761
- data/ext/abc/src/opt/dar/darCore.c +0 -348
- data/ext/abc/src/opt/dar/darCut.c +0 -837
- data/ext/abc/src/opt/dar/darData.c +0 -11294
- data/ext/abc/src/opt/dar/darInt.h +0 -169
- data/ext/abc/src/opt/dar/darLib.c +0 -1341
- data/ext/abc/src/opt/dar/darMan.c +0 -174
- data/ext/abc/src/opt/dar/darPrec.c +0 -394
- data/ext/abc/src/opt/dar/darRefact.c +0 -639
- data/ext/abc/src/opt/dar/darResub.c +0 -53
- data/ext/abc/src/opt/dar/darScript.c +0 -911
- data/ext/abc/src/opt/dar/dar_.c +0 -53
- data/ext/abc/src/opt/dar/module.make +0 -9
- data/ext/abc/src/opt/dau/dau.c +0 -53
- data/ext/abc/src/opt/dau/dau.h +0 -125
- data/ext/abc/src/opt/dau/dauArray.c +0 -257
- data/ext/abc/src/opt/dau/dauCanon.c +0 -1202
- data/ext/abc/src/opt/dau/dauCore.c +0 -112
- data/ext/abc/src/opt/dau/dauDivs.c +0 -111
- data/ext/abc/src/opt/dau/dauDsd.c +0 -2098
- data/ext/abc/src/opt/dau/dauDsd2.c +0 -660
- data/ext/abc/src/opt/dau/dauEnum.c +0 -253
- data/ext/abc/src/opt/dau/dauGia.c +0 -573
- data/ext/abc/src/opt/dau/dauInt.h +0 -70
- data/ext/abc/src/opt/dau/dauMerge.c +0 -824
- data/ext/abc/src/opt/dau/dauNonDsd.c +0 -903
- data/ext/abc/src/opt/dau/dauTree.c +0 -2022
- data/ext/abc/src/opt/dau/module.make +0 -9
- data/ext/abc/src/opt/dsc/dsc.c +0 -525
- data/ext/abc/src/opt/dsc/dsc.h +0 -91
- data/ext/abc/src/opt/dsc/module.make +0 -1
- data/ext/abc/src/opt/fret/fretFlow.c +0 -700
- data/ext/abc/src/opt/fret/fretInit.c +0 -1343
- data/ext/abc/src/opt/fret/fretMain.c +0 -1383
- data/ext/abc/src/opt/fret/fretTime.c +0 -766
- data/ext/abc/src/opt/fret/fretime.h +0 -212
- data/ext/abc/src/opt/fret/module.make +0 -5
- data/ext/abc/src/opt/fsim/fsim.h +0 -101
- data/ext/abc/src/opt/fsim/fsimCore.c +0 -88
- data/ext/abc/src/opt/fsim/fsimFront.c +0 -369
- data/ext/abc/src/opt/fsim/fsimInt.h +0 -138
- data/ext/abc/src/opt/fsim/fsimMan.c +0 -212
- data/ext/abc/src/opt/fsim/fsimSim.c +0 -569
- data/ext/abc/src/opt/fsim/fsimSwitch.c +0 -40
- data/ext/abc/src/opt/fsim/fsimTsim.c +0 -416
- data/ext/abc/src/opt/fsim/module.make +0 -6
- data/ext/abc/src/opt/fxch/Fxch.c +0 -266
- data/ext/abc/src/opt/fxch/Fxch.h +0 -229
- data/ext/abc/src/opt/fxch/FxchDiv.c +0 -485
- data/ext/abc/src/opt/fxch/FxchMan.c +0 -785
- data/ext/abc/src/opt/fxch/FxchSCHashTable.c +0 -382
- data/ext/abc/src/opt/fxch/module.make +0 -4
- data/ext/abc/src/opt/fxu/fxu.c +0 -260
- data/ext/abc/src/opt/fxu/fxu.h +0 -97
- data/ext/abc/src/opt/fxu/fxuCreate.c +0 -447
- data/ext/abc/src/opt/fxu/fxuHeapD.c +0 -450
- data/ext/abc/src/opt/fxu/fxuHeapS.c +0 -449
- data/ext/abc/src/opt/fxu/fxuInt.h +0 -545
- data/ext/abc/src/opt/fxu/fxuList.c +0 -527
- data/ext/abc/src/opt/fxu/fxuMatrix.c +0 -377
- data/ext/abc/src/opt/fxu/fxuPair.c +0 -560
- data/ext/abc/src/opt/fxu/fxuPrint.c +0 -202
- data/ext/abc/src/opt/fxu/fxuReduce.c +0 -213
- data/ext/abc/src/opt/fxu/fxuSelect.c +0 -608
- data/ext/abc/src/opt/fxu/fxuSingle.c +0 -289
- data/ext/abc/src/opt/fxu/fxuUpdate.c +0 -811
- data/ext/abc/src/opt/fxu/module.make +0 -12
- data/ext/abc/src/opt/lpk/lpk.h +0 -88
- data/ext/abc/src/opt/lpk/lpkAbcDec.c +0 -294
- data/ext/abc/src/opt/lpk/lpkAbcDsd.c +0 -617
- data/ext/abc/src/opt/lpk/lpkAbcMux.c +0 -240
- data/ext/abc/src/opt/lpk/lpkAbcUtil.c +0 -249
- data/ext/abc/src/opt/lpk/lpkCore.c +0 -694
- data/ext/abc/src/opt/lpk/lpkCut.c +0 -689
- data/ext/abc/src/opt/lpk/lpkInt.h +0 -250
- data/ext/abc/src/opt/lpk/lpkMan.c +0 -127
- data/ext/abc/src/opt/lpk/lpkMap.c +0 -210
- data/ext/abc/src/opt/lpk/lpkMulti.c +0 -513
- data/ext/abc/src/opt/lpk/lpkMux.c +0 -252
- data/ext/abc/src/opt/lpk/lpkSets.c +0 -445
- data/ext/abc/src/opt/lpk/lpk_.c +0 -53
- data/ext/abc/src/opt/lpk/module.make +0 -11
- data/ext/abc/src/opt/mfs/mfs.h +0 -89
- data/ext/abc/src/opt/mfs/mfsCore.c +0 -596
- data/ext/abc/src/opt/mfs/mfsCore_.c +0 -394
- data/ext/abc/src/opt/mfs/mfsDiv.c +0 -309
- data/ext/abc/src/opt/mfs/mfsGia.c +0 -301
- data/ext/abc/src/opt/mfs/mfsInt.h +0 -192
- data/ext/abc/src/opt/mfs/mfsInter.c +0 -398
- data/ext/abc/src/opt/mfs/mfsMan.c +0 -202
- data/ext/abc/src/opt/mfs/mfsResub.c +0 -622
- data/ext/abc/src/opt/mfs/mfsResub_.c +0 -567
- data/ext/abc/src/opt/mfs/mfsSat.c +0 -182
- data/ext/abc/src/opt/mfs/mfsStrash.c +0 -406
- data/ext/abc/src/opt/mfs/mfsWin.c +0 -117
- data/ext/abc/src/opt/mfs/mfs_.c +0 -52
- data/ext/abc/src/opt/mfs/module.make +0 -8
- data/ext/abc/src/opt/nwk/module.make +0 -14
- data/ext/abc/src/opt/nwk/ntlnwk.h +0 -113
- data/ext/abc/src/opt/nwk/nwk.h +0 -307
- data/ext/abc/src/opt/nwk/nwkAig.c +0 -299
- data/ext/abc/src/opt/nwk/nwkBidec.c +0 -177
- data/ext/abc/src/opt/nwk/nwkCheck.c +0 -76
- data/ext/abc/src/opt/nwk/nwkDfs.c +0 -664
- data/ext/abc/src/opt/nwk/nwkFanio.c +0 -320
- data/ext/abc/src/opt/nwk/nwkFlow.c +0 -606
- data/ext/abc/src/opt/nwk/nwkFlow_depth.c +0 -631
- data/ext/abc/src/opt/nwk/nwkMan.c +0 -278
- data/ext/abc/src/opt/nwk/nwkMap.c +0 -396
- data/ext/abc/src/opt/nwk/nwkMerge.c +0 -1046
- data/ext/abc/src/opt/nwk/nwkMerge.h +0 -153
- data/ext/abc/src/opt/nwk/nwkObj.c +0 -204
- data/ext/abc/src/opt/nwk/nwkSpeedup.c +0 -382
- data/ext/abc/src/opt/nwk/nwkStrash.c +0 -149
- data/ext/abc/src/opt/nwk/nwkTiming.c +0 -894
- data/ext/abc/src/opt/nwk/nwkUtil.c +0 -644
- data/ext/abc/src/opt/nwk/nwk_.c +0 -52
- data/ext/abc/src/opt/res/module.make +0 -7
- data/ext/abc/src/opt/res/res.h +0 -79
- data/ext/abc/src/opt/res/resCore.c +0 -427
- data/ext/abc/src/opt/res/resDivs.c +0 -290
- data/ext/abc/src/opt/res/resFilter.c +0 -439
- data/ext/abc/src/opt/res/resInt.h +0 -141
- data/ext/abc/src/opt/res/resSat.c +0 -414
- data/ext/abc/src/opt/res/resSim.c +0 -795
- data/ext/abc/src/opt/res/resSim_old.c +0 -526
- data/ext/abc/src/opt/res/resStrash.c +0 -122
- data/ext/abc/src/opt/res/resWin.c +0 -490
- data/ext/abc/src/opt/res/res_.c +0 -55
- data/ext/abc/src/opt/ret/module.make +0 -8
- data/ext/abc/src/opt/ret/retArea.c +0 -554
- data/ext/abc/src/opt/ret/retCore.c +0 -138
- data/ext/abc/src/opt/ret/retDelay.c +0 -315
- data/ext/abc/src/opt/ret/retFlow.c +0 -789
- data/ext/abc/src/opt/ret/retIncrem.c +0 -480
- data/ext/abc/src/opt/ret/retInit.c +0 -355
- data/ext/abc/src/opt/ret/retInt.h +0 -88
- data/ext/abc/src/opt/ret/retLvalue.c +0 -402
- data/ext/abc/src/opt/ret/ret_.c +0 -53
- data/ext/abc/src/opt/rwr/module.make +0 -7
- data/ext/abc/src/opt/rwr/rwr.h +0 -173
- data/ext/abc/src/opt/rwr/rwrDec.c +0 -155
- data/ext/abc/src/opt/rwr/rwrEva.c +0 -599
- data/ext/abc/src/opt/rwr/rwrExp.c +0 -336
- data/ext/abc/src/opt/rwr/rwrLib.c +0 -367
- data/ext/abc/src/opt/rwr/rwrMan.c +0 -323
- data/ext/abc/src/opt/rwr/rwrPrint.c +0 -271
- data/ext/abc/src/opt/rwr/rwrTemp.c +0 -126
- data/ext/abc/src/opt/rwr/rwrUtil.c +0 -661
- data/ext/abc/src/opt/rwt/module.make +0 -3
- data/ext/abc/src/opt/rwt/rwt.h +0 -165
- data/ext/abc/src/opt/rwt/rwtDec.c +0 -155
- data/ext/abc/src/opt/rwt/rwtMan.c +0 -363
- data/ext/abc/src/opt/rwt/rwtUtil.c +0 -663
- data/ext/abc/src/opt/sbd/module.make +0 -9
- data/ext/abc/src/opt/sbd/sbd.c +0 -122
- data/ext/abc/src/opt/sbd/sbd.h +0 -82
- data/ext/abc/src/opt/sbd/sbdCnf.c +0 -147
- data/ext/abc/src/opt/sbd/sbdCore.c +0 -2229
- data/ext/abc/src/opt/sbd/sbdCut.c +0 -872
- data/ext/abc/src/opt/sbd/sbdCut2.c +0 -431
- data/ext/abc/src/opt/sbd/sbdInt.h +0 -125
- data/ext/abc/src/opt/sbd/sbdLut.c +0 -311
- data/ext/abc/src/opt/sbd/sbdPath.c +0 -197
- data/ext/abc/src/opt/sbd/sbdSat.c +0 -793
- data/ext/abc/src/opt/sbd/sbdSim.c +0 -310
- data/ext/abc/src/opt/sbd/sbdWin.c +0 -464
- data/ext/abc/src/opt/sfm/module.make +0 -10
- data/ext/abc/src/opt/sfm/sfm.h +0 -107
- data/ext/abc/src/opt/sfm/sfmArea.c +0 -380
- data/ext/abc/src/opt/sfm/sfmCnf.c +0 -179
- data/ext/abc/src/opt/sfm/sfmCore.c +0 -306
- data/ext/abc/src/opt/sfm/sfmDec.c +0 -2168
- data/ext/abc/src/opt/sfm/sfmInt.h +0 -254
- data/ext/abc/src/opt/sfm/sfmLib.c +0 -766
- data/ext/abc/src/opt/sfm/sfmMit.c +0 -73
- data/ext/abc/src/opt/sfm/sfmNtk.c +0 -381
- data/ext/abc/src/opt/sfm/sfmSat.c +0 -273
- data/ext/abc/src/opt/sfm/sfmTim.c +0 -458
- data/ext/abc/src/opt/sfm/sfmWin.c +0 -481
- data/ext/abc/src/opt/sim/module.make +0 -9
- data/ext/abc/src/opt/sim/sim.h +0 -237
- data/ext/abc/src/opt/sim/simMan.c +0 -293
- data/ext/abc/src/opt/sim/simSat.c +0 -53
- data/ext/abc/src/opt/sim/simSeq.c +0 -176
- data/ext/abc/src/opt/sim/simSupp.c +0 -603
- data/ext/abc/src/opt/sim/simSwitch.c +0 -112
- data/ext/abc/src/opt/sim/simSym.c +0 -148
- data/ext/abc/src/opt/sim/simSymSat.c +0 -205
- data/ext/abc/src/opt/sim/simSymSim.c +0 -178
- data/ext/abc/src/opt/sim/simSymStr.c +0 -493
- data/ext/abc/src/opt/sim/simUtils.c +0 -718
- data/ext/abc/src/phys/place/Makefile +0 -30
- data/ext/abc/src/phys/place/README +0 -50
- data/ext/abc/src/phys/place/hpwl +0 -57
- data/ext/abc/src/phys/place/libhmetis.h +0 -39
- data/ext/abc/src/phys/place/module.make +0 -10
- data/ext/abc/src/phys/place/place_base.c +0 -350
- data/ext/abc/src/phys/place/place_base.h +0 -145
- data/ext/abc/src/phys/place/place_bin.c +0 -282
- data/ext/abc/src/phys/place/place_genqp.c +0 -314
- data/ext/abc/src/phys/place/place_gordian.c +0 -165
- data/ext/abc/src/phys/place/place_gordian.h +0 -86
- data/ext/abc/src/phys/place/place_inc.c +0 -111
- data/ext/abc/src/phys/place/place_io.c +0 -99
- data/ext/abc/src/phys/place/place_legalize.c +0 -28
- data/ext/abc/src/phys/place/place_pads.c +0 -146
- data/ext/abc/src/phys/place/place_partition.c +0 -1140
- data/ext/abc/src/phys/place/place_qpsolver.c +0 -1275
- data/ext/abc/src/phys/place/place_qpsolver.h +0 -139
- data/ext/abc/src/phys/place/place_test.c +0 -365
- data/ext/abc/src/proof/abs/abs.c +0 -52
- data/ext/abc/src/proof/abs/abs.h +0 -177
- data/ext/abc/src/proof/abs/absDup.c +0 -445
- data/ext/abc/src/proof/abs/absGla.c +0 -1901
- data/ext/abc/src/proof/abs/absGlaOld.c +0 -1956
- data/ext/abc/src/proof/abs/absIter.c +0 -148
- data/ext/abc/src/proof/abs/absOldCex.c +0 -873
- data/ext/abc/src/proof/abs/absOldRef.c +0 -474
- data/ext/abc/src/proof/abs/absOldSat.c +0 -986
- data/ext/abc/src/proof/abs/absOldSim.c +0 -477
- data/ext/abc/src/proof/abs/absOut.c +0 -458
- data/ext/abc/src/proof/abs/absPth.c +0 -205
- data/ext/abc/src/proof/abs/absRef.c +0 -751
- data/ext/abc/src/proof/abs/absRef.h +0 -129
- data/ext/abc/src/proof/abs/absRefJ.c +0 -916
- data/ext/abc/src/proof/abs/absRefJ.h +0 -67
- data/ext/abc/src/proof/abs/absRefSelect.c +0 -309
- data/ext/abc/src/proof/abs/absRpm.c +0 -874
- data/ext/abc/src/proof/abs/absRpmOld.c +0 -201
- data/ext/abc/src/proof/abs/absUtil.c +0 -257
- data/ext/abc/src/proof/abs/absVta.c +0 -1764
- data/ext/abc/src/proof/abs/module.make +0 -16
- data/ext/abc/src/proof/acec/acec.c +0 -52
- data/ext/abc/src/proof/acec/acec.h +0 -98
- data/ext/abc/src/proof/acec/acec2Mult.c +0 -1211
- data/ext/abc/src/proof/acec/acecBo.c +0 -216
- data/ext/abc/src/proof/acec/acecCl.c +0 -445
- data/ext/abc/src/proof/acec/acecCo.c +0 -429
- data/ext/abc/src/proof/acec/acecCore.c +0 -553
- data/ext/abc/src/proof/acec/acecCover.c +0 -263
- data/ext/abc/src/proof/acec/acecFadds.c +0 -1247
- data/ext/abc/src/proof/acec/acecInt.h +0 -105
- data/ext/abc/src/proof/acec/acecMult.c +0 -623
- data/ext/abc/src/proof/acec/acecNorm.c +0 -226
- data/ext/abc/src/proof/acec/acecOrder.c +0 -254
- data/ext/abc/src/proof/acec/acecPa.c +0 -277
- data/ext/abc/src/proof/acec/acecPo.c +0 -655
- data/ext/abc/src/proof/acec/acecPolyn.c +0 -445
- data/ext/abc/src/proof/acec/acecPool.c +0 -428
- data/ext/abc/src/proof/acec/acecRe.c +0 -602
- data/ext/abc/src/proof/acec/acecSt.c +0 -422
- data/ext/abc/src/proof/acec/acecStruct.c +0 -271
- data/ext/abc/src/proof/acec/acecTree.c +0 -783
- data/ext/abc/src/proof/acec/acecUtil.c +0 -122
- data/ext/abc/src/proof/acec/acecXor.c +0 -434
- data/ext/abc/src/proof/acec/module.make +0 -19
- data/ext/abc/src/proof/cec/cec.c +0 -53
- data/ext/abc/src/proof/cec/cec.h +0 -240
- data/ext/abc/src/proof/cec/cecCec.c +0 -580
- data/ext/abc/src/proof/cec/cecChoice.c +0 -410
- data/ext/abc/src/proof/cec/cecClass.c +0 -931
- data/ext/abc/src/proof/cec/cecCore.c +0 -554
- data/ext/abc/src/proof/cec/cecCorr.c +0 -1229
- data/ext/abc/src/proof/cec/cecInt.h +0 -227
- data/ext/abc/src/proof/cec/cecIso.c +0 -375
- data/ext/abc/src/proof/cec/cecMan.c +0 -297
- data/ext/abc/src/proof/cec/cecPat.c +0 -578
- data/ext/abc/src/proof/cec/cecSat.c +0 -1040
- data/ext/abc/src/proof/cec/cecSatG.c +0 -1048
- data/ext/abc/src/proof/cec/cecSeq.c +0 -449
- data/ext/abc/src/proof/cec/cecSim.c +0 -53
- data/ext/abc/src/proof/cec/cecSimBack.c +0 -194
- data/ext/abc/src/proof/cec/cecSolve.c +0 -1107
- data/ext/abc/src/proof/cec/cecSplit.c +0 -849
- data/ext/abc/src/proof/cec/cecSweep.c +0 -301
- data/ext/abc/src/proof/cec/cecSynth.c +0 -433
- data/ext/abc/src/proof/cec/module.make +0 -15
- data/ext/abc/src/proof/dch/dch.h +0 -91
- data/ext/abc/src/proof/dch/dchAig.c +0 -119
- data/ext/abc/src/proof/dch/dchChoice.c +0 -552
- data/ext/abc/src/proof/dch/dchClass.c +0 -611
- data/ext/abc/src/proof/dch/dchCnf.c +0 -334
- data/ext/abc/src/proof/dch/dchCore.c +0 -161
- data/ext/abc/src/proof/dch/dchInt.h +0 -170
- data/ext/abc/src/proof/dch/dchMan.c +0 -191
- data/ext/abc/src/proof/dch/dchSat.c +0 -167
- data/ext/abc/src/proof/dch/dchSim.c +0 -297
- data/ext/abc/src/proof/dch/dchSimSat.c +0 -260
- data/ext/abc/src/proof/dch/dchSweep.c +0 -146
- data/ext/abc/src/proof/dch/module.make +0 -10
- data/ext/abc/src/proof/fra/fra.h +0 -389
- data/ext/abc/src/proof/fra/fraBmc.c +0 -453
- data/ext/abc/src/proof/fra/fraCec.c +0 -574
- data/ext/abc/src/proof/fra/fraClass.c +0 -862
- data/ext/abc/src/proof/fra/fraClau.c +0 -745
- data/ext/abc/src/proof/fra/fraClaus.c +0 -1877
- data/ext/abc/src/proof/fra/fraCnf.c +0 -289
- data/ext/abc/src/proof/fra/fraCore.c +0 -490
- data/ext/abc/src/proof/fra/fraHot.c +0 -476
- data/ext/abc/src/proof/fra/fraImp.c +0 -732
- data/ext/abc/src/proof/fra/fraInd.c +0 -712
- data/ext/abc/src/proof/fra/fraIndVer.c +0 -166
- data/ext/abc/src/proof/fra/fraLcr.c +0 -708
- data/ext/abc/src/proof/fra/fraMan.c +0 -314
- data/ext/abc/src/proof/fra/fraPart.c +0 -269
- data/ext/abc/src/proof/fra/fraSat.c +0 -571
- data/ext/abc/src/proof/fra/fraSec.c +0 -693
- data/ext/abc/src/proof/fra/fraSim.c +0 -1173
- data/ext/abc/src/proof/fra/fra_.c +0 -53
- data/ext/abc/src/proof/fra/module.make +0 -17
- data/ext/abc/src/proof/fraig/fraig.h +0 -257
- data/ext/abc/src/proof/fraig/fraigApi.c +0 -299
- data/ext/abc/src/proof/fraig/fraigCanon.c +0 -223
- data/ext/abc/src/proof/fraig/fraigChoice.c +0 -246
- data/ext/abc/src/proof/fraig/fraigFanout.c +0 -180
- data/ext/abc/src/proof/fraig/fraigFeed.c +0 -914
- data/ext/abc/src/proof/fraig/fraigInt.h +0 -436
- data/ext/abc/src/proof/fraig/fraigMan.c +0 -546
- data/ext/abc/src/proof/fraig/fraigMem.c +0 -251
- data/ext/abc/src/proof/fraig/fraigNode.c +0 -319
- data/ext/abc/src/proof/fraig/fraigPrime.c +0 -113
- data/ext/abc/src/proof/fraig/fraigSat.c +0 -1463
- data/ext/abc/src/proof/fraig/fraigTable.c +0 -664
- data/ext/abc/src/proof/fraig/fraigUtil.c +0 -1039
- data/ext/abc/src/proof/fraig/fraigVec.c +0 -550
- data/ext/abc/src/proof/fraig/module.make +0 -12
- data/ext/abc/src/proof/int/int.h +0 -96
- data/ext/abc/src/proof/int/intCheck.c +0 -305
- data/ext/abc/src/proof/int/intContain.c +0 -341
- data/ext/abc/src/proof/int/intCore.c +0 -412
- data/ext/abc/src/proof/int/intCtrex.c +0 -168
- data/ext/abc/src/proof/int/intDup.c +0 -184
- data/ext/abc/src/proof/int/intFrames.c +0 -124
- data/ext/abc/src/proof/int/intInt.h +0 -143
- data/ext/abc/src/proof/int/intInter.c +0 -145
- data/ext/abc/src/proof/int/intM114.c +0 -323
- data/ext/abc/src/proof/int/intM114p.c +0 -443
- data/ext/abc/src/proof/int/intMan.c +0 -165
- data/ext/abc/src/proof/int/intUtil.c +0 -108
- data/ext/abc/src/proof/int/module.make +0 -10
- data/ext/abc/src/proof/int2/int2.h +0 -90
- data/ext/abc/src/proof/int2/int2Bmc.c +0 -355
- data/ext/abc/src/proof/int2/int2Core.c +0 -335
- data/ext/abc/src/proof/int2/int2Int.h +0 -164
- data/ext/abc/src/proof/int2/int2Refine.c +0 -154
- data/ext/abc/src/proof/int2/int2Util.c +0 -152
- data/ext/abc/src/proof/int2/module.make +0 -4
- data/ext/abc/src/proof/live/arenaViolation.c +0 -549
- data/ext/abc/src/proof/live/combination.c +0 -463
- data/ext/abc/src/proof/live/disjunctiveMonotone.c +0 -757
- data/ext/abc/src/proof/live/kLiveConstraints.c +0 -177
- data/ext/abc/src/proof/live/kliveness.c +0 -816
- data/ext/abc/src/proof/live/liveness.c +0 -2575
- data/ext/abc/src/proof/live/liveness_sim.c +0 -849
- data/ext/abc/src/proof/live/ltl_parser.c +0 -839
- data/ext/abc/src/proof/live/module.make +0 -9
- data/ext/abc/src/proof/live/monotone.c +0 -507
- data/ext/abc/src/proof/pdr/module.make +0 -10
- data/ext/abc/src/proof/pdr/pdr.c +0 -53
- data/ext/abc/src/proof/pdr/pdr.h +0 -109
- data/ext/abc/src/proof/pdr/pdrClass.c +0 -223
- data/ext/abc/src/proof/pdr/pdrCnf.c +0 -455
- data/ext/abc/src/proof/pdr/pdrCore.c +0 -1451
- data/ext/abc/src/proof/pdr/pdrIncr.c +0 -1046
- data/ext/abc/src/proof/pdr/pdrInt.h +0 -275
- data/ext/abc/src/proof/pdr/pdrInv.c +0 -985
- data/ext/abc/src/proof/pdr/pdrMan.c +0 -549
- data/ext/abc/src/proof/pdr/pdrSat.c +0 -395
- data/ext/abc/src/proof/pdr/pdrTsim.c +0 -502
- data/ext/abc/src/proof/pdr/pdrTsim2.c +0 -550
- data/ext/abc/src/proof/pdr/pdrTsim3.c +0 -361
- data/ext/abc/src/proof/pdr/pdrUtil.c +0 -800
- data/ext/abc/src/proof/ssc/module.make +0 -5
- data/ext/abc/src/proof/ssc/ssc.h +0 -78
- data/ext/abc/src/proof/ssc/sscClass.c +0 -326
- data/ext/abc/src/proof/ssc/sscCore.c +0 -469
- data/ext/abc/src/proof/ssc/sscInt.h +0 -135
- data/ext/abc/src/proof/ssc/sscSat.c +0 -430
- data/ext/abc/src/proof/ssc/sscSim.c +0 -364
- data/ext/abc/src/proof/ssc/sscUtil.c +0 -173
- data/ext/abc/src/proof/ssw/module.make +0 -20
- data/ext/abc/src/proof/ssw/ssw.h +0 -170
- data/ext/abc/src/proof/ssw/sswAig.c +0 -258
- data/ext/abc/src/proof/ssw/sswBmc.c +0 -224
- data/ext/abc/src/proof/ssw/sswClass.c +0 -1170
- data/ext/abc/src/proof/ssw/sswCnf.c +0 -427
- data/ext/abc/src/proof/ssw/sswConstr.c +0 -718
- data/ext/abc/src/proof/ssw/sswCore.c +0 -539
- data/ext/abc/src/proof/ssw/sswDyn.c +0 -491
- data/ext/abc/src/proof/ssw/sswFilter.c +0 -493
- data/ext/abc/src/proof/ssw/sswInt.h +0 -302
- data/ext/abc/src/proof/ssw/sswIslands.c +0 -598
- data/ext/abc/src/proof/ssw/sswLcorr.c +0 -337
- data/ext/abc/src/proof/ssw/sswMan.c +0 -217
- data/ext/abc/src/proof/ssw/sswPairs.c +0 -480
- data/ext/abc/src/proof/ssw/sswPart.c +0 -140
- data/ext/abc/src/proof/ssw/sswRarity.c +0 -1385
- data/ext/abc/src/proof/ssw/sswRarity2.c +0 -518
- data/ext/abc/src/proof/ssw/sswSat.c +0 -307
- data/ext/abc/src/proof/ssw/sswSemi.c +0 -323
- data/ext/abc/src/proof/ssw/sswSim.c +0 -1406
- data/ext/abc/src/proof/ssw/sswSimSat.c +0 -124
- data/ext/abc/src/proof/ssw/sswSweep.c +0 -440
- data/ext/abc/src/proof/ssw/sswUnique.c +0 -196
- data/ext/abc/src/sat/bmc/bmc.c +0 -52
- data/ext/abc/src/sat/bmc/bmc.h +0 -205
- data/ext/abc/src/sat/bmc/bmcBCore.c +0 -273
- data/ext/abc/src/sat/bmc/bmcBmc.c +0 -377
- data/ext/abc/src/sat/bmc/bmcBmc2.c +0 -944
- data/ext/abc/src/sat/bmc/bmcBmc3.c +0 -1893
- data/ext/abc/src/sat/bmc/bmcBmcAnd.c +0 -1100
- data/ext/abc/src/sat/bmc/bmcBmcG.c +0 -455
- data/ext/abc/src/sat/bmc/bmcBmcS.c +0 -940
- data/ext/abc/src/sat/bmc/bmcBmci.c +0 -344
- data/ext/abc/src/sat/bmc/bmcCexCare.c +0 -476
- data/ext/abc/src/sat/bmc/bmcCexCut.c +0 -537
- data/ext/abc/src/sat/bmc/bmcCexDepth.c +0 -373
- data/ext/abc/src/sat/bmc/bmcCexMin1.c +0 -578
- data/ext/abc/src/sat/bmc/bmcCexMin2.c +0 -363
- data/ext/abc/src/sat/bmc/bmcCexTools.c +0 -852
- data/ext/abc/src/sat/bmc/bmcChain.c +0 -396
- data/ext/abc/src/sat/bmc/bmcClp.c +0 -1548
- data/ext/abc/src/sat/bmc/bmcEco.c +0 -312
- data/ext/abc/src/sat/bmc/bmcEnum.c +0 -223
- data/ext/abc/src/sat/bmc/bmcExpand.c +0 -172
- data/ext/abc/src/sat/bmc/bmcFault.c +0 -1710
- data/ext/abc/src/sat/bmc/bmcFx.c +0 -725
- data/ext/abc/src/sat/bmc/bmcGen.c +0 -193
- data/ext/abc/src/sat/bmc/bmcICheck.c +0 -540
- data/ext/abc/src/sat/bmc/bmcInse.c +0 -345
- data/ext/abc/src/sat/bmc/bmcLoad.c +0 -212
- data/ext/abc/src/sat/bmc/bmcMaj.c +0 -745
- data/ext/abc/src/sat/bmc/bmcMaj2.c +0 -852
- data/ext/abc/src/sat/bmc/bmcMaxi.c +0 -282
- data/ext/abc/src/sat/bmc/bmcMesh.c +0 -433
- data/ext/abc/src/sat/bmc/bmcMesh2.c +0 -449
- data/ext/abc/src/sat/bmc/bmcMulti.c +0 -296
- data/ext/abc/src/sat/bmc/bmcUnroll.c +0 -505
- data/ext/abc/src/sat/bmc/module.make +0 -31
- data/ext/abc/src/sat/bsat/license +0 -21
- data/ext/abc/src/sat/bsat/module.make +0 -14
- data/ext/abc/src/sat/bsat/satChecker.c +0 -193
- data/ext/abc/src/sat/bsat/satClause.h +0 -476
- data/ext/abc/src/sat/bsat/satInter.c +0 -1077
- data/ext/abc/src/sat/bsat/satInterA.c +0 -1090
- data/ext/abc/src/sat/bsat/satInterB.c +0 -1115
- data/ext/abc/src/sat/bsat/satInterP.c +0 -1096
- data/ext/abc/src/sat/bsat/satMem.c +0 -583
- data/ext/abc/src/sat/bsat/satMem.h +0 -85
- data/ext/abc/src/sat/bsat/satProof.c +0 -934
- data/ext/abc/src/sat/bsat/satProof2.h +0 -327
- data/ext/abc/src/sat/bsat/satSolver.c +0 -2417
- data/ext/abc/src/sat/bsat/satSolver.h +0 -639
- data/ext/abc/src/sat/bsat/satSolver2.c +0 -1998
- data/ext/abc/src/sat/bsat/satSolver2.h +0 -377
- data/ext/abc/src/sat/bsat/satSolver2i.c +0 -242
- data/ext/abc/src/sat/bsat/satSolver3.c +0 -2299
- data/ext/abc/src/sat/bsat/satSolver3.h +0 -622
- data/ext/abc/src/sat/bsat/satStore.c +0 -469
- data/ext/abc/src/sat/bsat/satStore.h +0 -158
- data/ext/abc/src/sat/bsat/satTrace.c +0 -112
- data/ext/abc/src/sat/bsat/satTruth.c +0 -299
- data/ext/abc/src/sat/bsat/satTruth.h +0 -89
- data/ext/abc/src/sat/bsat/satUtil.c +0 -358
- data/ext/abc/src/sat/bsat/satVec.h +0 -161
- data/ext/abc/src/sat/bsat2/AbcApi.cpp +0 -59
- data/ext/abc/src/sat/bsat2/Alg.h +0 -84
- data/ext/abc/src/sat/bsat2/Alloc.h +0 -131
- data/ext/abc/src/sat/bsat2/Dimacs.h +0 -89
- data/ext/abc/src/sat/bsat2/Heap.h +0 -149
- data/ext/abc/src/sat/bsat2/IntTypes.h +0 -47
- data/ext/abc/src/sat/bsat2/LICENSE +0 -21
- data/ext/abc/src/sat/bsat2/MainSat.cpp +0 -197
- data/ext/abc/src/sat/bsat2/MainSimp.cpp +0 -206
- data/ext/abc/src/sat/bsat2/Map.h +0 -193
- data/ext/abc/src/sat/bsat2/Options.cpp +0 -93
- data/ext/abc/src/sat/bsat2/Options.h +0 -387
- data/ext/abc/src/sat/bsat2/ParseUtils.h +0 -122
- data/ext/abc/src/sat/bsat2/Queue.h +0 -69
- data/ext/abc/src/sat/bsat2/README +0 -24
- data/ext/abc/src/sat/bsat2/ReleaseNotes-2.2.0.txt +0 -79
- data/ext/abc/src/sat/bsat2/SimpSolver.cpp +0 -720
- data/ext/abc/src/sat/bsat2/SimpSolver.h +0 -197
- data/ext/abc/src/sat/bsat2/Solver.cpp +0 -924
- data/ext/abc/src/sat/bsat2/Solver.h +0 -373
- data/ext/abc/src/sat/bsat2/SolverTypes.h +0 -407
- data/ext/abc/src/sat/bsat2/Sort.h +0 -98
- data/ext/abc/src/sat/bsat2/System.cpp +0 -95
- data/ext/abc/src/sat/bsat2/System.h +0 -60
- data/ext/abc/src/sat/bsat2/Vec.h +0 -130
- data/ext/abc/src/sat/bsat2/XAlloc.h +0 -45
- data/ext/abc/src/sat/bsat2/module.make +0 -7
- data/ext/abc/src/sat/bsat2/pstdint.h +0 -813
- data/ext/abc/src/sat/cnf/cnf.h +0 -202
- data/ext/abc/src/sat/cnf/cnfCore.c +0 -290
- data/ext/abc/src/sat/cnf/cnfCut.c +0 -376
- data/ext/abc/src/sat/cnf/cnfData.c +0 -4789
- data/ext/abc/src/sat/cnf/cnfFast.c +0 -697
- data/ext/abc/src/sat/cnf/cnfMan.c +0 -726
- data/ext/abc/src/sat/cnf/cnfMap.c +0 -362
- data/ext/abc/src/sat/cnf/cnfPost.c +0 -238
- data/ext/abc/src/sat/cnf/cnfUtil.c +0 -479
- data/ext/abc/src/sat/cnf/cnfWrite.c +0 -806
- data/ext/abc/src/sat/cnf/cnf_.c +0 -53
- data/ext/abc/src/sat/cnf/module.make +0 -9
- data/ext/abc/src/sat/csat/csat_apis.c +0 -778
- data/ext/abc/src/sat/csat/csat_apis.h +0 -226
- data/ext/abc/src/sat/csat/module.make +0 -1
- data/ext/abc/src/sat/glucose/AbcGlucose.cpp +0 -1372
- data/ext/abc/src/sat/glucose/AbcGlucose.h +0 -110
- data/ext/abc/src/sat/glucose/AbcGlucoseCmd.cpp +0 -144
- data/ext/abc/src/sat/glucose/Alg.h +0 -84
- data/ext/abc/src/sat/glucose/Alloc.h +0 -132
- data/ext/abc/src/sat/glucose/BoundedQueue.h +0 -110
- data/ext/abc/src/sat/glucose/Constants.h +0 -33
- data/ext/abc/src/sat/glucose/Dimacs.h +0 -89
- data/ext/abc/src/sat/glucose/Glucose.cpp +0 -1493
- data/ext/abc/src/sat/glucose/Heap.h +0 -150
- data/ext/abc/src/sat/glucose/IntTypes.h +0 -47
- data/ext/abc/src/sat/glucose/Map.h +0 -193
- data/ext/abc/src/sat/glucose/Options.cpp +0 -92
- data/ext/abc/src/sat/glucose/Options.h +0 -388
- data/ext/abc/src/sat/glucose/ParseUtils.h +0 -151
- data/ext/abc/src/sat/glucose/Queue.h +0 -69
- data/ext/abc/src/sat/glucose/SimpSolver.cpp +0 -774
- data/ext/abc/src/sat/glucose/SimpSolver.h +0 -204
- data/ext/abc/src/sat/glucose/Solver.h +0 -491
- data/ext/abc/src/sat/glucose/SolverTypes.h +0 -434
- data/ext/abc/src/sat/glucose/Sort.h +0 -98
- data/ext/abc/src/sat/glucose/System.cpp +0 -95
- data/ext/abc/src/sat/glucose/System.h +0 -60
- data/ext/abc/src/sat/glucose/Vec.h +0 -130
- data/ext/abc/src/sat/glucose/XAlloc.h +0 -47
- data/ext/abc/src/sat/glucose/module.make +0 -6
- data/ext/abc/src/sat/glucose/pstdint.h +0 -919
- data/ext/abc/src/sat/glucose/stdint.h +0 -1628
- data/ext/abc/src/sat/lsat/solver.h +0 -132
- data/ext/abc/src/sat/msat/module.make +0 -13
- data/ext/abc/src/sat/msat/msat.h +0 -168
- data/ext/abc/src/sat/msat/msatActivity.c +0 -165
- data/ext/abc/src/sat/msat/msatClause.c +0 -537
- data/ext/abc/src/sat/msat/msatClauseVec.c +0 -237
- data/ext/abc/src/sat/msat/msatInt.h +0 -295
- data/ext/abc/src/sat/msat/msatMem.c +0 -534
- data/ext/abc/src/sat/msat/msatOrderH.c +0 -415
- data/ext/abc/src/sat/msat/msatOrderJ.c +0 -477
- data/ext/abc/src/sat/msat/msatQueue.c +0 -162
- data/ext/abc/src/sat/msat/msatRead.c +0 -274
- data/ext/abc/src/sat/msat/msatSolverApi.c +0 -505
- data/ext/abc/src/sat/msat/msatSolverCore.c +0 -215
- data/ext/abc/src/sat/msat/msatSolverIo.c +0 -182
- data/ext/abc/src/sat/msat/msatSolverSearch.c +0 -634
- data/ext/abc/src/sat/msat/msatSort.c +0 -178
- data/ext/abc/src/sat/msat/msatVec.c +0 -500
- data/ext/abc/src/sat/proof/pr.c +0 -1264
- data/ext/abc/src/sat/proof/pr.h +0 -69
- data/ext/abc/src/sat/proof/stats.txt +0 -66
- data/ext/abc/src/sat/psat/m114p.h +0 -47
- data/ext/abc/src/sat/psat/m114p_types.h +0 -13
- data/ext/abc/src/sat/psat/module.make +0 -1
- data/ext/abc/src/sat/satoko/LICENSE +0 -22
- data/ext/abc/src/sat/satoko/act_clause.h +0 -43
- data/ext/abc/src/sat/satoko/act_var.h +0 -53
- data/ext/abc/src/sat/satoko/cdb.h +0 -106
- data/ext/abc/src/sat/satoko/clause.h +0 -77
- data/ext/abc/src/sat/satoko/cnf_reader.c +0 -157
- data/ext/abc/src/sat/satoko/module.make +0 -3
- data/ext/abc/src/sat/satoko/satoko.h +0 -147
- data/ext/abc/src/sat/satoko/solver.c +0 -771
- data/ext/abc/src/sat/satoko/solver.h +0 -260
- data/ext/abc/src/sat/satoko/solver_api.c +0 -669
- data/ext/abc/src/sat/satoko/types.h +0 -39
- data/ext/abc/src/sat/satoko/utils/b_queue.h +0 -81
- data/ext/abc/src/sat/satoko/utils/heap.h +0 -178
- data/ext/abc/src/sat/satoko/utils/mem.h +0 -23
- data/ext/abc/src/sat/satoko/utils/misc.h +0 -35
- data/ext/abc/src/sat/satoko/utils/sdbl.h +0 -133
- data/ext/abc/src/sat/satoko/utils/sort.h +0 -65
- data/ext/abc/src/sat/satoko/utils/vec/vec_char.h +0 -260
- data/ext/abc/src/sat/satoko/utils/vec/vec_flt.h +0 -246
- data/ext/abc/src/sat/satoko/utils/vec/vec_int.h +0 -240
- data/ext/abc/src/sat/satoko/utils/vec/vec_sdbl.h +0 -253
- data/ext/abc/src/sat/satoko/utils/vec/vec_uint.h +0 -268
- data/ext/abc/src/sat/satoko/watch_list.h +0 -203
- data/ext/abc/src/sat/xsat/license +0 -39
- data/ext/abc/src/sat/xsat/module.make +0 -3
- data/ext/abc/src/sat/xsat/xsat.h +0 -59
- data/ext/abc/src/sat/xsat/xsatBQueue.h +0 -190
- data/ext/abc/src/sat/xsat/xsatClause.h +0 -109
- data/ext/abc/src/sat/xsat/xsatCnfReader.c +0 -236
- data/ext/abc/src/sat/xsat/xsatHeap.h +0 -330
- data/ext/abc/src/sat/xsat/xsatMemory.h +0 -222
- data/ext/abc/src/sat/xsat/xsatSolver.c +0 -1003
- data/ext/abc/src/sat/xsat/xsatSolver.h +0 -248
- data/ext/abc/src/sat/xsat/xsatSolverAPI.c +0 -346
- data/ext/abc/src/sat/xsat/xsatUtils.h +0 -106
- data/ext/abc/src/sat/xsat/xsatWatchList.h +0 -269
- data/ext/abc/src/starter.c +0 -190
- data/ext/abc/src/template.c +0 -111
- data/ext/extconf.rb +0 -14
- data/ext/ruby_abc_wrapper.h +0 -13
@@ -1,3179 +0,0 @@
|
|
1
|
-
/**CFile***********************************************************************
|
2
|
-
|
3
|
-
FileName [cuddTable.c]
|
4
|
-
|
5
|
-
PackageName [cudd]
|
6
|
-
|
7
|
-
Synopsis [Unique table management functions.]
|
8
|
-
|
9
|
-
Description [External procedures included in this module:
|
10
|
-
<ul>
|
11
|
-
<li> Cudd_Prime()
|
12
|
-
</ul>
|
13
|
-
Internal procedures included in this module:
|
14
|
-
<ul>
|
15
|
-
<li> cuddAllocNode()
|
16
|
-
<li> cuddInitTable()
|
17
|
-
<li> cuddFreeTable()
|
18
|
-
<li> cuddGarbageCollect()
|
19
|
-
<li> cuddZddGetNode()
|
20
|
-
<li> cuddZddGetNodeIVO()
|
21
|
-
<li> cuddUniqueInter()
|
22
|
-
<li> cuddUniqueInterIVO()
|
23
|
-
<li> cuddUniqueInterZdd()
|
24
|
-
<li> cuddUniqueConst()
|
25
|
-
<li> cuddRehash()
|
26
|
-
<li> cuddShrinkSubtable()
|
27
|
-
<li> cuddInsertSubtables()
|
28
|
-
<li> cuddDestroySubtables()
|
29
|
-
<li> cuddResizeTableZdd()
|
30
|
-
<li> cuddSlowTableGrowth()
|
31
|
-
</ul>
|
32
|
-
Static procedures included in this module:
|
33
|
-
<ul>
|
34
|
-
<li> ddRehashZdd()
|
35
|
-
<li> ddResizeTable()
|
36
|
-
<li> cuddFindParent()
|
37
|
-
<li> cuddOrderedInsert()
|
38
|
-
<li> cuddOrderedThread()
|
39
|
-
<li> cuddRotateLeft()
|
40
|
-
<li> cuddRotateRight()
|
41
|
-
<li> cuddDoRebalance()
|
42
|
-
<li> cuddCheckCollisionOrdering()
|
43
|
-
</ul>]
|
44
|
-
|
45
|
-
SeeAlso []
|
46
|
-
|
47
|
-
Author [Fabio Somenzi]
|
48
|
-
|
49
|
-
Copyright [Copyright (c) 1995-2004, Regents of the University of Colorado
|
50
|
-
|
51
|
-
All rights reserved.
|
52
|
-
|
53
|
-
Redistribution and use in source and binary forms, with or without
|
54
|
-
modification, are permitted provided that the following conditions
|
55
|
-
are met:
|
56
|
-
|
57
|
-
Redistributions of source code must retain the above copyright
|
58
|
-
notice, this list of conditions and the following disclaimer.
|
59
|
-
|
60
|
-
Redistributions in binary form must reproduce the above copyright
|
61
|
-
notice, this list of conditions and the following disclaimer in the
|
62
|
-
documentation and/or other materials provided with the distribution.
|
63
|
-
|
64
|
-
Neither the name of the University of Colorado nor the names of its
|
65
|
-
contributors may be used to endorse or promote products derived from
|
66
|
-
this software without specific prior written permission.
|
67
|
-
|
68
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
69
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
70
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
71
|
-
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
72
|
-
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
73
|
-
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
74
|
-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
75
|
-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
76
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
77
|
-
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
78
|
-
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
79
|
-
POSSIBILITY OF SUCH DAMAGE.]
|
80
|
-
|
81
|
-
******************************************************************************/
|
82
|
-
|
83
|
-
#include "misc/util/util_hack.h"
|
84
|
-
#include "cuddInt.h"
|
85
|
-
|
86
|
-
ABC_NAMESPACE_IMPL_START
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
/*---------------------------------------------------------------------------*/
|
91
|
-
/* Constant declarations */
|
92
|
-
/*---------------------------------------------------------------------------*/
|
93
|
-
|
94
|
-
#ifndef DD_UNSORTED_FREE_LIST
|
95
|
-
#ifdef DD_RED_BLACK_FREE_LIST
|
96
|
-
/* Constants for red/black trees. */
|
97
|
-
#define DD_STACK_SIZE 128
|
98
|
-
#define DD_RED 0
|
99
|
-
#define DD_BLACK 1
|
100
|
-
#define DD_PAGE_SIZE 8192
|
101
|
-
#define DD_PAGE_MASK ~(DD_PAGE_SIZE - 1)
|
102
|
-
#endif
|
103
|
-
#endif
|
104
|
-
|
105
|
-
/*---------------------------------------------------------------------------*/
|
106
|
-
/* Stucture declarations */
|
107
|
-
/*---------------------------------------------------------------------------*/
|
108
|
-
|
109
|
-
/* This is a hack for when CUDD_VALUE_TYPE is double */
|
110
|
-
typedef union hack {
|
111
|
-
CUDD_VALUE_TYPE value;
|
112
|
-
unsigned int bits[2];
|
113
|
-
} hack;
|
114
|
-
|
115
|
-
/*---------------------------------------------------------------------------*/
|
116
|
-
/* Type declarations */
|
117
|
-
/*---------------------------------------------------------------------------*/
|
118
|
-
|
119
|
-
/*---------------------------------------------------------------------------*/
|
120
|
-
/* Variable declarations */
|
121
|
-
/*---------------------------------------------------------------------------*/
|
122
|
-
|
123
|
-
#ifndef lint
|
124
|
-
static char rcsid[] DD_UNUSED = "$Id: cuddTable.c,v 1.122 2009/02/19 16:24:28 fabio Exp $";
|
125
|
-
#endif
|
126
|
-
|
127
|
-
/*---------------------------------------------------------------------------*/
|
128
|
-
/* Macro declarations */
|
129
|
-
/*---------------------------------------------------------------------------*/
|
130
|
-
|
131
|
-
|
132
|
-
#ifndef DD_UNSORTED_FREE_LIST
|
133
|
-
#ifdef DD_RED_BLACK_FREE_LIST
|
134
|
-
/* Macros for red/black trees. */
|
135
|
-
#define DD_INSERT_COMPARE(x,y) \
|
136
|
-
(((ptruint) (x) & DD_PAGE_MASK) - ((ptruint) (y) & DD_PAGE_MASK))
|
137
|
-
#define DD_COLOR(p) ((p)->index)
|
138
|
-
#define DD_IS_BLACK(p) ((p)->index == DD_BLACK)
|
139
|
-
#define DD_IS_RED(p) ((p)->index == DD_RED)
|
140
|
-
#define DD_LEFT(p) cuddT(p)
|
141
|
-
#define DD_RIGHT(p) cuddE(p)
|
142
|
-
#define DD_NEXT(p) ((p)->next)
|
143
|
-
#endif
|
144
|
-
#endif
|
145
|
-
|
146
|
-
|
147
|
-
/**AutomaticStart*************************************************************/
|
148
|
-
|
149
|
-
/*---------------------------------------------------------------------------*/
|
150
|
-
/* Static function prototypes */
|
151
|
-
/*---------------------------------------------------------------------------*/
|
152
|
-
|
153
|
-
static void ddRehashZdd (DdManager *unique, int i);
|
154
|
-
static int ddResizeTable (DdManager *unique, int index);
|
155
|
-
static int cuddFindParent (DdManager *table, DdNode *node);
|
156
|
-
DD_INLINE static void ddFixLimits (DdManager *unique);
|
157
|
-
#ifdef DD_RED_BLACK_FREE_LIST
|
158
|
-
static void cuddOrderedInsert (DdNodePtr *root, DdNodePtr node);
|
159
|
-
static DdNode * cuddOrderedThread (DdNode *root, DdNode *list);
|
160
|
-
static void cuddRotateLeft (DdNodePtr *nodeP);
|
161
|
-
static void cuddRotateRight (DdNodePtr *nodeP);
|
162
|
-
static void cuddDoRebalance (DdNodePtr **stack, int stackN);
|
163
|
-
#endif
|
164
|
-
static void ddPatchTree (DdManager *dd, MtrNode *treenode);
|
165
|
-
#ifdef DD_DEBUG
|
166
|
-
static int cuddCheckCollisionOrdering (DdManager *unique, int i, int j);
|
167
|
-
#endif
|
168
|
-
static void ddReportRefMess (DdManager *unique, int i, const char *caller);
|
169
|
-
|
170
|
-
/**AutomaticEnd***************************************************************/
|
171
|
-
|
172
|
-
|
173
|
-
/*---------------------------------------------------------------------------*/
|
174
|
-
/* Definition of exported functions */
|
175
|
-
/*---------------------------------------------------------------------------*/
|
176
|
-
|
177
|
-
|
178
|
-
/**Function********************************************************************
|
179
|
-
|
180
|
-
Synopsis [Returns the next prime >= p.]
|
181
|
-
|
182
|
-
Description []
|
183
|
-
|
184
|
-
SideEffects [None]
|
185
|
-
|
186
|
-
******************************************************************************/
|
187
|
-
unsigned int
|
188
|
-
Cudd_Prime(
|
189
|
-
unsigned int p)
|
190
|
-
{
|
191
|
-
int i,pn;
|
192
|
-
|
193
|
-
p--;
|
194
|
-
do {
|
195
|
-
p++;
|
196
|
-
if (p&1) {
|
197
|
-
pn = 1;
|
198
|
-
i = 3;
|
199
|
-
while ((unsigned) (i * i) <= p) {
|
200
|
-
if (p % i == 0) {
|
201
|
-
pn = 0;
|
202
|
-
break;
|
203
|
-
}
|
204
|
-
i += 2;
|
205
|
-
}
|
206
|
-
} else {
|
207
|
-
pn = 0;
|
208
|
-
}
|
209
|
-
} while (!pn);
|
210
|
-
return(p);
|
211
|
-
|
212
|
-
} /* end of Cudd_Prime */
|
213
|
-
|
214
|
-
|
215
|
-
/*---------------------------------------------------------------------------*/
|
216
|
-
/* Definition of internal functions */
|
217
|
-
/*---------------------------------------------------------------------------*/
|
218
|
-
|
219
|
-
|
220
|
-
/**Function********************************************************************
|
221
|
-
|
222
|
-
Synopsis [Fast storage allocation for DdNodes in the table.]
|
223
|
-
|
224
|
-
Description [Fast storage allocation for DdNodes in the table. The
|
225
|
-
first 4 bytes of a chunk contain a pointer to the next block; the
|
226
|
-
rest contains DD_MEM_CHUNK spaces for DdNodes. Returns a pointer to
|
227
|
-
a new node if successful; NULL is memory is full.]
|
228
|
-
|
229
|
-
SideEffects [None]
|
230
|
-
|
231
|
-
SeeAlso [cuddDynamicAllocNode]
|
232
|
-
|
233
|
-
******************************************************************************/
|
234
|
-
DdNode *
|
235
|
-
cuddAllocNode(
|
236
|
-
DdManager * unique)
|
237
|
-
{
|
238
|
-
int i;
|
239
|
-
DdNodePtr *mem;
|
240
|
-
DdNode *list, *node;
|
241
|
-
extern DD_OOMFP MMoutOfMemory;
|
242
|
-
DD_OOMFP saveHandler;
|
243
|
-
|
244
|
-
if (unique->nextFree == NULL) { /* free list is empty */
|
245
|
-
/* Check for exceeded limits. */
|
246
|
-
if ((unique->keys - unique->dead) + (unique->keysZ - unique->deadZ) >
|
247
|
-
unique->maxLive) {
|
248
|
-
unique->errorCode = CUDD_TOO_MANY_NODES;
|
249
|
-
return(NULL);
|
250
|
-
}
|
251
|
-
if (unique->stash == NULL || unique->memused > unique->maxmemhard) {
|
252
|
-
(void) cuddGarbageCollect(unique,1);
|
253
|
-
mem = NULL;
|
254
|
-
}
|
255
|
-
if (unique->nextFree == NULL) {
|
256
|
-
if (unique->memused > unique->maxmemhard) {
|
257
|
-
unique->errorCode = CUDD_MAX_MEM_EXCEEDED;
|
258
|
-
return(NULL);
|
259
|
-
}
|
260
|
-
/* Try to allocate a new block. */
|
261
|
-
saveHandler = MMoutOfMemory;
|
262
|
-
MMoutOfMemory = Cudd_OutOfMem;
|
263
|
-
// mem = (DdNodePtr *) ABC_ALLOC(DdNode,DD_MEM_CHUNK + 1);
|
264
|
-
mem = (DdNodePtr *) ABC_ALLOC(DdNode,DD_MEM_CHUNK + 2);
|
265
|
-
MMoutOfMemory = saveHandler;
|
266
|
-
if (mem == NULL) {
|
267
|
-
/* No more memory: Try collecting garbage. If this succeeds,
|
268
|
-
** we end up with mem still NULL, but unique->nextFree !=
|
269
|
-
** NULL. */
|
270
|
-
if (cuddGarbageCollect(unique,1) == 0) {
|
271
|
-
/* Last resort: Free the memory stashed away, if there
|
272
|
-
** any. If this succeeeds, mem != NULL and
|
273
|
-
** unique->nextFree still NULL. */
|
274
|
-
if (unique->stash != NULL) {
|
275
|
-
ABC_FREE(unique->stash);
|
276
|
-
unique->stash = NULL;
|
277
|
-
/* Inhibit resizing of tables. */
|
278
|
-
cuddSlowTableGrowth(unique);
|
279
|
-
/* Now try again. */
|
280
|
-
// mem = (DdNodePtr *) ABC_ALLOC(DdNode,DD_MEM_CHUNK + 1);
|
281
|
-
mem = (DdNodePtr *) ABC_ALLOC(DdNode,DD_MEM_CHUNK + 2);
|
282
|
-
}
|
283
|
-
if (mem == NULL) {
|
284
|
-
/* Out of luck. Call the default handler to do
|
285
|
-
** whatever it specifies for a failed malloc.
|
286
|
-
** If this handler returns, then set error code,
|
287
|
-
** print warning, and return. */
|
288
|
-
(*MMoutOfMemory)(sizeof(DdNode)*(DD_MEM_CHUNK + 1));
|
289
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
290
|
-
#ifdef DD_VERBOSE
|
291
|
-
(void) fprintf(unique->err,
|
292
|
-
"cuddAllocNode: out of memory");
|
293
|
-
(void) fprintf(unique->err, "Memory in use = %lu\n",
|
294
|
-
unique->memused);
|
295
|
-
#endif
|
296
|
-
return(NULL);
|
297
|
-
}
|
298
|
-
}
|
299
|
-
}
|
300
|
-
if (mem != NULL) { /* successful allocation; slice memory */
|
301
|
-
ptruint offset;
|
302
|
-
unique->memused += (DD_MEM_CHUNK + 1) * sizeof(DdNode);
|
303
|
-
mem[0] = (DdNodePtr) unique->memoryList;
|
304
|
-
unique->memoryList = mem;
|
305
|
-
|
306
|
-
/* Here we rely on the fact that a DdNode is as large as 4 pointers. */
|
307
|
-
// offset = (ptruint) mem & (sizeof(DdNode) - 1);
|
308
|
-
// mem += (sizeof(DdNode) - offset) / sizeof(DdNodePtr);
|
309
|
-
// assert(((ptruint) mem & (sizeof(DdNode) - 1)) == 0);
|
310
|
-
// list = (DdNode *) mem;
|
311
|
-
offset = (ptruint) mem & (32 - 1);
|
312
|
-
mem += (32 - offset) / sizeof(DdNodePtr);
|
313
|
-
assert(((ptruint) mem & (32 - 1)) == 0);
|
314
|
-
list = (DdNode *) mem;
|
315
|
-
|
316
|
-
i = 1;
|
317
|
-
do {
|
318
|
-
list[i - 1].ref = 0;
|
319
|
-
list[i - 1].next = &list[i];
|
320
|
-
} while (++i < DD_MEM_CHUNK);
|
321
|
-
|
322
|
-
list[DD_MEM_CHUNK-1].ref = 0;
|
323
|
-
list[DD_MEM_CHUNK-1].next = NULL;
|
324
|
-
|
325
|
-
unique->nextFree = &list[0];
|
326
|
-
}
|
327
|
-
}
|
328
|
-
}
|
329
|
-
unique->allocated++;
|
330
|
-
node = unique->nextFree;
|
331
|
-
unique->nextFree = node->next;
|
332
|
-
node->Id = (unique->allocated<<4);
|
333
|
-
return(node);
|
334
|
-
|
335
|
-
} /* end of cuddAllocNode */
|
336
|
-
|
337
|
-
|
338
|
-
/**Function********************************************************************
|
339
|
-
|
340
|
-
Synopsis [Creates and initializes the unique table.]
|
341
|
-
|
342
|
-
Description [Creates and initializes the unique table. Returns a pointer
|
343
|
-
to the table if successful; NULL otherwise.]
|
344
|
-
|
345
|
-
SideEffects [None]
|
346
|
-
|
347
|
-
SeeAlso [Cudd_Init cuddFreeTable]
|
348
|
-
|
349
|
-
******************************************************************************/
|
350
|
-
DdManager *
|
351
|
-
cuddInitTable(
|
352
|
-
unsigned int numVars /* Initial number of BDD variables (and subtables) */,
|
353
|
-
unsigned int numVarsZ /* Initial number of ZDD variables (and subtables) */,
|
354
|
-
unsigned int numSlots /* Initial size of the BDD subtables */,
|
355
|
-
unsigned int looseUpTo /* Limit for fast table growth */)
|
356
|
-
{
|
357
|
-
DdManager *unique = ABC_ALLOC(DdManager,1);
|
358
|
-
int i, j;
|
359
|
-
DdNodePtr *nodelist;
|
360
|
-
DdNode *sentinel;
|
361
|
-
unsigned int slots;
|
362
|
-
int shift;
|
363
|
-
|
364
|
-
if (unique == NULL) {
|
365
|
-
return(NULL);
|
366
|
-
}
|
367
|
-
sentinel = &(unique->sentinel);
|
368
|
-
sentinel->ref = 0;
|
369
|
-
sentinel->index = 0;
|
370
|
-
cuddT(sentinel) = NULL;
|
371
|
-
cuddE(sentinel) = NULL;
|
372
|
-
sentinel->next = NULL;
|
373
|
-
unique->epsilon = DD_EPSILON;
|
374
|
-
unique->maxGrowth = DD_MAX_REORDER_GROWTH;
|
375
|
-
unique->maxGrowthAlt = 2.0 * DD_MAX_REORDER_GROWTH;
|
376
|
-
unique->reordCycle = 0; /* do not use alternate threshold */
|
377
|
-
unique->size = numVars;
|
378
|
-
unique->sizeZ = numVarsZ;
|
379
|
-
unique->maxSize = ddMax(DD_DEFAULT_RESIZE, numVars);
|
380
|
-
unique->maxSizeZ = ddMax(DD_DEFAULT_RESIZE, numVarsZ);
|
381
|
-
|
382
|
-
/* Adjust the requested number of slots to a power of 2. */
|
383
|
-
slots = 8;
|
384
|
-
while (slots < numSlots) {
|
385
|
-
slots <<= 1;
|
386
|
-
}
|
387
|
-
unique->initSlots = slots;
|
388
|
-
shift = sizeof(int) * 8 - cuddComputeFloorLog2(slots);
|
389
|
-
|
390
|
-
unique->slots = (numVars + numVarsZ + 1) * slots;
|
391
|
-
unique->keys = 0;
|
392
|
-
unique->maxLive = ~0; /* very large number */
|
393
|
-
unique->keysZ = 0;
|
394
|
-
unique->dead = 0;
|
395
|
-
unique->deadZ = 0;
|
396
|
-
unique->gcFrac = DD_GC_FRAC_HI;
|
397
|
-
unique->minDead = (unsigned) (DD_GC_FRAC_HI * (double) unique->slots);
|
398
|
-
unique->looseUpTo = looseUpTo;
|
399
|
-
unique->gcEnabled = 1;
|
400
|
-
unique->allocated = 0;
|
401
|
-
unique->reclaimed = 0;
|
402
|
-
unique->subtables = ABC_ALLOC(DdSubtable,unique->maxSize);
|
403
|
-
if (unique->subtables == NULL) {
|
404
|
-
ABC_FREE(unique);
|
405
|
-
return(NULL);
|
406
|
-
}
|
407
|
-
unique->subtableZ = ABC_ALLOC(DdSubtable,unique->maxSizeZ);
|
408
|
-
if (unique->subtableZ == NULL) {
|
409
|
-
ABC_FREE(unique->subtables);
|
410
|
-
ABC_FREE(unique);
|
411
|
-
return(NULL);
|
412
|
-
}
|
413
|
-
unique->perm = ABC_ALLOC(int,unique->maxSize);
|
414
|
-
if (unique->perm == NULL) {
|
415
|
-
ABC_FREE(unique->subtables);
|
416
|
-
ABC_FREE(unique->subtableZ);
|
417
|
-
ABC_FREE(unique);
|
418
|
-
return(NULL);
|
419
|
-
}
|
420
|
-
unique->invperm = ABC_ALLOC(int,unique->maxSize);
|
421
|
-
if (unique->invperm == NULL) {
|
422
|
-
ABC_FREE(unique->subtables);
|
423
|
-
ABC_FREE(unique->subtableZ);
|
424
|
-
ABC_FREE(unique->perm);
|
425
|
-
ABC_FREE(unique);
|
426
|
-
return(NULL);
|
427
|
-
}
|
428
|
-
unique->permZ = ABC_ALLOC(int,unique->maxSizeZ);
|
429
|
-
if (unique->permZ == NULL) {
|
430
|
-
ABC_FREE(unique->subtables);
|
431
|
-
ABC_FREE(unique->subtableZ);
|
432
|
-
ABC_FREE(unique->perm);
|
433
|
-
ABC_FREE(unique->invperm);
|
434
|
-
ABC_FREE(unique);
|
435
|
-
return(NULL);
|
436
|
-
}
|
437
|
-
unique->invpermZ = ABC_ALLOC(int,unique->maxSizeZ);
|
438
|
-
if (unique->invpermZ == NULL) {
|
439
|
-
ABC_FREE(unique->subtables);
|
440
|
-
ABC_FREE(unique->subtableZ);
|
441
|
-
ABC_FREE(unique->perm);
|
442
|
-
ABC_FREE(unique->invperm);
|
443
|
-
ABC_FREE(unique->permZ);
|
444
|
-
ABC_FREE(unique);
|
445
|
-
return(NULL);
|
446
|
-
}
|
447
|
-
unique->map = NULL;
|
448
|
-
unique->stack = ABC_ALLOC(DdNodePtr,ddMax(unique->maxSize,unique->maxSizeZ)+1);
|
449
|
-
if (unique->stack == NULL) {
|
450
|
-
ABC_FREE(unique->subtables);
|
451
|
-
ABC_FREE(unique->subtableZ);
|
452
|
-
ABC_FREE(unique->perm);
|
453
|
-
ABC_FREE(unique->invperm);
|
454
|
-
ABC_FREE(unique->permZ);
|
455
|
-
ABC_FREE(unique->invpermZ);
|
456
|
-
ABC_FREE(unique);
|
457
|
-
return(NULL);
|
458
|
-
}
|
459
|
-
unique->stack[0] = NULL; /* to suppress harmless UMR */
|
460
|
-
|
461
|
-
#ifndef DD_NO_DEATH_ROW
|
462
|
-
unique->deathRowDepth = 1 << cuddComputeFloorLog2(unique->looseUpTo >> 2);
|
463
|
-
unique->deathRow = ABC_ALLOC(DdNodePtr,unique->deathRowDepth);
|
464
|
-
if (unique->deathRow == NULL) {
|
465
|
-
ABC_FREE(unique->subtables);
|
466
|
-
ABC_FREE(unique->subtableZ);
|
467
|
-
ABC_FREE(unique->perm);
|
468
|
-
ABC_FREE(unique->invperm);
|
469
|
-
ABC_FREE(unique->permZ);
|
470
|
-
ABC_FREE(unique->invpermZ);
|
471
|
-
ABC_FREE(unique->stack);
|
472
|
-
ABC_FREE(unique);
|
473
|
-
return(NULL);
|
474
|
-
}
|
475
|
-
for (i = 0; i < unique->deathRowDepth; i++) {
|
476
|
-
unique->deathRow[i] = NULL;
|
477
|
-
}
|
478
|
-
unique->nextDead = 0;
|
479
|
-
unique->deadMask = unique->deathRowDepth - 1;
|
480
|
-
#endif
|
481
|
-
|
482
|
-
for (i = 0; (unsigned) i < numVars; i++) {
|
483
|
-
unique->subtables[i].slots = slots;
|
484
|
-
unique->subtables[i].shift = shift;
|
485
|
-
unique->subtables[i].keys = 0;
|
486
|
-
unique->subtables[i].dead = 0;
|
487
|
-
unique->subtables[i].maxKeys = slots * DD_MAX_SUBTABLE_DENSITY;
|
488
|
-
unique->subtables[i].bindVar = 0;
|
489
|
-
unique->subtables[i].varType = CUDD_VAR_PRIMARY_INPUT;
|
490
|
-
unique->subtables[i].pairIndex = 0;
|
491
|
-
unique->subtables[i].varHandled = 0;
|
492
|
-
unique->subtables[i].varToBeGrouped = CUDD_LAZY_NONE;
|
493
|
-
|
494
|
-
nodelist = unique->subtables[i].nodelist = ABC_ALLOC(DdNodePtr,slots);
|
495
|
-
if (nodelist == NULL) {
|
496
|
-
for (j = 0; j < i; j++) {
|
497
|
-
ABC_FREE(unique->subtables[j].nodelist);
|
498
|
-
}
|
499
|
-
ABC_FREE(unique->subtables);
|
500
|
-
ABC_FREE(unique->subtableZ);
|
501
|
-
ABC_FREE(unique->perm);
|
502
|
-
ABC_FREE(unique->invperm);
|
503
|
-
ABC_FREE(unique->permZ);
|
504
|
-
ABC_FREE(unique->invpermZ);
|
505
|
-
ABC_FREE(unique->stack);
|
506
|
-
ABC_FREE(unique);
|
507
|
-
return(NULL);
|
508
|
-
}
|
509
|
-
for (j = 0; (unsigned) j < slots; j++) {
|
510
|
-
nodelist[j] = sentinel;
|
511
|
-
}
|
512
|
-
unique->perm[i] = i;
|
513
|
-
unique->invperm[i] = i;
|
514
|
-
}
|
515
|
-
for (i = 0; (unsigned) i < numVarsZ; i++) {
|
516
|
-
unique->subtableZ[i].slots = slots;
|
517
|
-
unique->subtableZ[i].shift = shift;
|
518
|
-
unique->subtableZ[i].keys = 0;
|
519
|
-
unique->subtableZ[i].dead = 0;
|
520
|
-
unique->subtableZ[i].maxKeys = slots * DD_MAX_SUBTABLE_DENSITY;
|
521
|
-
nodelist = unique->subtableZ[i].nodelist = ABC_ALLOC(DdNodePtr,slots);
|
522
|
-
if (nodelist == NULL) {
|
523
|
-
for (j = 0; (unsigned) j < numVars; j++) {
|
524
|
-
ABC_FREE(unique->subtables[j].nodelist);
|
525
|
-
}
|
526
|
-
ABC_FREE(unique->subtables);
|
527
|
-
for (j = 0; j < i; j++) {
|
528
|
-
ABC_FREE(unique->subtableZ[j].nodelist);
|
529
|
-
}
|
530
|
-
ABC_FREE(unique->subtableZ);
|
531
|
-
ABC_FREE(unique->perm);
|
532
|
-
ABC_FREE(unique->invperm);
|
533
|
-
ABC_FREE(unique->permZ);
|
534
|
-
ABC_FREE(unique->invpermZ);
|
535
|
-
ABC_FREE(unique->stack);
|
536
|
-
ABC_FREE(unique);
|
537
|
-
return(NULL);
|
538
|
-
}
|
539
|
-
for (j = 0; (unsigned) j < slots; j++) {
|
540
|
-
nodelist[j] = NULL;
|
541
|
-
}
|
542
|
-
unique->permZ[i] = i;
|
543
|
-
unique->invpermZ[i] = i;
|
544
|
-
}
|
545
|
-
unique->constants.slots = slots;
|
546
|
-
unique->constants.shift = shift;
|
547
|
-
unique->constants.keys = 0;
|
548
|
-
unique->constants.dead = 0;
|
549
|
-
unique->constants.maxKeys = slots * DD_MAX_SUBTABLE_DENSITY;
|
550
|
-
nodelist = unique->constants.nodelist = ABC_ALLOC(DdNodePtr,slots);
|
551
|
-
if (nodelist == NULL) {
|
552
|
-
for (j = 0; (unsigned) j < numVars; j++) {
|
553
|
-
ABC_FREE(unique->subtables[j].nodelist);
|
554
|
-
}
|
555
|
-
ABC_FREE(unique->subtables);
|
556
|
-
for (j = 0; (unsigned) j < numVarsZ; j++) {
|
557
|
-
ABC_FREE(unique->subtableZ[j].nodelist);
|
558
|
-
}
|
559
|
-
ABC_FREE(unique->subtableZ);
|
560
|
-
ABC_FREE(unique->perm);
|
561
|
-
ABC_FREE(unique->invperm);
|
562
|
-
ABC_FREE(unique->permZ);
|
563
|
-
ABC_FREE(unique->invpermZ);
|
564
|
-
ABC_FREE(unique->stack);
|
565
|
-
ABC_FREE(unique);
|
566
|
-
return(NULL);
|
567
|
-
}
|
568
|
-
for (j = 0; (unsigned) j < slots; j++) {
|
569
|
-
nodelist[j] = NULL;
|
570
|
-
}
|
571
|
-
|
572
|
-
unique->memoryList = NULL;
|
573
|
-
unique->nextFree = NULL;
|
574
|
-
|
575
|
-
unique->memused = sizeof(DdManager) + (unique->maxSize + unique->maxSizeZ)
|
576
|
-
* (sizeof(DdSubtable) + 2 * sizeof(int)) + (numVars + 1) *
|
577
|
-
slots * sizeof(DdNodePtr) +
|
578
|
-
(ddMax(unique->maxSize,unique->maxSizeZ) + 1) * sizeof(DdNodePtr);
|
579
|
-
#ifndef DD_NO_DEATH_ROW
|
580
|
-
unique->memused += unique->deathRowDepth * sizeof(DdNodePtr);
|
581
|
-
#endif
|
582
|
-
|
583
|
-
/* Initialize fields concerned with automatic dynamic reordering */
|
584
|
-
unique->reorderings = 0;
|
585
|
-
unique->autoDyn = 0; /* initially disabled */
|
586
|
-
unique->autoDynZ = 0; /* initially disabled */
|
587
|
-
unique->realign = 0; /* initially disabled */
|
588
|
-
unique->realignZ = 0; /* initially disabled */
|
589
|
-
unique->reordered = 0;
|
590
|
-
unique->autoMethod = CUDD_REORDER_SIFT;
|
591
|
-
unique->autoMethodZ = CUDD_REORDER_SIFT;
|
592
|
-
unique->nextDyn = DD_FIRST_REORDER;
|
593
|
-
unique->countDead = ~0;
|
594
|
-
unique->siftMaxVar = DD_SIFT_MAX_VAR;
|
595
|
-
unique->siftMaxSwap = DD_SIFT_MAX_SWAPS;
|
596
|
-
unique->tree = NULL;
|
597
|
-
unique->treeZ = NULL;
|
598
|
-
unique->groupcheck = CUDD_GROUP_CHECK7;
|
599
|
-
unique->recomb = DD_DEFAULT_RECOMB;
|
600
|
-
unique->symmviolation = 0;
|
601
|
-
unique->arcviolation = 0;
|
602
|
-
unique->populationSize = 0;
|
603
|
-
unique->numberXovers = 0;
|
604
|
-
unique->linear = NULL;
|
605
|
-
unique->linearSize = 0;
|
606
|
-
|
607
|
-
/* Initialize ZDD universe. */
|
608
|
-
unique->univ = (DdNodePtr *)NULL;
|
609
|
-
|
610
|
-
/* Initialize auxiliary fields. */
|
611
|
-
unique->localCaches = NULL;
|
612
|
-
unique->preGCHook = NULL;
|
613
|
-
unique->postGCHook = NULL;
|
614
|
-
unique->preReorderingHook = NULL;
|
615
|
-
unique->postReorderingHook = NULL;
|
616
|
-
unique->out = stdout;
|
617
|
-
unique->err = stderr;
|
618
|
-
unique->errorCode = CUDD_NO_ERROR;
|
619
|
-
|
620
|
-
/* Initialize statistical counters. */
|
621
|
-
unique->maxmemhard = ~ 0UL;
|
622
|
-
unique->garbageCollections = 0;
|
623
|
-
unique->GCTime = 0;
|
624
|
-
unique->reordTime = 0;
|
625
|
-
#ifdef DD_STATS
|
626
|
-
unique->nodesDropped = 0;
|
627
|
-
unique->nodesFreed = 0;
|
628
|
-
#endif
|
629
|
-
unique->peakLiveNodes = 0;
|
630
|
-
#ifdef DD_UNIQUE_PROFILE
|
631
|
-
unique->uniqueLookUps = 0;
|
632
|
-
unique->uniqueLinks = 0;
|
633
|
-
#endif
|
634
|
-
#ifdef DD_COUNT
|
635
|
-
unique->recursiveCalls = 0;
|
636
|
-
unique->swapSteps = 0;
|
637
|
-
#ifdef DD_STATS
|
638
|
-
unique->nextSample = 250000;
|
639
|
-
#endif
|
640
|
-
#endif
|
641
|
-
|
642
|
-
return(unique);
|
643
|
-
|
644
|
-
} /* end of cuddInitTable */
|
645
|
-
|
646
|
-
|
647
|
-
/**Function********************************************************************
|
648
|
-
|
649
|
-
Synopsis [Frees the resources associated to a unique table.]
|
650
|
-
|
651
|
-
Description []
|
652
|
-
|
653
|
-
SideEffects [None]
|
654
|
-
|
655
|
-
SeeAlso [cuddInitTable]
|
656
|
-
|
657
|
-
******************************************************************************/
|
658
|
-
void
|
659
|
-
cuddFreeTable(
|
660
|
-
DdManager * unique)
|
661
|
-
{
|
662
|
-
DdNodePtr *next;
|
663
|
-
DdNodePtr *memlist = unique->memoryList;
|
664
|
-
int i;
|
665
|
-
|
666
|
-
if (unique->univ != NULL) cuddZddFreeUniv(unique);
|
667
|
-
while (memlist != NULL) {
|
668
|
-
next = (DdNodePtr *) memlist[0]; /* link to next block */
|
669
|
-
ABC_FREE(memlist);
|
670
|
-
memlist = next;
|
671
|
-
}
|
672
|
-
unique->nextFree = NULL;
|
673
|
-
unique->memoryList = NULL;
|
674
|
-
|
675
|
-
for (i = 0; i < unique->size; i++) {
|
676
|
-
ABC_FREE(unique->subtables[i].nodelist);
|
677
|
-
}
|
678
|
-
for (i = 0; i < unique->sizeZ; i++) {
|
679
|
-
ABC_FREE(unique->subtableZ[i].nodelist);
|
680
|
-
}
|
681
|
-
ABC_FREE(unique->constants.nodelist);
|
682
|
-
ABC_FREE(unique->subtables);
|
683
|
-
ABC_FREE(unique->subtableZ);
|
684
|
-
ABC_FREE(unique->acache);
|
685
|
-
ABC_FREE(unique->perm);
|
686
|
-
ABC_FREE(unique->permZ);
|
687
|
-
ABC_FREE(unique->invperm);
|
688
|
-
ABC_FREE(unique->invpermZ);
|
689
|
-
ABC_FREE(unique->vars);
|
690
|
-
if (unique->map != NULL) ABC_FREE(unique->map);
|
691
|
-
ABC_FREE(unique->stack);
|
692
|
-
#ifndef DD_NO_DEATH_ROW
|
693
|
-
ABC_FREE(unique->deathRow);
|
694
|
-
#endif
|
695
|
-
if (unique->tree != NULL) Mtr_FreeTree(unique->tree);
|
696
|
-
if (unique->treeZ != NULL) Mtr_FreeTree(unique->treeZ);
|
697
|
-
if (unique->linear != NULL) ABC_FREE(unique->linear);
|
698
|
-
while (unique->preGCHook != NULL)
|
699
|
-
Cudd_RemoveHook(unique,unique->preGCHook->f,CUDD_PRE_GC_HOOK);
|
700
|
-
while (unique->postGCHook != NULL)
|
701
|
-
Cudd_RemoveHook(unique,unique->postGCHook->f,CUDD_POST_GC_HOOK);
|
702
|
-
while (unique->preReorderingHook != NULL)
|
703
|
-
Cudd_RemoveHook(unique,unique->preReorderingHook->f,
|
704
|
-
CUDD_PRE_REORDERING_HOOK);
|
705
|
-
while (unique->postReorderingHook != NULL)
|
706
|
-
Cudd_RemoveHook(unique,unique->postReorderingHook->f,
|
707
|
-
CUDD_POST_REORDERING_HOOK);
|
708
|
-
ABC_FREE(unique);
|
709
|
-
|
710
|
-
} /* end of cuddFreeTable */
|
711
|
-
|
712
|
-
|
713
|
-
/**Function********************************************************************
|
714
|
-
|
715
|
-
Synopsis [Performs garbage collection on the unique tables.]
|
716
|
-
|
717
|
-
Description [Performs garbage collection on the BDD and ZDD unique tables.
|
718
|
-
If clearCache is 0, the cache is not cleared. This should only be
|
719
|
-
specified if the cache has been cleared right before calling
|
720
|
-
cuddGarbageCollect. (As in the case of dynamic reordering.)
|
721
|
-
Returns the total number of deleted nodes.]
|
722
|
-
|
723
|
-
SideEffects [None]
|
724
|
-
|
725
|
-
SeeAlso []
|
726
|
-
|
727
|
-
******************************************************************************/
|
728
|
-
int
|
729
|
-
cuddGarbageCollect(
|
730
|
-
DdManager * unique,
|
731
|
-
int clearCache)
|
732
|
-
{
|
733
|
-
DdHook *hook;
|
734
|
-
DdCache *cache = unique->cache;
|
735
|
-
DdNode *sentinel = &(unique->sentinel);
|
736
|
-
DdNodePtr *nodelist;
|
737
|
-
int i, j, deleted, totalDeleted, totalDeletedZ;
|
738
|
-
DdCache *c;
|
739
|
-
DdNode *node,*next;
|
740
|
-
DdNodePtr *lastP;
|
741
|
-
int slots;
|
742
|
-
long localTime;
|
743
|
-
#ifndef DD_UNSORTED_FREE_LIST
|
744
|
-
#ifdef DD_RED_BLACK_FREE_LIST
|
745
|
-
DdNodePtr tree;
|
746
|
-
#else
|
747
|
-
DdNodePtr *memListTrav, *nxtNode;
|
748
|
-
DdNode *downTrav, *sentry;
|
749
|
-
int k;
|
750
|
-
#endif
|
751
|
-
#endif
|
752
|
-
|
753
|
-
#ifndef DD_NO_DEATH_ROW
|
754
|
-
cuddClearDeathRow(unique);
|
755
|
-
#endif
|
756
|
-
|
757
|
-
hook = unique->preGCHook;
|
758
|
-
while (hook != NULL) {
|
759
|
-
int res = (hook->f)(unique,"DD",NULL);
|
760
|
-
if (res == 0) return(0);
|
761
|
-
hook = hook->next;
|
762
|
-
}
|
763
|
-
|
764
|
-
if (unique->dead + unique->deadZ == 0) {
|
765
|
-
hook = unique->postGCHook;
|
766
|
-
while (hook != NULL) {
|
767
|
-
int res = (hook->f)(unique,"DD",NULL);
|
768
|
-
if (res == 0) return(0);
|
769
|
-
hook = hook->next;
|
770
|
-
}
|
771
|
-
return(0);
|
772
|
-
}
|
773
|
-
|
774
|
-
/* If many nodes are being reclaimed, we want to resize the tables
|
775
|
-
** more aggressively, to reduce the frequency of garbage collection.
|
776
|
-
*/
|
777
|
-
if (clearCache && unique->gcFrac == DD_GC_FRAC_LO &&
|
778
|
-
unique->slots <= unique->looseUpTo && unique->stash != NULL) {
|
779
|
-
unique->minDead = (unsigned) (DD_GC_FRAC_HI * (double) unique->slots);
|
780
|
-
#ifdef DD_VERBOSE
|
781
|
-
(void) fprintf(unique->err,"GC fraction = %.2f\t", DD_GC_FRAC_HI);
|
782
|
-
(void) fprintf(unique->err,"minDead = %d\n", unique->minDead);
|
783
|
-
#endif
|
784
|
-
unique->gcFrac = DD_GC_FRAC_HI;
|
785
|
-
return(0);
|
786
|
-
}
|
787
|
-
|
788
|
-
localTime = util_cpu_time();
|
789
|
-
|
790
|
-
unique->garbageCollections++;
|
791
|
-
#ifdef DD_VERBOSE
|
792
|
-
(void) fprintf(unique->err,
|
793
|
-
"garbage collecting (%d dead BDD nodes out of %d, min %d)...",
|
794
|
-
unique->dead, unique->keys, unique->minDead);
|
795
|
-
(void) fprintf(unique->err,
|
796
|
-
" (%d dead ZDD nodes out of %d)...",
|
797
|
-
unique->deadZ, unique->keysZ);
|
798
|
-
#endif
|
799
|
-
|
800
|
-
/* Remove references to garbage collected nodes from the cache. */
|
801
|
-
if (clearCache) {
|
802
|
-
slots = unique->cacheSlots;
|
803
|
-
for (i = 0; i < slots; i++) {
|
804
|
-
c = &cache[i];
|
805
|
-
if (c->data != NULL) {
|
806
|
-
if (cuddClean(c->f)->ref == 0 ||
|
807
|
-
cuddClean(c->g)->ref == 0 ||
|
808
|
-
(((ptruint)c->f & 0x2) && Cudd_Regular(c->h)->ref == 0) ||
|
809
|
-
(c->data != DD_NON_CONSTANT &&
|
810
|
-
Cudd_Regular(c->data)->ref == 0)) {
|
811
|
-
c->data = NULL;
|
812
|
-
unique->cachedeletions++;
|
813
|
-
}
|
814
|
-
}
|
815
|
-
}
|
816
|
-
cuddLocalCacheClearDead(unique);
|
817
|
-
}
|
818
|
-
|
819
|
-
/* Now return dead nodes to free list. Count them for sanity check. */
|
820
|
-
totalDeleted = 0;
|
821
|
-
#ifndef DD_UNSORTED_FREE_LIST
|
822
|
-
#ifdef DD_RED_BLACK_FREE_LIST
|
823
|
-
tree = NULL;
|
824
|
-
#endif
|
825
|
-
#endif
|
826
|
-
|
827
|
-
for (i = 0; i < unique->size; i++) {
|
828
|
-
if (unique->subtables[i].dead == 0) continue;
|
829
|
-
nodelist = unique->subtables[i].nodelist;
|
830
|
-
|
831
|
-
deleted = 0;
|
832
|
-
slots = unique->subtables[i].slots;
|
833
|
-
for (j = 0; j < slots; j++) {
|
834
|
-
lastP = &(nodelist[j]);
|
835
|
-
node = *lastP;
|
836
|
-
while (node != sentinel) {
|
837
|
-
next = node->next;
|
838
|
-
if (node->ref == 0) {
|
839
|
-
deleted++;
|
840
|
-
#ifndef DD_UNSORTED_FREE_LIST
|
841
|
-
#ifdef DD_RED_BLACK_FREE_LIST
|
842
|
-
#ifdef __osf__
|
843
|
-
#pragma pointer_size save
|
844
|
-
#pragma pointer_size short
|
845
|
-
#endif
|
846
|
-
cuddOrderedInsert(&tree,node);
|
847
|
-
#ifdef __osf__
|
848
|
-
#pragma pointer_size restore
|
849
|
-
#endif
|
850
|
-
#endif
|
851
|
-
#else
|
852
|
-
cuddDeallocNode(unique,node);
|
853
|
-
#endif
|
854
|
-
} else {
|
855
|
-
*lastP = node;
|
856
|
-
lastP = &(node->next);
|
857
|
-
}
|
858
|
-
node = next;
|
859
|
-
}
|
860
|
-
*lastP = sentinel;
|
861
|
-
}
|
862
|
-
if ((unsigned) deleted != unique->subtables[i].dead) {
|
863
|
-
ddReportRefMess(unique, i, "cuddGarbageCollect");
|
864
|
-
}
|
865
|
-
totalDeleted += deleted;
|
866
|
-
unique->subtables[i].keys -= deleted;
|
867
|
-
unique->subtables[i].dead = 0;
|
868
|
-
}
|
869
|
-
if (unique->constants.dead != 0) {
|
870
|
-
nodelist = unique->constants.nodelist;
|
871
|
-
deleted = 0;
|
872
|
-
slots = unique->constants.slots;
|
873
|
-
for (j = 0; j < slots; j++) {
|
874
|
-
lastP = &(nodelist[j]);
|
875
|
-
node = *lastP;
|
876
|
-
while (node != NULL) {
|
877
|
-
next = node->next;
|
878
|
-
if (node->ref == 0) {
|
879
|
-
deleted++;
|
880
|
-
#ifndef DD_UNSORTED_FREE_LIST
|
881
|
-
#ifdef DD_RED_BLACK_FREE_LIST
|
882
|
-
#ifdef __osf__
|
883
|
-
#pragma pointer_size save
|
884
|
-
#pragma pointer_size short
|
885
|
-
#endif
|
886
|
-
cuddOrderedInsert(&tree,node);
|
887
|
-
#ifdef __osf__
|
888
|
-
#pragma pointer_size restore
|
889
|
-
#endif
|
890
|
-
#endif
|
891
|
-
#else
|
892
|
-
cuddDeallocNode(unique,node);
|
893
|
-
#endif
|
894
|
-
} else {
|
895
|
-
*lastP = node;
|
896
|
-
lastP = &(node->next);
|
897
|
-
}
|
898
|
-
node = next;
|
899
|
-
}
|
900
|
-
*lastP = NULL;
|
901
|
-
}
|
902
|
-
if ((unsigned) deleted != unique->constants.dead) {
|
903
|
-
ddReportRefMess(unique, CUDD_CONST_INDEX, "cuddGarbageCollect");
|
904
|
-
}
|
905
|
-
totalDeleted += deleted;
|
906
|
-
unique->constants.keys -= deleted;
|
907
|
-
unique->constants.dead = 0;
|
908
|
-
}
|
909
|
-
if ((unsigned) totalDeleted != unique->dead) {
|
910
|
-
ddReportRefMess(unique, -1, "cuddGarbageCollect");
|
911
|
-
}
|
912
|
-
unique->keys -= totalDeleted;
|
913
|
-
unique->dead = 0;
|
914
|
-
#ifdef DD_STATS
|
915
|
-
unique->nodesFreed += (double) totalDeleted;
|
916
|
-
#endif
|
917
|
-
|
918
|
-
totalDeletedZ = 0;
|
919
|
-
|
920
|
-
for (i = 0; i < unique->sizeZ; i++) {
|
921
|
-
if (unique->subtableZ[i].dead == 0) continue;
|
922
|
-
nodelist = unique->subtableZ[i].nodelist;
|
923
|
-
|
924
|
-
deleted = 0;
|
925
|
-
slots = unique->subtableZ[i].slots;
|
926
|
-
for (j = 0; j < slots; j++) {
|
927
|
-
lastP = &(nodelist[j]);
|
928
|
-
node = *lastP;
|
929
|
-
while (node != NULL) {
|
930
|
-
next = node->next;
|
931
|
-
if (node->ref == 0) {
|
932
|
-
deleted++;
|
933
|
-
#ifndef DD_UNSORTED_FREE_LIST
|
934
|
-
#ifdef DD_RED_BLACK_FREE_LIST
|
935
|
-
#ifdef __osf__
|
936
|
-
#pragma pointer_size save
|
937
|
-
#pragma pointer_size short
|
938
|
-
#endif
|
939
|
-
cuddOrderedInsert(&tree,node);
|
940
|
-
#ifdef __osf__
|
941
|
-
#pragma pointer_size restore
|
942
|
-
#endif
|
943
|
-
#endif
|
944
|
-
#else
|
945
|
-
cuddDeallocNode(unique,node);
|
946
|
-
#endif
|
947
|
-
} else {
|
948
|
-
*lastP = node;
|
949
|
-
lastP = &(node->next);
|
950
|
-
}
|
951
|
-
node = next;
|
952
|
-
}
|
953
|
-
*lastP = NULL;
|
954
|
-
}
|
955
|
-
if ((unsigned) deleted != unique->subtableZ[i].dead) {
|
956
|
-
ddReportRefMess(unique, i, "cuddGarbageCollect");
|
957
|
-
}
|
958
|
-
totalDeletedZ += deleted;
|
959
|
-
unique->subtableZ[i].keys -= deleted;
|
960
|
-
unique->subtableZ[i].dead = 0;
|
961
|
-
}
|
962
|
-
|
963
|
-
/* No need to examine the constant table for ZDDs.
|
964
|
-
** If we did we should be careful not to count whatever dead
|
965
|
-
** nodes we found there among the dead ZDD nodes. */
|
966
|
-
if ((unsigned) totalDeletedZ != unique->deadZ) {
|
967
|
-
ddReportRefMess(unique, -1, "cuddGarbageCollect");
|
968
|
-
}
|
969
|
-
unique->keysZ -= totalDeletedZ;
|
970
|
-
unique->deadZ = 0;
|
971
|
-
#ifdef DD_STATS
|
972
|
-
unique->nodesFreed += (double) totalDeletedZ;
|
973
|
-
#endif
|
974
|
-
|
975
|
-
|
976
|
-
#ifndef DD_UNSORTED_FREE_LIST
|
977
|
-
#ifdef DD_RED_BLACK_FREE_LIST
|
978
|
-
unique->nextFree = cuddOrderedThread(tree,unique->nextFree);
|
979
|
-
#else
|
980
|
-
memListTrav = unique->memoryList;
|
981
|
-
sentry = NULL;
|
982
|
-
while (memListTrav != NULL) {
|
983
|
-
ptruint offset;
|
984
|
-
nxtNode = (DdNodePtr *)memListTrav[0];
|
985
|
-
// offset = (ptruint) memListTrav & (sizeof(DdNode) - 1);
|
986
|
-
// memListTrav += (sizeof(DdNode) - offset) / sizeof(DdNodePtr);
|
987
|
-
offset = (ptruint) memListTrav & (32 - 1);
|
988
|
-
memListTrav += (32 - offset) / sizeof(DdNodePtr);
|
989
|
-
|
990
|
-
downTrav = (DdNode *)memListTrav;
|
991
|
-
k = 0;
|
992
|
-
do {
|
993
|
-
if (downTrav[k].ref == 0) {
|
994
|
-
if (sentry == NULL) {
|
995
|
-
unique->nextFree = sentry = &downTrav[k];
|
996
|
-
} else {
|
997
|
-
/* First hook sentry->next to the dead node and then
|
998
|
-
** reassign sentry to the dead node. */
|
999
|
-
sentry = (sentry->next = &downTrav[k]);
|
1000
|
-
}
|
1001
|
-
}
|
1002
|
-
} while (++k < DD_MEM_CHUNK);
|
1003
|
-
memListTrav = nxtNode;
|
1004
|
-
}
|
1005
|
-
sentry->next = NULL;
|
1006
|
-
#endif
|
1007
|
-
#endif
|
1008
|
-
|
1009
|
-
unique->GCTime += util_cpu_time() - localTime;
|
1010
|
-
|
1011
|
-
hook = unique->postGCHook;
|
1012
|
-
while (hook != NULL) {
|
1013
|
-
int res = (hook->f)(unique,"DD",NULL);
|
1014
|
-
if (res == 0) return(0);
|
1015
|
-
hook = hook->next;
|
1016
|
-
}
|
1017
|
-
|
1018
|
-
#ifdef DD_VERBOSE
|
1019
|
-
(void) fprintf(unique->err," done\n");
|
1020
|
-
#endif
|
1021
|
-
|
1022
|
-
return(totalDeleted+totalDeletedZ);
|
1023
|
-
|
1024
|
-
} /* end of cuddGarbageCollect */
|
1025
|
-
|
1026
|
-
|
1027
|
-
/**Function********************************************************************
|
1028
|
-
|
1029
|
-
Synopsis [Wrapper for cuddUniqueInterZdd.]
|
1030
|
-
|
1031
|
-
Description [Wrapper for cuddUniqueInterZdd, which applies the ZDD
|
1032
|
-
reduction rule. Returns a pointer to the result node under normal
|
1033
|
-
conditions; NULL if reordering occurred or memory was exhausted.]
|
1034
|
-
|
1035
|
-
SideEffects [None]
|
1036
|
-
|
1037
|
-
SeeAlso [cuddUniqueInterZdd]
|
1038
|
-
|
1039
|
-
******************************************************************************/
|
1040
|
-
DdNode *
|
1041
|
-
cuddZddGetNode(
|
1042
|
-
DdManager * zdd,
|
1043
|
-
int id,
|
1044
|
-
DdNode * T,
|
1045
|
-
DdNode * E)
|
1046
|
-
{
|
1047
|
-
DdNode *node;
|
1048
|
-
|
1049
|
-
if (T == DD_ZERO(zdd))
|
1050
|
-
return(E);
|
1051
|
-
node = cuddUniqueInterZdd(zdd, id, T, E);
|
1052
|
-
return(node);
|
1053
|
-
|
1054
|
-
} /* end of cuddZddGetNode */
|
1055
|
-
|
1056
|
-
|
1057
|
-
/**Function********************************************************************
|
1058
|
-
|
1059
|
-
Synopsis [Wrapper for cuddUniqueInterZdd that is independent of variable
|
1060
|
-
ordering.]
|
1061
|
-
|
1062
|
-
Description [Wrapper for cuddUniqueInterZdd that is independent of
|
1063
|
-
variable ordering (IVO). This function does not require parameter
|
1064
|
-
index to precede the indices of the top nodes of g and h in the
|
1065
|
-
variable order. Returns a pointer to the result node under normal
|
1066
|
-
conditions; NULL if reordering occurred or memory was exhausted.]
|
1067
|
-
|
1068
|
-
SideEffects [None]
|
1069
|
-
|
1070
|
-
SeeAlso [cuddZddGetNode cuddZddIsop]
|
1071
|
-
|
1072
|
-
******************************************************************************/
|
1073
|
-
DdNode *
|
1074
|
-
cuddZddGetNodeIVO(
|
1075
|
-
DdManager * dd,
|
1076
|
-
int index,
|
1077
|
-
DdNode * g,
|
1078
|
-
DdNode * h)
|
1079
|
-
{
|
1080
|
-
DdNode *f, *r, *t;
|
1081
|
-
DdNode *zdd_one = DD_ONE(dd);
|
1082
|
-
DdNode *zdd_zero = DD_ZERO(dd);
|
1083
|
-
|
1084
|
-
f = cuddUniqueInterZdd(dd, index, zdd_one, zdd_zero);
|
1085
|
-
if (f == NULL) {
|
1086
|
-
return(NULL);
|
1087
|
-
}
|
1088
|
-
cuddRef(f);
|
1089
|
-
t = cuddZddProduct(dd, f, g);
|
1090
|
-
if (t == NULL) {
|
1091
|
-
Cudd_RecursiveDerefZdd(dd, f);
|
1092
|
-
return(NULL);
|
1093
|
-
}
|
1094
|
-
cuddRef(t);
|
1095
|
-
Cudd_RecursiveDerefZdd(dd, f);
|
1096
|
-
r = cuddZddUnion(dd, t, h);
|
1097
|
-
if (r == NULL) {
|
1098
|
-
Cudd_RecursiveDerefZdd(dd, t);
|
1099
|
-
return(NULL);
|
1100
|
-
}
|
1101
|
-
cuddRef(r);
|
1102
|
-
Cudd_RecursiveDerefZdd(dd, t);
|
1103
|
-
|
1104
|
-
cuddDeref(r);
|
1105
|
-
return(r);
|
1106
|
-
|
1107
|
-
} /* end of cuddZddGetNodeIVO */
|
1108
|
-
|
1109
|
-
|
1110
|
-
/**Function********************************************************************
|
1111
|
-
|
1112
|
-
Synopsis [Checks the unique table for the existence of an internal node.]
|
1113
|
-
|
1114
|
-
Description [Checks the unique table for the existence of an internal
|
1115
|
-
node. If it does not exist, it creates a new one. Does not
|
1116
|
-
modify the reference count of whatever is returned. A newly created
|
1117
|
-
internal node comes back with a reference count 0. For a newly
|
1118
|
-
created node, increments the reference counts of what T and E point
|
1119
|
-
to. Returns a pointer to the new node if successful; NULL if memory
|
1120
|
-
is exhausted or if reordering took place.]
|
1121
|
-
|
1122
|
-
SideEffects [None]
|
1123
|
-
|
1124
|
-
SeeAlso [cuddUniqueInterZdd]
|
1125
|
-
|
1126
|
-
******************************************************************************/
|
1127
|
-
DdNode *
|
1128
|
-
cuddUniqueInter(
|
1129
|
-
DdManager * unique,
|
1130
|
-
int index,
|
1131
|
-
DdNode * T,
|
1132
|
-
DdNode * E)
|
1133
|
-
{
|
1134
|
-
int pos;
|
1135
|
-
unsigned int level;
|
1136
|
-
int retval;
|
1137
|
-
DdNodePtr *nodelist;
|
1138
|
-
DdNode *looking;
|
1139
|
-
DdNodePtr *previousP;
|
1140
|
-
DdSubtable *subtable;
|
1141
|
-
int gcNumber;
|
1142
|
-
|
1143
|
-
#ifdef DD_UNIQUE_PROFILE
|
1144
|
-
unique->uniqueLookUps++;
|
1145
|
-
#endif
|
1146
|
-
|
1147
|
-
if (index >= unique->size) {
|
1148
|
-
if (!ddResizeTable(unique,index)) return(NULL);
|
1149
|
-
}
|
1150
|
-
|
1151
|
-
level = unique->perm[index];
|
1152
|
-
subtable = &(unique->subtables[level]);
|
1153
|
-
|
1154
|
-
#ifdef DD_DEBUG
|
1155
|
-
assert(level < (unsigned) cuddI(unique,T->index));
|
1156
|
-
assert(level < (unsigned) cuddI(unique,Cudd_Regular(E)->index));
|
1157
|
-
#endif
|
1158
|
-
|
1159
|
-
pos = ddHash(cuddF2L(T), cuddF2L(E), subtable->shift);
|
1160
|
-
nodelist = subtable->nodelist;
|
1161
|
-
previousP = &(nodelist[pos]);
|
1162
|
-
looking = *previousP;
|
1163
|
-
|
1164
|
-
while (T < cuddT(looking)) {
|
1165
|
-
previousP = &(looking->next);
|
1166
|
-
looking = *previousP;
|
1167
|
-
#ifdef DD_UNIQUE_PROFILE
|
1168
|
-
unique->uniqueLinks++;
|
1169
|
-
#endif
|
1170
|
-
}
|
1171
|
-
while (T == cuddT(looking) && E < cuddE(looking)) {
|
1172
|
-
previousP = &(looking->next);
|
1173
|
-
looking = *previousP;
|
1174
|
-
#ifdef DD_UNIQUE_PROFILE
|
1175
|
-
unique->uniqueLinks++;
|
1176
|
-
#endif
|
1177
|
-
}
|
1178
|
-
if (T == cuddT(looking) && E == cuddE(looking)) {
|
1179
|
-
if (looking->ref == 0) {
|
1180
|
-
cuddReclaim(unique,looking);
|
1181
|
-
}
|
1182
|
-
return(looking);
|
1183
|
-
}
|
1184
|
-
|
1185
|
-
/* countDead is 0 if deads should be counted and ~0 if they should not. */
|
1186
|
-
if (unique->autoDyn &&
|
1187
|
-
unique->keys - (unique->dead & unique->countDead) >= unique->nextDyn) {
|
1188
|
-
#ifdef DD_DEBUG
|
1189
|
-
retval = Cudd_DebugCheck(unique);
|
1190
|
-
if (retval != 0) return(NULL);
|
1191
|
-
retval = Cudd_CheckKeys(unique);
|
1192
|
-
if (retval != 0) return(NULL);
|
1193
|
-
#endif
|
1194
|
-
retval = Cudd_ReduceHeap(unique,unique->autoMethod,10); /* 10 = whatever */
|
1195
|
-
if (retval == 0) unique->reordered = 2;
|
1196
|
-
#ifdef DD_DEBUG
|
1197
|
-
retval = Cudd_DebugCheck(unique);
|
1198
|
-
if (retval != 0) unique->reordered = 2;
|
1199
|
-
retval = Cudd_CheckKeys(unique);
|
1200
|
-
if (retval != 0) unique->reordered = 2;
|
1201
|
-
#endif
|
1202
|
-
return(NULL);
|
1203
|
-
}
|
1204
|
-
|
1205
|
-
if (subtable->keys > subtable->maxKeys) {
|
1206
|
-
if (unique->gcEnabled &&
|
1207
|
-
((unique->dead > unique->minDead) ||
|
1208
|
-
((unique->dead > unique->minDead / 2) &&
|
1209
|
-
(subtable->dead > subtable->keys * 0.95)))) { /* too many dead */
|
1210
|
-
(void) cuddGarbageCollect(unique,1);
|
1211
|
-
} else {
|
1212
|
-
cuddRehash(unique,(int)level);
|
1213
|
-
}
|
1214
|
-
/* Update pointer to insertion point. In the case of rehashing,
|
1215
|
-
** the slot may have changed. In the case of garbage collection,
|
1216
|
-
** the predecessor may have been dead. */
|
1217
|
-
pos = ddHash(cuddF2L(T), cuddF2L(E), subtable->shift);
|
1218
|
-
nodelist = subtable->nodelist;
|
1219
|
-
previousP = &(nodelist[pos]);
|
1220
|
-
looking = *previousP;
|
1221
|
-
|
1222
|
-
while (T < cuddT(looking)) {
|
1223
|
-
previousP = &(looking->next);
|
1224
|
-
looking = *previousP;
|
1225
|
-
#ifdef DD_UNIQUE_PROFILE
|
1226
|
-
unique->uniqueLinks++;
|
1227
|
-
#endif
|
1228
|
-
}
|
1229
|
-
while (T == cuddT(looking) && E < cuddE(looking)) {
|
1230
|
-
previousP = &(looking->next);
|
1231
|
-
looking = *previousP;
|
1232
|
-
#ifdef DD_UNIQUE_PROFILE
|
1233
|
-
unique->uniqueLinks++;
|
1234
|
-
#endif
|
1235
|
-
}
|
1236
|
-
}
|
1237
|
-
|
1238
|
-
gcNumber = unique->garbageCollections;
|
1239
|
-
looking = cuddAllocNode(unique);
|
1240
|
-
if (looking == NULL) {
|
1241
|
-
return(NULL);
|
1242
|
-
}
|
1243
|
-
unique->keys++;
|
1244
|
-
subtable->keys++;
|
1245
|
-
|
1246
|
-
if (gcNumber != unique->garbageCollections) {
|
1247
|
-
DdNode *looking2;
|
1248
|
-
pos = ddHash(cuddF2L(T), cuddF2L(E), subtable->shift);
|
1249
|
-
nodelist = subtable->nodelist;
|
1250
|
-
previousP = &(nodelist[pos]);
|
1251
|
-
looking2 = *previousP;
|
1252
|
-
|
1253
|
-
while (T < cuddT(looking2)) {
|
1254
|
-
previousP = &(looking2->next);
|
1255
|
-
looking2 = *previousP;
|
1256
|
-
#ifdef DD_UNIQUE_PROFILE
|
1257
|
-
unique->uniqueLinks++;
|
1258
|
-
#endif
|
1259
|
-
}
|
1260
|
-
while (T == cuddT(looking2) && E < cuddE(looking2)) {
|
1261
|
-
previousP = &(looking2->next);
|
1262
|
-
looking2 = *previousP;
|
1263
|
-
#ifdef DD_UNIQUE_PROFILE
|
1264
|
-
unique->uniqueLinks++;
|
1265
|
-
#endif
|
1266
|
-
}
|
1267
|
-
}
|
1268
|
-
looking->index = index;
|
1269
|
-
cuddT(looking) = T;
|
1270
|
-
cuddE(looking) = E;
|
1271
|
-
looking->next = *previousP;
|
1272
|
-
*previousP = looking;
|
1273
|
-
cuddSatInc(T->ref); /* we know T is a regular pointer */
|
1274
|
-
cuddRef(E);
|
1275
|
-
|
1276
|
-
#ifdef DD_DEBUG
|
1277
|
-
cuddCheckCollisionOrdering(unique,level,pos);
|
1278
|
-
#endif
|
1279
|
-
|
1280
|
-
// assert( Cudd_Regular(T)->Id < 100000000 );
|
1281
|
-
// assert( Cudd_Regular(E)->Id < 100000000 );
|
1282
|
-
return(looking);
|
1283
|
-
|
1284
|
-
} /* end of cuddUniqueInter */
|
1285
|
-
|
1286
|
-
|
1287
|
-
/**Function********************************************************************
|
1288
|
-
|
1289
|
-
Synopsis [Wrapper for cuddUniqueInter that is independent of variable
|
1290
|
-
ordering.]
|
1291
|
-
|
1292
|
-
Description [Wrapper for cuddUniqueInter that is independent of
|
1293
|
-
variable ordering (IVO). This function does not require parameter
|
1294
|
-
index to precede the indices of the top nodes of T and E in the
|
1295
|
-
variable order. Returns a pointer to the result node under normal
|
1296
|
-
conditions; NULL if reordering occurred or memory was exhausted.]
|
1297
|
-
|
1298
|
-
SideEffects [None]
|
1299
|
-
|
1300
|
-
SeeAlso [cuddUniqueInter Cudd_MakeBddFromZddCover]
|
1301
|
-
|
1302
|
-
******************************************************************************/
|
1303
|
-
DdNode *
|
1304
|
-
cuddUniqueInterIVO(
|
1305
|
-
DdManager * unique,
|
1306
|
-
int index,
|
1307
|
-
DdNode * T,
|
1308
|
-
DdNode * E)
|
1309
|
-
{
|
1310
|
-
DdNode *result;
|
1311
|
-
DdNode *v;
|
1312
|
-
|
1313
|
-
v = cuddUniqueInter(unique, index, DD_ONE(unique),
|
1314
|
-
Cudd_Not(DD_ONE(unique)));
|
1315
|
-
if (v == NULL)
|
1316
|
-
return(NULL);
|
1317
|
-
cuddRef(v);
|
1318
|
-
result = cuddBddIteRecur(unique, v, T, E);
|
1319
|
-
Cudd_RecursiveDeref(unique, v);
|
1320
|
-
return(result);
|
1321
|
-
}
|
1322
|
-
|
1323
|
-
|
1324
|
-
/**Function********************************************************************
|
1325
|
-
|
1326
|
-
Synopsis [Checks the unique table for the existence of an internal
|
1327
|
-
ZDD node.]
|
1328
|
-
|
1329
|
-
Description [Checks the unique table for the existence of an internal
|
1330
|
-
ZDD node. If it does not exist, it creates a new one. Does not
|
1331
|
-
modify the reference count of whatever is returned. A newly created
|
1332
|
-
internal node comes back with a reference count 0. For a newly
|
1333
|
-
created node, increments the reference counts of what T and E point
|
1334
|
-
to. Returns a pointer to the new node if successful; NULL if memory
|
1335
|
-
is exhausted or if reordering took place.]
|
1336
|
-
|
1337
|
-
SideEffects [None]
|
1338
|
-
|
1339
|
-
SeeAlso [cuddUniqueInter]
|
1340
|
-
|
1341
|
-
******************************************************************************/
|
1342
|
-
DdNode *
|
1343
|
-
cuddUniqueInterZdd(
|
1344
|
-
DdManager * unique,
|
1345
|
-
int index,
|
1346
|
-
DdNode * T,
|
1347
|
-
DdNode * E)
|
1348
|
-
{
|
1349
|
-
int pos;
|
1350
|
-
unsigned int level;
|
1351
|
-
int retval;
|
1352
|
-
DdNodePtr *nodelist;
|
1353
|
-
DdNode *looking;
|
1354
|
-
DdSubtable *subtable;
|
1355
|
-
|
1356
|
-
#ifdef DD_UNIQUE_PROFILE
|
1357
|
-
unique->uniqueLookUps++;
|
1358
|
-
#endif
|
1359
|
-
|
1360
|
-
if (index >= unique->sizeZ) {
|
1361
|
-
if (!cuddResizeTableZdd(unique,index)) return(NULL);
|
1362
|
-
}
|
1363
|
-
|
1364
|
-
level = unique->permZ[index];
|
1365
|
-
subtable = &(unique->subtableZ[level]);
|
1366
|
-
|
1367
|
-
#ifdef DD_DEBUG
|
1368
|
-
assert(level < (unsigned) cuddIZ(unique,T->index));
|
1369
|
-
assert(level < (unsigned) cuddIZ(unique,Cudd_Regular(E)->index));
|
1370
|
-
#endif
|
1371
|
-
|
1372
|
-
if (subtable->keys > subtable->maxKeys) {
|
1373
|
-
if (unique->gcEnabled && ((unique->deadZ > unique->minDead) ||
|
1374
|
-
(10 * subtable->dead > 9 * subtable->keys))) { /* too many dead */
|
1375
|
-
(void) cuddGarbageCollect(unique,1);
|
1376
|
-
} else {
|
1377
|
-
ddRehashZdd(unique,(int)level);
|
1378
|
-
}
|
1379
|
-
}
|
1380
|
-
|
1381
|
-
pos = ddHash(cuddF2L(T), cuddF2L(E), subtable->shift);
|
1382
|
-
nodelist = subtable->nodelist;
|
1383
|
-
looking = nodelist[pos];
|
1384
|
-
|
1385
|
-
while (looking != NULL) {
|
1386
|
-
if (cuddT(looking) == T && cuddE(looking) == E) {
|
1387
|
-
if (looking->ref == 0) {
|
1388
|
-
cuddReclaimZdd(unique,looking);
|
1389
|
-
}
|
1390
|
-
return(looking);
|
1391
|
-
}
|
1392
|
-
looking = looking->next;
|
1393
|
-
#ifdef DD_UNIQUE_PROFILE
|
1394
|
-
unique->uniqueLinks++;
|
1395
|
-
#endif
|
1396
|
-
}
|
1397
|
-
|
1398
|
-
/* countDead is 0 if deads should be counted and ~0 if they should not. */
|
1399
|
-
if (unique->autoDynZ &&
|
1400
|
-
unique->keysZ - (unique->deadZ & unique->countDead) >= unique->nextDyn) {
|
1401
|
-
#ifdef DD_DEBUG
|
1402
|
-
retval = Cudd_DebugCheck(unique);
|
1403
|
-
if (retval != 0) return(NULL);
|
1404
|
-
retval = Cudd_CheckKeys(unique);
|
1405
|
-
if (retval != 0) return(NULL);
|
1406
|
-
#endif
|
1407
|
-
retval = Cudd_zddReduceHeap(unique,unique->autoMethodZ,10); /* 10 = whatever */
|
1408
|
-
if (retval == 0) unique->reordered = 2;
|
1409
|
-
#ifdef DD_DEBUG
|
1410
|
-
retval = Cudd_DebugCheck(unique);
|
1411
|
-
if (retval != 0) unique->reordered = 2;
|
1412
|
-
retval = Cudd_CheckKeys(unique);
|
1413
|
-
if (retval != 0) unique->reordered = 2;
|
1414
|
-
#endif
|
1415
|
-
return(NULL);
|
1416
|
-
}
|
1417
|
-
|
1418
|
-
unique->keysZ++;
|
1419
|
-
subtable->keys++;
|
1420
|
-
|
1421
|
-
looking = cuddAllocNode(unique);
|
1422
|
-
if (looking == NULL) return(NULL);
|
1423
|
-
looking->index = index;
|
1424
|
-
cuddT(looking) = T;
|
1425
|
-
cuddE(looking) = E;
|
1426
|
-
looking->next = nodelist[pos];
|
1427
|
-
nodelist[pos] = looking;
|
1428
|
-
cuddRef(T);
|
1429
|
-
cuddRef(E);
|
1430
|
-
|
1431
|
-
return(looking);
|
1432
|
-
|
1433
|
-
} /* end of cuddUniqueInterZdd */
|
1434
|
-
|
1435
|
-
|
1436
|
-
/**Function********************************************************************
|
1437
|
-
|
1438
|
-
Synopsis [Checks the unique table for the existence of a constant node.]
|
1439
|
-
|
1440
|
-
Description [Checks the unique table for the existence of a constant node.
|
1441
|
-
If it does not exist, it creates a new one. Does not
|
1442
|
-
modify the reference count of whatever is returned. A newly created
|
1443
|
-
internal node comes back with a reference count 0. Returns a
|
1444
|
-
pointer to the new node.]
|
1445
|
-
|
1446
|
-
SideEffects [None]
|
1447
|
-
|
1448
|
-
******************************************************************************/
|
1449
|
-
DdNode *
|
1450
|
-
cuddUniqueConst(
|
1451
|
-
DdManager * unique,
|
1452
|
-
CUDD_VALUE_TYPE value)
|
1453
|
-
{
|
1454
|
-
int pos;
|
1455
|
-
DdNodePtr *nodelist;
|
1456
|
-
DdNode *looking;
|
1457
|
-
hack split;
|
1458
|
-
|
1459
|
-
#ifdef DD_UNIQUE_PROFILE
|
1460
|
-
unique->uniqueLookUps++;
|
1461
|
-
#endif
|
1462
|
-
|
1463
|
-
if (unique->constants.keys > unique->constants.maxKeys) {
|
1464
|
-
if (unique->gcEnabled && ((unique->dead > unique->minDead) ||
|
1465
|
-
(10 * unique->constants.dead > 9 * unique->constants.keys))) { /* too many dead */
|
1466
|
-
(void) cuddGarbageCollect(unique,1);
|
1467
|
-
} else {
|
1468
|
-
cuddRehash(unique,CUDD_CONST_INDEX);
|
1469
|
-
}
|
1470
|
-
}
|
1471
|
-
|
1472
|
-
cuddAdjust(value); /* for the case of crippled infinities */
|
1473
|
-
|
1474
|
-
if (ddAbs(value) < unique->epsilon) {
|
1475
|
-
value = 0.0;
|
1476
|
-
}
|
1477
|
-
split.value = value;
|
1478
|
-
|
1479
|
-
pos = ddHash(split.bits[0], split.bits[1], unique->constants.shift);
|
1480
|
-
nodelist = unique->constants.nodelist;
|
1481
|
-
looking = nodelist[pos];
|
1482
|
-
|
1483
|
-
/* Here we compare values both for equality and for difference less
|
1484
|
-
* than epsilon. The first comparison is required when values are
|
1485
|
-
* infinite, since Infinity - Infinity is NaN and NaN < X is 0 for
|
1486
|
-
* every X.
|
1487
|
-
*/
|
1488
|
-
while (looking != NULL) {
|
1489
|
-
if (looking->type.value == value ||
|
1490
|
-
ddEqualVal(looking->type.value,value,unique->epsilon)) {
|
1491
|
-
if (looking->ref == 0) {
|
1492
|
-
cuddReclaim(unique,looking);
|
1493
|
-
}
|
1494
|
-
return(looking);
|
1495
|
-
}
|
1496
|
-
looking = looking->next;
|
1497
|
-
#ifdef DD_UNIQUE_PROFILE
|
1498
|
-
unique->uniqueLinks++;
|
1499
|
-
#endif
|
1500
|
-
}
|
1501
|
-
|
1502
|
-
unique->keys++;
|
1503
|
-
unique->constants.keys++;
|
1504
|
-
|
1505
|
-
looking = cuddAllocNode(unique);
|
1506
|
-
if (looking == NULL) return(NULL);
|
1507
|
-
looking->index = CUDD_CONST_INDEX;
|
1508
|
-
looking->type.value = value;
|
1509
|
-
looking->next = nodelist[pos];
|
1510
|
-
nodelist[pos] = looking;
|
1511
|
-
|
1512
|
-
return(looking);
|
1513
|
-
|
1514
|
-
} /* end of cuddUniqueConst */
|
1515
|
-
|
1516
|
-
|
1517
|
-
/**Function********************************************************************
|
1518
|
-
|
1519
|
-
Synopsis [Rehashes a unique subtable.]
|
1520
|
-
|
1521
|
-
Description [Doubles the size of a unique subtable and rehashes its
|
1522
|
-
contents.]
|
1523
|
-
|
1524
|
-
SideEffects [None]
|
1525
|
-
|
1526
|
-
SeeAlso []
|
1527
|
-
|
1528
|
-
******************************************************************************/
|
1529
|
-
void
|
1530
|
-
cuddRehash(
|
1531
|
-
DdManager * unique,
|
1532
|
-
int i)
|
1533
|
-
{
|
1534
|
-
unsigned int slots, oldslots;
|
1535
|
-
int shift, oldshift;
|
1536
|
-
int j, pos;
|
1537
|
-
DdNodePtr *nodelist, *oldnodelist;
|
1538
|
-
DdNode *node, *next;
|
1539
|
-
DdNode *sentinel = &(unique->sentinel);
|
1540
|
-
hack split;
|
1541
|
-
extern DD_OOMFP MMoutOfMemory;
|
1542
|
-
DD_OOMFP saveHandler;
|
1543
|
-
|
1544
|
-
if (unique->gcFrac == DD_GC_FRAC_HI && unique->slots > unique->looseUpTo) {
|
1545
|
-
unique->gcFrac = DD_GC_FRAC_LO;
|
1546
|
-
unique->minDead = (unsigned) (DD_GC_FRAC_LO * (double) unique->slots);
|
1547
|
-
#ifdef DD_VERBOSE
|
1548
|
-
(void) fprintf(unique->err,"GC fraction = %.2f\t", DD_GC_FRAC_LO);
|
1549
|
-
(void) fprintf(unique->err,"minDead = %d\n", unique->minDead);
|
1550
|
-
#endif
|
1551
|
-
}
|
1552
|
-
|
1553
|
-
if (unique->gcFrac != DD_GC_FRAC_MIN && unique->memused > unique->maxmem) {
|
1554
|
-
unique->gcFrac = DD_GC_FRAC_MIN;
|
1555
|
-
unique->minDead = (unsigned) (DD_GC_FRAC_MIN * (double) unique->slots);
|
1556
|
-
#ifdef DD_VERBOSE
|
1557
|
-
(void) fprintf(unique->err,"GC fraction = %.2f\t", DD_GC_FRAC_MIN);
|
1558
|
-
(void) fprintf(unique->err,"minDead = %d\n", unique->minDead);
|
1559
|
-
#endif
|
1560
|
-
cuddShrinkDeathRow(unique);
|
1561
|
-
if (cuddGarbageCollect(unique,1) > 0) return;
|
1562
|
-
}
|
1563
|
-
|
1564
|
-
if (i != CUDD_CONST_INDEX) {
|
1565
|
-
oldslots = unique->subtables[i].slots;
|
1566
|
-
oldshift = unique->subtables[i].shift;
|
1567
|
-
oldnodelist = unique->subtables[i].nodelist;
|
1568
|
-
|
1569
|
-
/* Compute the new size of the subtable. */
|
1570
|
-
slots = oldslots << 1;
|
1571
|
-
shift = oldshift - 1;
|
1572
|
-
|
1573
|
-
saveHandler = MMoutOfMemory;
|
1574
|
-
MMoutOfMemory = Cudd_OutOfMem;
|
1575
|
-
nodelist = ABC_ALLOC(DdNodePtr, slots);
|
1576
|
-
MMoutOfMemory = saveHandler;
|
1577
|
-
if (nodelist == NULL) {
|
1578
|
-
(void) fprintf(unique->err,
|
1579
|
-
"Unable to resize subtable %d for lack of memory\n",
|
1580
|
-
i);
|
1581
|
-
/* Prevent frequent resizing attempts. */
|
1582
|
-
(void) cuddGarbageCollect(unique,1);
|
1583
|
-
if (unique->stash != NULL) {
|
1584
|
-
ABC_FREE(unique->stash);
|
1585
|
-
unique->stash = NULL;
|
1586
|
-
/* Inhibit resizing of tables. */
|
1587
|
-
cuddSlowTableGrowth(unique);
|
1588
|
-
}
|
1589
|
-
return;
|
1590
|
-
}
|
1591
|
-
unique->subtables[i].nodelist = nodelist;
|
1592
|
-
unique->subtables[i].slots = slots;
|
1593
|
-
unique->subtables[i].shift = shift;
|
1594
|
-
unique->subtables[i].maxKeys = slots * DD_MAX_SUBTABLE_DENSITY;
|
1595
|
-
|
1596
|
-
/* Move the nodes from the old table to the new table.
|
1597
|
-
** This code depends on the type of hash function.
|
1598
|
-
** It assumes that the effect of doubling the size of the table
|
1599
|
-
** is to retain one more bit of the 32-bit hash value.
|
1600
|
-
** The additional bit is the LSB. */
|
1601
|
-
for (j = 0; (unsigned) j < oldslots; j++) {
|
1602
|
-
DdNodePtr *evenP, *oddP;
|
1603
|
-
node = oldnodelist[j];
|
1604
|
-
evenP = &(nodelist[j<<1]);
|
1605
|
-
oddP = &(nodelist[(j<<1)+1]);
|
1606
|
-
while (node != sentinel) {
|
1607
|
-
next = node->next;
|
1608
|
-
pos = ddHash(cuddF2L(cuddT(node)), cuddF2L(cuddE(node)), shift);
|
1609
|
-
if (pos & 1) {
|
1610
|
-
*oddP = node;
|
1611
|
-
oddP = &(node->next);
|
1612
|
-
} else {
|
1613
|
-
*evenP = node;
|
1614
|
-
evenP = &(node->next);
|
1615
|
-
}
|
1616
|
-
node = next;
|
1617
|
-
}
|
1618
|
-
*evenP = *oddP = sentinel;
|
1619
|
-
}
|
1620
|
-
ABC_FREE(oldnodelist);
|
1621
|
-
|
1622
|
-
#ifdef DD_VERBOSE
|
1623
|
-
(void) fprintf(unique->err,
|
1624
|
-
"rehashing layer %d: keys %d dead %d new size %d\n",
|
1625
|
-
i, unique->subtables[i].keys,
|
1626
|
-
unique->subtables[i].dead, slots);
|
1627
|
-
#endif
|
1628
|
-
} else {
|
1629
|
-
oldslots = unique->constants.slots;
|
1630
|
-
oldshift = unique->constants.shift;
|
1631
|
-
oldnodelist = unique->constants.nodelist;
|
1632
|
-
|
1633
|
-
/* The constant subtable is never subjected to reordering.
|
1634
|
-
** Therefore, when it is resized, it is because it has just
|
1635
|
-
** reached the maximum load. We can safely just double the size,
|
1636
|
-
** with no need for the loop we use for the other tables.
|
1637
|
-
*/
|
1638
|
-
slots = oldslots << 1;
|
1639
|
-
shift = oldshift - 1;
|
1640
|
-
saveHandler = MMoutOfMemory;
|
1641
|
-
MMoutOfMemory = Cudd_OutOfMem;
|
1642
|
-
nodelist = ABC_ALLOC(DdNodePtr, slots);
|
1643
|
-
MMoutOfMemory = saveHandler;
|
1644
|
-
if (nodelist == NULL) {
|
1645
|
-
(void) fprintf(unique->err,
|
1646
|
-
"Unable to resize constant subtable for lack of memory\n");
|
1647
|
-
(void) cuddGarbageCollect(unique,1);
|
1648
|
-
for (j = 0; j < unique->size; j++) {
|
1649
|
-
unique->subtables[j].maxKeys <<= 1;
|
1650
|
-
}
|
1651
|
-
unique->constants.maxKeys <<= 1;
|
1652
|
-
return;
|
1653
|
-
}
|
1654
|
-
unique->constants.slots = slots;
|
1655
|
-
unique->constants.shift = shift;
|
1656
|
-
unique->constants.maxKeys = slots * DD_MAX_SUBTABLE_DENSITY;
|
1657
|
-
unique->constants.nodelist = nodelist;
|
1658
|
-
for (j = 0; (unsigned) j < slots; j++) {
|
1659
|
-
nodelist[j] = NULL;
|
1660
|
-
}
|
1661
|
-
for (j = 0; (unsigned) j < oldslots; j++) {
|
1662
|
-
node = oldnodelist[j];
|
1663
|
-
while (node != NULL) {
|
1664
|
-
next = node->next;
|
1665
|
-
split.value = cuddV(node);
|
1666
|
-
pos = ddHash(split.bits[0], split.bits[1], shift);
|
1667
|
-
node->next = nodelist[pos];
|
1668
|
-
nodelist[pos] = node;
|
1669
|
-
node = next;
|
1670
|
-
}
|
1671
|
-
}
|
1672
|
-
ABC_FREE(oldnodelist);
|
1673
|
-
|
1674
|
-
#ifdef DD_VERBOSE
|
1675
|
-
(void) fprintf(unique->err,
|
1676
|
-
"rehashing constants: keys %d dead %d new size %d\n",
|
1677
|
-
unique->constants.keys,unique->constants.dead,slots);
|
1678
|
-
#endif
|
1679
|
-
}
|
1680
|
-
|
1681
|
-
/* Update global data */
|
1682
|
-
|
1683
|
-
unique->memused += (slots - oldslots) * sizeof(DdNodePtr);
|
1684
|
-
unique->slots += (slots - oldslots);
|
1685
|
-
ddFixLimits(unique);
|
1686
|
-
|
1687
|
-
} /* end of cuddRehash */
|
1688
|
-
|
1689
|
-
|
1690
|
-
/**Function********************************************************************
|
1691
|
-
|
1692
|
-
Synopsis [Shrinks a subtable.]
|
1693
|
-
|
1694
|
-
Description [Shrinks a subtable.]
|
1695
|
-
|
1696
|
-
SideEffects [None]
|
1697
|
-
|
1698
|
-
SeeAlso [cuddRehash]
|
1699
|
-
|
1700
|
-
******************************************************************************/
|
1701
|
-
void
|
1702
|
-
cuddShrinkSubtable(
|
1703
|
-
DdManager *unique,
|
1704
|
-
int i)
|
1705
|
-
{
|
1706
|
-
int j;
|
1707
|
-
int shift, posn;
|
1708
|
-
DdNodePtr *nodelist, *oldnodelist;
|
1709
|
-
DdNode *node, *next;
|
1710
|
-
DdNode *sentinel = &(unique->sentinel);
|
1711
|
-
unsigned int slots, oldslots;
|
1712
|
-
extern DD_OOMFP MMoutOfMemory;
|
1713
|
-
DD_OOMFP saveHandler;
|
1714
|
-
|
1715
|
-
oldnodelist = unique->subtables[i].nodelist;
|
1716
|
-
oldslots = unique->subtables[i].slots;
|
1717
|
-
slots = oldslots >> 1;
|
1718
|
-
saveHandler = MMoutOfMemory;
|
1719
|
-
MMoutOfMemory = Cudd_OutOfMem;
|
1720
|
-
nodelist = ABC_ALLOC(DdNodePtr, slots);
|
1721
|
-
MMoutOfMemory = saveHandler;
|
1722
|
-
if (nodelist == NULL) {
|
1723
|
-
return;
|
1724
|
-
}
|
1725
|
-
unique->subtables[i].nodelist = nodelist;
|
1726
|
-
unique->subtables[i].slots = slots;
|
1727
|
-
unique->subtables[i].shift++;
|
1728
|
-
unique->subtables[i].maxKeys = slots * DD_MAX_SUBTABLE_DENSITY;
|
1729
|
-
#ifdef DD_VERBOSE
|
1730
|
-
(void) fprintf(unique->err,
|
1731
|
-
"shrunk layer %d (%d keys) from %d to %d slots\n",
|
1732
|
-
i, unique->subtables[i].keys, oldslots, slots);
|
1733
|
-
#endif
|
1734
|
-
|
1735
|
-
for (j = 0; (unsigned) j < slots; j++) {
|
1736
|
-
nodelist[j] = sentinel;
|
1737
|
-
}
|
1738
|
-
shift = unique->subtables[i].shift;
|
1739
|
-
for (j = 0; (unsigned) j < oldslots; j++) {
|
1740
|
-
node = oldnodelist[j];
|
1741
|
-
while (node != sentinel) {
|
1742
|
-
DdNode *looking, *T, *E;
|
1743
|
-
DdNodePtr *previousP;
|
1744
|
-
next = node->next;
|
1745
|
-
posn = ddHash(cuddF2L(cuddT(node)), cuddF2L(cuddE(node)), shift);
|
1746
|
-
previousP = &(nodelist[posn]);
|
1747
|
-
looking = *previousP;
|
1748
|
-
T = cuddT(node);
|
1749
|
-
E = cuddE(node);
|
1750
|
-
while (T < cuddT(looking)) {
|
1751
|
-
previousP = &(looking->next);
|
1752
|
-
looking = *previousP;
|
1753
|
-
#ifdef DD_UNIQUE_PROFILE
|
1754
|
-
unique->uniqueLinks++;
|
1755
|
-
#endif
|
1756
|
-
}
|
1757
|
-
while (T == cuddT(looking) && E < cuddE(looking)) {
|
1758
|
-
previousP = &(looking->next);
|
1759
|
-
looking = *previousP;
|
1760
|
-
#ifdef DD_UNIQUE_PROFILE
|
1761
|
-
unique->uniqueLinks++;
|
1762
|
-
#endif
|
1763
|
-
}
|
1764
|
-
node->next = *previousP;
|
1765
|
-
*previousP = node;
|
1766
|
-
node = next;
|
1767
|
-
}
|
1768
|
-
}
|
1769
|
-
ABC_FREE(oldnodelist);
|
1770
|
-
|
1771
|
-
unique->memused += ((long) slots - (long) oldslots) * sizeof(DdNode *);
|
1772
|
-
unique->slots += slots - oldslots;
|
1773
|
-
unique->minDead = (unsigned) (unique->gcFrac * (double) unique->slots);
|
1774
|
-
unique->cacheSlack = (int)
|
1775
|
-
ddMin(unique->maxCacheHard,DD_MAX_CACHE_TO_SLOTS_RATIO * unique->slots)
|
1776
|
-
- 2 * (int) unique->cacheSlots;
|
1777
|
-
|
1778
|
-
} /* end of cuddShrinkSubtable */
|
1779
|
-
|
1780
|
-
|
1781
|
-
/**Function********************************************************************
|
1782
|
-
|
1783
|
-
Synopsis [Inserts n new subtables in a unique table at level.]
|
1784
|
-
|
1785
|
-
Description [Inserts n new subtables in a unique table at level.
|
1786
|
-
The number n should be positive, and level should be an existing level.
|
1787
|
-
Returns 1 if successful; 0 otherwise.]
|
1788
|
-
|
1789
|
-
SideEffects [None]
|
1790
|
-
|
1791
|
-
SeeAlso [cuddDestroySubtables]
|
1792
|
-
|
1793
|
-
******************************************************************************/
|
1794
|
-
int
|
1795
|
-
cuddInsertSubtables(
|
1796
|
-
DdManager * unique,
|
1797
|
-
int n,
|
1798
|
-
int level)
|
1799
|
-
{
|
1800
|
-
DdSubtable *newsubtables;
|
1801
|
-
DdNodePtr *newnodelist;
|
1802
|
-
DdNodePtr *newvars;
|
1803
|
-
DdNode *sentinel = &(unique->sentinel);
|
1804
|
-
int oldsize,newsize;
|
1805
|
-
int i,j,index,reorderSave;
|
1806
|
-
unsigned int numSlots = unique->initSlots;
|
1807
|
-
int *newperm, *newinvperm, *newmap=NULL;
|
1808
|
-
DdNode *one, *zero;
|
1809
|
-
|
1810
|
-
#ifdef DD_DEBUG
|
1811
|
-
assert(n > 0 && level < unique->size);
|
1812
|
-
#endif
|
1813
|
-
|
1814
|
-
oldsize = unique->size;
|
1815
|
-
/* Easy case: there is still room in the current table. */
|
1816
|
-
if (oldsize + n <= unique->maxSize) {
|
1817
|
-
/* Shift the tables at and below level. */
|
1818
|
-
for (i = oldsize - 1; i >= level; i--) {
|
1819
|
-
unique->subtables[i+n].slots = unique->subtables[i].slots;
|
1820
|
-
unique->subtables[i+n].shift = unique->subtables[i].shift;
|
1821
|
-
unique->subtables[i+n].keys = unique->subtables[i].keys;
|
1822
|
-
unique->subtables[i+n].maxKeys = unique->subtables[i].maxKeys;
|
1823
|
-
unique->subtables[i+n].dead = unique->subtables[i].dead;
|
1824
|
-
unique->subtables[i+n].nodelist = unique->subtables[i].nodelist;
|
1825
|
-
unique->subtables[i+n].bindVar = unique->subtables[i].bindVar;
|
1826
|
-
unique->subtables[i+n].varType = unique->subtables[i].varType;
|
1827
|
-
unique->subtables[i+n].pairIndex = unique->subtables[i].pairIndex;
|
1828
|
-
unique->subtables[i+n].varHandled = unique->subtables[i].varHandled;
|
1829
|
-
unique->subtables[i+n].varToBeGrouped =
|
1830
|
-
unique->subtables[i].varToBeGrouped;
|
1831
|
-
|
1832
|
-
index = unique->invperm[i];
|
1833
|
-
unique->invperm[i+n] = index;
|
1834
|
-
unique->perm[index] += n;
|
1835
|
-
}
|
1836
|
-
/* Create new subtables. */
|
1837
|
-
for (i = 0; i < n; i++) {
|
1838
|
-
unique->subtables[level+i].slots = numSlots;
|
1839
|
-
unique->subtables[level+i].shift = sizeof(int) * 8 -
|
1840
|
-
cuddComputeFloorLog2(numSlots);
|
1841
|
-
unique->subtables[level+i].keys = 0;
|
1842
|
-
unique->subtables[level+i].maxKeys = numSlots * DD_MAX_SUBTABLE_DENSITY;
|
1843
|
-
unique->subtables[level+i].dead = 0;
|
1844
|
-
unique->subtables[level+i].bindVar = 0;
|
1845
|
-
unique->subtables[level+i].varType = CUDD_VAR_PRIMARY_INPUT;
|
1846
|
-
unique->subtables[level+i].pairIndex = 0;
|
1847
|
-
unique->subtables[level+i].varHandled = 0;
|
1848
|
-
unique->subtables[level+i].varToBeGrouped = CUDD_LAZY_NONE;
|
1849
|
-
|
1850
|
-
unique->perm[oldsize+i] = level + i;
|
1851
|
-
unique->invperm[level+i] = oldsize + i;
|
1852
|
-
newnodelist = unique->subtables[level+i].nodelist =
|
1853
|
-
ABC_ALLOC(DdNodePtr, numSlots);
|
1854
|
-
if (newnodelist == NULL) {
|
1855
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
1856
|
-
return(0);
|
1857
|
-
}
|
1858
|
-
for (j = 0; (unsigned) j < numSlots; j++) {
|
1859
|
-
newnodelist[j] = sentinel;
|
1860
|
-
}
|
1861
|
-
}
|
1862
|
-
if (unique->map != NULL) {
|
1863
|
-
for (i = 0; i < n; i++) {
|
1864
|
-
unique->map[oldsize+i] = oldsize + i;
|
1865
|
-
}
|
1866
|
-
}
|
1867
|
-
} else {
|
1868
|
-
/* The current table is too small: we need to allocate a new,
|
1869
|
-
** larger one; move all old subtables, and initialize the new
|
1870
|
-
** subtables.
|
1871
|
-
*/
|
1872
|
-
newsize = oldsize + n + DD_DEFAULT_RESIZE;
|
1873
|
-
#ifdef DD_VERBOSE
|
1874
|
-
(void) fprintf(unique->err,
|
1875
|
-
"Increasing the table size from %d to %d\n",
|
1876
|
-
unique->maxSize, newsize);
|
1877
|
-
#endif
|
1878
|
-
/* Allocate memory for new arrays (except nodelists). */
|
1879
|
-
newsubtables = ABC_ALLOC(DdSubtable,newsize);
|
1880
|
-
if (newsubtables == NULL) {
|
1881
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
1882
|
-
return(0);
|
1883
|
-
}
|
1884
|
-
newvars = ABC_ALLOC(DdNodePtr,newsize);
|
1885
|
-
if (newvars == NULL) {
|
1886
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
1887
|
-
ABC_FREE(newsubtables);
|
1888
|
-
return(0);
|
1889
|
-
}
|
1890
|
-
newperm = ABC_ALLOC(int,newsize);
|
1891
|
-
if (newperm == NULL) {
|
1892
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
1893
|
-
ABC_FREE(newsubtables);
|
1894
|
-
ABC_FREE(newvars);
|
1895
|
-
return(0);
|
1896
|
-
}
|
1897
|
-
newinvperm = ABC_ALLOC(int,newsize);
|
1898
|
-
if (newinvperm == NULL) {
|
1899
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
1900
|
-
ABC_FREE(newsubtables);
|
1901
|
-
ABC_FREE(newvars);
|
1902
|
-
ABC_FREE(newperm);
|
1903
|
-
return(0);
|
1904
|
-
}
|
1905
|
-
if (unique->map != NULL) {
|
1906
|
-
newmap = ABC_ALLOC(int,newsize);
|
1907
|
-
if (newmap == NULL) {
|
1908
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
1909
|
-
ABC_FREE(newsubtables);
|
1910
|
-
ABC_FREE(newvars);
|
1911
|
-
ABC_FREE(newperm);
|
1912
|
-
ABC_FREE(newinvperm);
|
1913
|
-
return(0);
|
1914
|
-
}
|
1915
|
-
unique->memused += (newsize - unique->maxSize) * sizeof(int);
|
1916
|
-
}
|
1917
|
-
unique->memused += (newsize - unique->maxSize) * ((numSlots+1) *
|
1918
|
-
sizeof(DdNode *) + 2 * sizeof(int) + sizeof(DdSubtable));
|
1919
|
-
/* Copy levels before insertion points from old tables. */
|
1920
|
-
for (i = 0; i < level; i++) {
|
1921
|
-
newsubtables[i].slots = unique->subtables[i].slots;
|
1922
|
-
newsubtables[i].shift = unique->subtables[i].shift;
|
1923
|
-
newsubtables[i].keys = unique->subtables[i].keys;
|
1924
|
-
newsubtables[i].maxKeys = unique->subtables[i].maxKeys;
|
1925
|
-
newsubtables[i].dead = unique->subtables[i].dead;
|
1926
|
-
newsubtables[i].nodelist = unique->subtables[i].nodelist;
|
1927
|
-
newsubtables[i].bindVar = unique->subtables[i].bindVar;
|
1928
|
-
newsubtables[i].varType = unique->subtables[i].varType;
|
1929
|
-
newsubtables[i].pairIndex = unique->subtables[i].pairIndex;
|
1930
|
-
newsubtables[i].varHandled = unique->subtables[i].varHandled;
|
1931
|
-
newsubtables[i].varToBeGrouped = unique->subtables[i].varToBeGrouped;
|
1932
|
-
|
1933
|
-
newvars[i] = unique->vars[i];
|
1934
|
-
newperm[i] = unique->perm[i];
|
1935
|
-
newinvperm[i] = unique->invperm[i];
|
1936
|
-
}
|
1937
|
-
/* Finish initializing permutation for new table to old one. */
|
1938
|
-
for (i = level; i < oldsize; i++) {
|
1939
|
-
newperm[i] = unique->perm[i];
|
1940
|
-
}
|
1941
|
-
/* Initialize new levels. */
|
1942
|
-
for (i = level; i < level + n; i++) {
|
1943
|
-
newsubtables[i].slots = numSlots;
|
1944
|
-
newsubtables[i].shift = sizeof(int) * 8 -
|
1945
|
-
cuddComputeFloorLog2(numSlots);
|
1946
|
-
newsubtables[i].keys = 0;
|
1947
|
-
newsubtables[i].maxKeys = numSlots * DD_MAX_SUBTABLE_DENSITY;
|
1948
|
-
newsubtables[i].dead = 0;
|
1949
|
-
newsubtables[i].bindVar = 0;
|
1950
|
-
newsubtables[i].varType = CUDD_VAR_PRIMARY_INPUT;
|
1951
|
-
newsubtables[i].pairIndex = 0;
|
1952
|
-
newsubtables[i].varHandled = 0;
|
1953
|
-
newsubtables[i].varToBeGrouped = CUDD_LAZY_NONE;
|
1954
|
-
|
1955
|
-
newperm[oldsize + i - level] = i;
|
1956
|
-
newinvperm[i] = oldsize + i - level;
|
1957
|
-
newnodelist = newsubtables[i].nodelist = ABC_ALLOC(DdNodePtr, numSlots);
|
1958
|
-
if (newnodelist == NULL) {
|
1959
|
-
/* We are going to leak some memory. We should clean up. */
|
1960
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
1961
|
-
return(0);
|
1962
|
-
}
|
1963
|
-
for (j = 0; (unsigned) j < numSlots; j++) {
|
1964
|
-
newnodelist[j] = sentinel;
|
1965
|
-
}
|
1966
|
-
}
|
1967
|
-
/* Copy the old tables for levels past the insertion point. */
|
1968
|
-
for (i = level; i < oldsize; i++) {
|
1969
|
-
newsubtables[i+n].slots = unique->subtables[i].slots;
|
1970
|
-
newsubtables[i+n].shift = unique->subtables[i].shift;
|
1971
|
-
newsubtables[i+n].keys = unique->subtables[i].keys;
|
1972
|
-
newsubtables[i+n].maxKeys = unique->subtables[i].maxKeys;
|
1973
|
-
newsubtables[i+n].dead = unique->subtables[i].dead;
|
1974
|
-
newsubtables[i+n].nodelist = unique->subtables[i].nodelist;
|
1975
|
-
newsubtables[i+n].bindVar = unique->subtables[i].bindVar;
|
1976
|
-
newsubtables[i+n].varType = unique->subtables[i].varType;
|
1977
|
-
newsubtables[i+n].pairIndex = unique->subtables[i].pairIndex;
|
1978
|
-
newsubtables[i+n].varHandled = unique->subtables[i].varHandled;
|
1979
|
-
newsubtables[i+n].varToBeGrouped =
|
1980
|
-
unique->subtables[i].varToBeGrouped;
|
1981
|
-
|
1982
|
-
newvars[i] = unique->vars[i];
|
1983
|
-
index = unique->invperm[i];
|
1984
|
-
newinvperm[i+n] = index;
|
1985
|
-
newperm[index] += n;
|
1986
|
-
}
|
1987
|
-
/* Update the map. */
|
1988
|
-
if (unique->map != NULL) {
|
1989
|
-
for (i = 0; i < oldsize; i++) {
|
1990
|
-
newmap[i] = unique->map[i];
|
1991
|
-
}
|
1992
|
-
for (i = oldsize; i < oldsize + n; i++) {
|
1993
|
-
newmap[i] = i;
|
1994
|
-
}
|
1995
|
-
ABC_FREE(unique->map);
|
1996
|
-
unique->map = newmap;
|
1997
|
-
}
|
1998
|
-
/* Install the new tables and free the old ones. */
|
1999
|
-
ABC_FREE(unique->subtables);
|
2000
|
-
unique->subtables = newsubtables;
|
2001
|
-
unique->maxSize = newsize;
|
2002
|
-
ABC_FREE(unique->vars);
|
2003
|
-
unique->vars = newvars;
|
2004
|
-
ABC_FREE(unique->perm);
|
2005
|
-
unique->perm = newperm;
|
2006
|
-
ABC_FREE(unique->invperm);
|
2007
|
-
unique->invperm = newinvperm;
|
2008
|
-
/* Update the stack for iterative procedures. */
|
2009
|
-
if (newsize > unique->maxSizeZ) {
|
2010
|
-
ABC_FREE(unique->stack);
|
2011
|
-
unique->stack = ABC_ALLOC(DdNodePtr,newsize + 1);
|
2012
|
-
if (unique->stack == NULL) {
|
2013
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
2014
|
-
return(0);
|
2015
|
-
}
|
2016
|
-
unique->stack[0] = NULL; /* to suppress harmless UMR */
|
2017
|
-
unique->memused +=
|
2018
|
-
(newsize - ddMax(unique->maxSize,unique->maxSizeZ))
|
2019
|
-
* sizeof(DdNode *);
|
2020
|
-
}
|
2021
|
-
}
|
2022
|
-
/* Update manager parameters to account for the new subtables. */
|
2023
|
-
unique->slots += n * numSlots;
|
2024
|
-
ddFixLimits(unique);
|
2025
|
-
unique->size += n;
|
2026
|
-
|
2027
|
-
/* Now that the table is in a coherent state, create the new
|
2028
|
-
** projection functions. We need to temporarily disable reordering,
|
2029
|
-
** because we cannot reorder without projection functions in place.
|
2030
|
-
**/
|
2031
|
-
one = unique->one;
|
2032
|
-
zero = Cudd_Not(one);
|
2033
|
-
|
2034
|
-
reorderSave = unique->autoDyn;
|
2035
|
-
unique->autoDyn = 0;
|
2036
|
-
for (i = oldsize; i < oldsize + n; i++) {
|
2037
|
-
unique->vars[i] = cuddUniqueInter(unique,i,one,zero);
|
2038
|
-
if (unique->vars[i] == NULL) {
|
2039
|
-
unique->autoDyn = reorderSave;
|
2040
|
-
/* Shift everything back so table remains coherent. */
|
2041
|
-
for (j = oldsize; j < i; j++) {
|
2042
|
-
Cudd_IterDerefBdd(unique,unique->vars[j]);
|
2043
|
-
cuddDeallocNode(unique,unique->vars[j]);
|
2044
|
-
unique->vars[j] = NULL;
|
2045
|
-
}
|
2046
|
-
for (j = level; j < oldsize; j++) {
|
2047
|
-
unique->subtables[j].slots = unique->subtables[j+n].slots;
|
2048
|
-
unique->subtables[j].slots = unique->subtables[j+n].slots;
|
2049
|
-
unique->subtables[j].shift = unique->subtables[j+n].shift;
|
2050
|
-
unique->subtables[j].keys = unique->subtables[j+n].keys;
|
2051
|
-
unique->subtables[j].maxKeys =
|
2052
|
-
unique->subtables[j+n].maxKeys;
|
2053
|
-
unique->subtables[j].dead = unique->subtables[j+n].dead;
|
2054
|
-
ABC_FREE(unique->subtables[j].nodelist);
|
2055
|
-
unique->subtables[j].nodelist =
|
2056
|
-
unique->subtables[j+n].nodelist;
|
2057
|
-
unique->subtables[j+n].nodelist = NULL;
|
2058
|
-
unique->subtables[j].bindVar =
|
2059
|
-
unique->subtables[j+n].bindVar;
|
2060
|
-
unique->subtables[j].varType =
|
2061
|
-
unique->subtables[j+n].varType;
|
2062
|
-
unique->subtables[j].pairIndex =
|
2063
|
-
unique->subtables[j+n].pairIndex;
|
2064
|
-
unique->subtables[j].varHandled =
|
2065
|
-
unique->subtables[j+n].varHandled;
|
2066
|
-
unique->subtables[j].varToBeGrouped =
|
2067
|
-
unique->subtables[j+n].varToBeGrouped;
|
2068
|
-
index = unique->invperm[j+n];
|
2069
|
-
unique->invperm[j] = index;
|
2070
|
-
unique->perm[index] -= n;
|
2071
|
-
}
|
2072
|
-
unique->size = oldsize;
|
2073
|
-
unique->slots -= n * numSlots;
|
2074
|
-
ddFixLimits(unique);
|
2075
|
-
(void) Cudd_DebugCheck(unique);
|
2076
|
-
return(0);
|
2077
|
-
}
|
2078
|
-
cuddRef(unique->vars[i]);
|
2079
|
-
}
|
2080
|
-
if (unique->tree != NULL) {
|
2081
|
-
unique->tree->size += n;
|
2082
|
-
unique->tree->index = unique->invperm[0];
|
2083
|
-
ddPatchTree(unique,unique->tree);
|
2084
|
-
}
|
2085
|
-
unique->autoDyn = reorderSave;
|
2086
|
-
|
2087
|
-
return(1);
|
2088
|
-
|
2089
|
-
} /* end of cuddInsertSubtables */
|
2090
|
-
|
2091
|
-
|
2092
|
-
/**Function********************************************************************
|
2093
|
-
|
2094
|
-
Synopsis [Destroys the n most recently created subtables in a unique table.]
|
2095
|
-
|
2096
|
-
Description [Destroys the n most recently created subtables in a unique
|
2097
|
-
table. n should be positive. The subtables should not contain any live
|
2098
|
-
nodes, except the (isolated) projection function. The projection
|
2099
|
-
functions are freed. Returns 1 if successful; 0 otherwise.]
|
2100
|
-
|
2101
|
-
SideEffects [The variable map used for fast variable substitution is
|
2102
|
-
destroyed if it exists. In this case the cache is also cleared.]
|
2103
|
-
|
2104
|
-
SeeAlso [cuddInsertSubtables Cudd_SetVarMap]
|
2105
|
-
|
2106
|
-
******************************************************************************/
|
2107
|
-
int
|
2108
|
-
cuddDestroySubtables(
|
2109
|
-
DdManager * unique,
|
2110
|
-
int n)
|
2111
|
-
{
|
2112
|
-
DdSubtable *subtables;
|
2113
|
-
DdNodePtr *nodelist;
|
2114
|
-
DdNodePtr *vars;
|
2115
|
-
int firstIndex, lastIndex;
|
2116
|
-
int index, level, newlevel;
|
2117
|
-
int lowestLevel;
|
2118
|
-
int shift;
|
2119
|
-
int found;
|
2120
|
-
|
2121
|
-
/* Sanity check and set up. */
|
2122
|
-
if (n <= 0) return(0);
|
2123
|
-
if (n > unique->size) n = unique->size;
|
2124
|
-
|
2125
|
-
subtables = unique->subtables;
|
2126
|
-
vars = unique->vars;
|
2127
|
-
firstIndex = unique->size - n;
|
2128
|
-
lastIndex = unique->size;
|
2129
|
-
|
2130
|
-
/* Check for nodes labeled by the variables being destroyed
|
2131
|
-
** that may still be in use. It is allowed to destroy a variable
|
2132
|
-
** only if there are no such nodes. Also, find the lowest level
|
2133
|
-
** among the variables being destroyed. This will make further
|
2134
|
-
** processing more efficient.
|
2135
|
-
*/
|
2136
|
-
lowestLevel = unique->size;
|
2137
|
-
for (index = firstIndex; index < lastIndex; index++) {
|
2138
|
-
level = unique->perm[index];
|
2139
|
-
if (level < lowestLevel) lowestLevel = level;
|
2140
|
-
nodelist = subtables[level].nodelist;
|
2141
|
-
if (subtables[level].keys - subtables[level].dead != 1) return(0);
|
2142
|
-
/* The projection function should be isolated. If the ref count
|
2143
|
-
** is 1, everything is OK. If the ref count is saturated, then
|
2144
|
-
** we need to make sure that there are no nodes pointing to it.
|
2145
|
-
** As for the external references, we assume the application is
|
2146
|
-
** responsible for them.
|
2147
|
-
*/
|
2148
|
-
if (vars[index]->ref != 1) {
|
2149
|
-
if (vars[index]->ref != DD_MAXREF) return(0);
|
2150
|
-
found = cuddFindParent(unique,vars[index]);
|
2151
|
-
if (found) {
|
2152
|
-
return(0);
|
2153
|
-
} else {
|
2154
|
-
vars[index]->ref = 1;
|
2155
|
-
}
|
2156
|
-
}
|
2157
|
-
Cudd_RecursiveDeref(unique,vars[index]);
|
2158
|
-
}
|
2159
|
-
|
2160
|
-
/* Collect garbage, because we cannot afford having dead nodes pointing
|
2161
|
-
** to the dead nodes in the subtables being destroyed.
|
2162
|
-
*/
|
2163
|
-
(void) cuddGarbageCollect(unique,1);
|
2164
|
-
|
2165
|
-
/* Here we know we can destroy our subtables. */
|
2166
|
-
for (index = firstIndex; index < lastIndex; index++) {
|
2167
|
-
level = unique->perm[index];
|
2168
|
-
nodelist = subtables[level].nodelist;
|
2169
|
-
#ifdef DD_DEBUG
|
2170
|
-
assert(subtables[level].keys == 0);
|
2171
|
-
#endif
|
2172
|
-
ABC_FREE(nodelist);
|
2173
|
-
unique->memused -= sizeof(DdNodePtr) * subtables[level].slots;
|
2174
|
-
unique->slots -= subtables[level].slots;
|
2175
|
-
unique->dead -= subtables[level].dead;
|
2176
|
-
}
|
2177
|
-
|
2178
|
-
/* Here all subtables to be destroyed have their keys field == 0 and
|
2179
|
-
** their hash tables have been freed.
|
2180
|
-
** We now scan the subtables from level lowestLevel + 1 to level size - 1,
|
2181
|
-
** shifting the subtables as required. We keep a running count of
|
2182
|
-
** how many subtables have been moved, so that we know by how many
|
2183
|
-
** positions each subtable should be shifted.
|
2184
|
-
*/
|
2185
|
-
shift = 1;
|
2186
|
-
for (level = lowestLevel + 1; level < unique->size; level++) {
|
2187
|
-
if (subtables[level].keys == 0) {
|
2188
|
-
shift++;
|
2189
|
-
continue;
|
2190
|
-
}
|
2191
|
-
newlevel = level - shift;
|
2192
|
-
subtables[newlevel].slots = subtables[level].slots;
|
2193
|
-
subtables[newlevel].shift = subtables[level].shift;
|
2194
|
-
subtables[newlevel].keys = subtables[level].keys;
|
2195
|
-
subtables[newlevel].maxKeys = subtables[level].maxKeys;
|
2196
|
-
subtables[newlevel].dead = subtables[level].dead;
|
2197
|
-
subtables[newlevel].nodelist = subtables[level].nodelist;
|
2198
|
-
index = unique->invperm[level];
|
2199
|
-
unique->perm[index] = newlevel;
|
2200
|
-
unique->invperm[newlevel] = index;
|
2201
|
-
subtables[newlevel].bindVar = subtables[level].bindVar;
|
2202
|
-
subtables[newlevel].varType = subtables[level].varType;
|
2203
|
-
subtables[newlevel].pairIndex = subtables[level].pairIndex;
|
2204
|
-
subtables[newlevel].varHandled = subtables[level].varHandled;
|
2205
|
-
subtables[newlevel].varToBeGrouped = subtables[level].varToBeGrouped;
|
2206
|
-
}
|
2207
|
-
/* Destroy the map. If a surviving variable is
|
2208
|
-
** mapped to a dying variable, and the map were used again,
|
2209
|
-
** an out-of-bounds access to unique->vars would result. */
|
2210
|
-
if (unique->map != NULL) {
|
2211
|
-
cuddCacheFlush(unique);
|
2212
|
-
ABC_FREE(unique->map);
|
2213
|
-
unique->map = NULL;
|
2214
|
-
}
|
2215
|
-
|
2216
|
-
unique->minDead = (unsigned) (unique->gcFrac * (double) unique->slots);
|
2217
|
-
unique->size -= n;
|
2218
|
-
|
2219
|
-
return(1);
|
2220
|
-
|
2221
|
-
} /* end of cuddDestroySubtables */
|
2222
|
-
|
2223
|
-
|
2224
|
-
/**Function********************************************************************
|
2225
|
-
|
2226
|
-
Synopsis [Increases the number of ZDD subtables in a unique table so
|
2227
|
-
that it meets or exceeds index.]
|
2228
|
-
|
2229
|
-
Description [Increases the number of ZDD subtables in a unique table so
|
2230
|
-
that it meets or exceeds index. When new ZDD variables are created, it
|
2231
|
-
is possible to preserve the functions unchanged, or it is possible to
|
2232
|
-
preserve the covers unchanged, but not both. cuddResizeTableZdd preserves
|
2233
|
-
the covers. Returns 1 if successful; 0 otherwise.]
|
2234
|
-
|
2235
|
-
SideEffects [None]
|
2236
|
-
|
2237
|
-
SeeAlso [ddResizeTable]
|
2238
|
-
|
2239
|
-
******************************************************************************/
|
2240
|
-
int
|
2241
|
-
cuddResizeTableZdd(
|
2242
|
-
DdManager * unique,
|
2243
|
-
int index)
|
2244
|
-
{
|
2245
|
-
DdSubtable *newsubtables;
|
2246
|
-
DdNodePtr *newnodelist;
|
2247
|
-
int oldsize,newsize;
|
2248
|
-
int i,j,reorderSave;
|
2249
|
-
unsigned int numSlots = unique->initSlots;
|
2250
|
-
int *newperm, *newinvperm;
|
2251
|
-
|
2252
|
-
oldsize = unique->sizeZ;
|
2253
|
-
/* Easy case: there is still room in the current table. */
|
2254
|
-
if (index < unique->maxSizeZ) {
|
2255
|
-
for (i = oldsize; i <= index; i++) {
|
2256
|
-
unique->subtableZ[i].slots = numSlots;
|
2257
|
-
unique->subtableZ[i].shift = sizeof(int) * 8 -
|
2258
|
-
cuddComputeFloorLog2(numSlots);
|
2259
|
-
unique->subtableZ[i].keys = 0;
|
2260
|
-
unique->subtableZ[i].maxKeys = numSlots * DD_MAX_SUBTABLE_DENSITY;
|
2261
|
-
unique->subtableZ[i].dead = 0;
|
2262
|
-
unique->permZ[i] = i;
|
2263
|
-
unique->invpermZ[i] = i;
|
2264
|
-
newnodelist = unique->subtableZ[i].nodelist =
|
2265
|
-
ABC_ALLOC(DdNodePtr, numSlots);
|
2266
|
-
if (newnodelist == NULL) {
|
2267
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
2268
|
-
return(0);
|
2269
|
-
}
|
2270
|
-
for (j = 0; (unsigned) j < numSlots; j++) {
|
2271
|
-
newnodelist[j] = NULL;
|
2272
|
-
}
|
2273
|
-
}
|
2274
|
-
} else {
|
2275
|
-
/* The current table is too small: we need to allocate a new,
|
2276
|
-
** larger one; move all old subtables, and initialize the new
|
2277
|
-
** subtables up to index included.
|
2278
|
-
*/
|
2279
|
-
newsize = index + DD_DEFAULT_RESIZE;
|
2280
|
-
#ifdef DD_VERBOSE
|
2281
|
-
(void) fprintf(unique->err,
|
2282
|
-
"Increasing the ZDD table size from %d to %d\n",
|
2283
|
-
unique->maxSizeZ, newsize);
|
2284
|
-
#endif
|
2285
|
-
newsubtables = ABC_ALLOC(DdSubtable,newsize);
|
2286
|
-
if (newsubtables == NULL) {
|
2287
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
2288
|
-
return(0);
|
2289
|
-
}
|
2290
|
-
newperm = ABC_ALLOC(int,newsize);
|
2291
|
-
if (newperm == NULL) {
|
2292
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
2293
|
-
return(0);
|
2294
|
-
}
|
2295
|
-
newinvperm = ABC_ALLOC(int,newsize);
|
2296
|
-
if (newinvperm == NULL) {
|
2297
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
2298
|
-
return(0);
|
2299
|
-
}
|
2300
|
-
unique->memused += (newsize - unique->maxSizeZ) * ((numSlots+1) *
|
2301
|
-
sizeof(DdNode *) + 2 * sizeof(int) + sizeof(DdSubtable));
|
2302
|
-
if (newsize > unique->maxSize) {
|
2303
|
-
ABC_FREE(unique->stack);
|
2304
|
-
unique->stack = ABC_ALLOC(DdNodePtr,newsize + 1);
|
2305
|
-
if (unique->stack == NULL) {
|
2306
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
2307
|
-
return(0);
|
2308
|
-
}
|
2309
|
-
unique->stack[0] = NULL; /* to suppress harmless UMR */
|
2310
|
-
unique->memused +=
|
2311
|
-
(newsize - ddMax(unique->maxSize,unique->maxSizeZ))
|
2312
|
-
* sizeof(DdNode *);
|
2313
|
-
}
|
2314
|
-
for (i = 0; i < oldsize; i++) {
|
2315
|
-
newsubtables[i].slots = unique->subtableZ[i].slots;
|
2316
|
-
newsubtables[i].shift = unique->subtableZ[i].shift;
|
2317
|
-
newsubtables[i].keys = unique->subtableZ[i].keys;
|
2318
|
-
newsubtables[i].maxKeys = unique->subtableZ[i].maxKeys;
|
2319
|
-
newsubtables[i].dead = unique->subtableZ[i].dead;
|
2320
|
-
newsubtables[i].nodelist = unique->subtableZ[i].nodelist;
|
2321
|
-
newperm[i] = unique->permZ[i];
|
2322
|
-
newinvperm[i] = unique->invpermZ[i];
|
2323
|
-
}
|
2324
|
-
for (i = oldsize; i <= index; i++) {
|
2325
|
-
newsubtables[i].slots = numSlots;
|
2326
|
-
newsubtables[i].shift = sizeof(int) * 8 -
|
2327
|
-
cuddComputeFloorLog2(numSlots);
|
2328
|
-
newsubtables[i].keys = 0;
|
2329
|
-
newsubtables[i].maxKeys = numSlots * DD_MAX_SUBTABLE_DENSITY;
|
2330
|
-
newsubtables[i].dead = 0;
|
2331
|
-
newperm[i] = i;
|
2332
|
-
newinvperm[i] = i;
|
2333
|
-
newnodelist = newsubtables[i].nodelist = ABC_ALLOC(DdNodePtr, numSlots);
|
2334
|
-
if (newnodelist == NULL) {
|
2335
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
2336
|
-
return(0);
|
2337
|
-
}
|
2338
|
-
for (j = 0; (unsigned) j < numSlots; j++) {
|
2339
|
-
newnodelist[j] = NULL;
|
2340
|
-
}
|
2341
|
-
}
|
2342
|
-
ABC_FREE(unique->subtableZ);
|
2343
|
-
unique->subtableZ = newsubtables;
|
2344
|
-
unique->maxSizeZ = newsize;
|
2345
|
-
ABC_FREE(unique->permZ);
|
2346
|
-
unique->permZ = newperm;
|
2347
|
-
ABC_FREE(unique->invpermZ);
|
2348
|
-
unique->invpermZ = newinvperm;
|
2349
|
-
}
|
2350
|
-
unique->slots += (index + 1 - unique->sizeZ) * numSlots;
|
2351
|
-
ddFixLimits(unique);
|
2352
|
-
unique->sizeZ = index + 1;
|
2353
|
-
|
2354
|
-
/* Now that the table is in a coherent state, update the ZDD
|
2355
|
-
** universe. We need to temporarily disable reordering,
|
2356
|
-
** because we cannot reorder without universe in place.
|
2357
|
-
*/
|
2358
|
-
|
2359
|
-
reorderSave = unique->autoDynZ;
|
2360
|
-
unique->autoDynZ = 0;
|
2361
|
-
cuddZddFreeUniv(unique);
|
2362
|
-
if (!cuddZddInitUniv(unique)) {
|
2363
|
-
unique->autoDynZ = reorderSave;
|
2364
|
-
return(0);
|
2365
|
-
}
|
2366
|
-
unique->autoDynZ = reorderSave;
|
2367
|
-
|
2368
|
-
return(1);
|
2369
|
-
|
2370
|
-
} /* end of cuddResizeTableZdd */
|
2371
|
-
|
2372
|
-
|
2373
|
-
/**Function********************************************************************
|
2374
|
-
|
2375
|
-
Synopsis [Adjusts parameters of a table to slow down its growth.]
|
2376
|
-
|
2377
|
-
Description []
|
2378
|
-
|
2379
|
-
SideEffects [None]
|
2380
|
-
|
2381
|
-
SeeAlso []
|
2382
|
-
|
2383
|
-
******************************************************************************/
|
2384
|
-
void
|
2385
|
-
cuddSlowTableGrowth(
|
2386
|
-
DdManager *unique)
|
2387
|
-
{
|
2388
|
-
int i;
|
2389
|
-
|
2390
|
-
unique->maxCacheHard = unique->cacheSlots - 1;
|
2391
|
-
unique->cacheSlack = - (int) (unique->cacheSlots + 1);
|
2392
|
-
for (i = 0; i < unique->size; i++) {
|
2393
|
-
unique->subtables[i].maxKeys <<= 2;
|
2394
|
-
}
|
2395
|
-
unique->gcFrac = DD_GC_FRAC_MIN;
|
2396
|
-
unique->minDead = (unsigned) (DD_GC_FRAC_MIN * (double) unique->slots);
|
2397
|
-
cuddShrinkDeathRow(unique);
|
2398
|
-
(void) fprintf(unique->err,"Slowing down table growth: ");
|
2399
|
-
(void) fprintf(unique->err,"GC fraction = %.2f\t", unique->gcFrac);
|
2400
|
-
(void) fprintf(unique->err,"minDead = %u\n", unique->minDead);
|
2401
|
-
|
2402
|
-
} /* end of cuddSlowTableGrowth */
|
2403
|
-
|
2404
|
-
|
2405
|
-
/*---------------------------------------------------------------------------*/
|
2406
|
-
/* Definition of static functions */
|
2407
|
-
/*---------------------------------------------------------------------------*/
|
2408
|
-
|
2409
|
-
|
2410
|
-
/**Function********************************************************************
|
2411
|
-
|
2412
|
-
Synopsis [Rehashes a ZDD unique subtable.]
|
2413
|
-
|
2414
|
-
Description []
|
2415
|
-
|
2416
|
-
SideEffects [None]
|
2417
|
-
|
2418
|
-
SeeAlso [cuddRehash]
|
2419
|
-
|
2420
|
-
******************************************************************************/
|
2421
|
-
static void
|
2422
|
-
ddRehashZdd(
|
2423
|
-
DdManager * unique,
|
2424
|
-
int i)
|
2425
|
-
{
|
2426
|
-
unsigned int slots, oldslots;
|
2427
|
-
int shift, oldshift;
|
2428
|
-
int j, pos;
|
2429
|
-
DdNodePtr *nodelist, *oldnodelist;
|
2430
|
-
DdNode *node, *next;
|
2431
|
-
extern DD_OOMFP MMoutOfMemory;
|
2432
|
-
DD_OOMFP saveHandler;
|
2433
|
-
|
2434
|
-
if (unique->slots > unique->looseUpTo) {
|
2435
|
-
unique->minDead = (unsigned) (DD_GC_FRAC_LO * (double) unique->slots);
|
2436
|
-
#ifdef DD_VERBOSE
|
2437
|
-
if (unique->gcFrac == DD_GC_FRAC_HI) {
|
2438
|
-
(void) fprintf(unique->err,"GC fraction = %.2f\t",
|
2439
|
-
DD_GC_FRAC_LO);
|
2440
|
-
(void) fprintf(unique->err,"minDead = %d\n", unique->minDead);
|
2441
|
-
}
|
2442
|
-
#endif
|
2443
|
-
unique->gcFrac = DD_GC_FRAC_LO;
|
2444
|
-
}
|
2445
|
-
|
2446
|
-
assert(i != CUDD_MAXINDEX);
|
2447
|
-
oldslots = unique->subtableZ[i].slots;
|
2448
|
-
oldshift = unique->subtableZ[i].shift;
|
2449
|
-
oldnodelist = unique->subtableZ[i].nodelist;
|
2450
|
-
|
2451
|
-
/* Compute the new size of the subtable. Normally, we just
|
2452
|
-
** double. However, after reordering, a table may be severely
|
2453
|
-
** overloaded. Therefore, we iterate. */
|
2454
|
-
slots = oldslots;
|
2455
|
-
shift = oldshift;
|
2456
|
-
do {
|
2457
|
-
slots <<= 1;
|
2458
|
-
shift--;
|
2459
|
-
} while (slots * DD_MAX_SUBTABLE_DENSITY < unique->subtableZ[i].keys);
|
2460
|
-
|
2461
|
-
saveHandler = MMoutOfMemory;
|
2462
|
-
MMoutOfMemory = Cudd_OutOfMem;
|
2463
|
-
nodelist = ABC_ALLOC(DdNodePtr, slots);
|
2464
|
-
MMoutOfMemory = saveHandler;
|
2465
|
-
if (nodelist == NULL) {
|
2466
|
-
(void) fprintf(unique->err,
|
2467
|
-
"Unable to resize ZDD subtable %d for lack of memory.\n",
|
2468
|
-
i);
|
2469
|
-
(void) cuddGarbageCollect(unique,1);
|
2470
|
-
for (j = 0; j < unique->sizeZ; j++) {
|
2471
|
-
unique->subtableZ[j].maxKeys <<= 1;
|
2472
|
-
}
|
2473
|
-
return;
|
2474
|
-
}
|
2475
|
-
unique->subtableZ[i].nodelist = nodelist;
|
2476
|
-
unique->subtableZ[i].slots = slots;
|
2477
|
-
unique->subtableZ[i].shift = shift;
|
2478
|
-
unique->subtableZ[i].maxKeys = slots * DD_MAX_SUBTABLE_DENSITY;
|
2479
|
-
for (j = 0; (unsigned) j < slots; j++) {
|
2480
|
-
nodelist[j] = NULL;
|
2481
|
-
}
|
2482
|
-
for (j = 0; (unsigned) j < oldslots; j++) {
|
2483
|
-
node = oldnodelist[j];
|
2484
|
-
while (node != NULL) {
|
2485
|
-
next = node->next;
|
2486
|
-
pos = ddHash(cuddF2L(cuddT(node)), cuddF2L(cuddE(node)), shift);
|
2487
|
-
node->next = nodelist[pos];
|
2488
|
-
nodelist[pos] = node;
|
2489
|
-
node = next;
|
2490
|
-
}
|
2491
|
-
}
|
2492
|
-
ABC_FREE(oldnodelist);
|
2493
|
-
|
2494
|
-
#ifdef DD_VERBOSE
|
2495
|
-
(void) fprintf(unique->err,
|
2496
|
-
"rehashing layer %d: keys %d dead %d new size %d\n",
|
2497
|
-
i, unique->subtableZ[i].keys,
|
2498
|
-
unique->subtableZ[i].dead, slots);
|
2499
|
-
#endif
|
2500
|
-
|
2501
|
-
/* Update global data. */
|
2502
|
-
unique->memused += (slots - oldslots) * sizeof(DdNode *);
|
2503
|
-
unique->slots += (slots - oldslots);
|
2504
|
-
ddFixLimits(unique);
|
2505
|
-
|
2506
|
-
} /* end of ddRehashZdd */
|
2507
|
-
|
2508
|
-
|
2509
|
-
/**Function********************************************************************
|
2510
|
-
|
2511
|
-
Synopsis [Increases the number of subtables in a unique table so
|
2512
|
-
that it meets or exceeds index.]
|
2513
|
-
|
2514
|
-
Description [Increases the number of subtables in a unique table so
|
2515
|
-
that it meets or exceeds index. Returns 1 if successful; 0 otherwise.]
|
2516
|
-
|
2517
|
-
SideEffects [None]
|
2518
|
-
|
2519
|
-
SeeAlso [cuddResizeTableZdd]
|
2520
|
-
|
2521
|
-
******************************************************************************/
|
2522
|
-
static int
|
2523
|
-
ddResizeTable(
|
2524
|
-
DdManager * unique,
|
2525
|
-
int index)
|
2526
|
-
{
|
2527
|
-
DdSubtable *newsubtables;
|
2528
|
-
DdNodePtr *newnodelist;
|
2529
|
-
DdNodePtr *newvars;
|
2530
|
-
DdNode *sentinel = &(unique->sentinel);
|
2531
|
-
int oldsize,newsize;
|
2532
|
-
int i,j,reorderSave;
|
2533
|
-
int numSlots = unique->initSlots;
|
2534
|
-
int *newperm, *newinvperm, *newmap = NULL;
|
2535
|
-
DdNode *one, *zero;
|
2536
|
-
|
2537
|
-
oldsize = unique->size;
|
2538
|
-
/* Easy case: there is still room in the current table. */
|
2539
|
-
if (index < unique->maxSize) {
|
2540
|
-
for (i = oldsize; i <= index; i++) {
|
2541
|
-
unique->subtables[i].slots = numSlots;
|
2542
|
-
unique->subtables[i].shift = sizeof(int) * 8 -
|
2543
|
-
cuddComputeFloorLog2(numSlots);
|
2544
|
-
unique->subtables[i].keys = 0;
|
2545
|
-
unique->subtables[i].maxKeys = numSlots * DD_MAX_SUBTABLE_DENSITY;
|
2546
|
-
unique->subtables[i].dead = 0;
|
2547
|
-
unique->subtables[i].bindVar = 0;
|
2548
|
-
unique->subtables[i].varType = CUDD_VAR_PRIMARY_INPUT;
|
2549
|
-
unique->subtables[i].pairIndex = 0;
|
2550
|
-
unique->subtables[i].varHandled = 0;
|
2551
|
-
unique->subtables[i].varToBeGrouped = CUDD_LAZY_NONE;
|
2552
|
-
|
2553
|
-
unique->perm[i] = i;
|
2554
|
-
unique->invperm[i] = i;
|
2555
|
-
newnodelist = unique->subtables[i].nodelist =
|
2556
|
-
ABC_ALLOC(DdNodePtr, numSlots);
|
2557
|
-
if (newnodelist == NULL) {
|
2558
|
-
for (j = oldsize; j < i; j++) {
|
2559
|
-
ABC_FREE(unique->subtables[j].nodelist);
|
2560
|
-
}
|
2561
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
2562
|
-
return(0);
|
2563
|
-
}
|
2564
|
-
for (j = 0; j < numSlots; j++) {
|
2565
|
-
newnodelist[j] = sentinel;
|
2566
|
-
}
|
2567
|
-
}
|
2568
|
-
if (unique->map != NULL) {
|
2569
|
-
for (i = oldsize; i <= index; i++) {
|
2570
|
-
unique->map[i] = i;
|
2571
|
-
}
|
2572
|
-
}
|
2573
|
-
} else {
|
2574
|
-
/* The current table is too small: we need to allocate a new,
|
2575
|
-
** larger one; move all old subtables, and initialize the new
|
2576
|
-
** subtables up to index included.
|
2577
|
-
*/
|
2578
|
-
newsize = index + DD_DEFAULT_RESIZE;
|
2579
|
-
#ifdef DD_VERBOSE
|
2580
|
-
(void) fprintf(unique->err,
|
2581
|
-
"Increasing the table size from %d to %d\n",
|
2582
|
-
unique->maxSize, newsize);
|
2583
|
-
#endif
|
2584
|
-
newsubtables = ABC_ALLOC(DdSubtable,newsize);
|
2585
|
-
if (newsubtables == NULL) {
|
2586
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
2587
|
-
return(0);
|
2588
|
-
}
|
2589
|
-
newvars = ABC_ALLOC(DdNodePtr,newsize);
|
2590
|
-
if (newvars == NULL) {
|
2591
|
-
ABC_FREE(newsubtables);
|
2592
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
2593
|
-
return(0);
|
2594
|
-
}
|
2595
|
-
newperm = ABC_ALLOC(int,newsize);
|
2596
|
-
if (newperm == NULL) {
|
2597
|
-
ABC_FREE(newsubtables);
|
2598
|
-
ABC_FREE(newvars);
|
2599
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
2600
|
-
return(0);
|
2601
|
-
}
|
2602
|
-
newinvperm = ABC_ALLOC(int,newsize);
|
2603
|
-
if (newinvperm == NULL) {
|
2604
|
-
ABC_FREE(newsubtables);
|
2605
|
-
ABC_FREE(newvars);
|
2606
|
-
ABC_FREE(newperm);
|
2607
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
2608
|
-
return(0);
|
2609
|
-
}
|
2610
|
-
if (unique->map != NULL) {
|
2611
|
-
newmap = ABC_ALLOC(int,newsize);
|
2612
|
-
if (newmap == NULL) {
|
2613
|
-
ABC_FREE(newsubtables);
|
2614
|
-
ABC_FREE(newvars);
|
2615
|
-
ABC_FREE(newperm);
|
2616
|
-
ABC_FREE(newinvperm);
|
2617
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
2618
|
-
return(0);
|
2619
|
-
}
|
2620
|
-
unique->memused += (newsize - unique->maxSize) * sizeof(int);
|
2621
|
-
}
|
2622
|
-
unique->memused += (newsize - unique->maxSize) * ((numSlots+1) *
|
2623
|
-
sizeof(DdNode *) + 2 * sizeof(int) + sizeof(DdSubtable));
|
2624
|
-
if (newsize > unique->maxSizeZ) {
|
2625
|
-
ABC_FREE(unique->stack);
|
2626
|
-
unique->stack = ABC_ALLOC(DdNodePtr,newsize + 1);
|
2627
|
-
if (unique->stack == NULL) {
|
2628
|
-
ABC_FREE(newsubtables);
|
2629
|
-
ABC_FREE(newvars);
|
2630
|
-
ABC_FREE(newperm);
|
2631
|
-
ABC_FREE(newinvperm);
|
2632
|
-
if (unique->map != NULL) {
|
2633
|
-
ABC_FREE(newmap);
|
2634
|
-
}
|
2635
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
2636
|
-
return(0);
|
2637
|
-
}
|
2638
|
-
unique->stack[0] = NULL; /* to suppress harmless UMR */
|
2639
|
-
unique->memused +=
|
2640
|
-
(newsize - ddMax(unique->maxSize,unique->maxSizeZ))
|
2641
|
-
* sizeof(DdNode *);
|
2642
|
-
}
|
2643
|
-
for (i = 0; i < oldsize; i++) {
|
2644
|
-
newsubtables[i].slots = unique->subtables[i].slots;
|
2645
|
-
newsubtables[i].shift = unique->subtables[i].shift;
|
2646
|
-
newsubtables[i].keys = unique->subtables[i].keys;
|
2647
|
-
newsubtables[i].maxKeys = unique->subtables[i].maxKeys;
|
2648
|
-
newsubtables[i].dead = unique->subtables[i].dead;
|
2649
|
-
newsubtables[i].nodelist = unique->subtables[i].nodelist;
|
2650
|
-
newsubtables[i].bindVar = unique->subtables[i].bindVar;
|
2651
|
-
newsubtables[i].varType = unique->subtables[i].varType;
|
2652
|
-
newsubtables[i].pairIndex = unique->subtables[i].pairIndex;
|
2653
|
-
newsubtables[i].varHandled = unique->subtables[i].varHandled;
|
2654
|
-
newsubtables[i].varToBeGrouped = unique->subtables[i].varToBeGrouped;
|
2655
|
-
|
2656
|
-
newvars[i] = unique->vars[i];
|
2657
|
-
newperm[i] = unique->perm[i];
|
2658
|
-
newinvperm[i] = unique->invperm[i];
|
2659
|
-
}
|
2660
|
-
for (i = oldsize; i <= index; i++) {
|
2661
|
-
newsubtables[i].slots = numSlots;
|
2662
|
-
newsubtables[i].shift = sizeof(int) * 8 -
|
2663
|
-
cuddComputeFloorLog2(numSlots);
|
2664
|
-
newsubtables[i].keys = 0;
|
2665
|
-
newsubtables[i].maxKeys = numSlots * DD_MAX_SUBTABLE_DENSITY;
|
2666
|
-
newsubtables[i].dead = 0;
|
2667
|
-
newsubtables[i].bindVar = 0;
|
2668
|
-
newsubtables[i].varType = CUDD_VAR_PRIMARY_INPUT;
|
2669
|
-
newsubtables[i].pairIndex = 0;
|
2670
|
-
newsubtables[i].varHandled = 0;
|
2671
|
-
newsubtables[i].varToBeGrouped = CUDD_LAZY_NONE;
|
2672
|
-
|
2673
|
-
newperm[i] = i;
|
2674
|
-
newinvperm[i] = i;
|
2675
|
-
newnodelist = newsubtables[i].nodelist = ABC_ALLOC(DdNodePtr, numSlots);
|
2676
|
-
if (newnodelist == NULL) {
|
2677
|
-
unique->errorCode = CUDD_MEMORY_OUT;
|
2678
|
-
return(0);
|
2679
|
-
}
|
2680
|
-
for (j = 0; j < numSlots; j++) {
|
2681
|
-
newnodelist[j] = sentinel;
|
2682
|
-
}
|
2683
|
-
}
|
2684
|
-
if (unique->map != NULL) {
|
2685
|
-
for (i = 0; i < oldsize; i++) {
|
2686
|
-
newmap[i] = unique->map[i];
|
2687
|
-
}
|
2688
|
-
for (i = oldsize; i <= index; i++) {
|
2689
|
-
newmap[i] = i;
|
2690
|
-
}
|
2691
|
-
ABC_FREE(unique->map);
|
2692
|
-
unique->map = newmap;
|
2693
|
-
}
|
2694
|
-
ABC_FREE(unique->subtables);
|
2695
|
-
unique->subtables = newsubtables;
|
2696
|
-
unique->maxSize = newsize;
|
2697
|
-
ABC_FREE(unique->vars);
|
2698
|
-
unique->vars = newvars;
|
2699
|
-
ABC_FREE(unique->perm);
|
2700
|
-
unique->perm = newperm;
|
2701
|
-
ABC_FREE(unique->invperm);
|
2702
|
-
unique->invperm = newinvperm;
|
2703
|
-
}
|
2704
|
-
|
2705
|
-
/* Now that the table is in a coherent state, create the new
|
2706
|
-
** projection functions. We need to temporarily disable reordering,
|
2707
|
-
** because we cannot reorder without projection functions in place.
|
2708
|
-
**/
|
2709
|
-
one = unique->one;
|
2710
|
-
zero = Cudd_Not(one);
|
2711
|
-
|
2712
|
-
unique->size = index + 1;
|
2713
|
-
unique->slots += (index + 1 - oldsize) * numSlots;
|
2714
|
-
ddFixLimits(unique);
|
2715
|
-
|
2716
|
-
reorderSave = unique->autoDyn;
|
2717
|
-
unique->autoDyn = 0;
|
2718
|
-
for (i = oldsize; i <= index; i++) {
|
2719
|
-
unique->vars[i] = cuddUniqueInter(unique,i,one,zero);
|
2720
|
-
if (unique->vars[i] == NULL) {
|
2721
|
-
unique->autoDyn = reorderSave;
|
2722
|
-
for (j = oldsize; j < i; j++) {
|
2723
|
-
Cudd_IterDerefBdd(unique,unique->vars[j]);
|
2724
|
-
cuddDeallocNode(unique,unique->vars[j]);
|
2725
|
-
unique->vars[j] = NULL;
|
2726
|
-
}
|
2727
|
-
for (j = oldsize; j <= index; j++) {
|
2728
|
-
ABC_FREE(unique->subtables[j].nodelist);
|
2729
|
-
unique->subtables[j].nodelist = NULL;
|
2730
|
-
}
|
2731
|
-
unique->size = oldsize;
|
2732
|
-
unique->slots -= (index + 1 - oldsize) * numSlots;
|
2733
|
-
ddFixLimits(unique);
|
2734
|
-
return(0);
|
2735
|
-
}
|
2736
|
-
cuddRef(unique->vars[i]);
|
2737
|
-
}
|
2738
|
-
unique->autoDyn = reorderSave;
|
2739
|
-
|
2740
|
-
return(1);
|
2741
|
-
|
2742
|
-
} /* end of ddResizeTable */
|
2743
|
-
|
2744
|
-
|
2745
|
-
/**Function********************************************************************
|
2746
|
-
|
2747
|
-
Synopsis [Searches the subtables above node for a parent.]
|
2748
|
-
|
2749
|
-
Description [Searches the subtables above node for a parent. Returns 1
|
2750
|
-
as soon as one parent is found. Returns 0 is the search is fruitless.]
|
2751
|
-
|
2752
|
-
SideEffects [None]
|
2753
|
-
|
2754
|
-
SeeAlso []
|
2755
|
-
|
2756
|
-
******************************************************************************/
|
2757
|
-
static int
|
2758
|
-
cuddFindParent(
|
2759
|
-
DdManager * table,
|
2760
|
-
DdNode * node)
|
2761
|
-
{
|
2762
|
-
int i,j;
|
2763
|
-
int slots;
|
2764
|
-
DdNodePtr *nodelist;
|
2765
|
-
DdNode *f;
|
2766
|
-
|
2767
|
-
for (i = cuddI(table,node->index) - 1; i >= 0; i--) {
|
2768
|
-
nodelist = table->subtables[i].nodelist;
|
2769
|
-
slots = table->subtables[i].slots;
|
2770
|
-
|
2771
|
-
for (j = 0; j < slots; j++) {
|
2772
|
-
f = nodelist[j];
|
2773
|
-
while (cuddT(f) > node) {
|
2774
|
-
f = f->next;
|
2775
|
-
}
|
2776
|
-
while (cuddT(f) == node && Cudd_Regular(cuddE(f)) > node) {
|
2777
|
-
f = f->next;
|
2778
|
-
}
|
2779
|
-
if (cuddT(f) == node && Cudd_Regular(cuddE(f)) == node) {
|
2780
|
-
return(1);
|
2781
|
-
}
|
2782
|
-
}
|
2783
|
-
}
|
2784
|
-
|
2785
|
-
return(0);
|
2786
|
-
|
2787
|
-
} /* end of cuddFindParent */
|
2788
|
-
|
2789
|
-
|
2790
|
-
/**Function********************************************************************
|
2791
|
-
|
2792
|
-
Synopsis [Adjusts the values of table limits.]
|
2793
|
-
|
2794
|
-
Description [Adjusts the values of table fields controlling the.
|
2795
|
-
sizes of subtables and computed table. If the computed table is too small
|
2796
|
-
according to the new values, it is resized.]
|
2797
|
-
|
2798
|
-
SideEffects [Modifies manager fields. May resize computed table.]
|
2799
|
-
|
2800
|
-
SeeAlso []
|
2801
|
-
|
2802
|
-
******************************************************************************/
|
2803
|
-
DD_INLINE
|
2804
|
-
static void
|
2805
|
-
ddFixLimits(
|
2806
|
-
DdManager *unique)
|
2807
|
-
{
|
2808
|
-
unique->minDead = (unsigned) (unique->gcFrac * (double) unique->slots);
|
2809
|
-
unique->cacheSlack = (int) ddMin(unique->maxCacheHard,
|
2810
|
-
DD_MAX_CACHE_TO_SLOTS_RATIO * unique->slots) -
|
2811
|
-
2 * (int) unique->cacheSlots;
|
2812
|
-
if (unique->cacheSlots < unique->slots/2 && unique->cacheSlack >= 0)
|
2813
|
-
cuddCacheResize(unique);
|
2814
|
-
return;
|
2815
|
-
|
2816
|
-
} /* end of ddFixLimits */
|
2817
|
-
|
2818
|
-
|
2819
|
-
#ifndef DD_UNSORTED_FREE_LIST
|
2820
|
-
#ifdef DD_RED_BLACK_FREE_LIST
|
2821
|
-
/**Function********************************************************************
|
2822
|
-
|
2823
|
-
Synopsis [Inserts a DdNode in a red/black search tree.]
|
2824
|
-
|
2825
|
-
Description [Inserts a DdNode in a red/black search tree. Nodes from
|
2826
|
-
the same "page" (defined by DD_PAGE_MASK) are linked in a LIFO list.]
|
2827
|
-
|
2828
|
-
SideEffects [None]
|
2829
|
-
|
2830
|
-
SeeAlso [cuddOrderedThread]
|
2831
|
-
|
2832
|
-
******************************************************************************/
|
2833
|
-
static void
|
2834
|
-
cuddOrderedInsert(
|
2835
|
-
DdNodePtr * root,
|
2836
|
-
DdNodePtr node)
|
2837
|
-
{
|
2838
|
-
DdNode *scan;
|
2839
|
-
DdNodePtr *scanP;
|
2840
|
-
DdNodePtr *stack[DD_STACK_SIZE];
|
2841
|
-
int stackN = 0;
|
2842
|
-
|
2843
|
-
scanP = root;
|
2844
|
-
while ((scan = *scanP) != NULL) {
|
2845
|
-
stack[stackN++] = scanP;
|
2846
|
-
if (DD_INSERT_COMPARE(node, scan) == 0) { /* add to page list */
|
2847
|
-
DD_NEXT(node) = DD_NEXT(scan);
|
2848
|
-
DD_NEXT(scan) = node;
|
2849
|
-
return;
|
2850
|
-
}
|
2851
|
-
scanP = (node < scan) ? &DD_LEFT(scan) : &DD_RIGHT(scan);
|
2852
|
-
}
|
2853
|
-
DD_RIGHT(node) = DD_LEFT(node) = DD_NEXT(node) = NULL;
|
2854
|
-
DD_COLOR(node) = DD_RED;
|
2855
|
-
*scanP = node;
|
2856
|
-
stack[stackN] = &node;
|
2857
|
-
cuddDoRebalance(stack,stackN);
|
2858
|
-
|
2859
|
-
} /* end of cuddOrderedInsert */
|
2860
|
-
|
2861
|
-
|
2862
|
-
/**Function********************************************************************
|
2863
|
-
|
2864
|
-
Synopsis [Threads all the nodes of a search tree into a linear list.]
|
2865
|
-
|
2866
|
-
Description [Threads all the nodes of a search tree into a linear
|
2867
|
-
list. For each node of the search tree, the "left" child, if non-null, has
|
2868
|
-
a lower address than its parent, and the "right" child, if non-null, has a
|
2869
|
-
higher address than its parent.
|
2870
|
-
The list is sorted in order of increasing addresses. The search
|
2871
|
-
tree is destroyed as a result of this operation. The last element of
|
2872
|
-
the linear list is made to point to the address passed in list. Each
|
2873
|
-
node if the search tree is a linearly-linked list of nodes from the
|
2874
|
-
same memory page (as defined in DD_PAGE_MASK). When a node is added to
|
2875
|
-
the linear list, all the elements of the linked list are added.]
|
2876
|
-
|
2877
|
-
SideEffects [The search tree is destroyed as a result of this operation.]
|
2878
|
-
|
2879
|
-
SeeAlso [cuddOrderedInsert]
|
2880
|
-
|
2881
|
-
******************************************************************************/
|
2882
|
-
static DdNode *
|
2883
|
-
cuddOrderedThread(
|
2884
|
-
DdNode * root,
|
2885
|
-
DdNode * list)
|
2886
|
-
{
|
2887
|
-
DdNode *current, *next, *prev, *end;
|
2888
|
-
|
2889
|
-
current = root;
|
2890
|
-
/* The first word in the node is used to implement a stack that holds
|
2891
|
-
** the nodes from the root of the tree to the current node. Here we
|
2892
|
-
** put the root of the tree at the bottom of the stack.
|
2893
|
-
*/
|
2894
|
-
*((DdNodePtr *) current) = NULL;
|
2895
|
-
|
2896
|
-
while (current != NULL) {
|
2897
|
-
if (DD_RIGHT(current) != NULL) {
|
2898
|
-
/* If possible, we follow the "right" link. Eventually we'll
|
2899
|
-
** find the node with the largest address in the current tree.
|
2900
|
-
** In this phase we use the first word of a node to implemen
|
2901
|
-
** a stack of the nodes on the path from the root to "current".
|
2902
|
-
** Also, we disconnect the "right" pointers to indicate that
|
2903
|
-
** we have already followed them.
|
2904
|
-
*/
|
2905
|
-
next = DD_RIGHT(current);
|
2906
|
-
DD_RIGHT(current) = NULL;
|
2907
|
-
*((DdNodePtr *)next) = current;
|
2908
|
-
current = next;
|
2909
|
-
} else {
|
2910
|
-
/* We can't proceed along the "right" links any further.
|
2911
|
-
** Hence "current" is the largest element in the current tree.
|
2912
|
-
** We make this node the new head of "list". (Repeating this
|
2913
|
-
** operation until the tree is empty yields the desired linear
|
2914
|
-
** threading of all nodes.)
|
2915
|
-
*/
|
2916
|
-
prev = *((DdNodePtr *) current); /* save prev node on stack in prev */
|
2917
|
-
/* Traverse the linked list of current until the end. */
|
2918
|
-
for (end = current; DD_NEXT(end) != NULL; end = DD_NEXT(end));
|
2919
|
-
DD_NEXT(end) = list; /* attach "list" at end and make */
|
2920
|
-
list = current; /* "current" the new head of "list" */
|
2921
|
-
/* Now, if current has a "left" child, we push it on the stack.
|
2922
|
-
** Otherwise, we just continue with the parent of "current".
|
2923
|
-
*/
|
2924
|
-
if (DD_LEFT(current) != NULL) {
|
2925
|
-
next = DD_LEFT(current);
|
2926
|
-
*((DdNodePtr *) next) = prev;
|
2927
|
-
current = next;
|
2928
|
-
} else {
|
2929
|
-
current = prev;
|
2930
|
-
}
|
2931
|
-
}
|
2932
|
-
}
|
2933
|
-
|
2934
|
-
return(list);
|
2935
|
-
|
2936
|
-
} /* end of cuddOrderedThread */
|
2937
|
-
|
2938
|
-
|
2939
|
-
/**Function********************************************************************
|
2940
|
-
|
2941
|
-
Synopsis [Performs the left rotation for red/black trees.]
|
2942
|
-
|
2943
|
-
Description []
|
2944
|
-
|
2945
|
-
SideEffects [None]
|
2946
|
-
|
2947
|
-
SeeAlso [cuddRotateRight]
|
2948
|
-
|
2949
|
-
******************************************************************************/
|
2950
|
-
DD_INLINE
|
2951
|
-
static void
|
2952
|
-
cuddRotateLeft(
|
2953
|
-
DdNodePtr * nodeP)
|
2954
|
-
{
|
2955
|
-
DdNode *newRoot;
|
2956
|
-
DdNode *oldRoot = *nodeP;
|
2957
|
-
|
2958
|
-
*nodeP = newRoot = DD_RIGHT(oldRoot);
|
2959
|
-
DD_RIGHT(oldRoot) = DD_LEFT(newRoot);
|
2960
|
-
DD_LEFT(newRoot) = oldRoot;
|
2961
|
-
|
2962
|
-
} /* end of cuddRotateLeft */
|
2963
|
-
|
2964
|
-
|
2965
|
-
/**Function********************************************************************
|
2966
|
-
|
2967
|
-
Synopsis [Performs the right rotation for red/black trees.]
|
2968
|
-
|
2969
|
-
Description []
|
2970
|
-
|
2971
|
-
SideEffects [None]
|
2972
|
-
|
2973
|
-
SeeAlso [cuddRotateLeft]
|
2974
|
-
|
2975
|
-
******************************************************************************/
|
2976
|
-
DD_INLINE
|
2977
|
-
static void
|
2978
|
-
cuddRotateRight(
|
2979
|
-
DdNodePtr * nodeP)
|
2980
|
-
{
|
2981
|
-
DdNode *newRoot;
|
2982
|
-
DdNode *oldRoot = *nodeP;
|
2983
|
-
|
2984
|
-
*nodeP = newRoot = DD_LEFT(oldRoot);
|
2985
|
-
DD_LEFT(oldRoot) = DD_RIGHT(newRoot);
|
2986
|
-
DD_RIGHT(newRoot) = oldRoot;
|
2987
|
-
|
2988
|
-
} /* end of cuddRotateRight */
|
2989
|
-
|
2990
|
-
|
2991
|
-
/**Function********************************************************************
|
2992
|
-
|
2993
|
-
Synopsis [Rebalances a red/black tree.]
|
2994
|
-
|
2995
|
-
Description []
|
2996
|
-
|
2997
|
-
SideEffects [None]
|
2998
|
-
|
2999
|
-
SeeAlso []
|
3000
|
-
|
3001
|
-
******************************************************************************/
|
3002
|
-
static void
|
3003
|
-
cuddDoRebalance(
|
3004
|
-
DdNodePtr ** stack,
|
3005
|
-
int stackN)
|
3006
|
-
{
|
3007
|
-
DdNodePtr *xP, *parentP, *grandpaP;
|
3008
|
-
DdNode *x, *y, *parent, *grandpa;
|
3009
|
-
|
3010
|
-
xP = stack[stackN];
|
3011
|
-
x = *xP;
|
3012
|
-
/* Work our way back up, re-balancing the tree. */
|
3013
|
-
while (--stackN >= 0) {
|
3014
|
-
parentP = stack[stackN];
|
3015
|
-
parent = *parentP;
|
3016
|
-
if (DD_IS_BLACK(parent)) break;
|
3017
|
-
/* Since the root is black, here a non-null grandparent exists. */
|
3018
|
-
grandpaP = stack[stackN-1];
|
3019
|
-
grandpa = *grandpaP;
|
3020
|
-
if (parent == DD_LEFT(grandpa)) {
|
3021
|
-
y = DD_RIGHT(grandpa);
|
3022
|
-
if (y != NULL && DD_IS_RED(y)) {
|
3023
|
-
DD_COLOR(parent) = DD_BLACK;
|
3024
|
-
DD_COLOR(y) = DD_BLACK;
|
3025
|
-
DD_COLOR(grandpa) = DD_RED;
|
3026
|
-
x = grandpa;
|
3027
|
-
stackN--;
|
3028
|
-
} else {
|
3029
|
-
if (x == DD_RIGHT(parent)) {
|
3030
|
-
cuddRotateLeft(parentP);
|
3031
|
-
DD_COLOR(x) = DD_BLACK;
|
3032
|
-
} else {
|
3033
|
-
DD_COLOR(parent) = DD_BLACK;
|
3034
|
-
}
|
3035
|
-
DD_COLOR(grandpa) = DD_RED;
|
3036
|
-
cuddRotateRight(grandpaP);
|
3037
|
-
break;
|
3038
|
-
}
|
3039
|
-
} else {
|
3040
|
-
y = DD_LEFT(grandpa);
|
3041
|
-
if (y != NULL && DD_IS_RED(y)) {
|
3042
|
-
DD_COLOR(parent) = DD_BLACK;
|
3043
|
-
DD_COLOR(y) = DD_BLACK;
|
3044
|
-
DD_COLOR(grandpa) = DD_RED;
|
3045
|
-
x = grandpa;
|
3046
|
-
stackN--;
|
3047
|
-
} else {
|
3048
|
-
if (x == DD_LEFT(parent)) {
|
3049
|
-
cuddRotateRight(parentP);
|
3050
|
-
DD_COLOR(x) = DD_BLACK;
|
3051
|
-
} else {
|
3052
|
-
DD_COLOR(parent) = DD_BLACK;
|
3053
|
-
}
|
3054
|
-
DD_COLOR(grandpa) = DD_RED;
|
3055
|
-
cuddRotateLeft(grandpaP);
|
3056
|
-
}
|
3057
|
-
}
|
3058
|
-
}
|
3059
|
-
DD_COLOR(*(stack[0])) = DD_BLACK;
|
3060
|
-
|
3061
|
-
} /* end of cuddDoRebalance */
|
3062
|
-
#endif
|
3063
|
-
#endif
|
3064
|
-
|
3065
|
-
|
3066
|
-
/**Function********************************************************************
|
3067
|
-
|
3068
|
-
Synopsis [Fixes a variable tree after the insertion of new subtables.]
|
3069
|
-
|
3070
|
-
Description [Fixes a variable tree after the insertion of new subtables.
|
3071
|
-
After such an insertion, the low fields of the tree below the insertion
|
3072
|
-
point are inconsistent.]
|
3073
|
-
|
3074
|
-
SideEffects [None]
|
3075
|
-
|
3076
|
-
SeeAlso []
|
3077
|
-
|
3078
|
-
******************************************************************************/
|
3079
|
-
static void
|
3080
|
-
ddPatchTree(
|
3081
|
-
DdManager *dd,
|
3082
|
-
MtrNode *treenode)
|
3083
|
-
{
|
3084
|
-
MtrNode *auxnode = treenode;
|
3085
|
-
|
3086
|
-
while (auxnode != NULL) {
|
3087
|
-
auxnode->low = dd->perm[auxnode->index];
|
3088
|
-
if (auxnode->child != NULL) {
|
3089
|
-
ddPatchTree(dd, auxnode->child);
|
3090
|
-
}
|
3091
|
-
auxnode = auxnode->younger;
|
3092
|
-
}
|
3093
|
-
|
3094
|
-
return;
|
3095
|
-
|
3096
|
-
} /* end of ddPatchTree */
|
3097
|
-
|
3098
|
-
|
3099
|
-
#ifdef DD_DEBUG
|
3100
|
-
/**Function********************************************************************
|
3101
|
-
|
3102
|
-
Synopsis [Checks whether a collision list is ordered.]
|
3103
|
-
|
3104
|
-
Description []
|
3105
|
-
|
3106
|
-
SideEffects [None]
|
3107
|
-
|
3108
|
-
SeeAlso []
|
3109
|
-
|
3110
|
-
******************************************************************************/
|
3111
|
-
static int
|
3112
|
-
cuddCheckCollisionOrdering(
|
3113
|
-
DdManager *unique,
|
3114
|
-
int i,
|
3115
|
-
int j)
|
3116
|
-
{
|
3117
|
-
int slots;
|
3118
|
-
DdNode *node, *next;
|
3119
|
-
DdNodePtr *nodelist;
|
3120
|
-
DdNode *sentinel = &(unique->sentinel);
|
3121
|
-
|
3122
|
-
nodelist = unique->subtables[i].nodelist;
|
3123
|
-
slots = unique->subtables[i].slots;
|
3124
|
-
node = nodelist[j];
|
3125
|
-
if (node == sentinel) return(1);
|
3126
|
-
next = node->next;
|
3127
|
-
while (next != sentinel) {
|
3128
|
-
if (cuddT(node) < cuddT(next) ||
|
3129
|
-
(cuddT(node) == cuddT(next) && cuddE(node) < cuddE(next))) {
|
3130
|
-
(void) fprintf(unique->err,
|
3131
|
-
"Unordered list: index %u, position %d\n", i, j);
|
3132
|
-
return(0);
|
3133
|
-
}
|
3134
|
-
node = next;
|
3135
|
-
next = node->next;
|
3136
|
-
}
|
3137
|
-
return(1);
|
3138
|
-
|
3139
|
-
} /* end of cuddCheckCollisionOrdering */
|
3140
|
-
#endif
|
3141
|
-
|
3142
|
-
|
3143
|
-
|
3144
|
-
|
3145
|
-
/**Function********************************************************************
|
3146
|
-
|
3147
|
-
Synopsis [Reports problem in garbage collection.]
|
3148
|
-
|
3149
|
-
Description []
|
3150
|
-
|
3151
|
-
SideEffects [None]
|
3152
|
-
|
3153
|
-
SeeAlso [cuddGarbageCollect cuddGarbageCollectZdd]
|
3154
|
-
|
3155
|
-
******************************************************************************/
|
3156
|
-
static void
|
3157
|
-
ddReportRefMess(
|
3158
|
-
DdManager *unique /* manager */,
|
3159
|
-
int i /* table in which the problem occurred */,
|
3160
|
-
const char *caller /* procedure that detected the problem */)
|
3161
|
-
{
|
3162
|
-
if (i == CUDD_CONST_INDEX) {
|
3163
|
-
(void) fprintf(unique->err,
|
3164
|
-
"%s: problem in constants\n", caller);
|
3165
|
-
} else if (i != -1) {
|
3166
|
-
(void) fprintf(unique->err,
|
3167
|
-
"%s: problem in table %d\n", caller, i);
|
3168
|
-
}
|
3169
|
-
(void) fprintf(unique->err, " dead count != deleted\n");
|
3170
|
-
(void) fprintf(unique->err, " This problem is often due to a missing \
|
3171
|
-
call to Cudd_Ref\n or to an extra call to Cudd_RecursiveDeref.\n \
|
3172
|
-
See the CUDD Programmer's Guide for additional details.");
|
3173
|
-
abort();
|
3174
|
-
|
3175
|
-
} /* end of ddReportRefMess */
|
3176
|
-
|
3177
|
-
|
3178
|
-
ABC_NAMESPACE_IMPL_END
|
3179
|
-
|