ruby_abc 0.0.6 → 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.
Files changed (1730) hide show
  1. checksums.yaml +5 -5
  2. data/.yardopts +7 -0
  3. data/LICENSE +51 -52
  4. data/README.md +48 -28
  5. data/bin/ruby_abc +83 -66
  6. data/ext/ruby_abc/extconf.rb +58 -0
  7. data/ext/{ruby_abc.c → ruby_abc/ruby_abc.c} +38 -70
  8. data/ext/ruby_abc/ruby_abc.map +6 -0
  9. data/ext/{ruby_abc_wrapper.c → ruby_abc/ruby_abc_wrapper.c} +0 -0
  10. data/ext/ruby_abc/ruby_abc_wrapper.h +39 -0
  11. data/lib/ruby_abc/version.rb +4 -0
  12. data/lib/ruby_abc.rb +247 -230
  13. data/share/bash_completion/ruby_abc.bash-completion.sh +24 -0
  14. data/share/osu018.genlib +66 -0
  15. data/share/simple.genlib +25 -0
  16. metadata +17 -1725
  17. data/Rakefile +0 -87
  18. data/ext/abc/CMakeLists.txt +0 -103
  19. data/ext/abc/Makefile +0 -213
  20. data/ext/abc/abc.rc +0 -146
  21. data/ext/abc/abcexe.dsp +0 -103
  22. data/ext/abc/abclib.dsp +0 -5948
  23. data/ext/abc/abcspace.dsw +0 -44
  24. data/ext/abc/arch_flags.c +0 -17
  25. data/ext/abc/copyright.txt +0 -23
  26. data/ext/abc/depends.sh +0 -13
  27. data/ext/abc/i10.aig +0 -752
  28. data/ext/abc/lib/pthread.h +0 -1369
  29. data/ext/abc/lib/sched.h +0 -178
  30. data/ext/abc/lib/semaphore.h +0 -166
  31. data/ext/abc/lib/x64/pthreadVC2.dll +0 -0
  32. data/ext/abc/lib/x64/pthreadVC2.lib +0 -0
  33. data/ext/abc/lib/x86/pthreadVC2.dll +0 -0
  34. data/ext/abc/lib/x86/pthreadVC2.lib +0 -0
  35. data/ext/abc/readme.md +0 -111
  36. data/ext/abc/readmeaig +0 -47
  37. data/ext/abc/src/aig/aig/aig.h +0 -713
  38. data/ext/abc/src/aig/aig/aigCanon.c +0 -701
  39. data/ext/abc/src/aig/aig/aigCheck.c +0 -168
  40. data/ext/abc/src/aig/aig/aigCuts.c +0 -673
  41. data/ext/abc/src/aig/aig/aigDfs.c +0 -1136
  42. data/ext/abc/src/aig/aig/aigDoms.c +0 -1154
  43. data/ext/abc/src/aig/aig/aigDup.c +0 -1335
  44. data/ext/abc/src/aig/aig/aigFact.c +0 -734
  45. data/ext/abc/src/aig/aig/aigFanout.c +0 -194
  46. data/ext/abc/src/aig/aig/aigFrames.c +0 -140
  47. data/ext/abc/src/aig/aig/aigInter.c +0 -301
  48. data/ext/abc/src/aig/aig/aigJust.c +0 -316
  49. data/ext/abc/src/aig/aig/aigMan.c +0 -486
  50. data/ext/abc/src/aig/aig/aigMem.c +0 -610
  51. data/ext/abc/src/aig/aig/aigMffc.c +0 -316
  52. data/ext/abc/src/aig/aig/aigObj.c +0 -536
  53. data/ext/abc/src/aig/aig/aigOper.c +0 -606
  54. data/ext/abc/src/aig/aig/aigOrder.c +0 -176
  55. data/ext/abc/src/aig/aig/aigPack.c +0 -404
  56. data/ext/abc/src/aig/aig/aigPart.c +0 -1613
  57. data/ext/abc/src/aig/aig/aigPartReg.c +0 -629
  58. data/ext/abc/src/aig/aig/aigPartSat.c +0 -618
  59. data/ext/abc/src/aig/aig/aigRepar.c +0 -403
  60. data/ext/abc/src/aig/aig/aigRepr.c +0 -559
  61. data/ext/abc/src/aig/aig/aigRet.c +0 -975
  62. data/ext/abc/src/aig/aig/aigRetF.c +0 -214
  63. data/ext/abc/src/aig/aig/aigScl.c +0 -708
  64. data/ext/abc/src/aig/aig/aigShow.c +0 -368
  65. data/ext/abc/src/aig/aig/aigSplit.c +0 -330
  66. data/ext/abc/src/aig/aig/aigTable.c +0 -277
  67. data/ext/abc/src/aig/aig/aigTest.c +0 -39
  68. data/ext/abc/src/aig/aig/aigTiming.c +0 -356
  69. data/ext/abc/src/aig/aig/aigTruth.c +0 -103
  70. data/ext/abc/src/aig/aig/aigTsim.c +0 -526
  71. data/ext/abc/src/aig/aig/aigUtil.c +0 -1575
  72. data/ext/abc/src/aig/aig/aigWin.c +0 -189
  73. data/ext/abc/src/aig/aig/aig_.c +0 -53
  74. data/ext/abc/src/aig/aig/module.make +0 -31
  75. data/ext/abc/src/aig/gia/gia.c +0 -52
  76. data/ext/abc/src/aig/gia/gia.h +0 -1667
  77. data/ext/abc/src/aig/gia/giaAgi.c +0 -238
  78. data/ext/abc/src/aig/gia/giaAig.c +0 -676
  79. data/ext/abc/src/aig/gia/giaAig.h +0 -78
  80. data/ext/abc/src/aig/gia/giaAiger.c +0 -1479
  81. data/ext/abc/src/aig/gia/giaAigerExt.c +0 -326
  82. data/ext/abc/src/aig/gia/giaBalAig.c +0 -1095
  83. data/ext/abc/src/aig/gia/giaBalLut.c +0 -982
  84. data/ext/abc/src/aig/gia/giaBalMap.c +0 -326
  85. data/ext/abc/src/aig/gia/giaBidec.c +0 -305
  86. data/ext/abc/src/aig/gia/giaCCof.c +0 -349
  87. data/ext/abc/src/aig/gia/giaCSat.c +0 -1105
  88. data/ext/abc/src/aig/gia/giaCSatOld.c +0 -804
  89. data/ext/abc/src/aig/gia/giaCTas.c +0 -1790
  90. data/ext/abc/src/aig/gia/giaCTas2.c +0 -208
  91. data/ext/abc/src/aig/gia/giaCex.c +0 -392
  92. data/ext/abc/src/aig/gia/giaClp.c +0 -422
  93. data/ext/abc/src/aig/gia/giaCof.c +0 -1002
  94. data/ext/abc/src/aig/gia/giaCone.c +0 -590
  95. data/ext/abc/src/aig/gia/giaConstr.c +0 -52
  96. data/ext/abc/src/aig/gia/giaCut.c +0 -646
  97. data/ext/abc/src/aig/gia/giaDfs.c +0 -582
  98. data/ext/abc/src/aig/gia/giaDup.c +0 -4791
  99. data/ext/abc/src/aig/gia/giaEdge.c +0 -1000
  100. data/ext/abc/src/aig/gia/giaEmbed.c +0 -1876
  101. data/ext/abc/src/aig/gia/giaEnable.c +0 -650
  102. data/ext/abc/src/aig/gia/giaEquiv.c +0 -2416
  103. data/ext/abc/src/aig/gia/giaEra.c +0 -602
  104. data/ext/abc/src/aig/gia/giaEra2.c +0 -1963
  105. data/ext/abc/src/aig/gia/giaEsop.c +0 -541
  106. data/ext/abc/src/aig/gia/giaFalse.c +0 -552
  107. data/ext/abc/src/aig/gia/giaFanout.c +0 -338
  108. data/ext/abc/src/aig/gia/giaForce.c +0 -1106
  109. data/ext/abc/src/aig/gia/giaFrames.c +0 -996
  110. data/ext/abc/src/aig/gia/giaFront.c +0 -295
  111. data/ext/abc/src/aig/gia/giaFx.c +0 -487
  112. data/ext/abc/src/aig/gia/giaGiarf.c +0 -1079
  113. data/ext/abc/src/aig/gia/giaGig.c +0 -506
  114. data/ext/abc/src/aig/gia/giaGlitch.c +0 -786
  115. data/ext/abc/src/aig/gia/giaHash.c +0 -816
  116. data/ext/abc/src/aig/gia/giaHcd.c +0 -689
  117. data/ext/abc/src/aig/gia/giaIf.c +0 -2536
  118. data/ext/abc/src/aig/gia/giaIff.c +0 -444
  119. data/ext/abc/src/aig/gia/giaIiff.c +0 -62
  120. data/ext/abc/src/aig/gia/giaIiff.h +0 -54
  121. data/ext/abc/src/aig/gia/giaIso.c +0 -1331
  122. data/ext/abc/src/aig/gia/giaIso2.c +0 -776
  123. data/ext/abc/src/aig/gia/giaIso3.c +0 -167
  124. data/ext/abc/src/aig/gia/giaJf.c +0 -1805
  125. data/ext/abc/src/aig/gia/giaKf.c +0 -1341
  126. data/ext/abc/src/aig/gia/giaLf.c +0 -2301
  127. data/ext/abc/src/aig/gia/giaMan.c +0 -1126
  128. data/ext/abc/src/aig/gia/giaMem.c +0 -598
  129. data/ext/abc/src/aig/gia/giaMf.c +0 -1741
  130. data/ext/abc/src/aig/gia/giaMffc.c +0 -313
  131. data/ext/abc/src/aig/gia/giaMfs.c +0 -477
  132. data/ext/abc/src/aig/gia/giaMini.c +0 -574
  133. data/ext/abc/src/aig/gia/giaMuxes.c +0 -915
  134. data/ext/abc/src/aig/gia/giaNf.c +0 -2420
  135. data/ext/abc/src/aig/gia/giaOf.c +0 -1866
  136. data/ext/abc/src/aig/gia/giaPack.c +0 -207
  137. data/ext/abc/src/aig/gia/giaPat.c +0 -135
  138. data/ext/abc/src/aig/gia/giaPf.c +0 -1354
  139. data/ext/abc/src/aig/gia/giaProp.c +0 -176
  140. data/ext/abc/src/aig/gia/giaQbf.c +0 -701
  141. data/ext/abc/src/aig/gia/giaResub.c +0 -292
  142. data/ext/abc/src/aig/gia/giaRetime.c +0 -304
  143. data/ext/abc/src/aig/gia/giaRex.c +0 -545
  144. data/ext/abc/src/aig/gia/giaSat.c +0 -427
  145. data/ext/abc/src/aig/gia/giaSat3.c +0 -136
  146. data/ext/abc/src/aig/gia/giaSatEdge.c +0 -537
  147. data/ext/abc/src/aig/gia/giaSatLE.c +0 -1083
  148. data/ext/abc/src/aig/gia/giaSatLut.c +0 -1225
  149. data/ext/abc/src/aig/gia/giaSatMap.c +0 -554
  150. data/ext/abc/src/aig/gia/giaSatoko.c +0 -274
  151. data/ext/abc/src/aig/gia/giaScl.c +0 -300
  152. data/ext/abc/src/aig/gia/giaScript.c +0 -783
  153. data/ext/abc/src/aig/gia/giaShow.c +0 -1164
  154. data/ext/abc/src/aig/gia/giaShrink.c +0 -154
  155. data/ext/abc/src/aig/gia/giaShrink6.c +0 -492
  156. data/ext/abc/src/aig/gia/giaShrink7.c +0 -373
  157. data/ext/abc/src/aig/gia/giaSim.c +0 -905
  158. data/ext/abc/src/aig/gia/giaSim2.c +0 -706
  159. data/ext/abc/src/aig/gia/giaSort.c +0 -273
  160. data/ext/abc/src/aig/gia/giaSpeedup.c +0 -805
  161. data/ext/abc/src/aig/gia/giaSplit.c +0 -578
  162. data/ext/abc/src/aig/gia/giaStg.c +0 -528
  163. data/ext/abc/src/aig/gia/giaStr.c +0 -1865
  164. data/ext/abc/src/aig/gia/giaSupMin.c +0 -165
  165. data/ext/abc/src/aig/gia/giaSupp.c +0 -886
  166. data/ext/abc/src/aig/gia/giaSweep.c +0 -777
  167. data/ext/abc/src/aig/gia/giaSweeper.c +0 -1185
  168. data/ext/abc/src/aig/gia/giaSwitch.c +0 -829
  169. data/ext/abc/src/aig/gia/giaTim.c +0 -1017
  170. data/ext/abc/src/aig/gia/giaTis.c +0 -213
  171. data/ext/abc/src/aig/gia/giaTruth.c +0 -639
  172. data/ext/abc/src/aig/gia/giaTsim.c +0 -757
  173. data/ext/abc/src/aig/gia/giaUnate.c +0 -255
  174. data/ext/abc/src/aig/gia/giaUtil.c +0 -2136
  175. data/ext/abc/src/aig/gia/module.make +0 -89
  176. data/ext/abc/src/aig/hop/cudd2.c +0 -360
  177. data/ext/abc/src/aig/hop/cudd2.h +0 -86
  178. data/ext/abc/src/aig/hop/hop.h +0 -356
  179. data/ext/abc/src/aig/hop/hopBalance.c +0 -401
  180. data/ext/abc/src/aig/hop/hopCheck.c +0 -115
  181. data/ext/abc/src/aig/hop/hopDfs.c +0 -591
  182. data/ext/abc/src/aig/hop/hopMan.c +0 -169
  183. data/ext/abc/src/aig/hop/hopMem.c +0 -120
  184. data/ext/abc/src/aig/hop/hopObj.c +0 -277
  185. data/ext/abc/src/aig/hop/hopOper.c +0 -378
  186. data/ext/abc/src/aig/hop/hopTable.c +0 -232
  187. data/ext/abc/src/aig/hop/hopTruth.c +0 -274
  188. data/ext/abc/src/aig/hop/hopUtil.c +0 -578
  189. data/ext/abc/src/aig/hop/hop_.c +0 -53
  190. data/ext/abc/src/aig/hop/module.make +0 -10
  191. data/ext/abc/src/aig/ioa/ioa.h +0 -87
  192. data/ext/abc/src/aig/ioa/ioaReadAig.c +0 -465
  193. data/ext/abc/src/aig/ioa/ioaUtil.c +0 -146
  194. data/ext/abc/src/aig/ioa/ioaWriteAig.c +0 -599
  195. data/ext/abc/src/aig/ioa/module.make +0 -3
  196. data/ext/abc/src/aig/ivy/attr.h +0 -418
  197. data/ext/abc/src/aig/ivy/ivy.h +0 -562
  198. data/ext/abc/src/aig/ivy/ivyBalance.c +0 -414
  199. data/ext/abc/src/aig/ivy/ivyCanon.c +0 -149
  200. data/ext/abc/src/aig/ivy/ivyCheck.c +0 -278
  201. data/ext/abc/src/aig/ivy/ivyCut.c +0 -995
  202. data/ext/abc/src/aig/ivy/ivyCutTrav.c +0 -478
  203. data/ext/abc/src/aig/ivy/ivyDfs.c +0 -498
  204. data/ext/abc/src/aig/ivy/ivyDsd.c +0 -831
  205. data/ext/abc/src/aig/ivy/ivyFanout.c +0 -314
  206. data/ext/abc/src/aig/ivy/ivyFastMap.c +0 -1569
  207. data/ext/abc/src/aig/ivy/ivyFraig.c +0 -2972
  208. data/ext/abc/src/aig/ivy/ivyHaig.c +0 -535
  209. data/ext/abc/src/aig/ivy/ivyMan.c +0 -552
  210. data/ext/abc/src/aig/ivy/ivyMem.c +0 -121
  211. data/ext/abc/src/aig/ivy/ivyMulti.c +0 -312
  212. data/ext/abc/src/aig/ivy/ivyMulti8.c +0 -432
  213. data/ext/abc/src/aig/ivy/ivyObj.c +0 -481
  214. data/ext/abc/src/aig/ivy/ivyOper.c +0 -298
  215. data/ext/abc/src/aig/ivy/ivyResyn.c +0 -201
  216. data/ext/abc/src/aig/ivy/ivyRwr.c +0 -618
  217. data/ext/abc/src/aig/ivy/ivyRwrAlg.c +0 -413
  218. data/ext/abc/src/aig/ivy/ivySeq.c +0 -1142
  219. data/ext/abc/src/aig/ivy/ivyShow.c +0 -343
  220. data/ext/abc/src/aig/ivy/ivyTable.c +0 -272
  221. data/ext/abc/src/aig/ivy/ivyUtil.c +0 -824
  222. data/ext/abc/src/aig/ivy/ivy_.c +0 -53
  223. data/ext/abc/src/aig/ivy/module.make +0 -22
  224. data/ext/abc/src/aig/miniaig/abcOper.h +0 -249
  225. data/ext/abc/src/aig/miniaig/miniaig.h +0 -346
  226. data/ext/abc/src/aig/miniaig/minilut.h +0 -288
  227. data/ext/abc/src/aig/miniaig/module.make +0 -1
  228. data/ext/abc/src/aig/miniaig/ndr.h +0 -521
  229. data/ext/abc/src/aig/saig/module.make +0 -26
  230. data/ext/abc/src/aig/saig/saig.h +0 -200
  231. data/ext/abc/src/aig/saig/saigCone.c +0 -181
  232. data/ext/abc/src/aig/saig/saigConstr.c +0 -484
  233. data/ext/abc/src/aig/saig/saigConstr2.c +0 -1013
  234. data/ext/abc/src/aig/saig/saigDual.c +0 -240
  235. data/ext/abc/src/aig/saig/saigDup.c +0 -600
  236. data/ext/abc/src/aig/saig/saigGlaCba.c +0 -840
  237. data/ext/abc/src/aig/saig/saigGlaPba.c +0 -589
  238. data/ext/abc/src/aig/saig/saigGlaPba2.c +0 -558
  239. data/ext/abc/src/aig/saig/saigInd.c +0 -409
  240. data/ext/abc/src/aig/saig/saigIoa.c +0 -405
  241. data/ext/abc/src/aig/saig/saigIso.c +0 -628
  242. data/ext/abc/src/aig/saig/saigIsoFast.c +0 -353
  243. data/ext/abc/src/aig/saig/saigIsoSlow.c +0 -1224
  244. data/ext/abc/src/aig/saig/saigMiter.c +0 -1317
  245. data/ext/abc/src/aig/saig/saigOutDec.c +0 -205
  246. data/ext/abc/src/aig/saig/saigPhase.c +0 -1081
  247. data/ext/abc/src/aig/saig/saigRefSat.c +0 -986
  248. data/ext/abc/src/aig/saig/saigRetFwd.c +0 -248
  249. data/ext/abc/src/aig/saig/saigRetMin.c +0 -705
  250. data/ext/abc/src/aig/saig/saigRetStep.c +0 -236
  251. data/ext/abc/src/aig/saig/saigScl.c +0 -115
  252. data/ext/abc/src/aig/saig/saigSimFast.c +0 -451
  253. data/ext/abc/src/aig/saig/saigSimMv.c +0 -956
  254. data/ext/abc/src/aig/saig/saigSimSeq.c +0 -518
  255. data/ext/abc/src/aig/saig/saigStrSim.c +0 -976
  256. data/ext/abc/src/aig/saig/saigSwitch.c +0 -573
  257. data/ext/abc/src/aig/saig/saigSynch.c +0 -665
  258. data/ext/abc/src/aig/saig/saigTempor.c +0 -256
  259. data/ext/abc/src/aig/saig/saigTrans.c +0 -428
  260. data/ext/abc/src/aig/saig/saigUnfold2.c +0 -497
  261. data/ext/abc/src/aig/saig/saigWnd.c +0 -816
  262. data/ext/abc/src/aig/saig/saig_.c +0 -52
  263. data/ext/abc/src/base/abc/abc.h +0 -1064
  264. data/ext/abc/src/base/abc/abcAig.c +0 -1505
  265. data/ext/abc/src/base/abc/abcBarBuf.c +0 -513
  266. data/ext/abc/src/base/abc/abcBlifMv.c +0 -1167
  267. data/ext/abc/src/base/abc/abcCheck.c +0 -953
  268. data/ext/abc/src/base/abc/abcDfs.c +0 -1910
  269. data/ext/abc/src/base/abc/abcFanOrder.c +0 -652
  270. data/ext/abc/src/base/abc/abcFanio.c +0 -366
  271. data/ext/abc/src/base/abc/abcFunc.c +0 -1273
  272. data/ext/abc/src/base/abc/abcHie.c +0 -843
  273. data/ext/abc/src/base/abc/abcHieCec.c +0 -764
  274. data/ext/abc/src/base/abc/abcHieGia.c +0 -582
  275. data/ext/abc/src/base/abc/abcHieNew.c +0 -1635
  276. data/ext/abc/src/base/abc/abcInt.h +0 -60
  277. data/ext/abc/src/base/abc/abcLatch.c +0 -778
  278. data/ext/abc/src/base/abc/abcLib.c +0 -400
  279. data/ext/abc/src/base/abc/abcMinBase.c +0 -841
  280. data/ext/abc/src/base/abc/abcNames.c +0 -802
  281. data/ext/abc/src/base/abc/abcNetlist.c +0 -511
  282. data/ext/abc/src/base/abc/abcNtk.c +0 -2298
  283. data/ext/abc/src/base/abc/abcObj.c +0 -1075
  284. data/ext/abc/src/base/abc/abcRefs.c +0 -457
  285. data/ext/abc/src/base/abc/abcShow.c +0 -458
  286. data/ext/abc/src/base/abc/abcSop.c +0 -1356
  287. data/ext/abc/src/base/abc/abcUtil.c +0 -3269
  288. data/ext/abc/src/base/abc/abc_.c +0 -52
  289. data/ext/abc/src/base/abc/module.make +0 -23
  290. data/ext/abc/src/base/abci/abc.c +0 -44490
  291. data/ext/abc/src/base/abci/abcAttach.c +0 -409
  292. data/ext/abc/src/base/abci/abcAuto.c +0 -256
  293. data/ext/abc/src/base/abci/abcBalance.c +0 -629
  294. data/ext/abc/src/base/abci/abcBidec.c +0 -156
  295. data/ext/abc/src/base/abci/abcBm.c +0 -2050
  296. data/ext/abc/src/base/abci/abcBmc.c +0 -122
  297. data/ext/abc/src/base/abci/abcCas.c +0 -128
  298. data/ext/abc/src/base/abci/abcCascade.c +0 -1062
  299. data/ext/abc/src/base/abci/abcCollapse.c +0 -957
  300. data/ext/abc/src/base/abci/abcCut.c +0 -700
  301. data/ext/abc/src/base/abci/abcDar.c +0 -4807
  302. data/ext/abc/src/base/abci/abcDarUnfold2.c +0 -69
  303. data/ext/abc/src/base/abci/abcDebug.c +0 -213
  304. data/ext/abc/src/base/abci/abcDec.c +0 -666
  305. data/ext/abc/src/base/abci/abcDetect.c +0 -1264
  306. data/ext/abc/src/base/abci/abcDress.c +0 -214
  307. data/ext/abc/src/base/abci/abcDress2.c +0 -500
  308. data/ext/abc/src/base/abci/abcDress3.c +0 -320
  309. data/ext/abc/src/base/abci/abcDsd.c +0 -710
  310. data/ext/abc/src/base/abci/abcEco.c +0 -58
  311. data/ext/abc/src/base/abci/abcEspresso.c +0 -255
  312. data/ext/abc/src/base/abci/abcExact.c +0 -3024
  313. data/ext/abc/src/base/abci/abcExtract.c +0 -752
  314. data/ext/abc/src/base/abci/abcFlop.c +0 -40
  315. data/ext/abc/src/base/abci/abcFpga.c +0 -288
  316. data/ext/abc/src/base/abci/abcFpgaFast.c +0 -195
  317. data/ext/abc/src/base/abci/abcFraig.c +0 -816
  318. data/ext/abc/src/base/abci/abcFx.c +0 -1207
  319. data/ext/abc/src/base/abci/abcFxu.c +0 -292
  320. data/ext/abc/src/base/abci/abcGen.c +0 -830
  321. data/ext/abc/src/base/abci/abcHaig.c +0 -557
  322. data/ext/abc/src/base/abci/abcIf.c +0 -830
  323. data/ext/abc/src/base/abci/abcIfMux.c +0 -422
  324. data/ext/abc/src/base/abci/abcIfif.c +0 -349
  325. data/ext/abc/src/base/abci/abcIvy.c +0 -1149
  326. data/ext/abc/src/base/abci/abcLog.c +0 -242
  327. data/ext/abc/src/base/abci/abcLut.c +0 -793
  328. data/ext/abc/src/base/abci/abcLutmin.c +0 -785
  329. data/ext/abc/src/base/abci/abcMap.c +0 -1064
  330. data/ext/abc/src/base/abci/abcMeasure.c +0 -483
  331. data/ext/abc/src/base/abci/abcMerge.c +0 -358
  332. data/ext/abc/src/base/abci/abcMffc.c +0 -1252
  333. data/ext/abc/src/base/abci/abcMfs.c +0 -469
  334. data/ext/abc/src/base/abci/abcMini.c +0 -237
  335. data/ext/abc/src/base/abci/abcMiter.c +0 -1196
  336. data/ext/abc/src/base/abci/abcMulti.c +0 -660
  337. data/ext/abc/src/base/abci/abcMv.c +0 -381
  338. data/ext/abc/src/base/abci/abcNpn.c +0 -392
  339. data/ext/abc/src/base/abci/abcNpnSave.c +0 -740
  340. data/ext/abc/src/base/abci/abcNtbdd.c +0 -619
  341. data/ext/abc/src/base/abci/abcOdc.c +0 -1132
  342. data/ext/abc/src/base/abci/abcOrder.c +0 -136
  343. data/ext/abc/src/base/abci/abcPart.c +0 -1206
  344. data/ext/abc/src/base/abci/abcPlace.c +0 -260
  345. data/ext/abc/src/base/abci/abcPrint.c +0 -2008
  346. data/ext/abc/src/base/abci/abcProve.c +0 -354
  347. data/ext/abc/src/base/abci/abcQbf.c +0 -319
  348. data/ext/abc/src/base/abci/abcQuant.c +0 -436
  349. data/ext/abc/src/base/abci/abcReach.c +0 -327
  350. data/ext/abc/src/base/abci/abcRec3.c +0 -1433
  351. data/ext/abc/src/base/abci/abcReconv.c +0 -776
  352. data/ext/abc/src/base/abci/abcRefactor.c +0 -418
  353. data/ext/abc/src/base/abci/abcRenode.c +0 -326
  354. data/ext/abc/src/base/abci/abcReorder.c +0 -117
  355. data/ext/abc/src/base/abci/abcRestruct.c +0 -1511
  356. data/ext/abc/src/base/abci/abcResub.c +0 -1957
  357. data/ext/abc/src/base/abci/abcRewrite.c +0 -420
  358. data/ext/abc/src/base/abci/abcRpo.c +0 -442
  359. data/ext/abc/src/base/abci/abcRr.c +0 -1005
  360. data/ext/abc/src/base/abci/abcSat.c +0 -1020
  361. data/ext/abc/src/base/abci/abcSaucy.c +0 -3346
  362. data/ext/abc/src/base/abci/abcScorr.c +0 -454
  363. data/ext/abc/src/base/abci/abcSense.c +0 -216
  364. data/ext/abc/src/base/abci/abcSpeedup.c +0 -965
  365. data/ext/abc/src/base/abci/abcStrash.c +0 -848
  366. data/ext/abc/src/base/abci/abcSweep.c +0 -1030
  367. data/ext/abc/src/base/abci/abcSymm.c +0 -246
  368. data/ext/abc/src/base/abci/abcTim.c +0 -637
  369. data/ext/abc/src/base/abci/abcTiming.c +0 -1398
  370. data/ext/abc/src/base/abci/abcUnate.c +0 -178
  371. data/ext/abc/src/base/abci/abcUnreach.c +0 -366
  372. data/ext/abc/src/base/abci/abcVerify.c +0 -1109
  373. data/ext/abc/src/base/abci/abcXsim.c +0 -231
  374. data/ext/abc/src/base/abci/abciUnfold2.c +0 -186
  375. data/ext/abc/src/base/abci/fahout_cut.c +0 -358
  376. data/ext/abc/src/base/abci/module.make +0 -75
  377. data/ext/abc/src/base/acb/acb.c +0 -52
  378. data/ext/abc/src/base/acb/acb.h +0 -1038
  379. data/ext/abc/src/base/acb/acbAbc.c +0 -302
  380. data/ext/abc/src/base/acb/acbAig.c +0 -52
  381. data/ext/abc/src/base/acb/acbCom.c +0 -735
  382. data/ext/abc/src/base/acb/acbFunc.c +0 -56
  383. data/ext/abc/src/base/acb/acbMfs.c +0 -1644
  384. data/ext/abc/src/base/acb/acbPar.h +0 -70
  385. data/ext/abc/src/base/acb/acbPush.c +0 -372
  386. data/ext/abc/src/base/acb/acbSets.c +0 -54
  387. data/ext/abc/src/base/acb/acbSets.h +0 -61
  388. data/ext/abc/src/base/acb/acbUtil.c +0 -479
  389. data/ext/abc/src/base/acb/module.make +0 -8
  390. data/ext/abc/src/base/bac/bac.c +0 -52
  391. data/ext/abc/src/base/bac/bac.h +0 -1017
  392. data/ext/abc/src/base/bac/bacBac.c +0 -298
  393. data/ext/abc/src/base/bac/bacBlast.c +0 -587
  394. data/ext/abc/src/base/bac/bacCom.c +0 -728
  395. data/ext/abc/src/base/bac/bacLib.c +0 -52
  396. data/ext/abc/src/base/bac/bacNtk.c +0 -603
  397. data/ext/abc/src/base/bac/bacOper.c +0 -365
  398. data/ext/abc/src/base/bac/bacPrs.h +0 -363
  399. data/ext/abc/src/base/bac/bacPrsBuild.c +0 -356
  400. data/ext/abc/src/base/bac/bacPrsTrans.c +0 -211
  401. data/ext/abc/src/base/bac/bacPtr.c +0 -470
  402. data/ext/abc/src/base/bac/bacPtrAbc.c +0 -486
  403. data/ext/abc/src/base/bac/bacReadBlif.c +0 -453
  404. data/ext/abc/src/base/bac/bacReadSmt.c +0 -42
  405. data/ext/abc/src/base/bac/bacReadVer.c +0 -875
  406. data/ext/abc/src/base/bac/bacWriteBlif.c +0 -236
  407. data/ext/abc/src/base/bac/bacWriteSmt.c +0 -52
  408. data/ext/abc/src/base/bac/bacWriteVer.c +0 -703
  409. data/ext/abc/src/base/bac/module.make +0 -15
  410. data/ext/abc/src/base/cba/cba.c +0 -52
  411. data/ext/abc/src/base/cba/cba.h +0 -1024
  412. data/ext/abc/src/base/cba/cbaBlast.c +0 -1069
  413. data/ext/abc/src/base/cba/cbaCba.c +0 -58
  414. data/ext/abc/src/base/cba/cbaCom.c +0 -731
  415. data/ext/abc/src/base/cba/cbaNtk.c +0 -1183
  416. data/ext/abc/src/base/cba/cbaPrs.h +0 -520
  417. data/ext/abc/src/base/cba/cbaReadBlif.c +0 -646
  418. data/ext/abc/src/base/cba/cbaReadVer.c +0 -2182
  419. data/ext/abc/src/base/cba/cbaTypes.h +0 -169
  420. data/ext/abc/src/base/cba/cbaWriteBlif.c +0 -218
  421. data/ext/abc/src/base/cba/cbaWriteVer.c +0 -1016
  422. data/ext/abc/src/base/cba/module.make +0 -8
  423. data/ext/abc/src/base/cmd/cmd.c +0 -2611
  424. data/ext/abc/src/base/cmd/cmd.h +0 -81
  425. data/ext/abc/src/base/cmd/cmdAlias.c +0 -126
  426. data/ext/abc/src/base/cmd/cmdApi.c +0 -127
  427. data/ext/abc/src/base/cmd/cmdAuto.c +0 -684
  428. data/ext/abc/src/base/cmd/cmdFlag.c +0 -110
  429. data/ext/abc/src/base/cmd/cmdHist.c +0 -180
  430. data/ext/abc/src/base/cmd/cmdInt.h +0 -92
  431. data/ext/abc/src/base/cmd/cmdLoad.c +0 -209
  432. data/ext/abc/src/base/cmd/cmdPlugin.c +0 -773
  433. data/ext/abc/src/base/cmd/cmdStarter.c +0 -259
  434. data/ext/abc/src/base/cmd/cmdUtils.c +0 -756
  435. data/ext/abc/src/base/cmd/module.make +0 -10
  436. data/ext/abc/src/base/exor/exor.c +0 -958
  437. data/ext/abc/src/base/exor/exor.h +0 -189
  438. data/ext/abc/src/base/exor/exorBits.c +0 -425
  439. data/ext/abc/src/base/exor/exorCubes.c +0 -190
  440. data/ext/abc/src/base/exor/exorLink.c +0 -749
  441. data/ext/abc/src/base/exor/exorList.c +0 -1156
  442. data/ext/abc/src/base/exor/exorUtil.c +0 -228
  443. data/ext/abc/src/base/exor/module.make +0 -6
  444. data/ext/abc/src/base/io/io.c +0 -3157
  445. data/ext/abc/src/base/io/ioAbc.h +0 -172
  446. data/ext/abc/src/base/io/ioInt.h +0 -57
  447. data/ext/abc/src/base/io/ioJson.c +0 -270
  448. data/ext/abc/src/base/io/ioReadAiger.c +0 -599
  449. data/ext/abc/src/base/io/ioReadBaf.c +0 -177
  450. data/ext/abc/src/base/io/ioReadBblif.c +0 -348
  451. data/ext/abc/src/base/io/ioReadBench.c +0 -391
  452. data/ext/abc/src/base/io/ioReadBlif.c +0 -1707
  453. data/ext/abc/src/base/io/ioReadBlifAig.c +0 -1019
  454. data/ext/abc/src/base/io/ioReadBlifMv.c +0 -2363
  455. data/ext/abc/src/base/io/ioReadDsd.c +0 -313
  456. data/ext/abc/src/base/io/ioReadEdif.c +0 -240
  457. data/ext/abc/src/base/io/ioReadEqn.c +0 -244
  458. data/ext/abc/src/base/io/ioReadPla.c +0 -600
  459. data/ext/abc/src/base/io/ioReadPlaMo.c +0 -813
  460. data/ext/abc/src/base/io/ioReadVerilog.c +0 -102
  461. data/ext/abc/src/base/io/ioUtil.c +0 -871
  462. data/ext/abc/src/base/io/ioWriteAiger.c +0 -956
  463. data/ext/abc/src/base/io/ioWriteBaf.c +0 -173
  464. data/ext/abc/src/base/io/ioWriteBblif.c +0 -116
  465. data/ext/abc/src/base/io/ioWriteBench.c +0 -340
  466. data/ext/abc/src/base/io/ioWriteBlif.c +0 -1410
  467. data/ext/abc/src/base/io/ioWriteBlifMv.c +0 -476
  468. data/ext/abc/src/base/io/ioWriteBook.c +0 -998
  469. data/ext/abc/src/base/io/ioWriteCnf.c +0 -120
  470. data/ext/abc/src/base/io/ioWriteDot.c +0 -854
  471. data/ext/abc/src/base/io/ioWriteEqn.c +0 -257
  472. data/ext/abc/src/base/io/ioWriteGml.c +0 -121
  473. data/ext/abc/src/base/io/ioWriteList.c +0 -293
  474. data/ext/abc/src/base/io/ioWritePla.c +0 -460
  475. data/ext/abc/src/base/io/ioWriteSmv.c +0 -265
  476. data/ext/abc/src/base/io/ioWriteVerilog.c +0 -662
  477. data/ext/abc/src/base/io/module.make +0 -31
  478. data/ext/abc/src/base/main/abcapis.h +0 -106
  479. data/ext/abc/src/base/main/abcapis_old.h +0 -84
  480. data/ext/abc/src/base/main/libSupport.c +0 -211
  481. data/ext/abc/src/base/main/main.c +0 -12
  482. data/ext/abc/src/base/main/main.h +0 -171
  483. data/ext/abc/src/base/main/mainFrame.c +0 -742
  484. data/ext/abc/src/base/main/mainInit.c +0 -168
  485. data/ext/abc/src/base/main/mainInt.h +0 -207
  486. data/ext/abc/src/base/main/mainLib.c +0 -93
  487. data/ext/abc/src/base/main/mainMC.c +0 -203
  488. data/ext/abc/src/base/main/mainReal.c +0 -386
  489. data/ext/abc/src/base/main/mainUtils.c +0 -294
  490. data/ext/abc/src/base/main/module.make +0 -7
  491. data/ext/abc/src/base/pla/module.make +0 -7
  492. data/ext/abc/src/base/pla/pla.c +0 -52
  493. data/ext/abc/src/base/pla/pla.h +0 -297
  494. data/ext/abc/src/base/pla/plaCom.c +0 -507
  495. data/ext/abc/src/base/pla/plaFxch.c +0 -854
  496. data/ext/abc/src/base/pla/plaHash.c +0 -347
  497. data/ext/abc/src/base/pla/plaMan.c +0 -300
  498. data/ext/abc/src/base/pla/plaMerge.c +0 -55
  499. data/ext/abc/src/base/pla/plaRead.c +0 -224
  500. data/ext/abc/src/base/pla/plaSimple.c +0 -339
  501. data/ext/abc/src/base/pla/plaWrite.c +0 -112
  502. data/ext/abc/src/base/test/module.make +0 -1
  503. data/ext/abc/src/base/test/test.c +0 -70
  504. data/ext/abc/src/base/ver/module.make +0 -4
  505. data/ext/abc/src/base/ver/ver.h +0 -122
  506. data/ext/abc/src/base/ver/verCore.c +0 -3037
  507. data/ext/abc/src/base/ver/verFormula.c +0 -479
  508. data/ext/abc/src/base/ver/verParse.c +0 -131
  509. data/ext/abc/src/base/ver/verStream.c +0 -450
  510. data/ext/abc/src/base/ver/verWords.c +0 -53
  511. data/ext/abc/src/base/ver/ver_.c +0 -53
  512. data/ext/abc/src/base/wlc/module.make +0 -17
  513. data/ext/abc/src/base/wlc/wlc.c +0 -274
  514. data/ext/abc/src/base/wlc/wlc.h +0 -392
  515. data/ext/abc/src/base/wlc/wlcAbc.c +0 -275
  516. data/ext/abc/src/base/wlc/wlcAbs.c +0 -1912
  517. data/ext/abc/src/base/wlc/wlcAbs2.c +0 -410
  518. data/ext/abc/src/base/wlc/wlcBlast.c +0 -1692
  519. data/ext/abc/src/base/wlc/wlcCom.c +0 -1559
  520. data/ext/abc/src/base/wlc/wlcGraft.c +0 -573
  521. data/ext/abc/src/base/wlc/wlcJson.c +0 -54
  522. data/ext/abc/src/base/wlc/wlcNtk.c +0 -1268
  523. data/ext/abc/src/base/wlc/wlcPth.c +0 -173
  524. data/ext/abc/src/base/wlc/wlcReadSmt.c +0 -1784
  525. data/ext/abc/src/base/wlc/wlcReadVer.c +0 -1308
  526. data/ext/abc/src/base/wlc/wlcShow.c +0 -337
  527. data/ext/abc/src/base/wlc/wlcSim.c +0 -251
  528. data/ext/abc/src/base/wlc/wlcStdin.c +0 -255
  529. data/ext/abc/src/base/wlc/wlcUif.c +0 -290
  530. data/ext/abc/src/base/wlc/wlcWin.c +0 -166
  531. data/ext/abc/src/base/wlc/wlcWriteVer.c +0 -450
  532. data/ext/abc/src/bdd/bbr/bbr.h +0 -93
  533. data/ext/abc/src/bdd/bbr/bbrCex.c +0 -172
  534. data/ext/abc/src/bdd/bbr/bbrImage.c +0 -1327
  535. data/ext/abc/src/bdd/bbr/bbrNtbdd.c +0 -218
  536. data/ext/abc/src/bdd/bbr/bbrReach.c +0 -615
  537. data/ext/abc/src/bdd/bbr/bbr_.c +0 -52
  538. data/ext/abc/src/bdd/bbr/module.make +0 -4
  539. data/ext/abc/src/bdd/cas/cas.h +0 -66
  540. data/ext/abc/src/bdd/cas/casCore.c +0 -1265
  541. data/ext/abc/src/bdd/cas/casDec.c +0 -512
  542. data/ext/abc/src/bdd/cas/module.make +0 -3
  543. data/ext/abc/src/bdd/cudd/Makefile +0 -124
  544. data/ext/abc/src/bdd/cudd/cuBdd.make +0 -41
  545. data/ext/abc/src/bdd/cudd/cudd.h +0 -1054
  546. data/ext/abc/src/bdd/cudd/cudd.make +0 -42
  547. data/ext/abc/src/bdd/cudd/cuddAPI.c +0 -4444
  548. data/ext/abc/src/bdd/cudd/cuddAddAbs.c +0 -588
  549. data/ext/abc/src/bdd/cudd/cuddAddApply.c +0 -949
  550. data/ext/abc/src/bdd/cudd/cuddAddFind.c +0 -316
  551. data/ext/abc/src/bdd/cudd/cuddAddInv.c +0 -209
  552. data/ext/abc/src/bdd/cudd/cuddAddIte.c +0 -647
  553. data/ext/abc/src/bdd/cudd/cuddAddNeg.c +0 -296
  554. data/ext/abc/src/bdd/cudd/cuddAddWalsh.c +0 -399
  555. data/ext/abc/src/bdd/cudd/cuddAndAbs.c +0 -384
  556. data/ext/abc/src/bdd/cudd/cuddAnneal.c +0 -822
  557. data/ext/abc/src/bdd/cudd/cuddApa.c +0 -979
  558. data/ext/abc/src/bdd/cudd/cuddApprox.c +0 -2213
  559. data/ext/abc/src/bdd/cudd/cuddBddAbs.c +0 -725
  560. data/ext/abc/src/bdd/cudd/cuddBddCorr.c +0 -515
  561. data/ext/abc/src/bdd/cudd/cuddBddIte.c +0 -1328
  562. data/ext/abc/src/bdd/cudd/cuddBridge.c +0 -1021
  563. data/ext/abc/src/bdd/cudd/cuddCache.c +0 -1100
  564. data/ext/abc/src/bdd/cudd/cuddCheck.c +0 -887
  565. data/ext/abc/src/bdd/cudd/cuddClip.c +0 -566
  566. data/ext/abc/src/bdd/cudd/cuddCof.c +0 -335
  567. data/ext/abc/src/bdd/cudd/cuddCompose.c +0 -1760
  568. data/ext/abc/src/bdd/cudd/cuddDecomp.c +0 -2185
  569. data/ext/abc/src/bdd/cudd/cuddEssent.c +0 -1475
  570. data/ext/abc/src/bdd/cudd/cuddExact.c +0 -1028
  571. data/ext/abc/src/bdd/cudd/cuddExport.c +0 -1384
  572. data/ext/abc/src/bdd/cudd/cuddGenCof.c +0 -2175
  573. data/ext/abc/src/bdd/cudd/cuddGenetic.c +0 -957
  574. data/ext/abc/src/bdd/cudd/cuddGroup.c +0 -2173
  575. data/ext/abc/src/bdd/cudd/cuddHarwell.c +0 -576
  576. data/ext/abc/src/bdd/cudd/cuddInit.c +0 -319
  577. data/ext/abc/src/bdd/cudd/cuddInt.h +0 -1232
  578. data/ext/abc/src/bdd/cudd/cuddInteract.c +0 -437
  579. data/ext/abc/src/bdd/cudd/cuddLCache.c +0 -1465
  580. data/ext/abc/src/bdd/cudd/cuddLevelQ.c +0 -569
  581. data/ext/abc/src/bdd/cudd/cuddLinear.c +0 -1373
  582. data/ext/abc/src/bdd/cudd/cuddLiteral.c +0 -272
  583. data/ext/abc/src/bdd/cudd/cuddMatMult.c +0 -715
  584. data/ext/abc/src/bdd/cudd/cuddPriority.c +0 -2035
  585. data/ext/abc/src/bdd/cudd/cuddRead.c +0 -525
  586. data/ext/abc/src/bdd/cudd/cuddRef.c +0 -816
  587. data/ext/abc/src/bdd/cudd/cuddReorder.c +0 -2143
  588. data/ext/abc/src/bdd/cudd/cuddSat.c +0 -1338
  589. data/ext/abc/src/bdd/cudd/cuddSign.c +0 -326
  590. data/ext/abc/src/bdd/cudd/cuddSolve.c +0 -374
  591. data/ext/abc/src/bdd/cudd/cuddSplit.c +0 -694
  592. data/ext/abc/src/bdd/cudd/cuddSubsetHB.c +0 -1337
  593. data/ext/abc/src/bdd/cudd/cuddSubsetSP.c +0 -1657
  594. data/ext/abc/src/bdd/cudd/cuddSymmetry.c +0 -1706
  595. data/ext/abc/src/bdd/cudd/cuddTable.c +0 -3179
  596. data/ext/abc/src/bdd/cudd/cuddUtil.c +0 -3929
  597. data/ext/abc/src/bdd/cudd/cuddWindow.c +0 -1031
  598. data/ext/abc/src/bdd/cudd/cuddZddCount.c +0 -357
  599. data/ext/abc/src/bdd/cudd/cuddZddFuncs.c +0 -1638
  600. data/ext/abc/src/bdd/cudd/cuddZddGroup.c +0 -1344
  601. data/ext/abc/src/bdd/cudd/cuddZddIsop.c +0 -919
  602. data/ext/abc/src/bdd/cudd/cuddZddLin.c +0 -975
  603. data/ext/abc/src/bdd/cudd/cuddZddMisc.c +0 -286
  604. data/ext/abc/src/bdd/cudd/cuddZddPort.c +0 -389
  605. data/ext/abc/src/bdd/cudd/cuddZddReord.c +0 -1668
  606. data/ext/abc/src/bdd/cudd/cuddZddSetop.c +0 -1166
  607. data/ext/abc/src/bdd/cudd/cuddZddSymm.c +0 -1707
  608. data/ext/abc/src/bdd/cudd/cuddZddUtil.c +0 -1071
  609. data/ext/abc/src/bdd/cudd/license +0 -32
  610. data/ext/abc/src/bdd/cudd/module.make +0 -61
  611. data/ext/abc/src/bdd/cudd/r7x8.1.mat +0 -53
  612. data/ext/abc/src/bdd/cudd/r7x8.1.out +0 -377
  613. data/ext/abc/src/bdd/cudd/testcudd.c +0 -1073
  614. data/ext/abc/src/bdd/dsd/dsd.h +0 -134
  615. data/ext/abc/src/bdd/dsd/dsdApi.c +0 -102
  616. data/ext/abc/src/bdd/dsd/dsdCheck.c +0 -319
  617. data/ext/abc/src/bdd/dsd/dsdInt.h +0 -99
  618. data/ext/abc/src/bdd/dsd/dsdLocal.c +0 -342
  619. data/ext/abc/src/bdd/dsd/dsdMan.c +0 -119
  620. data/ext/abc/src/bdd/dsd/dsdProc.c +0 -1613
  621. data/ext/abc/src/bdd/dsd/dsdTree.c +0 -1181
  622. data/ext/abc/src/bdd/dsd/module.make +0 -6
  623. data/ext/abc/src/bdd/epd/epd.c +0 -1347
  624. data/ext/abc/src/bdd/epd/epd.h +0 -196
  625. data/ext/abc/src/bdd/epd/module.make +0 -1
  626. data/ext/abc/src/bdd/extrab/extraBdd.h +0 -317
  627. data/ext/abc/src/bdd/extrab/extraBddAuto.c +0 -1563
  628. data/ext/abc/src/bdd/extrab/extraBddCas.c +0 -1235
  629. data/ext/abc/src/bdd/extrab/extraBddImage.c +0 -1162
  630. data/ext/abc/src/bdd/extrab/extraBddKmap.c +0 -876
  631. data/ext/abc/src/bdd/extrab/extraBddMisc.c +0 -2591
  632. data/ext/abc/src/bdd/extrab/extraBddSymm.c +0 -1474
  633. data/ext/abc/src/bdd/extrab/extraBddThresh.c +0 -693
  634. data/ext/abc/src/bdd/extrab/extraBddTime.c +0 -660
  635. data/ext/abc/src/bdd/extrab/extraBddUnate.c +0 -646
  636. data/ext/abc/src/bdd/extrab/module.make +0 -9
  637. data/ext/abc/src/bdd/llb/llb.c +0 -52
  638. data/ext/abc/src/bdd/llb/llb.h +0 -96
  639. data/ext/abc/src/bdd/llb/llb1Cluster.c +0 -356
  640. data/ext/abc/src/bdd/llb/llb1Constr.c +0 -313
  641. data/ext/abc/src/bdd/llb/llb1Core.c +0 -222
  642. data/ext/abc/src/bdd/llb/llb1Group.c +0 -474
  643. data/ext/abc/src/bdd/llb/llb1Hint.c +0 -226
  644. data/ext/abc/src/bdd/llb/llb1Man.c +0 -218
  645. data/ext/abc/src/bdd/llb/llb1Matrix.c +0 -430
  646. data/ext/abc/src/bdd/llb/llb1Pivot.c +0 -254
  647. data/ext/abc/src/bdd/llb/llb1Reach.c +0 -904
  648. data/ext/abc/src/bdd/llb/llb1Sched.c +0 -257
  649. data/ext/abc/src/bdd/llb/llb2Bad.c +0 -138
  650. data/ext/abc/src/bdd/llb/llb2Core.c +0 -777
  651. data/ext/abc/src/bdd/llb/llb2Driver.c +0 -222
  652. data/ext/abc/src/bdd/llb/llb2Dump.c +0 -104
  653. data/ext/abc/src/bdd/llb/llb2Flow.c +0 -1376
  654. data/ext/abc/src/bdd/llb/llb2Image.c +0 -482
  655. data/ext/abc/src/bdd/llb/llb3Image.c +0 -1095
  656. data/ext/abc/src/bdd/llb/llb3Nonlin.c +0 -872
  657. data/ext/abc/src/bdd/llb/llb4Cex.c +0 -320
  658. data/ext/abc/src/bdd/llb/llb4Cluster.c +0 -452
  659. data/ext/abc/src/bdd/llb/llb4Image.c +0 -863
  660. data/ext/abc/src/bdd/llb/llb4Map.c +0 -123
  661. data/ext/abc/src/bdd/llb/llb4Nonlin.c +0 -1185
  662. data/ext/abc/src/bdd/llb/llb4Sweep.c +0 -589
  663. data/ext/abc/src/bdd/llb/llbInt.h +0 -212
  664. data/ext/abc/src/bdd/llb/module.make +0 -22
  665. data/ext/abc/src/bdd/mtr/module.make +0 -2
  666. data/ext/abc/src/bdd/mtr/mtr.h +0 -187
  667. data/ext/abc/src/bdd/mtr/mtrBasic.c +0 -453
  668. data/ext/abc/src/bdd/mtr/mtrGroup.c +0 -734
  669. data/ext/abc/src/bdd/mtr/mtrInt.h +0 -94
  670. data/ext/abc/src/bdd/reo/module.make +0 -8
  671. data/ext/abc/src/bdd/reo/reo.h +0 -234
  672. data/ext/abc/src/bdd/reo/reoApi.c +0 -294
  673. data/ext/abc/src/bdd/reo/reoCore.c +0 -441
  674. data/ext/abc/src/bdd/reo/reoProfile.c +0 -370
  675. data/ext/abc/src/bdd/reo/reoShuffle.c +0 -230
  676. data/ext/abc/src/bdd/reo/reoSift.c +0 -346
  677. data/ext/abc/src/bdd/reo/reoSwap.c +0 -905
  678. data/ext/abc/src/bdd/reo/reoTest.c +0 -256
  679. data/ext/abc/src/bdd/reo/reoTransfer.c +0 -206
  680. data/ext/abc/src/bdd/reo/reoUnits.c +0 -190
  681. data/ext/abc/src/bool/bdc/bdc.h +0 -98
  682. data/ext/abc/src/bool/bdc/bdcCore.c +0 -374
  683. data/ext/abc/src/bool/bdc/bdcDec.c +0 -751
  684. data/ext/abc/src/bool/bdc/bdcInt.h +0 -165
  685. data/ext/abc/src/bool/bdc/bdcSpfd.c +0 -1184
  686. data/ext/abc/src/bool/bdc/bdcTable.c +0 -134
  687. data/ext/abc/src/bool/bdc/bdc_.c +0 -54
  688. data/ext/abc/src/bool/bdc/module.make +0 -5
  689. data/ext/abc/src/bool/dec/dec.h +0 -725
  690. data/ext/abc/src/bool/dec/decAbc.c +0 -358
  691. data/ext/abc/src/bool/dec/decFactor.c +0 -403
  692. data/ext/abc/src/bool/dec/decMan.c +0 -88
  693. data/ext/abc/src/bool/dec/decPrint.c +0 -289
  694. data/ext/abc/src/bool/dec/decUtil.c +0 -148
  695. data/ext/abc/src/bool/dec/module.make +0 -5
  696. data/ext/abc/src/bool/deco/deco.h +0 -714
  697. data/ext/abc/src/bool/deco/module.make +0 -1
  698. data/ext/abc/src/bool/kit/cloud.c +0 -993
  699. data/ext/abc/src/bool/kit/cloud.h +0 -254
  700. data/ext/abc/src/bool/kit/kit.h +0 -655
  701. data/ext/abc/src/bool/kit/kitAig.c +0 -126
  702. data/ext/abc/src/bool/kit/kitBdd.c +0 -243
  703. data/ext/abc/src/bool/kit/kitCloud.c +0 -378
  704. data/ext/abc/src/bool/kit/kitDec.c +0 -343
  705. data/ext/abc/src/bool/kit/kitDsd.c +0 -3285
  706. data/ext/abc/src/bool/kit/kitFactor.c +0 -344
  707. data/ext/abc/src/bool/kit/kitGraph.c +0 -402
  708. data/ext/abc/src/bool/kit/kitHop.c +0 -200
  709. data/ext/abc/src/bool/kit/kitIsop.c +0 -365
  710. data/ext/abc/src/bool/kit/kitPerm.c +0 -357
  711. data/ext/abc/src/bool/kit/kitPla.c +0 -535
  712. data/ext/abc/src/bool/kit/kitSop.c +0 -579
  713. data/ext/abc/src/bool/kit/kitTruth.c +0 -2224
  714. data/ext/abc/src/bool/kit/kit_.c +0 -53
  715. data/ext/abc/src/bool/kit/module.make +0 -11
  716. data/ext/abc/src/bool/lucky/lucky.c +0 -705
  717. data/ext/abc/src/bool/lucky/lucky.h +0 -44
  718. data/ext/abc/src/bool/lucky/luckyFast16.c +0 -872
  719. data/ext/abc/src/bool/lucky/luckyFast6.c +0 -285
  720. data/ext/abc/src/bool/lucky/luckyInt.h +0 -136
  721. data/ext/abc/src/bool/lucky/luckyRead.c +0 -333
  722. data/ext/abc/src/bool/lucky/luckySimple.c +0 -307
  723. data/ext/abc/src/bool/lucky/luckySwap.c +0 -402
  724. data/ext/abc/src/bool/lucky/luckySwapIJ.c +0 -102
  725. data/ext/abc/src/bool/lucky/module.make +0 -7
  726. data/ext/abc/src/bool/rpo/literal.h +0 -297
  727. data/ext/abc/src/bool/rpo/module.make +0 -1
  728. data/ext/abc/src/bool/rpo/rpo.c +0 -383
  729. data/ext/abc/src/bool/rpo/rpo.h +0 -61
  730. data/ext/abc/src/bool/rsb/module.make +0 -2
  731. data/ext/abc/src/bool/rsb/rsb.h +0 -65
  732. data/ext/abc/src/bool/rsb/rsbDec6.c +0 -770
  733. data/ext/abc/src/bool/rsb/rsbInt.h +0 -84
  734. data/ext/abc/src/bool/rsb/rsbMan.c +0 -99
  735. data/ext/abc/src/demo.c +0 -181
  736. data/ext/abc/src/generic.c +0 -52
  737. data/ext/abc/src/generic.h +0 -63
  738. data/ext/abc/src/map/amap/amap.h +0 -97
  739. data/ext/abc/src/map/amap/amapCore.c +0 -110
  740. data/ext/abc/src/map/amap/amapGraph.c +0 -399
  741. data/ext/abc/src/map/amap/amapInt.h +0 -376
  742. data/ext/abc/src/map/amap/amapLib.c +0 -374
  743. data/ext/abc/src/map/amap/amapLiberty.c +0 -1103
  744. data/ext/abc/src/map/amap/amapMan.c +0 -104
  745. data/ext/abc/src/map/amap/amapMatch.c +0 -622
  746. data/ext/abc/src/map/amap/amapMerge.c +0 -541
  747. data/ext/abc/src/map/amap/amapOutput.c +0 -186
  748. data/ext/abc/src/map/amap/amapParse.c +0 -480
  749. data/ext/abc/src/map/amap/amapPerm.c +0 -380
  750. data/ext/abc/src/map/amap/amapRead.c +0 -494
  751. data/ext/abc/src/map/amap/amapRule.c +0 -462
  752. data/ext/abc/src/map/amap/amapUniq.c +0 -317
  753. data/ext/abc/src/map/amap/module.make +0 -13
  754. data/ext/abc/src/map/cov/cov.h +0 -109
  755. data/ext/abc/src/map/cov/covBuild.c +0 -544
  756. data/ext/abc/src/map/cov/covCore.c +0 -1030
  757. data/ext/abc/src/map/cov/covInt.h +0 -654
  758. data/ext/abc/src/map/cov/covMan.c +0 -149
  759. data/ext/abc/src/map/cov/covMinEsop.c +0 -304
  760. data/ext/abc/src/map/cov/covMinMan.c +0 -118
  761. data/ext/abc/src/map/cov/covMinSop.c +0 -620
  762. data/ext/abc/src/map/cov/covMinUtil.c +0 -343
  763. data/ext/abc/src/map/cov/covTest.c +0 -422
  764. data/ext/abc/src/map/cov/module.make +0 -7
  765. data/ext/abc/src/map/fpga/fpga.c +0 -288
  766. data/ext/abc/src/map/fpga/fpga.h +0 -175
  767. data/ext/abc/src/map/fpga/fpgaCore.c +0 -194
  768. data/ext/abc/src/map/fpga/fpgaCreate.c +0 -584
  769. data/ext/abc/src/map/fpga/fpgaCut.c +0 -1186
  770. data/ext/abc/src/map/fpga/fpgaCutUtils.c +0 -476
  771. data/ext/abc/src/map/fpga/fpgaFanout.c +0 -146
  772. data/ext/abc/src/map/fpga/fpgaGENERIC.c +0 -51
  773. data/ext/abc/src/map/fpga/fpgaInt.h +0 -389
  774. data/ext/abc/src/map/fpga/fpgaLib.c +0 -255
  775. data/ext/abc/src/map/fpga/fpgaMatch.c +0 -800
  776. data/ext/abc/src/map/fpga/fpgaSwitch.c +0 -156
  777. data/ext/abc/src/map/fpga/fpgaTime.c +0 -267
  778. data/ext/abc/src/map/fpga/fpgaTruth.c +0 -171
  779. data/ext/abc/src/map/fpga/fpgaUtils.c +0 -990
  780. data/ext/abc/src/map/fpga/fpgaVec.c +0 -413
  781. data/ext/abc/src/map/fpga/module.make +0 -13
  782. data/ext/abc/src/map/if/if.h +0 -689
  783. data/ext/abc/src/map/if/ifCache.c +0 -100
  784. data/ext/abc/src/map/if/ifCheck.c +0 -204
  785. data/ext/abc/src/map/if/ifCom.c +0 -372
  786. data/ext/abc/src/map/if/ifCore.c +0 -200
  787. data/ext/abc/src/map/if/ifCount.h +0 -521
  788. data/ext/abc/src/map/if/ifCut.c +0 -1479
  789. data/ext/abc/src/map/if/ifData2.c +0 -52
  790. data/ext/abc/src/map/if/ifDec07.c +0 -1125
  791. data/ext/abc/src/map/if/ifDec08.c +0 -507
  792. data/ext/abc/src/map/if/ifDec10.c +0 -506
  793. data/ext/abc/src/map/if/ifDec16.c +0 -2374
  794. data/ext/abc/src/map/if/ifDec75.c +0 -341
  795. data/ext/abc/src/map/if/ifDelay.c +0 -447
  796. data/ext/abc/src/map/if/ifDsd.c +0 -2838
  797. data/ext/abc/src/map/if/ifLibBox.c +0 -401
  798. data/ext/abc/src/map/if/ifLibLut.c +0 -505
  799. data/ext/abc/src/map/if/ifMan.c +0 -720
  800. data/ext/abc/src/map/if/ifMap.c +0 -680
  801. data/ext/abc/src/map/if/ifMatch2.c +0 -62
  802. data/ext/abc/src/map/if/ifReduce.c +0 -466
  803. data/ext/abc/src/map/if/ifSat.c +0 -548
  804. data/ext/abc/src/map/if/ifSelect.c +0 -601
  805. data/ext/abc/src/map/if/ifSeq.c +0 -397
  806. data/ext/abc/src/map/if/ifTest.c +0 -352
  807. data/ext/abc/src/map/if/ifTime.c +0 -525
  808. data/ext/abc/src/map/if/ifTruth.c +0 -339
  809. data/ext/abc/src/map/if/ifTune.c +0 -1452
  810. data/ext/abc/src/map/if/ifUtil.c +0 -632
  811. data/ext/abc/src/map/if/if_.c +0 -52
  812. data/ext/abc/src/map/if/module.make +0 -26
  813. data/ext/abc/src/map/mapper/mapper.c +0 -185
  814. data/ext/abc/src/map/mapper/mapper.h +0 -201
  815. data/ext/abc/src/map/mapper/mapperCanon.c +0 -277
  816. data/ext/abc/src/map/mapper/mapperCore.c +0 -231
  817. data/ext/abc/src/map/mapper/mapperCreate.c +0 -587
  818. data/ext/abc/src/map/mapper/mapperCut.c +0 -1178
  819. data/ext/abc/src/map/mapper/mapperCutUtils.c +0 -279
  820. data/ext/abc/src/map/mapper/mapperFanout.c +0 -146
  821. data/ext/abc/src/map/mapper/mapperInt.h +0 -469
  822. data/ext/abc/src/map/mapper/mapperLib.c +0 -258
  823. data/ext/abc/src/map/mapper/mapperMatch.c +0 -664
  824. data/ext/abc/src/map/mapper/mapperRefs.c +0 -540
  825. data/ext/abc/src/map/mapper/mapperSuper.c +0 -456
  826. data/ext/abc/src/map/mapper/mapperSwitch.c +0 -229
  827. data/ext/abc/src/map/mapper/mapperTable.c +0 -407
  828. data/ext/abc/src/map/mapper/mapperTime.c +0 -459
  829. data/ext/abc/src/map/mapper/mapperTree.c +0 -1042
  830. data/ext/abc/src/map/mapper/mapperTruth.c +0 -315
  831. data/ext/abc/src/map/mapper/mapperUtils.c +0 -898
  832. data/ext/abc/src/map/mapper/mapperVec.c +0 -344
  833. data/ext/abc/src/map/mapper/module.make +0 -17
  834. data/ext/abc/src/map/mio/exp.h +0 -343
  835. data/ext/abc/src/map/mio/mio.c +0 -728
  836. data/ext/abc/src/map/mio/mio.h +0 -242
  837. data/ext/abc/src/map/mio/mioApi.c +0 -254
  838. data/ext/abc/src/map/mio/mioForm.c +0 -307
  839. data/ext/abc/src/map/mio/mioFunc.c +0 -327
  840. data/ext/abc/src/map/mio/mioInt.h +0 -160
  841. data/ext/abc/src/map/mio/mioParse.c +0 -504
  842. data/ext/abc/src/map/mio/mioRead.c +0 -780
  843. data/ext/abc/src/map/mio/mioSop.c +0 -333
  844. data/ext/abc/src/map/mio/mioUtils.c +0 -1752
  845. data/ext/abc/src/map/mio/module.make +0 -7
  846. data/ext/abc/src/map/mpm/module.make +0 -11
  847. data/ext/abc/src/map/mpm/mpm.c +0 -55
  848. data/ext/abc/src/map/mpm/mpm.h +0 -98
  849. data/ext/abc/src/map/mpm/mpmAbc.c +0 -350
  850. data/ext/abc/src/map/mpm/mpmCore.c +0 -115
  851. data/ext/abc/src/map/mpm/mpmDsd.c +0 -1055
  852. data/ext/abc/src/map/mpm/mpmGates.c +0 -307
  853. data/ext/abc/src/map/mpm/mpmInt.h +0 -265
  854. data/ext/abc/src/map/mpm/mpmLib.c +0 -74
  855. data/ext/abc/src/map/mpm/mpmMan.c +0 -207
  856. data/ext/abc/src/map/mpm/mpmMap.c +0 -872
  857. data/ext/abc/src/map/mpm/mpmMig.c +0 -204
  858. data/ext/abc/src/map/mpm/mpmMig.h +0 -358
  859. data/ext/abc/src/map/mpm/mpmPre.c +0 -1029
  860. data/ext/abc/src/map/mpm/mpmTruth.c +0 -239
  861. data/ext/abc/src/map/mpm/mpmUtil.c +0 -52
  862. data/ext/abc/src/map/scl/module.make +0 -11
  863. data/ext/abc/src/map/scl/scl.c +0 -2042
  864. data/ext/abc/src/map/scl/scl.h +0 -58
  865. data/ext/abc/src/map/scl/sclBufSize.c +0 -518
  866. data/ext/abc/src/map/scl/sclBuffer.c +0 -1010
  867. data/ext/abc/src/map/scl/sclCon.h +0 -293
  868. data/ext/abc/src/map/scl/sclDnsize.c +0 -378
  869. data/ext/abc/src/map/scl/sclLib.h +0 -770
  870. data/ext/abc/src/map/scl/sclLibScl.c +0 -848
  871. data/ext/abc/src/map/scl/sclLibUtil.c +0 -1078
  872. data/ext/abc/src/map/scl/sclLiberty.c +0 -1697
  873. data/ext/abc/src/map/scl/sclLoad.c +0 -238
  874. data/ext/abc/src/map/scl/sclSize.c +0 -915
  875. data/ext/abc/src/map/scl/sclSize.h +0 -594
  876. data/ext/abc/src/map/scl/sclTime.h +0 -234
  877. data/ext/abc/src/map/scl/sclUpsize.c +0 -1045
  878. data/ext/abc/src/map/scl/sclUtil.c +0 -320
  879. data/ext/abc/src/map/super/module.make +0 -3
  880. data/ext/abc/src/map/super/super.c +0 -333
  881. data/ext/abc/src/map/super/super.h +0 -62
  882. data/ext/abc/src/map/super/superAnd.c +0 -701
  883. data/ext/abc/src/map/super/superGENERIC.c +0 -51
  884. data/ext/abc/src/map/super/superGate.c +0 -1473
  885. data/ext/abc/src/map/super/superInt.h +0 -64
  886. data/ext/abc/src/map/super/superWrite.c +0 -81
  887. data/ext/abc/src/misc/avl/avl.c +0 -621
  888. data/ext/abc/src/misc/avl/avl.doc +0 -166
  889. data/ext/abc/src/misc/avl/avl.h +0 -91
  890. data/ext/abc/src/misc/bar/bar.c +0 -193
  891. data/ext/abc/src/misc/bar/bar.h +0 -78
  892. data/ext/abc/src/misc/bar/module.make +0 -1
  893. data/ext/abc/src/misc/bbl/bblif.c +0 -1518
  894. data/ext/abc/src/misc/bbl/bblif.h +0 -285
  895. data/ext/abc/src/misc/bbl/module.make +0 -1
  896. data/ext/abc/src/misc/bzlib/CHANGES +0 -319
  897. data/ext/abc/src/misc/bzlib/LICENSE +0 -42
  898. data/ext/abc/src/misc/bzlib/blocksort.c +0 -1098
  899. data/ext/abc/src/misc/bzlib/bzip2.txt +0 -391
  900. data/ext/abc/src/misc/bzlib/bzlib.c +0 -1588
  901. data/ext/abc/src/misc/bzlib/bzlib.h +0 -287
  902. data/ext/abc/src/misc/bzlib/bzlib_private.h +0 -513
  903. data/ext/abc/src/misc/bzlib/compress.c +0 -677
  904. data/ext/abc/src/misc/bzlib/crctable.c +0 -109
  905. data/ext/abc/src/misc/bzlib/decompress.c +0 -631
  906. data/ext/abc/src/misc/bzlib/huffman.c +0 -210
  907. data/ext/abc/src/misc/bzlib/link.txt +0 -2
  908. data/ext/abc/src/misc/bzlib/manual.html +0 -2540
  909. data/ext/abc/src/misc/bzlib/module.make +0 -7
  910. data/ext/abc/src/misc/bzlib/randtable.c +0 -89
  911. data/ext/abc/src/misc/espresso/cofactor.c +0 -389
  912. data/ext/abc/src/misc/espresso/cols.c +0 -319
  913. data/ext/abc/src/misc/espresso/compl.c +0 -685
  914. data/ext/abc/src/misc/espresso/contain.c +0 -450
  915. data/ext/abc/src/misc/espresso/cubehack.c +0 -143
  916. data/ext/abc/src/misc/espresso/cubestr.c +0 -157
  917. data/ext/abc/src/misc/espresso/cvrin.c +0 -816
  918. data/ext/abc/src/misc/espresso/cvrm.c +0 -544
  919. data/ext/abc/src/misc/espresso/cvrmisc.c +0 -147
  920. data/ext/abc/src/misc/espresso/cvrout.c +0 -614
  921. data/ext/abc/src/misc/espresso/dominate.c +0 -103
  922. data/ext/abc/src/misc/espresso/equiv.c +0 -99
  923. data/ext/abc/src/misc/espresso/espresso.c +0 -144
  924. data/ext/abc/src/misc/espresso/espresso.h +0 -786
  925. data/ext/abc/src/misc/espresso/essen.c +0 -184
  926. data/ext/abc/src/misc/espresso/exact.c +0 -186
  927. data/ext/abc/src/misc/espresso/expand.c +0 -700
  928. data/ext/abc/src/misc/espresso/gasp.c +0 -233
  929. data/ext/abc/src/misc/espresso/gimpel.c +0 -112
  930. data/ext/abc/src/misc/espresso/globals.c +0 -81
  931. data/ext/abc/src/misc/espresso/hack.c +0 -646
  932. data/ext/abc/src/misc/espresso/indep.c +0 -139
  933. data/ext/abc/src/misc/espresso/irred.c +0 -445
  934. data/ext/abc/src/misc/espresso/main.c +0 -751
  935. data/ext/abc/src/misc/espresso/main.h +0 -122
  936. data/ext/abc/src/misc/espresso/map.c +0 -122
  937. data/ext/abc/src/misc/espresso/matrix.c +0 -579
  938. data/ext/abc/src/misc/espresso/mincov.c +0 -383
  939. data/ext/abc/src/misc/espresso/mincov.h +0 -11
  940. data/ext/abc/src/misc/espresso/mincov_int.h +0 -55
  941. data/ext/abc/src/misc/espresso/module.make +0 -39
  942. data/ext/abc/src/misc/espresso/opo.c +0 -629
  943. data/ext/abc/src/misc/espresso/pair.c +0 -685
  944. data/ext/abc/src/misc/espresso/part.c +0 -127
  945. data/ext/abc/src/misc/espresso/primes.c +0 -175
  946. data/ext/abc/src/misc/espresso/reduce.c +0 -263
  947. data/ext/abc/src/misc/espresso/rows.c +0 -319
  948. data/ext/abc/src/misc/espresso/set.c +0 -825
  949. data/ext/abc/src/misc/espresso/setc.c +0 -488
  950. data/ext/abc/src/misc/espresso/sharp.c +0 -252
  951. data/ext/abc/src/misc/espresso/sminterf.c +0 -49
  952. data/ext/abc/src/misc/espresso/solution.c +0 -119
  953. data/ext/abc/src/misc/espresso/sparse.c +0 -151
  954. data/ext/abc/src/misc/espresso/sparse.h +0 -143
  955. data/ext/abc/src/misc/espresso/sparse_int.h +0 -121
  956. data/ext/abc/src/misc/espresso/unate.c +0 -446
  957. data/ext/abc/src/misc/espresso/util_old.h +0 -309
  958. data/ext/abc/src/misc/espresso/verify.c +0 -198
  959. data/ext/abc/src/misc/extra/extra.h +0 -417
  960. data/ext/abc/src/misc/extra/extraUtilBitMatrix.c +0 -420
  961. data/ext/abc/src/misc/extra/extraUtilCanon.c +0 -691
  962. data/ext/abc/src/misc/extra/extraUtilCube.c +0 -279
  963. data/ext/abc/src/misc/extra/extraUtilDsd.c +0 -1271
  964. data/ext/abc/src/misc/extra/extraUtilEnum.c +0 -680
  965. data/ext/abc/src/misc/extra/extraUtilFile.c +0 -887
  966. data/ext/abc/src/misc/extra/extraUtilMemory.c +0 -628
  967. data/ext/abc/src/misc/extra/extraUtilMisc.c +0 -2580
  968. data/ext/abc/src/misc/extra/extraUtilPerm.c +0 -933
  969. data/ext/abc/src/misc/extra/extraUtilPrime.c +0 -602
  970. data/ext/abc/src/misc/extra/extraUtilProgress.c +0 -185
  971. data/ext/abc/src/misc/extra/extraUtilReader.c +0 -390
  972. data/ext/abc/src/misc/extra/extraUtilSupp.c +0 -532
  973. data/ext/abc/src/misc/extra/extraUtilTruth.c +0 -1153
  974. data/ext/abc/src/misc/extra/extraUtilUtil.c +0 -421
  975. data/ext/abc/src/misc/extra/extraZddTrunc.c +0 -338
  976. data/ext/abc/src/misc/extra/module.make +0 -14
  977. data/ext/abc/src/misc/hash/hash.h +0 -70
  978. data/ext/abc/src/misc/hash/hashFlt.h +0 -339
  979. data/ext/abc/src/misc/hash/hashGen.h +0 -367
  980. data/ext/abc/src/misc/hash/hashInt.h +0 -302
  981. data/ext/abc/src/misc/hash/hashPtr.h +0 -339
  982. data/ext/abc/src/misc/hash/module.make +0 -1
  983. data/ext/abc/src/misc/mem/mem.c +0 -605
  984. data/ext/abc/src/misc/mem/mem.h +0 -75
  985. data/ext/abc/src/misc/mem/mem2.h +0 -271
  986. data/ext/abc/src/misc/mem/module.make +0 -1
  987. data/ext/abc/src/misc/mvc/module.make +0 -15
  988. data/ext/abc/src/misc/mvc/mvc.c +0 -51
  989. data/ext/abc/src/misc/mvc/mvc.h +0 -739
  990. data/ext/abc/src/misc/mvc/mvcApi.c +0 -238
  991. data/ext/abc/src/misc/mvc/mvcCompare.c +0 -374
  992. data/ext/abc/src/misc/mvc/mvcContain.c +0 -178
  993. data/ext/abc/src/misc/mvc/mvcCover.c +0 -256
  994. data/ext/abc/src/misc/mvc/mvcCube.c +0 -180
  995. data/ext/abc/src/misc/mvc/mvcDivide.c +0 -442
  996. data/ext/abc/src/misc/mvc/mvcDivisor.c +0 -95
  997. data/ext/abc/src/misc/mvc/mvcList.c +0 -367
  998. data/ext/abc/src/misc/mvc/mvcLits.c +0 -350
  999. data/ext/abc/src/misc/mvc/mvcMan.c +0 -82
  1000. data/ext/abc/src/misc/mvc/mvcOpAlg.c +0 -168
  1001. data/ext/abc/src/misc/mvc/mvcOpBool.c +0 -156
  1002. data/ext/abc/src/misc/mvc/mvcPrint.c +0 -225
  1003. data/ext/abc/src/misc/mvc/mvcSort.c +0 -146
  1004. data/ext/abc/src/misc/mvc/mvcUtils.c +0 -873
  1005. data/ext/abc/src/misc/nm/module.make +0 -2
  1006. data/ext/abc/src/misc/nm/nm.h +0 -96
  1007. data/ext/abc/src/misc/nm/nmApi.c +0 -278
  1008. data/ext/abc/src/misc/nm/nmInt.h +0 -94
  1009. data/ext/abc/src/misc/nm/nmTable.c +0 -310
  1010. data/ext/abc/src/misc/parse/module.make +0 -2
  1011. data/ext/abc/src/misc/parse/parse.h +0 -62
  1012. data/ext/abc/src/misc/parse/parseCore.c +0 -536
  1013. data/ext/abc/src/misc/parse/parseEqn.c +0 -362
  1014. data/ext/abc/src/misc/parse/parseInt.h +0 -77
  1015. data/ext/abc/src/misc/parse/parseStack.c +0 -248
  1016. data/ext/abc/src/misc/st/module.make +0 -2
  1017. data/ext/abc/src/misc/st/st.c +0 -561
  1018. data/ext/abc/src/misc/st/st.h +0 -121
  1019. data/ext/abc/src/misc/st/stmm.c +0 -627
  1020. data/ext/abc/src/misc/st/stmm.h +0 -147
  1021. data/ext/abc/src/misc/tim/module.make +0 -5
  1022. data/ext/abc/src/misc/tim/tim.c +0 -39
  1023. data/ext/abc/src/misc/tim/tim.h +0 -184
  1024. data/ext/abc/src/misc/tim/timBox.c +0 -326
  1025. data/ext/abc/src/misc/tim/timDump.c +0 -201
  1026. data/ext/abc/src/misc/tim/timInt.h +0 -148
  1027. data/ext/abc/src/misc/tim/timMan.c +0 -807
  1028. data/ext/abc/src/misc/tim/timTime.c +0 -267
  1029. data/ext/abc/src/misc/tim/timTrav.c +0 -185
  1030. data/ext/abc/src/misc/util/abc_global.h +0 -416
  1031. data/ext/abc/src/misc/util/abc_namespaces.h +0 -58
  1032. data/ext/abc/src/misc/util/module.make +0 -8
  1033. data/ext/abc/src/misc/util/utilBridge.c +0 -564
  1034. data/ext/abc/src/misc/util/utilCex.c +0 -574
  1035. data/ext/abc/src/misc/util/utilCex.h +0 -84
  1036. data/ext/abc/src/misc/util/utilColor.c +0 -124
  1037. data/ext/abc/src/misc/util/utilDouble.h +0 -222
  1038. data/ext/abc/src/misc/util/utilFile.c +0 -221
  1039. data/ext/abc/src/misc/util/utilFloat.h +0 -226
  1040. data/ext/abc/src/misc/util/utilIsop.c +0 -1139
  1041. data/ext/abc/src/misc/util/utilMem.c +0 -341
  1042. data/ext/abc/src/misc/util/utilMem.h +0 -73
  1043. data/ext/abc/src/misc/util/utilNam.c +0 -622
  1044. data/ext/abc/src/misc/util/utilNam.h +0 -80
  1045. data/ext/abc/src/misc/util/utilSignal.c +0 -68
  1046. data/ext/abc/src/misc/util/utilSignal.h +0 -58
  1047. data/ext/abc/src/misc/util/utilSort.c +0 -789
  1048. data/ext/abc/src/misc/util/utilTruth.h +0 -3076
  1049. data/ext/abc/src/misc/util/util_hack.h +0 -46
  1050. data/ext/abc/src/misc/vec/module.make +0 -1
  1051. data/ext/abc/src/misc/vec/vec.h +0 -74
  1052. data/ext/abc/src/misc/vec/vecAtt.h +0 -298
  1053. data/ext/abc/src/misc/vec/vecBit.h +0 -636
  1054. data/ext/abc/src/misc/vec/vecFlt.h +0 -826
  1055. data/ext/abc/src/misc/vec/vecHash.h +0 -280
  1056. data/ext/abc/src/misc/vec/vecHsh.h +0 -590
  1057. data/ext/abc/src/misc/vec/vecInt.h +0 -2078
  1058. data/ext/abc/src/misc/vec/vecMem.h +0 -431
  1059. data/ext/abc/src/misc/vec/vecPtr.h +0 -1160
  1060. data/ext/abc/src/misc/vec/vecQue.h +0 -374
  1061. data/ext/abc/src/misc/vec/vecSet.h +0 -299
  1062. data/ext/abc/src/misc/vec/vecStr.h +0 -1072
  1063. data/ext/abc/src/misc/vec/vecVec.h +0 -646
  1064. data/ext/abc/src/misc/vec/vecWec.h +0 -738
  1065. data/ext/abc/src/misc/vec/vecWrd.h +0 -1205
  1066. data/ext/abc/src/misc/zlib/README +0 -115
  1067. data/ext/abc/src/misc/zlib/adler32.c +0 -168
  1068. data/ext/abc/src/misc/zlib/algorithm.txt +0 -209
  1069. data/ext/abc/src/misc/zlib/compress_.c +0 -76
  1070. data/ext/abc/src/misc/zlib/crc32.c +0 -433
  1071. data/ext/abc/src/misc/zlib/crc32.h +0 -445
  1072. data/ext/abc/src/misc/zlib/deflate.c +0 -1784
  1073. data/ext/abc/src/misc/zlib/deflate.h +0 -346
  1074. data/ext/abc/src/misc/zlib/gzclose.c +0 -33
  1075. data/ext/abc/src/misc/zlib/gzguts.h +0 -147
  1076. data/ext/abc/src/misc/zlib/gzlib.c +0 -517
  1077. data/ext/abc/src/misc/zlib/gzread.c +0 -641
  1078. data/ext/abc/src/misc/zlib/gzwrite.c +0 -520
  1079. data/ext/abc/src/misc/zlib/infback.c +0 -631
  1080. data/ext/abc/src/misc/zlib/inffast.c +0 -351
  1081. data/ext/abc/src/misc/zlib/inffast.h +0 -15
  1082. data/ext/abc/src/misc/zlib/inffixed.h +0 -98
  1083. data/ext/abc/src/misc/zlib/inflate.c +0 -1457
  1084. data/ext/abc/src/misc/zlib/inflate.h +0 -126
  1085. data/ext/abc/src/misc/zlib/inftrees.c +0 -337
  1086. data/ext/abc/src/misc/zlib/inftrees.h +0 -66
  1087. data/ext/abc/src/misc/zlib/license +0 -31
  1088. data/ext/abc/src/misc/zlib/link.txt +0 -1
  1089. data/ext/abc/src/misc/zlib/module.make +0 -15
  1090. data/ext/abc/src/misc/zlib/trees.c +0 -1216
  1091. data/ext/abc/src/misc/zlib/trees.h +0 -132
  1092. data/ext/abc/src/misc/zlib/uncompr.c +0 -67
  1093. data/ext/abc/src/misc/zlib/zconf.h +0 -432
  1094. data/ext/abc/src/misc/zlib/zlib.h +0 -1619
  1095. data/ext/abc/src/misc/zlib/zutil.c +0 -318
  1096. data/ext/abc/src/misc/zlib/zutil.h +0 -288
  1097. data/ext/abc/src/opt/cgt/cgt.h +0 -87
  1098. data/ext/abc/src/opt/cgt/cgtAig.c +0 -601
  1099. data/ext/abc/src/opt/cgt/cgtCore.c +0 -328
  1100. data/ext/abc/src/opt/cgt/cgtDecide.c +0 -300
  1101. data/ext/abc/src/opt/cgt/cgtInt.h +0 -123
  1102. data/ext/abc/src/opt/cgt/cgtMan.c +0 -179
  1103. data/ext/abc/src/opt/cgt/cgtSat.c +0 -98
  1104. data/ext/abc/src/opt/cgt/module.make +0 -5
  1105. data/ext/abc/src/opt/csw/csw.h +0 -69
  1106. data/ext/abc/src/opt/csw/cswCore.c +0 -100
  1107. data/ext/abc/src/opt/csw/cswCut.c +0 -608
  1108. data/ext/abc/src/opt/csw/cswInt.h +0 -160
  1109. data/ext/abc/src/opt/csw/cswMan.c +0 -130
  1110. data/ext/abc/src/opt/csw/cswTable.c +0 -166
  1111. data/ext/abc/src/opt/csw/csw_.c +0 -53
  1112. data/ext/abc/src/opt/csw/module.make +0 -4
  1113. data/ext/abc/src/opt/cut/abcCut.c +0 -498
  1114. data/ext/abc/src/opt/cut/cut.h +0 -172
  1115. data/ext/abc/src/opt/cut/cutApi.c +0 -202
  1116. data/ext/abc/src/opt/cut/cutCut.c +0 -364
  1117. data/ext/abc/src/opt/cut/cutExpand.c +0 -189
  1118. data/ext/abc/src/opt/cut/cutInt.h +0 -165
  1119. data/ext/abc/src/opt/cut/cutList.h +0 -215
  1120. data/ext/abc/src/opt/cut/cutMan.c +0 -320
  1121. data/ext/abc/src/opt/cut/cutMerge.c +0 -662
  1122. data/ext/abc/src/opt/cut/cutNode.c +0 -1004
  1123. data/ext/abc/src/opt/cut/cutOracle.c +0 -424
  1124. data/ext/abc/src/opt/cut/cutPre22.c +0 -994
  1125. data/ext/abc/src/opt/cut/cutSeq.c +0 -232
  1126. data/ext/abc/src/opt/cut/cutTruth.c +0 -232
  1127. data/ext/abc/src/opt/cut/module.make +0 -9
  1128. data/ext/abc/src/opt/dar/dar.h +0 -116
  1129. data/ext/abc/src/opt/dar/darBalance.c +0 -761
  1130. data/ext/abc/src/opt/dar/darCore.c +0 -348
  1131. data/ext/abc/src/opt/dar/darCut.c +0 -837
  1132. data/ext/abc/src/opt/dar/darData.c +0 -11294
  1133. data/ext/abc/src/opt/dar/darInt.h +0 -169
  1134. data/ext/abc/src/opt/dar/darLib.c +0 -1341
  1135. data/ext/abc/src/opt/dar/darMan.c +0 -174
  1136. data/ext/abc/src/opt/dar/darPrec.c +0 -394
  1137. data/ext/abc/src/opt/dar/darRefact.c +0 -639
  1138. data/ext/abc/src/opt/dar/darResub.c +0 -53
  1139. data/ext/abc/src/opt/dar/darScript.c +0 -911
  1140. data/ext/abc/src/opt/dar/dar_.c +0 -53
  1141. data/ext/abc/src/opt/dar/module.make +0 -9
  1142. data/ext/abc/src/opt/dau/dau.c +0 -53
  1143. data/ext/abc/src/opt/dau/dau.h +0 -125
  1144. data/ext/abc/src/opt/dau/dauArray.c +0 -257
  1145. data/ext/abc/src/opt/dau/dauCanon.c +0 -1202
  1146. data/ext/abc/src/opt/dau/dauCore.c +0 -112
  1147. data/ext/abc/src/opt/dau/dauDivs.c +0 -111
  1148. data/ext/abc/src/opt/dau/dauDsd.c +0 -2098
  1149. data/ext/abc/src/opt/dau/dauDsd2.c +0 -660
  1150. data/ext/abc/src/opt/dau/dauEnum.c +0 -253
  1151. data/ext/abc/src/opt/dau/dauGia.c +0 -573
  1152. data/ext/abc/src/opt/dau/dauInt.h +0 -70
  1153. data/ext/abc/src/opt/dau/dauMerge.c +0 -824
  1154. data/ext/abc/src/opt/dau/dauNonDsd.c +0 -903
  1155. data/ext/abc/src/opt/dau/dauTree.c +0 -2022
  1156. data/ext/abc/src/opt/dau/module.make +0 -9
  1157. data/ext/abc/src/opt/dsc/dsc.c +0 -525
  1158. data/ext/abc/src/opt/dsc/dsc.h +0 -91
  1159. data/ext/abc/src/opt/dsc/module.make +0 -1
  1160. data/ext/abc/src/opt/fret/fretFlow.c +0 -700
  1161. data/ext/abc/src/opt/fret/fretInit.c +0 -1343
  1162. data/ext/abc/src/opt/fret/fretMain.c +0 -1383
  1163. data/ext/abc/src/opt/fret/fretTime.c +0 -766
  1164. data/ext/abc/src/opt/fret/fretime.h +0 -212
  1165. data/ext/abc/src/opt/fret/module.make +0 -5
  1166. data/ext/abc/src/opt/fsim/fsim.h +0 -101
  1167. data/ext/abc/src/opt/fsim/fsimCore.c +0 -88
  1168. data/ext/abc/src/opt/fsim/fsimFront.c +0 -369
  1169. data/ext/abc/src/opt/fsim/fsimInt.h +0 -138
  1170. data/ext/abc/src/opt/fsim/fsimMan.c +0 -212
  1171. data/ext/abc/src/opt/fsim/fsimSim.c +0 -569
  1172. data/ext/abc/src/opt/fsim/fsimSwitch.c +0 -40
  1173. data/ext/abc/src/opt/fsim/fsimTsim.c +0 -416
  1174. data/ext/abc/src/opt/fsim/module.make +0 -6
  1175. data/ext/abc/src/opt/fxch/Fxch.c +0 -266
  1176. data/ext/abc/src/opt/fxch/Fxch.h +0 -229
  1177. data/ext/abc/src/opt/fxch/FxchDiv.c +0 -485
  1178. data/ext/abc/src/opt/fxch/FxchMan.c +0 -785
  1179. data/ext/abc/src/opt/fxch/FxchSCHashTable.c +0 -382
  1180. data/ext/abc/src/opt/fxch/module.make +0 -4
  1181. data/ext/abc/src/opt/fxu/fxu.c +0 -260
  1182. data/ext/abc/src/opt/fxu/fxu.h +0 -97
  1183. data/ext/abc/src/opt/fxu/fxuCreate.c +0 -447
  1184. data/ext/abc/src/opt/fxu/fxuHeapD.c +0 -450
  1185. data/ext/abc/src/opt/fxu/fxuHeapS.c +0 -449
  1186. data/ext/abc/src/opt/fxu/fxuInt.h +0 -545
  1187. data/ext/abc/src/opt/fxu/fxuList.c +0 -527
  1188. data/ext/abc/src/opt/fxu/fxuMatrix.c +0 -377
  1189. data/ext/abc/src/opt/fxu/fxuPair.c +0 -560
  1190. data/ext/abc/src/opt/fxu/fxuPrint.c +0 -202
  1191. data/ext/abc/src/opt/fxu/fxuReduce.c +0 -213
  1192. data/ext/abc/src/opt/fxu/fxuSelect.c +0 -608
  1193. data/ext/abc/src/opt/fxu/fxuSingle.c +0 -289
  1194. data/ext/abc/src/opt/fxu/fxuUpdate.c +0 -811
  1195. data/ext/abc/src/opt/fxu/module.make +0 -12
  1196. data/ext/abc/src/opt/lpk/lpk.h +0 -88
  1197. data/ext/abc/src/opt/lpk/lpkAbcDec.c +0 -294
  1198. data/ext/abc/src/opt/lpk/lpkAbcDsd.c +0 -617
  1199. data/ext/abc/src/opt/lpk/lpkAbcMux.c +0 -240
  1200. data/ext/abc/src/opt/lpk/lpkAbcUtil.c +0 -249
  1201. data/ext/abc/src/opt/lpk/lpkCore.c +0 -694
  1202. data/ext/abc/src/opt/lpk/lpkCut.c +0 -689
  1203. data/ext/abc/src/opt/lpk/lpkInt.h +0 -250
  1204. data/ext/abc/src/opt/lpk/lpkMan.c +0 -127
  1205. data/ext/abc/src/opt/lpk/lpkMap.c +0 -210
  1206. data/ext/abc/src/opt/lpk/lpkMulti.c +0 -513
  1207. data/ext/abc/src/opt/lpk/lpkMux.c +0 -252
  1208. data/ext/abc/src/opt/lpk/lpkSets.c +0 -445
  1209. data/ext/abc/src/opt/lpk/lpk_.c +0 -53
  1210. data/ext/abc/src/opt/lpk/module.make +0 -11
  1211. data/ext/abc/src/opt/mfs/mfs.h +0 -89
  1212. data/ext/abc/src/opt/mfs/mfsCore.c +0 -596
  1213. data/ext/abc/src/opt/mfs/mfsCore_.c +0 -394
  1214. data/ext/abc/src/opt/mfs/mfsDiv.c +0 -309
  1215. data/ext/abc/src/opt/mfs/mfsGia.c +0 -301
  1216. data/ext/abc/src/opt/mfs/mfsInt.h +0 -192
  1217. data/ext/abc/src/opt/mfs/mfsInter.c +0 -398
  1218. data/ext/abc/src/opt/mfs/mfsMan.c +0 -202
  1219. data/ext/abc/src/opt/mfs/mfsResub.c +0 -622
  1220. data/ext/abc/src/opt/mfs/mfsResub_.c +0 -567
  1221. data/ext/abc/src/opt/mfs/mfsSat.c +0 -182
  1222. data/ext/abc/src/opt/mfs/mfsStrash.c +0 -406
  1223. data/ext/abc/src/opt/mfs/mfsWin.c +0 -117
  1224. data/ext/abc/src/opt/mfs/mfs_.c +0 -52
  1225. data/ext/abc/src/opt/mfs/module.make +0 -8
  1226. data/ext/abc/src/opt/nwk/module.make +0 -14
  1227. data/ext/abc/src/opt/nwk/ntlnwk.h +0 -113
  1228. data/ext/abc/src/opt/nwk/nwk.h +0 -307
  1229. data/ext/abc/src/opt/nwk/nwkAig.c +0 -299
  1230. data/ext/abc/src/opt/nwk/nwkBidec.c +0 -177
  1231. data/ext/abc/src/opt/nwk/nwkCheck.c +0 -76
  1232. data/ext/abc/src/opt/nwk/nwkDfs.c +0 -664
  1233. data/ext/abc/src/opt/nwk/nwkFanio.c +0 -320
  1234. data/ext/abc/src/opt/nwk/nwkFlow.c +0 -606
  1235. data/ext/abc/src/opt/nwk/nwkFlow_depth.c +0 -631
  1236. data/ext/abc/src/opt/nwk/nwkMan.c +0 -278
  1237. data/ext/abc/src/opt/nwk/nwkMap.c +0 -396
  1238. data/ext/abc/src/opt/nwk/nwkMerge.c +0 -1046
  1239. data/ext/abc/src/opt/nwk/nwkMerge.h +0 -153
  1240. data/ext/abc/src/opt/nwk/nwkObj.c +0 -204
  1241. data/ext/abc/src/opt/nwk/nwkSpeedup.c +0 -382
  1242. data/ext/abc/src/opt/nwk/nwkStrash.c +0 -149
  1243. data/ext/abc/src/opt/nwk/nwkTiming.c +0 -894
  1244. data/ext/abc/src/opt/nwk/nwkUtil.c +0 -644
  1245. data/ext/abc/src/opt/nwk/nwk_.c +0 -52
  1246. data/ext/abc/src/opt/res/module.make +0 -7
  1247. data/ext/abc/src/opt/res/res.h +0 -79
  1248. data/ext/abc/src/opt/res/resCore.c +0 -427
  1249. data/ext/abc/src/opt/res/resDivs.c +0 -290
  1250. data/ext/abc/src/opt/res/resFilter.c +0 -439
  1251. data/ext/abc/src/opt/res/resInt.h +0 -141
  1252. data/ext/abc/src/opt/res/resSat.c +0 -414
  1253. data/ext/abc/src/opt/res/resSim.c +0 -795
  1254. data/ext/abc/src/opt/res/resSim_old.c +0 -526
  1255. data/ext/abc/src/opt/res/resStrash.c +0 -122
  1256. data/ext/abc/src/opt/res/resWin.c +0 -490
  1257. data/ext/abc/src/opt/res/res_.c +0 -55
  1258. data/ext/abc/src/opt/ret/module.make +0 -8
  1259. data/ext/abc/src/opt/ret/retArea.c +0 -554
  1260. data/ext/abc/src/opt/ret/retCore.c +0 -138
  1261. data/ext/abc/src/opt/ret/retDelay.c +0 -315
  1262. data/ext/abc/src/opt/ret/retFlow.c +0 -789
  1263. data/ext/abc/src/opt/ret/retIncrem.c +0 -480
  1264. data/ext/abc/src/opt/ret/retInit.c +0 -355
  1265. data/ext/abc/src/opt/ret/retInt.h +0 -88
  1266. data/ext/abc/src/opt/ret/retLvalue.c +0 -402
  1267. data/ext/abc/src/opt/ret/ret_.c +0 -53
  1268. data/ext/abc/src/opt/rwr/module.make +0 -7
  1269. data/ext/abc/src/opt/rwr/rwr.h +0 -173
  1270. data/ext/abc/src/opt/rwr/rwrDec.c +0 -155
  1271. data/ext/abc/src/opt/rwr/rwrEva.c +0 -599
  1272. data/ext/abc/src/opt/rwr/rwrExp.c +0 -336
  1273. data/ext/abc/src/opt/rwr/rwrLib.c +0 -367
  1274. data/ext/abc/src/opt/rwr/rwrMan.c +0 -323
  1275. data/ext/abc/src/opt/rwr/rwrPrint.c +0 -271
  1276. data/ext/abc/src/opt/rwr/rwrTemp.c +0 -126
  1277. data/ext/abc/src/opt/rwr/rwrUtil.c +0 -661
  1278. data/ext/abc/src/opt/rwt/module.make +0 -3
  1279. data/ext/abc/src/opt/rwt/rwt.h +0 -165
  1280. data/ext/abc/src/opt/rwt/rwtDec.c +0 -155
  1281. data/ext/abc/src/opt/rwt/rwtMan.c +0 -363
  1282. data/ext/abc/src/opt/rwt/rwtUtil.c +0 -663
  1283. data/ext/abc/src/opt/sbd/module.make +0 -9
  1284. data/ext/abc/src/opt/sbd/sbd.c +0 -122
  1285. data/ext/abc/src/opt/sbd/sbd.h +0 -82
  1286. data/ext/abc/src/opt/sbd/sbdCnf.c +0 -147
  1287. data/ext/abc/src/opt/sbd/sbdCore.c +0 -2229
  1288. data/ext/abc/src/opt/sbd/sbdCut.c +0 -872
  1289. data/ext/abc/src/opt/sbd/sbdCut2.c +0 -431
  1290. data/ext/abc/src/opt/sbd/sbdInt.h +0 -125
  1291. data/ext/abc/src/opt/sbd/sbdLut.c +0 -311
  1292. data/ext/abc/src/opt/sbd/sbdPath.c +0 -197
  1293. data/ext/abc/src/opt/sbd/sbdSat.c +0 -793
  1294. data/ext/abc/src/opt/sbd/sbdSim.c +0 -310
  1295. data/ext/abc/src/opt/sbd/sbdWin.c +0 -464
  1296. data/ext/abc/src/opt/sfm/module.make +0 -10
  1297. data/ext/abc/src/opt/sfm/sfm.h +0 -107
  1298. data/ext/abc/src/opt/sfm/sfmArea.c +0 -380
  1299. data/ext/abc/src/opt/sfm/sfmCnf.c +0 -179
  1300. data/ext/abc/src/opt/sfm/sfmCore.c +0 -306
  1301. data/ext/abc/src/opt/sfm/sfmDec.c +0 -2168
  1302. data/ext/abc/src/opt/sfm/sfmInt.h +0 -254
  1303. data/ext/abc/src/opt/sfm/sfmLib.c +0 -766
  1304. data/ext/abc/src/opt/sfm/sfmMit.c +0 -73
  1305. data/ext/abc/src/opt/sfm/sfmNtk.c +0 -381
  1306. data/ext/abc/src/opt/sfm/sfmSat.c +0 -273
  1307. data/ext/abc/src/opt/sfm/sfmTim.c +0 -458
  1308. data/ext/abc/src/opt/sfm/sfmWin.c +0 -481
  1309. data/ext/abc/src/opt/sim/module.make +0 -9
  1310. data/ext/abc/src/opt/sim/sim.h +0 -237
  1311. data/ext/abc/src/opt/sim/simMan.c +0 -293
  1312. data/ext/abc/src/opt/sim/simSat.c +0 -53
  1313. data/ext/abc/src/opt/sim/simSeq.c +0 -176
  1314. data/ext/abc/src/opt/sim/simSupp.c +0 -603
  1315. data/ext/abc/src/opt/sim/simSwitch.c +0 -112
  1316. data/ext/abc/src/opt/sim/simSym.c +0 -148
  1317. data/ext/abc/src/opt/sim/simSymSat.c +0 -205
  1318. data/ext/abc/src/opt/sim/simSymSim.c +0 -178
  1319. data/ext/abc/src/opt/sim/simSymStr.c +0 -493
  1320. data/ext/abc/src/opt/sim/simUtils.c +0 -718
  1321. data/ext/abc/src/phys/place/Makefile +0 -30
  1322. data/ext/abc/src/phys/place/README +0 -50
  1323. data/ext/abc/src/phys/place/hpwl +0 -57
  1324. data/ext/abc/src/phys/place/libhmetis.h +0 -39
  1325. data/ext/abc/src/phys/place/module.make +0 -10
  1326. data/ext/abc/src/phys/place/place_base.c +0 -350
  1327. data/ext/abc/src/phys/place/place_base.h +0 -145
  1328. data/ext/abc/src/phys/place/place_bin.c +0 -282
  1329. data/ext/abc/src/phys/place/place_genqp.c +0 -314
  1330. data/ext/abc/src/phys/place/place_gordian.c +0 -165
  1331. data/ext/abc/src/phys/place/place_gordian.h +0 -86
  1332. data/ext/abc/src/phys/place/place_inc.c +0 -111
  1333. data/ext/abc/src/phys/place/place_io.c +0 -99
  1334. data/ext/abc/src/phys/place/place_legalize.c +0 -28
  1335. data/ext/abc/src/phys/place/place_pads.c +0 -146
  1336. data/ext/abc/src/phys/place/place_partition.c +0 -1140
  1337. data/ext/abc/src/phys/place/place_qpsolver.c +0 -1275
  1338. data/ext/abc/src/phys/place/place_qpsolver.h +0 -139
  1339. data/ext/abc/src/phys/place/place_test.c +0 -365
  1340. data/ext/abc/src/proof/abs/abs.c +0 -52
  1341. data/ext/abc/src/proof/abs/abs.h +0 -177
  1342. data/ext/abc/src/proof/abs/absDup.c +0 -445
  1343. data/ext/abc/src/proof/abs/absGla.c +0 -1901
  1344. data/ext/abc/src/proof/abs/absGlaOld.c +0 -1956
  1345. data/ext/abc/src/proof/abs/absIter.c +0 -148
  1346. data/ext/abc/src/proof/abs/absOldCex.c +0 -873
  1347. data/ext/abc/src/proof/abs/absOldRef.c +0 -474
  1348. data/ext/abc/src/proof/abs/absOldSat.c +0 -986
  1349. data/ext/abc/src/proof/abs/absOldSim.c +0 -477
  1350. data/ext/abc/src/proof/abs/absOut.c +0 -458
  1351. data/ext/abc/src/proof/abs/absPth.c +0 -205
  1352. data/ext/abc/src/proof/abs/absRef.c +0 -751
  1353. data/ext/abc/src/proof/abs/absRef.h +0 -129
  1354. data/ext/abc/src/proof/abs/absRefJ.c +0 -916
  1355. data/ext/abc/src/proof/abs/absRefJ.h +0 -67
  1356. data/ext/abc/src/proof/abs/absRefSelect.c +0 -309
  1357. data/ext/abc/src/proof/abs/absRpm.c +0 -874
  1358. data/ext/abc/src/proof/abs/absRpmOld.c +0 -201
  1359. data/ext/abc/src/proof/abs/absUtil.c +0 -257
  1360. data/ext/abc/src/proof/abs/absVta.c +0 -1764
  1361. data/ext/abc/src/proof/abs/module.make +0 -16
  1362. data/ext/abc/src/proof/acec/acec.c +0 -52
  1363. data/ext/abc/src/proof/acec/acec.h +0 -98
  1364. data/ext/abc/src/proof/acec/acec2Mult.c +0 -1211
  1365. data/ext/abc/src/proof/acec/acecBo.c +0 -216
  1366. data/ext/abc/src/proof/acec/acecCl.c +0 -445
  1367. data/ext/abc/src/proof/acec/acecCo.c +0 -429
  1368. data/ext/abc/src/proof/acec/acecCore.c +0 -553
  1369. data/ext/abc/src/proof/acec/acecCover.c +0 -263
  1370. data/ext/abc/src/proof/acec/acecFadds.c +0 -1247
  1371. data/ext/abc/src/proof/acec/acecInt.h +0 -105
  1372. data/ext/abc/src/proof/acec/acecMult.c +0 -623
  1373. data/ext/abc/src/proof/acec/acecNorm.c +0 -226
  1374. data/ext/abc/src/proof/acec/acecOrder.c +0 -254
  1375. data/ext/abc/src/proof/acec/acecPa.c +0 -277
  1376. data/ext/abc/src/proof/acec/acecPo.c +0 -655
  1377. data/ext/abc/src/proof/acec/acecPolyn.c +0 -445
  1378. data/ext/abc/src/proof/acec/acecPool.c +0 -428
  1379. data/ext/abc/src/proof/acec/acecRe.c +0 -602
  1380. data/ext/abc/src/proof/acec/acecSt.c +0 -422
  1381. data/ext/abc/src/proof/acec/acecStruct.c +0 -271
  1382. data/ext/abc/src/proof/acec/acecTree.c +0 -783
  1383. data/ext/abc/src/proof/acec/acecUtil.c +0 -122
  1384. data/ext/abc/src/proof/acec/acecXor.c +0 -434
  1385. data/ext/abc/src/proof/acec/module.make +0 -19
  1386. data/ext/abc/src/proof/cec/cec.c +0 -53
  1387. data/ext/abc/src/proof/cec/cec.h +0 -240
  1388. data/ext/abc/src/proof/cec/cecCec.c +0 -580
  1389. data/ext/abc/src/proof/cec/cecChoice.c +0 -410
  1390. data/ext/abc/src/proof/cec/cecClass.c +0 -931
  1391. data/ext/abc/src/proof/cec/cecCore.c +0 -554
  1392. data/ext/abc/src/proof/cec/cecCorr.c +0 -1229
  1393. data/ext/abc/src/proof/cec/cecInt.h +0 -227
  1394. data/ext/abc/src/proof/cec/cecIso.c +0 -375
  1395. data/ext/abc/src/proof/cec/cecMan.c +0 -297
  1396. data/ext/abc/src/proof/cec/cecPat.c +0 -578
  1397. data/ext/abc/src/proof/cec/cecSat.c +0 -1040
  1398. data/ext/abc/src/proof/cec/cecSatG.c +0 -1048
  1399. data/ext/abc/src/proof/cec/cecSeq.c +0 -449
  1400. data/ext/abc/src/proof/cec/cecSim.c +0 -53
  1401. data/ext/abc/src/proof/cec/cecSimBack.c +0 -194
  1402. data/ext/abc/src/proof/cec/cecSolve.c +0 -1107
  1403. data/ext/abc/src/proof/cec/cecSplit.c +0 -849
  1404. data/ext/abc/src/proof/cec/cecSweep.c +0 -301
  1405. data/ext/abc/src/proof/cec/cecSynth.c +0 -433
  1406. data/ext/abc/src/proof/cec/module.make +0 -15
  1407. data/ext/abc/src/proof/dch/dch.h +0 -91
  1408. data/ext/abc/src/proof/dch/dchAig.c +0 -119
  1409. data/ext/abc/src/proof/dch/dchChoice.c +0 -552
  1410. data/ext/abc/src/proof/dch/dchClass.c +0 -611
  1411. data/ext/abc/src/proof/dch/dchCnf.c +0 -334
  1412. data/ext/abc/src/proof/dch/dchCore.c +0 -161
  1413. data/ext/abc/src/proof/dch/dchInt.h +0 -170
  1414. data/ext/abc/src/proof/dch/dchMan.c +0 -191
  1415. data/ext/abc/src/proof/dch/dchSat.c +0 -167
  1416. data/ext/abc/src/proof/dch/dchSim.c +0 -297
  1417. data/ext/abc/src/proof/dch/dchSimSat.c +0 -260
  1418. data/ext/abc/src/proof/dch/dchSweep.c +0 -146
  1419. data/ext/abc/src/proof/dch/module.make +0 -10
  1420. data/ext/abc/src/proof/fra/fra.h +0 -389
  1421. data/ext/abc/src/proof/fra/fraBmc.c +0 -453
  1422. data/ext/abc/src/proof/fra/fraCec.c +0 -574
  1423. data/ext/abc/src/proof/fra/fraClass.c +0 -862
  1424. data/ext/abc/src/proof/fra/fraClau.c +0 -745
  1425. data/ext/abc/src/proof/fra/fraClaus.c +0 -1877
  1426. data/ext/abc/src/proof/fra/fraCnf.c +0 -289
  1427. data/ext/abc/src/proof/fra/fraCore.c +0 -490
  1428. data/ext/abc/src/proof/fra/fraHot.c +0 -476
  1429. data/ext/abc/src/proof/fra/fraImp.c +0 -732
  1430. data/ext/abc/src/proof/fra/fraInd.c +0 -712
  1431. data/ext/abc/src/proof/fra/fraIndVer.c +0 -166
  1432. data/ext/abc/src/proof/fra/fraLcr.c +0 -708
  1433. data/ext/abc/src/proof/fra/fraMan.c +0 -314
  1434. data/ext/abc/src/proof/fra/fraPart.c +0 -269
  1435. data/ext/abc/src/proof/fra/fraSat.c +0 -571
  1436. data/ext/abc/src/proof/fra/fraSec.c +0 -693
  1437. data/ext/abc/src/proof/fra/fraSim.c +0 -1173
  1438. data/ext/abc/src/proof/fra/fra_.c +0 -53
  1439. data/ext/abc/src/proof/fra/module.make +0 -17
  1440. data/ext/abc/src/proof/fraig/fraig.h +0 -257
  1441. data/ext/abc/src/proof/fraig/fraigApi.c +0 -299
  1442. data/ext/abc/src/proof/fraig/fraigCanon.c +0 -223
  1443. data/ext/abc/src/proof/fraig/fraigChoice.c +0 -246
  1444. data/ext/abc/src/proof/fraig/fraigFanout.c +0 -180
  1445. data/ext/abc/src/proof/fraig/fraigFeed.c +0 -914
  1446. data/ext/abc/src/proof/fraig/fraigInt.h +0 -436
  1447. data/ext/abc/src/proof/fraig/fraigMan.c +0 -546
  1448. data/ext/abc/src/proof/fraig/fraigMem.c +0 -251
  1449. data/ext/abc/src/proof/fraig/fraigNode.c +0 -319
  1450. data/ext/abc/src/proof/fraig/fraigPrime.c +0 -113
  1451. data/ext/abc/src/proof/fraig/fraigSat.c +0 -1463
  1452. data/ext/abc/src/proof/fraig/fraigTable.c +0 -664
  1453. data/ext/abc/src/proof/fraig/fraigUtil.c +0 -1039
  1454. data/ext/abc/src/proof/fraig/fraigVec.c +0 -550
  1455. data/ext/abc/src/proof/fraig/module.make +0 -12
  1456. data/ext/abc/src/proof/int/int.h +0 -96
  1457. data/ext/abc/src/proof/int/intCheck.c +0 -305
  1458. data/ext/abc/src/proof/int/intContain.c +0 -341
  1459. data/ext/abc/src/proof/int/intCore.c +0 -412
  1460. data/ext/abc/src/proof/int/intCtrex.c +0 -168
  1461. data/ext/abc/src/proof/int/intDup.c +0 -184
  1462. data/ext/abc/src/proof/int/intFrames.c +0 -124
  1463. data/ext/abc/src/proof/int/intInt.h +0 -143
  1464. data/ext/abc/src/proof/int/intInter.c +0 -145
  1465. data/ext/abc/src/proof/int/intM114.c +0 -323
  1466. data/ext/abc/src/proof/int/intM114p.c +0 -443
  1467. data/ext/abc/src/proof/int/intMan.c +0 -165
  1468. data/ext/abc/src/proof/int/intUtil.c +0 -108
  1469. data/ext/abc/src/proof/int/module.make +0 -10
  1470. data/ext/abc/src/proof/int2/int2.h +0 -90
  1471. data/ext/abc/src/proof/int2/int2Bmc.c +0 -355
  1472. data/ext/abc/src/proof/int2/int2Core.c +0 -335
  1473. data/ext/abc/src/proof/int2/int2Int.h +0 -164
  1474. data/ext/abc/src/proof/int2/int2Refine.c +0 -154
  1475. data/ext/abc/src/proof/int2/int2Util.c +0 -152
  1476. data/ext/abc/src/proof/int2/module.make +0 -4
  1477. data/ext/abc/src/proof/live/arenaViolation.c +0 -549
  1478. data/ext/abc/src/proof/live/combination.c +0 -463
  1479. data/ext/abc/src/proof/live/disjunctiveMonotone.c +0 -757
  1480. data/ext/abc/src/proof/live/kLiveConstraints.c +0 -177
  1481. data/ext/abc/src/proof/live/kliveness.c +0 -816
  1482. data/ext/abc/src/proof/live/liveness.c +0 -2575
  1483. data/ext/abc/src/proof/live/liveness_sim.c +0 -849
  1484. data/ext/abc/src/proof/live/ltl_parser.c +0 -839
  1485. data/ext/abc/src/proof/live/module.make +0 -9
  1486. data/ext/abc/src/proof/live/monotone.c +0 -507
  1487. data/ext/abc/src/proof/pdr/module.make +0 -10
  1488. data/ext/abc/src/proof/pdr/pdr.c +0 -53
  1489. data/ext/abc/src/proof/pdr/pdr.h +0 -109
  1490. data/ext/abc/src/proof/pdr/pdrClass.c +0 -223
  1491. data/ext/abc/src/proof/pdr/pdrCnf.c +0 -455
  1492. data/ext/abc/src/proof/pdr/pdrCore.c +0 -1451
  1493. data/ext/abc/src/proof/pdr/pdrIncr.c +0 -1046
  1494. data/ext/abc/src/proof/pdr/pdrInt.h +0 -275
  1495. data/ext/abc/src/proof/pdr/pdrInv.c +0 -985
  1496. data/ext/abc/src/proof/pdr/pdrMan.c +0 -549
  1497. data/ext/abc/src/proof/pdr/pdrSat.c +0 -395
  1498. data/ext/abc/src/proof/pdr/pdrTsim.c +0 -502
  1499. data/ext/abc/src/proof/pdr/pdrTsim2.c +0 -550
  1500. data/ext/abc/src/proof/pdr/pdrTsim3.c +0 -361
  1501. data/ext/abc/src/proof/pdr/pdrUtil.c +0 -800
  1502. data/ext/abc/src/proof/ssc/module.make +0 -5
  1503. data/ext/abc/src/proof/ssc/ssc.h +0 -78
  1504. data/ext/abc/src/proof/ssc/sscClass.c +0 -326
  1505. data/ext/abc/src/proof/ssc/sscCore.c +0 -469
  1506. data/ext/abc/src/proof/ssc/sscInt.h +0 -135
  1507. data/ext/abc/src/proof/ssc/sscSat.c +0 -430
  1508. data/ext/abc/src/proof/ssc/sscSim.c +0 -364
  1509. data/ext/abc/src/proof/ssc/sscUtil.c +0 -173
  1510. data/ext/abc/src/proof/ssw/module.make +0 -20
  1511. data/ext/abc/src/proof/ssw/ssw.h +0 -170
  1512. data/ext/abc/src/proof/ssw/sswAig.c +0 -258
  1513. data/ext/abc/src/proof/ssw/sswBmc.c +0 -224
  1514. data/ext/abc/src/proof/ssw/sswClass.c +0 -1170
  1515. data/ext/abc/src/proof/ssw/sswCnf.c +0 -427
  1516. data/ext/abc/src/proof/ssw/sswConstr.c +0 -718
  1517. data/ext/abc/src/proof/ssw/sswCore.c +0 -539
  1518. data/ext/abc/src/proof/ssw/sswDyn.c +0 -491
  1519. data/ext/abc/src/proof/ssw/sswFilter.c +0 -493
  1520. data/ext/abc/src/proof/ssw/sswInt.h +0 -302
  1521. data/ext/abc/src/proof/ssw/sswIslands.c +0 -598
  1522. data/ext/abc/src/proof/ssw/sswLcorr.c +0 -337
  1523. data/ext/abc/src/proof/ssw/sswMan.c +0 -217
  1524. data/ext/abc/src/proof/ssw/sswPairs.c +0 -480
  1525. data/ext/abc/src/proof/ssw/sswPart.c +0 -140
  1526. data/ext/abc/src/proof/ssw/sswRarity.c +0 -1385
  1527. data/ext/abc/src/proof/ssw/sswRarity2.c +0 -518
  1528. data/ext/abc/src/proof/ssw/sswSat.c +0 -307
  1529. data/ext/abc/src/proof/ssw/sswSemi.c +0 -323
  1530. data/ext/abc/src/proof/ssw/sswSim.c +0 -1406
  1531. data/ext/abc/src/proof/ssw/sswSimSat.c +0 -124
  1532. data/ext/abc/src/proof/ssw/sswSweep.c +0 -440
  1533. data/ext/abc/src/proof/ssw/sswUnique.c +0 -196
  1534. data/ext/abc/src/sat/bmc/bmc.c +0 -52
  1535. data/ext/abc/src/sat/bmc/bmc.h +0 -205
  1536. data/ext/abc/src/sat/bmc/bmcBCore.c +0 -273
  1537. data/ext/abc/src/sat/bmc/bmcBmc.c +0 -377
  1538. data/ext/abc/src/sat/bmc/bmcBmc2.c +0 -944
  1539. data/ext/abc/src/sat/bmc/bmcBmc3.c +0 -1893
  1540. data/ext/abc/src/sat/bmc/bmcBmcAnd.c +0 -1100
  1541. data/ext/abc/src/sat/bmc/bmcBmcG.c +0 -455
  1542. data/ext/abc/src/sat/bmc/bmcBmcS.c +0 -940
  1543. data/ext/abc/src/sat/bmc/bmcBmci.c +0 -344
  1544. data/ext/abc/src/sat/bmc/bmcCexCare.c +0 -476
  1545. data/ext/abc/src/sat/bmc/bmcCexCut.c +0 -537
  1546. data/ext/abc/src/sat/bmc/bmcCexDepth.c +0 -373
  1547. data/ext/abc/src/sat/bmc/bmcCexMin1.c +0 -578
  1548. data/ext/abc/src/sat/bmc/bmcCexMin2.c +0 -363
  1549. data/ext/abc/src/sat/bmc/bmcCexTools.c +0 -852
  1550. data/ext/abc/src/sat/bmc/bmcChain.c +0 -396
  1551. data/ext/abc/src/sat/bmc/bmcClp.c +0 -1548
  1552. data/ext/abc/src/sat/bmc/bmcEco.c +0 -312
  1553. data/ext/abc/src/sat/bmc/bmcEnum.c +0 -223
  1554. data/ext/abc/src/sat/bmc/bmcExpand.c +0 -172
  1555. data/ext/abc/src/sat/bmc/bmcFault.c +0 -1710
  1556. data/ext/abc/src/sat/bmc/bmcFx.c +0 -725
  1557. data/ext/abc/src/sat/bmc/bmcGen.c +0 -193
  1558. data/ext/abc/src/sat/bmc/bmcICheck.c +0 -540
  1559. data/ext/abc/src/sat/bmc/bmcInse.c +0 -345
  1560. data/ext/abc/src/sat/bmc/bmcLoad.c +0 -212
  1561. data/ext/abc/src/sat/bmc/bmcMaj.c +0 -745
  1562. data/ext/abc/src/sat/bmc/bmcMaj2.c +0 -852
  1563. data/ext/abc/src/sat/bmc/bmcMaxi.c +0 -282
  1564. data/ext/abc/src/sat/bmc/bmcMesh.c +0 -433
  1565. data/ext/abc/src/sat/bmc/bmcMesh2.c +0 -449
  1566. data/ext/abc/src/sat/bmc/bmcMulti.c +0 -296
  1567. data/ext/abc/src/sat/bmc/bmcUnroll.c +0 -505
  1568. data/ext/abc/src/sat/bmc/module.make +0 -31
  1569. data/ext/abc/src/sat/bsat/license +0 -21
  1570. data/ext/abc/src/sat/bsat/module.make +0 -14
  1571. data/ext/abc/src/sat/bsat/satChecker.c +0 -193
  1572. data/ext/abc/src/sat/bsat/satClause.h +0 -476
  1573. data/ext/abc/src/sat/bsat/satInter.c +0 -1077
  1574. data/ext/abc/src/sat/bsat/satInterA.c +0 -1090
  1575. data/ext/abc/src/sat/bsat/satInterB.c +0 -1115
  1576. data/ext/abc/src/sat/bsat/satInterP.c +0 -1096
  1577. data/ext/abc/src/sat/bsat/satMem.c +0 -583
  1578. data/ext/abc/src/sat/bsat/satMem.h +0 -85
  1579. data/ext/abc/src/sat/bsat/satProof.c +0 -934
  1580. data/ext/abc/src/sat/bsat/satProof2.h +0 -327
  1581. data/ext/abc/src/sat/bsat/satSolver.c +0 -2417
  1582. data/ext/abc/src/sat/bsat/satSolver.h +0 -639
  1583. data/ext/abc/src/sat/bsat/satSolver2.c +0 -1998
  1584. data/ext/abc/src/sat/bsat/satSolver2.h +0 -377
  1585. data/ext/abc/src/sat/bsat/satSolver2i.c +0 -242
  1586. data/ext/abc/src/sat/bsat/satSolver3.c +0 -2299
  1587. data/ext/abc/src/sat/bsat/satSolver3.h +0 -622
  1588. data/ext/abc/src/sat/bsat/satStore.c +0 -469
  1589. data/ext/abc/src/sat/bsat/satStore.h +0 -158
  1590. data/ext/abc/src/sat/bsat/satTrace.c +0 -112
  1591. data/ext/abc/src/sat/bsat/satTruth.c +0 -299
  1592. data/ext/abc/src/sat/bsat/satTruth.h +0 -89
  1593. data/ext/abc/src/sat/bsat/satUtil.c +0 -358
  1594. data/ext/abc/src/sat/bsat/satVec.h +0 -161
  1595. data/ext/abc/src/sat/bsat2/AbcApi.cpp +0 -59
  1596. data/ext/abc/src/sat/bsat2/Alg.h +0 -84
  1597. data/ext/abc/src/sat/bsat2/Alloc.h +0 -131
  1598. data/ext/abc/src/sat/bsat2/Dimacs.h +0 -89
  1599. data/ext/abc/src/sat/bsat2/Heap.h +0 -149
  1600. data/ext/abc/src/sat/bsat2/IntTypes.h +0 -47
  1601. data/ext/abc/src/sat/bsat2/LICENSE +0 -21
  1602. data/ext/abc/src/sat/bsat2/MainSat.cpp +0 -197
  1603. data/ext/abc/src/sat/bsat2/MainSimp.cpp +0 -206
  1604. data/ext/abc/src/sat/bsat2/Map.h +0 -193
  1605. data/ext/abc/src/sat/bsat2/Options.cpp +0 -93
  1606. data/ext/abc/src/sat/bsat2/Options.h +0 -387
  1607. data/ext/abc/src/sat/bsat2/ParseUtils.h +0 -122
  1608. data/ext/abc/src/sat/bsat2/Queue.h +0 -69
  1609. data/ext/abc/src/sat/bsat2/README +0 -24
  1610. data/ext/abc/src/sat/bsat2/ReleaseNotes-2.2.0.txt +0 -79
  1611. data/ext/abc/src/sat/bsat2/SimpSolver.cpp +0 -720
  1612. data/ext/abc/src/sat/bsat2/SimpSolver.h +0 -197
  1613. data/ext/abc/src/sat/bsat2/Solver.cpp +0 -924
  1614. data/ext/abc/src/sat/bsat2/Solver.h +0 -373
  1615. data/ext/abc/src/sat/bsat2/SolverTypes.h +0 -407
  1616. data/ext/abc/src/sat/bsat2/Sort.h +0 -98
  1617. data/ext/abc/src/sat/bsat2/System.cpp +0 -95
  1618. data/ext/abc/src/sat/bsat2/System.h +0 -60
  1619. data/ext/abc/src/sat/bsat2/Vec.h +0 -130
  1620. data/ext/abc/src/sat/bsat2/XAlloc.h +0 -45
  1621. data/ext/abc/src/sat/bsat2/module.make +0 -7
  1622. data/ext/abc/src/sat/bsat2/pstdint.h +0 -813
  1623. data/ext/abc/src/sat/cnf/cnf.h +0 -202
  1624. data/ext/abc/src/sat/cnf/cnfCore.c +0 -290
  1625. data/ext/abc/src/sat/cnf/cnfCut.c +0 -376
  1626. data/ext/abc/src/sat/cnf/cnfData.c +0 -4789
  1627. data/ext/abc/src/sat/cnf/cnfFast.c +0 -697
  1628. data/ext/abc/src/sat/cnf/cnfMan.c +0 -726
  1629. data/ext/abc/src/sat/cnf/cnfMap.c +0 -362
  1630. data/ext/abc/src/sat/cnf/cnfPost.c +0 -238
  1631. data/ext/abc/src/sat/cnf/cnfUtil.c +0 -479
  1632. data/ext/abc/src/sat/cnf/cnfWrite.c +0 -806
  1633. data/ext/abc/src/sat/cnf/cnf_.c +0 -53
  1634. data/ext/abc/src/sat/cnf/module.make +0 -9
  1635. data/ext/abc/src/sat/csat/csat_apis.c +0 -778
  1636. data/ext/abc/src/sat/csat/csat_apis.h +0 -226
  1637. data/ext/abc/src/sat/csat/module.make +0 -1
  1638. data/ext/abc/src/sat/glucose/AbcGlucose.cpp +0 -1372
  1639. data/ext/abc/src/sat/glucose/AbcGlucose.h +0 -110
  1640. data/ext/abc/src/sat/glucose/AbcGlucoseCmd.cpp +0 -144
  1641. data/ext/abc/src/sat/glucose/Alg.h +0 -84
  1642. data/ext/abc/src/sat/glucose/Alloc.h +0 -132
  1643. data/ext/abc/src/sat/glucose/BoundedQueue.h +0 -110
  1644. data/ext/abc/src/sat/glucose/Constants.h +0 -33
  1645. data/ext/abc/src/sat/glucose/Dimacs.h +0 -89
  1646. data/ext/abc/src/sat/glucose/Glucose.cpp +0 -1493
  1647. data/ext/abc/src/sat/glucose/Heap.h +0 -150
  1648. data/ext/abc/src/sat/glucose/IntTypes.h +0 -47
  1649. data/ext/abc/src/sat/glucose/Map.h +0 -193
  1650. data/ext/abc/src/sat/glucose/Options.cpp +0 -92
  1651. data/ext/abc/src/sat/glucose/Options.h +0 -388
  1652. data/ext/abc/src/sat/glucose/ParseUtils.h +0 -151
  1653. data/ext/abc/src/sat/glucose/Queue.h +0 -69
  1654. data/ext/abc/src/sat/glucose/SimpSolver.cpp +0 -774
  1655. data/ext/abc/src/sat/glucose/SimpSolver.h +0 -204
  1656. data/ext/abc/src/sat/glucose/Solver.h +0 -491
  1657. data/ext/abc/src/sat/glucose/SolverTypes.h +0 -434
  1658. data/ext/abc/src/sat/glucose/Sort.h +0 -98
  1659. data/ext/abc/src/sat/glucose/System.cpp +0 -95
  1660. data/ext/abc/src/sat/glucose/System.h +0 -60
  1661. data/ext/abc/src/sat/glucose/Vec.h +0 -130
  1662. data/ext/abc/src/sat/glucose/XAlloc.h +0 -47
  1663. data/ext/abc/src/sat/glucose/module.make +0 -6
  1664. data/ext/abc/src/sat/glucose/pstdint.h +0 -919
  1665. data/ext/abc/src/sat/glucose/stdint.h +0 -1628
  1666. data/ext/abc/src/sat/lsat/solver.h +0 -132
  1667. data/ext/abc/src/sat/msat/module.make +0 -13
  1668. data/ext/abc/src/sat/msat/msat.h +0 -168
  1669. data/ext/abc/src/sat/msat/msatActivity.c +0 -165
  1670. data/ext/abc/src/sat/msat/msatClause.c +0 -537
  1671. data/ext/abc/src/sat/msat/msatClauseVec.c +0 -237
  1672. data/ext/abc/src/sat/msat/msatInt.h +0 -295
  1673. data/ext/abc/src/sat/msat/msatMem.c +0 -534
  1674. data/ext/abc/src/sat/msat/msatOrderH.c +0 -415
  1675. data/ext/abc/src/sat/msat/msatOrderJ.c +0 -477
  1676. data/ext/abc/src/sat/msat/msatQueue.c +0 -162
  1677. data/ext/abc/src/sat/msat/msatRead.c +0 -274
  1678. data/ext/abc/src/sat/msat/msatSolverApi.c +0 -505
  1679. data/ext/abc/src/sat/msat/msatSolverCore.c +0 -215
  1680. data/ext/abc/src/sat/msat/msatSolverIo.c +0 -182
  1681. data/ext/abc/src/sat/msat/msatSolverSearch.c +0 -634
  1682. data/ext/abc/src/sat/msat/msatSort.c +0 -178
  1683. data/ext/abc/src/sat/msat/msatVec.c +0 -500
  1684. data/ext/abc/src/sat/proof/pr.c +0 -1264
  1685. data/ext/abc/src/sat/proof/pr.h +0 -69
  1686. data/ext/abc/src/sat/proof/stats.txt +0 -66
  1687. data/ext/abc/src/sat/psat/m114p.h +0 -47
  1688. data/ext/abc/src/sat/psat/m114p_types.h +0 -13
  1689. data/ext/abc/src/sat/psat/module.make +0 -1
  1690. data/ext/abc/src/sat/satoko/LICENSE +0 -22
  1691. data/ext/abc/src/sat/satoko/act_clause.h +0 -43
  1692. data/ext/abc/src/sat/satoko/act_var.h +0 -53
  1693. data/ext/abc/src/sat/satoko/cdb.h +0 -106
  1694. data/ext/abc/src/sat/satoko/clause.h +0 -77
  1695. data/ext/abc/src/sat/satoko/cnf_reader.c +0 -157
  1696. data/ext/abc/src/sat/satoko/module.make +0 -3
  1697. data/ext/abc/src/sat/satoko/satoko.h +0 -147
  1698. data/ext/abc/src/sat/satoko/solver.c +0 -771
  1699. data/ext/abc/src/sat/satoko/solver.h +0 -260
  1700. data/ext/abc/src/sat/satoko/solver_api.c +0 -669
  1701. data/ext/abc/src/sat/satoko/types.h +0 -39
  1702. data/ext/abc/src/sat/satoko/utils/b_queue.h +0 -81
  1703. data/ext/abc/src/sat/satoko/utils/heap.h +0 -178
  1704. data/ext/abc/src/sat/satoko/utils/mem.h +0 -23
  1705. data/ext/abc/src/sat/satoko/utils/misc.h +0 -35
  1706. data/ext/abc/src/sat/satoko/utils/sdbl.h +0 -133
  1707. data/ext/abc/src/sat/satoko/utils/sort.h +0 -65
  1708. data/ext/abc/src/sat/satoko/utils/vec/vec_char.h +0 -260
  1709. data/ext/abc/src/sat/satoko/utils/vec/vec_flt.h +0 -246
  1710. data/ext/abc/src/sat/satoko/utils/vec/vec_int.h +0 -240
  1711. data/ext/abc/src/sat/satoko/utils/vec/vec_sdbl.h +0 -253
  1712. data/ext/abc/src/sat/satoko/utils/vec/vec_uint.h +0 -268
  1713. data/ext/abc/src/sat/satoko/watch_list.h +0 -203
  1714. data/ext/abc/src/sat/xsat/license +0 -39
  1715. data/ext/abc/src/sat/xsat/module.make +0 -3
  1716. data/ext/abc/src/sat/xsat/xsat.h +0 -59
  1717. data/ext/abc/src/sat/xsat/xsatBQueue.h +0 -190
  1718. data/ext/abc/src/sat/xsat/xsatClause.h +0 -109
  1719. data/ext/abc/src/sat/xsat/xsatCnfReader.c +0 -236
  1720. data/ext/abc/src/sat/xsat/xsatHeap.h +0 -330
  1721. data/ext/abc/src/sat/xsat/xsatMemory.h +0 -222
  1722. data/ext/abc/src/sat/xsat/xsatSolver.c +0 -1003
  1723. data/ext/abc/src/sat/xsat/xsatSolver.h +0 -248
  1724. data/ext/abc/src/sat/xsat/xsatSolverAPI.c +0 -346
  1725. data/ext/abc/src/sat/xsat/xsatUtils.h +0 -106
  1726. data/ext/abc/src/sat/xsat/xsatWatchList.h +0 -269
  1727. data/ext/abc/src/starter.c +0 -190
  1728. data/ext/abc/src/template.c +0 -111
  1729. data/ext/extconf.rb +0 -14
  1730. data/ext/ruby_abc_wrapper.h +0 -13
@@ -1,3024 +0,0 @@
1
- /**CFile****************************************************************
2
-
3
- FileName [abcExact.c]
4
-
5
- SystemName [ABC: Logic synthesis and verification system.]
6
-
7
- PackageName [Network and node package.]
8
-
9
- Synopsis [Find minimum size networks with a SAT solver.]
10
-
11
- Author [Mathias Soeken]
12
-
13
- Affiliation [EPFL]
14
-
15
- Date [Ver. 1.0. Started - July 15, 2016.]
16
-
17
- Revision [$Id: abcFanio.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18
-
19
- ***********************************************************************/
20
-
21
- /* This implementation is based on Exercises 477 and 478 in
22
- * Donald E. Knuth TAOCP Fascicle 6 (Satisfiability) Section 7.2.2.2
23
- */
24
-
25
- #include "base/abc/abc.h"
26
-
27
- #include "aig/gia/gia.h"
28
- #include "misc/util/utilTruth.h"
29
- #include "misc/vec/vecInt.h"
30
- #include "misc/vec/vecPtr.h"
31
- #include "proof/cec/cec.h"
32
- #include "sat/bsat/satSolver.h"
33
-
34
- ABC_NAMESPACE_IMPL_START
35
-
36
-
37
- ////////////////////////////////////////////////////////////////////////
38
- /// DECLARATIONS ///
39
- ////////////////////////////////////////////////////////////////////////
40
-
41
- /***********************************************************************
42
-
43
- Synopsis [Some truth table helper functions.]
44
-
45
- ***********************************************************************/
46
-
47
- static word s_Truths8[32] = {
48
- ABC_CONST(0xAAAAAAAAAAAAAAAA), ABC_CONST(0xAAAAAAAAAAAAAAAA), ABC_CONST(0xAAAAAAAAAAAAAAAA), ABC_CONST(0xAAAAAAAAAAAAAAAA),
49
- ABC_CONST(0xCCCCCCCCCCCCCCCC), ABC_CONST(0xCCCCCCCCCCCCCCCC), ABC_CONST(0xCCCCCCCCCCCCCCCC), ABC_CONST(0xCCCCCCCCCCCCCCCC),
50
- ABC_CONST(0xF0F0F0F0F0F0F0F0), ABC_CONST(0xF0F0F0F0F0F0F0F0), ABC_CONST(0xF0F0F0F0F0F0F0F0), ABC_CONST(0xF0F0F0F0F0F0F0F0),
51
- ABC_CONST(0xFF00FF00FF00FF00), ABC_CONST(0xFF00FF00FF00FF00), ABC_CONST(0xFF00FF00FF00FF00), ABC_CONST(0xFF00FF00FF00FF00),
52
- ABC_CONST(0xFFFF0000FFFF0000), ABC_CONST(0xFFFF0000FFFF0000), ABC_CONST(0xFFFF0000FFFF0000), ABC_CONST(0xFFFF0000FFFF0000),
53
- ABC_CONST(0xFFFFFFFF00000000), ABC_CONST(0xFFFFFFFF00000000), ABC_CONST(0xFFFFFFFF00000000), ABC_CONST(0xFFFFFFFF00000000),
54
- ABC_CONST(0x0000000000000000), ABC_CONST(0xFFFFFFFFFFFFFFFF), ABC_CONST(0x0000000000000000), ABC_CONST(0xFFFFFFFFFFFFFFFF),
55
- ABC_CONST(0x0000000000000000), ABC_CONST(0x0000000000000000), ABC_CONST(0xFFFFFFFFFFFFFFFF), ABC_CONST(0xFFFFFFFFFFFFFFFF)
56
- };
57
-
58
- static word s_Truths8Neg[32] = {
59
- ABC_CONST(0x5555555555555555), ABC_CONST(0x5555555555555555), ABC_CONST(0x5555555555555555), ABC_CONST(0x5555555555555555),
60
- ABC_CONST(0x3333333333333333), ABC_CONST(0x3333333333333333), ABC_CONST(0x3333333333333333), ABC_CONST(0x3333333333333333),
61
- ABC_CONST(0x0F0F0F0F0F0F0F0F), ABC_CONST(0x0F0F0F0F0F0F0F0F), ABC_CONST(0x0F0F0F0F0F0F0F0F), ABC_CONST(0x0F0F0F0F0F0F0F0F),
62
- ABC_CONST(0x00FF00FF00FF00FF), ABC_CONST(0x00FF00FF00FF00FF), ABC_CONST(0x00FF00FF00FF00FF), ABC_CONST(0x00FF00FF00FF00FF),
63
- ABC_CONST(0x0000FFFF0000FFFF), ABC_CONST(0x0000FFFF0000FFFF), ABC_CONST(0x0000FFFF0000FFFF), ABC_CONST(0x0000FFFF0000FFFF),
64
- ABC_CONST(0x00000000FFFFFFFF), ABC_CONST(0x00000000FFFFFFFF), ABC_CONST(0x00000000FFFFFFFF), ABC_CONST(0x00000000FFFFFFFF),
65
- ABC_CONST(0xFFFFFFFFFFFFFFFF), ABC_CONST(0x0000000000000000), ABC_CONST(0xFFFFFFFFFFFFFFFF), ABC_CONST(0x0000000000000000),
66
- ABC_CONST(0xFFFFFFFFFFFFFFFF), ABC_CONST(0xFFFFFFFFFFFFFFFF), ABC_CONST(0x0000000000000000), ABC_CONST(0x0000000000000000)
67
- };
68
-
69
- static int Abc_TtIsSubsetWithMask( word * pSmall, word * pLarge, word * pMask, int nWords )
70
- {
71
- int w;
72
- for ( w = 0; w < nWords; ++w )
73
- if ( ( pSmall[w] & pLarge[w] & pMask[w] ) != ( pSmall[w] & pMask[w] ) )
74
- return 0;
75
- return 1;
76
- }
77
-
78
- static int Abc_TtCofsOppositeWithMask( word * pTruth, word * pMask, int nWords, int iVar )
79
- {
80
- if ( iVar < 6 )
81
- {
82
- int w, Shift = ( 1 << iVar );
83
- for ( w = 0; w < nWords; ++w )
84
- if ( ( ( pTruth[w] << Shift ) & s_Truths6[iVar] & pMask[w] ) != ( ~pTruth[w] & s_Truths6[iVar] & pMask[w] ) )
85
- return 0;
86
- return 1;
87
- }
88
- else
89
- {
90
- int w, Step = ( 1 << ( iVar - 6 ) );
91
- word * p = pTruth, * m = pMask, * pLimit = pTruth + nWords;
92
- for ( ; p < pLimit; p += 2 * Step, m += 2 * Step )
93
- for ( w = 0; w < Step; ++w )
94
- if ( ( p[w] & m[w] ) != ( ~p[w + Step] & m[w + Step] ) )
95
- return 0;
96
- return 1;
97
- }
98
- }
99
-
100
- // checks whether we can decompose as OP(x^p, g) where OP in {AND, OR} and p in {0, 1}
101
- // returns p if OP = AND, and 2 + p if OP = OR
102
- static int Abc_TtIsTopDecomposable( word * pTruth, word * pMask, int nWords, int iVar )
103
- {
104
- assert( iVar < 8 );
105
-
106
- if ( Abc_TtIsSubsetWithMask( pTruth, &s_Truths8[iVar << 2], pMask, nWords ) ) return 1;
107
- if ( Abc_TtIsSubsetWithMask( pTruth, &s_Truths8Neg[iVar << 2], pMask, nWords ) ) return 2;
108
- if ( Abc_TtIsSubsetWithMask( &s_Truths8[iVar << 2], pTruth, pMask, nWords ) ) return 3;
109
- if ( Abc_TtIsSubsetWithMask( &s_Truths8Neg[iVar << 2], pTruth, pMask, nWords ) ) return 4;
110
- if ( Abc_TtCofsOppositeWithMask( pTruth, pMask, nWords, iVar ) ) return 5;
111
-
112
- return 0;
113
- }
114
-
115
- // checks whether we can decompose as OP(x1, OP(x2, OP(x3, ...))) where pVars = {x1, x2, x3, ...}
116
- // OP can be different and vars can be complemented
117
- static int Abc_TtIsStairDecomposable( word * pTruth, int nWords, int * pVars, int nSize, int * pStairFunc )
118
- {
119
- int i, d;
120
- word pMask[4];
121
- word pCopy[4];
122
-
123
- Abc_TtCopy( pCopy, pTruth, nWords, 0 );
124
- Abc_TtMask( pMask, nWords, nWords * 64 );
125
-
126
- for ( i = 0; i < nSize; ++i )
127
- {
128
- d = Abc_TtIsTopDecomposable( pCopy, pMask, nWords, pVars[i] );
129
- if ( !d )
130
- return 0; /* not decomposable */
131
-
132
- pStairFunc[i] = d;
133
-
134
- switch ( d )
135
- {
136
- case 1: /* AND(x, g) */
137
- case 4: /* OR(!x, g) */
138
- Abc_TtAnd( pMask, pMask, &s_Truths8[pVars[i] << 2], nWords, 0 );
139
- break;
140
- case 2: /* AND(!x, g) */
141
- case 3: /* OR(x, g) */
142
- Abc_TtAnd( pMask, pMask, &s_Truths8Neg[pVars[i] << 2], nWords, 0 );
143
- break;
144
- case 5:
145
- Abc_TtXor( pCopy, pCopy, &s_Truths8[pVars[i] << 2], nWords, 0 );
146
- break;
147
- }
148
- }
149
-
150
- return 1; /* decomposable */
151
- }
152
-
153
- /***********************************************************************
154
-
155
- Synopsis [Some printing utilities.]
156
-
157
- ***********************************************************************/
158
-
159
- static inline void Abc_DebugPrint( const char* str, int fCond )
160
- {
161
- if ( fCond )
162
- {
163
- printf( "%s", str );
164
- fflush( stdout );
165
- }
166
- }
167
-
168
- static inline void Abc_DebugPrintInt( const char* fmt, int n, int fCond )
169
- {
170
- if ( fCond )
171
- {
172
- printf( fmt, n );
173
- fflush( stdout );
174
- }
175
- }
176
-
177
- static inline void Abc_DebugPrintIntInt( const char* fmt, int n1, int n2, int fCond )
178
- {
179
- if ( fCond )
180
- {
181
- printf( fmt, n1, n2 );
182
- fflush( stdout );
183
- }
184
- }
185
-
186
- static inline void Abc_DebugErase( int n, int fCond )
187
- {
188
- int i;
189
- if ( fCond )
190
- {
191
- for ( i = 0; i < n; ++i )
192
- printf( "\b" );
193
- fflush( stdout );
194
- }
195
- }
196
-
197
- /***********************************************************************
198
-
199
- Synopsis [BMS.]
200
-
201
- ***********************************************************************/
202
-
203
- #define ABC_EXACT_SOL_NVARS 0
204
- #define ABC_EXACT_SOL_NFUNC 1
205
- #define ABC_EXACT_SOL_NGATES 2
206
-
207
- #define ANSI_COLOR_RED "\x1b[31m"
208
- #define ANSI_COLOR_GREEN "\x1b[32m"
209
- #define ANSI_COLOR_YELLOW "\x1b[33m"
210
- #define ANSI_COLOR_BLUE "\x1b[34m"
211
- #define ANSI_COLOR_MAGENTA "\x1b[35m"
212
- #define ANSI_COLOR_CYAN "\x1b[36m"
213
- #define ANSI_COLOR_RESET "\x1b[0m"
214
-
215
- typedef struct Ses_Man_t_ Ses_Man_t;
216
- struct Ses_Man_t_
217
- {
218
- sat_solver * pSat; /* SAT solver */
219
-
220
- word * pSpec; /* specification */
221
- int bSpecInv; /* remembers whether spec was inverted for normalization */
222
- int nSpecVars; /* number of variables in specification */
223
- int nSpecFunc; /* number of functions to synthesize */
224
- int nSpecWords; /* number of words for function */
225
- int nRows; /* number of rows in the specification (without 0) */
226
- int nMaxDepth; /* maximum depth (-1 if depth is not constrained) */
227
- int nMaxDepthTmp; /* temporary copy to modify nMaxDepth temporarily */
228
- int * pArrTimeProfile; /* arrival times of inputs (NULL if arrival times are ignored) */
229
- int pArrTimeProfileTmp[8]; /* temporary copy to modify pArrTimeProfile temporarily */
230
- int nArrTimeDelta; /* delta to the original arrival times (arrival times are normalized to have 0 as minimum element) */
231
- int nArrTimeMax; /* maximum normalized arrival time */
232
- int nBTLimit; /* conflict limit */
233
- int fMakeAIG; /* create AIG instead of general network */
234
- int fVerbose; /* be verbose */
235
- int fVeryVerbose; /* be very verbose */
236
- int fExtractVerbose; /* be verbose about solution extraction */
237
- int fSatVerbose; /* be verbose about SAT solving */
238
- int fReasonVerbose; /* be verbose about give-up reasons */
239
- word pTtValues[4]; /* truth table values to assign */
240
- Vec_Int_t * vPolar; /* variables with positive polarity */
241
- Vec_Int_t * vAssump; /* assumptions */
242
- int nRandRowAssigns; /* number of random row assignments to initialize CEGAR */
243
- int fKeepRowAssigns; /* if 1, keep counter examples in CEGAR for next number of gates */
244
-
245
- int nGates; /* number of gates */
246
- int nStartGates; /* number of gates to start search (-1), i.e., to start from 1 gate, one needs to specify 0 */
247
- int nMaxGates; /* maximum number of gates given max. delay and arrival times */
248
- int fDecStructure; /* set to 1 or higher if nSpecFunc = 1 and f = x_i OP g(X \ {x_i}), otherwise 0 (determined when solving) */
249
- int pDecVars; /* mask of variables that can be decomposed at top-level */
250
- Vec_Int_t * vStairDecVars; /* list of stair decomposable variables */
251
- int pStairDecFunc[8]; /* list of stair decomposable functions */
252
- word pTtObjs[100]; /* temporary truth tables */
253
-
254
- int nSimVars; /* number of simulation vars x(i, t) */
255
- int nOutputVars; /* number of output variables g(h, i) */
256
- int nGateVars; /* number of gate variables f(i, p, q) */
257
- int nSelectVars; /* number of select variables s(i, j, k) */
258
- int nDepthVars; /* number of depth variables d(i, j) */
259
-
260
- int nSimOffset; /* offset where gate variables start */
261
- int nOutputOffset; /* offset where output variables start */
262
- int nGateOffset; /* offset where gate variables start */
263
- int nSelectOffset; /* offset where select variables start */
264
- int nDepthOffset; /* offset where depth variables start */
265
-
266
- int fHitResLimit; /* SAT solver gave up due to resource limit */
267
-
268
- abctime timeSat; /* SAT runtime */
269
- abctime timeSatSat; /* SAT runtime (sat instance) */
270
- abctime timeSatUnsat; /* SAT runtime (unsat instance) */
271
- abctime timeSatUndef; /* SAT runtime (undef instance) */
272
- abctime timeInstance; /* creating instance runtime */
273
- abctime timeTotal; /* all runtime */
274
-
275
- int nSatCalls; /* number of SAT calls */
276
- int nUnsatCalls; /* number of UNSAT calls */
277
- int nUndefCalls; /* number of UNDEF calls */
278
-
279
- int nDebugOffset; /* for debug printing */
280
- };
281
-
282
- /***********************************************************************
283
-
284
- Synopsis [Store truth tables based on normalized arrival times.]
285
-
286
- ***********************************************************************/
287
-
288
- // The hash table is a list of pointers to Ses_TruthEntry_t elements, which
289
- // are arranged in a linked list, each of which pointing to a linked list
290
- // of Ses_TimesEntry_t elements which contain the char* representation of the
291
- // optimum netlist according to then normalized arrival times:
292
-
293
- typedef struct Ses_TimesEntry_t_ Ses_TimesEntry_t;
294
- struct Ses_TimesEntry_t_
295
- {
296
- int pArrTimeProfile[8]; /* normalized arrival time profile */
297
- int fResLimit; /* solution found after resource limit */
298
- Ses_TimesEntry_t * next; /* linked list pointer */
299
- char * pNetwork; /* pointer to char array representation of optimum network */
300
- };
301
-
302
- typedef struct Ses_TruthEntry_t_ Ses_TruthEntry_t;
303
- struct Ses_TruthEntry_t_
304
- {
305
- word pTruth[4]; /* truth table for comparison */
306
- int nVars; /* number of variables */
307
- Ses_TruthEntry_t * next; /* linked list pointer */
308
- Ses_TimesEntry_t * head; /* pointer to head of sub list with arrival times */
309
- };
310
-
311
- #define SES_STORE_TABLE_SIZE 1024
312
- typedef struct Ses_Store_t_ Ses_Store_t;
313
- struct Ses_Store_t_
314
- {
315
- int fMakeAIG; /* create AIG instead of general network */
316
- int fVerbose; /* be verbose */
317
- int fVeryVerbose; /* be very verbose */
318
- int nBTLimit; /* conflict limit */
319
- int nEntriesCount; /* number of entries */
320
- int nValidEntriesCount; /* number of entries with network */
321
- Ses_TruthEntry_t * pEntries[SES_STORE_TABLE_SIZE]; /* hash table for truth table entries */
322
- sat_solver * pSat; /* own SAT solver instance to reuse when calling exact algorithm */
323
- FILE * pDebugEntries; /* debug unsynth. (rl) entries */
324
- char * szDBName; /* if given, database is written every time a new entry is added */
325
-
326
- /* statistics */
327
- unsigned long nCutCount; /* number of cuts investigated */
328
- unsigned long pCutCount[9]; /* -> per cut size */
329
- unsigned long nUnsynthesizedImp; /* number of cuts which couldn't be optimized at all, opt. stopped because of imp. constraints */
330
- unsigned long pUnsynthesizedImp[9]; /* -> per cut size */
331
- unsigned long nUnsynthesizedRL; /* number of cuts which couldn't be optimized at all, opt. stopped because of resource limits */
332
- unsigned long pUnsynthesizedRL[9]; /* -> per cut size */
333
- unsigned long nSynthesizedTrivial; /* number of cuts which could be synthesized trivially (n < 2) */
334
- unsigned long pSynthesizedTrivial[9]; /* -> per cut size */
335
- unsigned long nSynthesizedImp; /* number of cuts which could be synthesized, opt. stopped because of imp. constraints */
336
- unsigned long pSynthesizedImp[9]; /* -> per cut size */
337
- unsigned long nSynthesizedRL; /* number of cuts which could be synthesized, opt. stopped because of resource limits */
338
- unsigned long pSynthesizedRL[9]; /* -> per cut size */
339
- unsigned long nCacheHits; /* number of cache hits */
340
- unsigned long pCacheHits[9]; /* -> per cut size */
341
-
342
- unsigned long nSatCalls; /* number of total SAT calls */
343
- unsigned long nUnsatCalls; /* number of total UNSAT calls */
344
- unsigned long nUndefCalls; /* number of total UNDEF calls */
345
-
346
- abctime timeExact; /* Exact synthesis runtime */
347
- abctime timeSat; /* SAT runtime */
348
- abctime timeSatSat; /* SAT runtime (sat instance) */
349
- abctime timeSatUnsat; /* SAT runtime (unsat instance) */
350
- abctime timeSatUndef; /* SAT runtime (undef instance) */
351
- abctime timeInstance; /* creating instance runtime */
352
- abctime timeTotal; /* all runtime */
353
- };
354
-
355
- static Ses_Store_t * s_pSesStore = NULL;
356
-
357
- ////////////////////////////////////////////////////////////////////////
358
- /// FUNCTION DEFINITIONS ///
359
- ////////////////////////////////////////////////////////////////////////
360
-
361
- static int Abc_NormalizeArrivalTimes( int * pArrTimeProfile, int nVars, int * maxNormalized )
362
- {
363
- int * p = pArrTimeProfile, * pEnd = pArrTimeProfile + nVars;
364
- int delta = *p;
365
-
366
- while ( ++p < pEnd )
367
- if ( *p < delta )
368
- delta = *p;
369
-
370
- *maxNormalized = 0;
371
- p = pArrTimeProfile;
372
- while ( p < pEnd )
373
- {
374
- *p -= delta;
375
- if ( *p > *maxNormalized )
376
- *maxNormalized = *p;
377
- ++p;
378
- }
379
-
380
- *maxNormalized += 1;
381
-
382
- return delta;
383
- }
384
-
385
- static inline Ses_Store_t * Ses_StoreAlloc( int nBTLimit, int fMakeAIG, int fVerbose )
386
- {
387
- Ses_Store_t * pStore = ABC_CALLOC( Ses_Store_t, 1 );
388
- pStore->fMakeAIG = fMakeAIG;
389
- pStore->fVerbose = fVerbose;
390
- pStore->nBTLimit = nBTLimit;
391
- memset( pStore->pEntries, 0, SES_STORE_TABLE_SIZE );
392
-
393
- pStore->pSat = sat_solver_new();
394
-
395
- return pStore;
396
- }
397
-
398
- static inline void Ses_StoreClean( Ses_Store_t * pStore )
399
- {
400
- int i;
401
- Ses_TruthEntry_t * pTEntry, * pTEntry2;
402
- Ses_TimesEntry_t * pTiEntry, * pTiEntry2;
403
-
404
- for ( i = 0; i < SES_STORE_TABLE_SIZE; ++i )
405
- if ( pStore->pEntries[i] )
406
- {
407
- pTEntry = pStore->pEntries[i];
408
-
409
- while ( pTEntry )
410
- {
411
- pTiEntry = pTEntry->head;
412
- while ( pTiEntry )
413
- {
414
- ABC_FREE( pTiEntry->pNetwork );
415
- pTiEntry2 = pTiEntry;
416
- pTiEntry = pTiEntry->next;
417
- ABC_FREE( pTiEntry2 );
418
- }
419
- pTEntry2 = pTEntry;
420
- pTEntry = pTEntry->next;
421
- ABC_FREE( pTEntry2 );
422
- }
423
- }
424
-
425
- sat_solver_delete( pStore->pSat );
426
-
427
- if ( pStore->szDBName )
428
- ABC_FREE( pStore->szDBName );
429
- ABC_FREE( pStore );
430
- }
431
-
432
- static inline int Ses_StoreTableHash( word * pTruth, int nVars )
433
- {
434
- static int s_Primes[4] = { 1291, 1699, 1999, 2357 };
435
- int i;
436
- unsigned uHash = 0;
437
- for ( i = 0; i < Abc_TtWordNum( nVars ); ++i )
438
- uHash ^= pTruth[i] * s_Primes[i & 0xf];
439
- return (int)(uHash % SES_STORE_TABLE_SIZE );
440
- }
441
-
442
- static inline int Ses_StoreTruthEqual( Ses_TruthEntry_t * pEntry, word * pTruth, int nVars )
443
- {
444
- int i;
445
-
446
- if ( pEntry->nVars != nVars )
447
- return 0;
448
-
449
- for ( i = 0; i < Abc_TtWordNum( nVars ); ++i )
450
- if ( pEntry->pTruth[i] != pTruth[i] )
451
- return 0;
452
- return 1;
453
- }
454
-
455
- static inline void Ses_StoreTruthCopy( Ses_TruthEntry_t * pEntry, word * pTruthSrc, int nVars )
456
- {
457
- int i;
458
- pEntry->nVars = nVars;
459
- for ( i = 0; i < Abc_TtWordNum( nVars ); ++i )
460
- pEntry->pTruth[i] = pTruthSrc[i];
461
- }
462
-
463
- static inline int Ses_StoreTimesEqual( int * pTimes1, int * pTimes2, int nVars )
464
- {
465
- int i;
466
- for ( i = 0; i < nVars; ++i )
467
- if ( pTimes1[i] != pTimes2[i] )
468
- return 0;
469
- return 1;
470
- }
471
-
472
- static inline void Ses_StoreTimesCopy( int * pTimesDest, int * pTimesSrc, int nVars )
473
- {
474
- int i;
475
- for ( i = 0; i < nVars; ++i )
476
- pTimesDest[i] = pTimesSrc[i];
477
- }
478
-
479
- static inline void Ses_StorePrintEntry( Ses_TruthEntry_t * pEntry, Ses_TimesEntry_t * pTiEntry )
480
- {
481
- int i;
482
-
483
- printf( "f = " );
484
- Abc_TtPrintHexRev( stdout, pEntry->pTruth, pEntry->nVars );
485
- printf( ", n = %d", pEntry->nVars );
486
- printf( ", arrival =" );
487
- for ( i = 0; i < pEntry->nVars; ++i )
488
- printf( " %d", pTiEntry->pArrTimeProfile[i] );
489
- printf( "\n" );
490
- }
491
-
492
- static inline void Ses_StorePrintDebugEntry( Ses_Store_t * pStore, word * pTruth, int nVars, int * pNormalArrTime, int nMaxDepth, char * pSol, int nStartGates )
493
- {
494
- int l;
495
-
496
- fprintf( pStore->pDebugEntries, "abc -c \"exact -v -C %d", pStore->nBTLimit );
497
- if ( s_pSesStore->fMakeAIG ) fprintf( pStore->pDebugEntries, " -a" );
498
- fprintf( pStore->pDebugEntries, " -S %d -D %d -A", nStartGates + 1, nMaxDepth );
499
- for ( l = 0; l < nVars; ++l )
500
- fprintf( pStore->pDebugEntries, "%c%d", ( l == 0 ? ' ' : ',' ), pNormalArrTime[l] );
501
- fprintf( pStore->pDebugEntries, " " );
502
- Abc_TtPrintHexRev( pStore->pDebugEntries, pTruth, nVars );
503
- fprintf( pStore->pDebugEntries, "\" # " );
504
-
505
- if ( !pSol )
506
- fprintf( pStore->pDebugEntries, "no " );
507
- fprintf( pStore->pDebugEntries, "solution found before\n" );
508
- }
509
-
510
- static void Abc_ExactNormalizeArrivalTimesForNetwork( int nVars, int * pArrTimeProfile, char * pSol )
511
- {
512
- int nGates, i, j, k, nMax;
513
- Vec_Int_t * vLevels;
514
-
515
- nGates = pSol[ABC_EXACT_SOL_NGATES];
516
-
517
- /* printf( "NORMALIZE\n" ); */
518
- /* printf( " #vars = %d\n", nVars ); */
519
- /* printf( " #gates = %d\n", nGates ); */
520
-
521
- vLevels = Vec_IntAllocArrayCopy( pArrTimeProfile, nVars );
522
-
523
- /* compute level of each gate based on arrival time profile (to compute depth) */
524
- for ( i = 0; i < nGates; ++i )
525
- {
526
- j = pSol[3 + i * 4 + 2];
527
- k = pSol[3 + i * 4 + 3];
528
-
529
- Vec_IntPush( vLevels, Abc_MaxInt( Vec_IntEntry( vLevels, j ), Vec_IntEntry( vLevels, k ) ) + 1 );
530
-
531
- /* printf( " gate %d = (%d,%d)\n", nVars + i, j, k ); */
532
- }
533
-
534
- /* Vec_IntPrint( vLevels ); */
535
-
536
- /* reset all levels except for the last one */
537
- for ( i = 0; i < nVars + nGates - 1; ++i )
538
- Vec_IntSetEntry( vLevels, i, Vec_IntEntry( vLevels, nVars + nGates - 1 ) );
539
-
540
- /* Vec_IntPrint( vLevels ); */
541
-
542
- /* compute levels from top to bottom */
543
- for ( i = nGates - 1; i >= 0; --i )
544
- {
545
- j = pSol[3 + i * 4 + 2];
546
- k = pSol[3 + i * 4 + 3];
547
-
548
- Vec_IntSetEntry( vLevels, j, Abc_MinInt( Vec_IntEntry( vLevels, j ), Vec_IntEntry( vLevels, nVars + i ) - 1 ) );
549
- Vec_IntSetEntry( vLevels, k, Abc_MinInt( Vec_IntEntry( vLevels, k ), Vec_IntEntry( vLevels, nVars + i ) - 1 ) );
550
- }
551
-
552
- /* Vec_IntPrint( vLevels ); */
553
-
554
- /* normalize arrival times */
555
- Abc_NormalizeArrivalTimes( Vec_IntArray( vLevels ), nVars, &nMax );
556
- memcpy( pArrTimeProfile, Vec_IntArray( vLevels ), sizeof(int) * nVars );
557
-
558
- /* printf( " nMax = %d\n", nMax ); */
559
- /* Vec_IntPrint( vLevels ); */
560
-
561
- Vec_IntFree( vLevels );
562
- }
563
-
564
- static void Ses_StoreWrite( Ses_Store_t * pStore, const char * pFilename, int fSynthImp, int fSynthRL, int fUnsynthImp, int fUnsynthRL )
565
- {
566
- int i;
567
- char zero = '\0';
568
- unsigned long nEntries = 0;
569
- Ses_TruthEntry_t * pTEntry;
570
- Ses_TimesEntry_t * pTiEntry;
571
- FILE * pFile;
572
-
573
- pFile = fopen( pFilename, "wb" );
574
- if (pFile == NULL)
575
- {
576
- printf( "cannot open file \"%s\" for writing\n", pFilename );
577
- return;
578
- }
579
-
580
- if ( fSynthImp ) nEntries += pStore->nSynthesizedImp;
581
- if ( fSynthRL ) nEntries += pStore->nSynthesizedRL;
582
- if ( fUnsynthImp ) nEntries += pStore->nUnsynthesizedImp;
583
- if ( fUnsynthRL ) nEntries += pStore->nUnsynthesizedRL;
584
- fwrite( &nEntries, sizeof( unsigned long ), 1, pFile );
585
-
586
- for ( i = 0; i < SES_STORE_TABLE_SIZE; ++i )
587
- if ( pStore->pEntries[i] )
588
- {
589
- pTEntry = pStore->pEntries[i];
590
-
591
- while ( pTEntry )
592
- {
593
- pTiEntry = pTEntry->head;
594
- while ( pTiEntry )
595
- {
596
- if ( !fSynthImp && pTiEntry->pNetwork && !pTiEntry->fResLimit ) { pTiEntry = pTiEntry->next; continue; }
597
- if ( !fSynthRL && pTiEntry->pNetwork && pTiEntry->fResLimit ) { pTiEntry = pTiEntry->next; continue; }
598
- if ( !fUnsynthImp && !pTiEntry->pNetwork && !pTiEntry->fResLimit ) { pTiEntry = pTiEntry->next; continue; }
599
- if ( !fUnsynthRL && !pTiEntry->pNetwork && pTiEntry->fResLimit ) { pTiEntry = pTiEntry->next; continue; }
600
-
601
- fwrite( pTEntry->pTruth, sizeof( word ), 4, pFile );
602
- fwrite( &pTEntry->nVars, sizeof( int ), 1, pFile );
603
- fwrite( pTiEntry->pArrTimeProfile, sizeof( int ), 8, pFile );
604
- fwrite( &pTiEntry->fResLimit, sizeof( int ), 1, pFile );
605
-
606
- if ( pTiEntry->pNetwork )
607
- {
608
- fwrite( pTiEntry->pNetwork, sizeof( char ), 3 + 4 * pTiEntry->pNetwork[ABC_EXACT_SOL_NGATES] + 2 + pTiEntry->pNetwork[ABC_EXACT_SOL_NVARS], pFile );
609
- }
610
- else
611
- {
612
- fwrite( &zero, sizeof( char ), 1, pFile );
613
- fwrite( &zero, sizeof( char ), 1, pFile );
614
- fwrite( &zero, sizeof( char ), 1, pFile );
615
- }
616
-
617
- pTiEntry = pTiEntry->next;
618
- }
619
- pTEntry = pTEntry->next;
620
- }
621
- }
622
-
623
-
624
- fclose( pFile );
625
- }
626
-
627
- // pArrTimeProfile is normalized
628
- // returns 1 if and only if a new TimesEntry has been created
629
- int Ses_StoreAddEntry( Ses_Store_t * pStore, word * pTruth, int nVars, int * pArrTimeProfile, char * pSol, int fResLimit )
630
- {
631
- int key, fAdded;
632
- Ses_TruthEntry_t * pTEntry;
633
- Ses_TimesEntry_t * pTiEntry;
634
-
635
- if ( pSol )
636
- Abc_ExactNormalizeArrivalTimesForNetwork( nVars, pArrTimeProfile, pSol );
637
-
638
- key = Ses_StoreTableHash( pTruth, nVars );
639
- pTEntry = pStore->pEntries[key];
640
-
641
- /* does truth table already exist? */
642
- while ( pTEntry )
643
- {
644
- if ( Ses_StoreTruthEqual( pTEntry, pTruth, nVars ) )
645
- break;
646
- else
647
- pTEntry = pTEntry->next;
648
- }
649
-
650
- /* entry does not yet exist, so create new one and enqueue */
651
- if ( !pTEntry )
652
- {
653
- pTEntry = ABC_CALLOC( Ses_TruthEntry_t, 1 );
654
- Ses_StoreTruthCopy( pTEntry, pTruth, nVars );
655
- pTEntry->next = pStore->pEntries[key];
656
- pStore->pEntries[key] = pTEntry;
657
- }
658
-
659
- /* does arrival time already exist? */
660
- pTiEntry = pTEntry->head;
661
- while ( pTiEntry )
662
- {
663
- if ( Ses_StoreTimesEqual( pArrTimeProfile, pTiEntry->pArrTimeProfile, nVars ) )
664
- break;
665
- else
666
- pTiEntry = pTiEntry->next;
667
- }
668
-
669
- /* entry does not yet exist, so create new one and enqueue */
670
- if ( !pTiEntry )
671
- {
672
- pTiEntry = ABC_CALLOC( Ses_TimesEntry_t, 1 );
673
- Ses_StoreTimesCopy( pTiEntry->pArrTimeProfile, pArrTimeProfile, nVars );
674
- pTiEntry->pNetwork = pSol;
675
- pTiEntry->fResLimit = fResLimit;
676
- pTiEntry->next = pTEntry->head;
677
- pTEntry->head = pTiEntry;
678
-
679
- /* item has been added */
680
- fAdded = 1;
681
- pStore->nEntriesCount++;
682
- if ( pSol )
683
- pStore->nValidEntriesCount++;
684
- }
685
- else
686
- {
687
- //assert( 0 );
688
- /* item was already present */
689
- fAdded = 0;
690
- }
691
-
692
- /* statistics */
693
- if ( pSol )
694
- {
695
- if ( fResLimit )
696
- {
697
- pStore->nSynthesizedRL++;
698
- pStore->pSynthesizedRL[nVars]++;
699
- }
700
- else
701
- {
702
- pStore->nSynthesizedImp++;
703
- pStore->pSynthesizedImp[nVars]++;
704
- }
705
- }
706
- else
707
- {
708
- if ( fResLimit )
709
- {
710
- pStore->nUnsynthesizedRL++;
711
- pStore->pUnsynthesizedRL[nVars]++;
712
- }
713
- else
714
- {
715
- pStore->nUnsynthesizedImp++;
716
- pStore->pUnsynthesizedImp[nVars]++;
717
- }
718
- }
719
-
720
- if ( fAdded && pStore->szDBName )
721
- Ses_StoreWrite( pStore, pStore->szDBName, 1, 0, 0, 0 );
722
-
723
- return fAdded;
724
- }
725
-
726
- // pArrTimeProfile is normalized
727
- // returns 1 if entry was in store, pSol may still be 0 if it couldn't be computed
728
- int Ses_StoreGetEntrySimple( Ses_Store_t * pStore, word * pTruth, int nVars, int * pArrTimeProfile, char ** pSol )
729
- {
730
- int key;
731
- Ses_TruthEntry_t * pTEntry;
732
- Ses_TimesEntry_t * pTiEntry;
733
-
734
- key = Ses_StoreTableHash( pTruth, nVars );
735
- pTEntry = pStore->pEntries[key];
736
-
737
- /* find truth table entry */
738
- while ( pTEntry )
739
- {
740
- if ( Ses_StoreTruthEqual( pTEntry, pTruth, nVars ) )
741
- break;
742
- else
743
- pTEntry = pTEntry->next;
744
- }
745
-
746
- /* no entry found? */
747
- if ( !pTEntry )
748
- return 0;
749
-
750
- /* find times entry */
751
- pTiEntry = pTEntry->head;
752
- while ( pTiEntry )
753
- {
754
- if ( Ses_StoreTimesEqual( pArrTimeProfile, pTiEntry->pArrTimeProfile, nVars ) )
755
- break;
756
- else
757
- pTiEntry = pTiEntry->next;
758
- }
759
-
760
- /* no entry found? */
761
- if ( !pTiEntry )
762
- return 0;
763
-
764
- *pSol = pTiEntry->pNetwork;
765
- return 1;
766
- }
767
-
768
- int Ses_StoreGetEntry( Ses_Store_t * pStore, word * pTruth, int nVars, int * pArrTimeProfile, char ** pSol )
769
- {
770
- int key;
771
- Ses_TruthEntry_t * pTEntry;
772
- Ses_TimesEntry_t * pTiEntry;
773
- int pTimes[8];
774
-
775
- key = Ses_StoreTableHash( pTruth, nVars );
776
- pTEntry = pStore->pEntries[key];
777
-
778
- /* find truth table entry */
779
- while ( pTEntry )
780
- {
781
- if ( Ses_StoreTruthEqual( pTEntry, pTruth, nVars ) )
782
- break;
783
- else
784
- pTEntry = pTEntry->next;
785
- }
786
-
787
- /* no entry found? */
788
- if ( !pTEntry )
789
- return 0;
790
-
791
- /* find times entry */
792
- pTiEntry = pTEntry->head;
793
- while ( pTiEntry )
794
- {
795
- /* found after normalization wrt. to network */
796
- if ( pTiEntry->pNetwork )
797
- {
798
- memcpy( pTimes, pArrTimeProfile, sizeof(int) * nVars );
799
- Abc_ExactNormalizeArrivalTimesForNetwork( nVars, pTimes, pTiEntry->pNetwork );
800
-
801
- if ( Ses_StoreTimesEqual( pTimes, pTiEntry->pArrTimeProfile, nVars ) )
802
- break;
803
- }
804
- /* found for non synthesized network */
805
- else if ( Ses_StoreTimesEqual( pArrTimeProfile, pTiEntry->pArrTimeProfile, nVars ) )
806
- break;
807
- else
808
- pTiEntry = pTiEntry->next;
809
- }
810
-
811
- /* no entry found? */
812
- if ( !pTiEntry )
813
- return 0;
814
-
815
- *pSol = pTiEntry->pNetwork;
816
- return 1;
817
- }
818
-
819
- static void Ses_StoreRead( Ses_Store_t * pStore, const char * pFilename, int fSynthImp, int fSynthRL, int fUnsynthImp, int fUnsynthRL )
820
- {
821
- int i;
822
- unsigned long nEntries;
823
- word pTruth[4];
824
- int nVars, fResLimit;
825
- int pArrTimeProfile[8];
826
- char pHeader[3];
827
- char * pNetwork;
828
- FILE * pFile;
829
- int value;
830
-
831
- if ( pStore->szDBName )
832
- {
833
- printf( "cannot read from database when szDBName is set" );
834
- return;
835
- }
836
-
837
- pFile = fopen( pFilename, "rb" );
838
- if (pFile == NULL)
839
- {
840
- printf( "cannot open file \"%s\" for reading\n", pFilename );
841
- return;
842
- }
843
-
844
- value = fread( &nEntries, sizeof( unsigned long ), 1, pFile );
845
-
846
- for ( i = 0; i < (int)nEntries; ++i )
847
- {
848
- value = fread( pTruth, sizeof( word ), 4, pFile );
849
- value = fread( &nVars, sizeof( int ), 1, pFile );
850
- value = fread( pArrTimeProfile, sizeof( int ), 8, pFile );
851
- value = fread( &fResLimit, sizeof( int ), 1, pFile );
852
- value = fread( pHeader, sizeof( char ), 3, pFile );
853
-
854
- if ( pHeader[0] == '\0' )
855
- pNetwork = NULL;
856
- else
857
- {
858
- pNetwork = ABC_CALLOC( char, 3 + 4 * pHeader[ABC_EXACT_SOL_NGATES] + 2 + pHeader[ABC_EXACT_SOL_NVARS] );
859
- pNetwork[0] = pHeader[0];
860
- pNetwork[1] = pHeader[1];
861
- pNetwork[2] = pHeader[2];
862
-
863
- value = fread( pNetwork + 3, sizeof( char ), 4 * pHeader[ABC_EXACT_SOL_NGATES] + 2 + pHeader[ABC_EXACT_SOL_NVARS], pFile );
864
- }
865
-
866
- if ( !fSynthImp && pNetwork && !fResLimit ) continue;
867
- if ( !fSynthRL && pNetwork && fResLimit ) continue;
868
- if ( !fUnsynthImp && !pNetwork && !fResLimit ) continue;
869
- if ( !fUnsynthRL && !pNetwork && fResLimit ) continue;
870
-
871
- Ses_StoreAddEntry( pStore, pTruth, nVars, pArrTimeProfile, pNetwork, fResLimit );
872
- }
873
-
874
- fclose( pFile );
875
-
876
- printf( "read %lu entries from file\n", (long)nEntries );
877
- }
878
-
879
- // computes top decomposition of variables wrt. to AND and OR
880
- static inline void Ses_ManComputeTopDec( Ses_Man_t * pSes )
881
- {
882
- int l;
883
- word pMask[4];
884
-
885
- Abc_TtMask( pMask, pSes->nSpecWords, pSes->nSpecWords * 64 );
886
-
887
- for ( l = 0; l < pSes->nSpecVars; ++l )
888
- if ( Abc_TtIsTopDecomposable( pSes->pSpec, pMask, pSes->nSpecWords, l ) )
889
- pSes->pDecVars |= ( 1 << l );
890
- }
891
-
892
- static inline Ses_Man_t * Ses_ManAlloc( word * pTruth, int nVars, int nFunc, int nMaxDepth, int * pArrTimeProfile, int fMakeAIG, int nBTLimit, int fVerbose )
893
- {
894
- int h, i;
895
-
896
- Ses_Man_t * p = ABC_CALLOC( Ses_Man_t, 1 );
897
- p->pSat = NULL;
898
- p->bSpecInv = 0;
899
- for ( h = 0; h < nFunc; ++h )
900
- if ( pTruth[h << 2] & 1 )
901
- {
902
- for ( i = 0; i < 4; ++i )
903
- pTruth[(h << 2) + i] = ~pTruth[(h << 2) + i];
904
- p->bSpecInv |= ( 1 << h );
905
- }
906
- p->pSpec = pTruth;
907
- p->nSpecVars = nVars;
908
- p->nSpecFunc = nFunc;
909
- p->nSpecWords = Abc_TtWordNum( nVars );
910
- p->nRows = ( 1 << nVars ) - 1;
911
- p->nMaxDepth = nMaxDepth;
912
- p->pArrTimeProfile = nMaxDepth >= 0 ? pArrTimeProfile : NULL;
913
- if ( p->pArrTimeProfile )
914
- p->nArrTimeDelta = Abc_NormalizeArrivalTimes( p->pArrTimeProfile, nVars, &p->nArrTimeMax );
915
- else
916
- p->nArrTimeDelta = p->nArrTimeMax = 0;
917
- p->fMakeAIG = fMakeAIG;
918
- p->nBTLimit = nBTLimit;
919
- p->fVerbose = fVerbose;
920
- p->fVeryVerbose = 0;
921
- p->fExtractVerbose = 0;
922
- p->fSatVerbose = 0;
923
- p->vPolar = Vec_IntAlloc( 100 );
924
- p->vAssump = Vec_IntAlloc( 10 );
925
- p->vStairDecVars = Vec_IntAlloc( nVars );
926
- p->nRandRowAssigns = 2 * nVars;
927
- p->fKeepRowAssigns = 0;
928
-
929
- if ( p->nSpecFunc == 1 )
930
- Ses_ManComputeTopDec( p );
931
-
932
- srand( 0xCAFE );
933
-
934
- return p;
935
- }
936
-
937
- static inline void Ses_ManCleanLight( Ses_Man_t * pSes )
938
- {
939
- int h, i;
940
- for ( h = 0; h < pSes->nSpecFunc; ++h )
941
- if ( ( pSes->bSpecInv >> h ) & 1 )
942
- for ( i = 0; i < 4; ++i )
943
- pSes->pSpec[(h << 2) + i] = ~( pSes->pSpec[(h << 2) + i] );
944
-
945
- if ( pSes->pArrTimeProfile )
946
- for ( i = 0; i < pSes->nSpecVars; ++i )
947
- pSes->pArrTimeProfile[i] += pSes->nArrTimeDelta;
948
-
949
- Vec_IntFree( pSes->vPolar );
950
- Vec_IntFree( pSes->vAssump );
951
- Vec_IntFree( pSes->vStairDecVars );
952
-
953
- ABC_FREE( pSes );
954
- }
955
-
956
- static inline void Ses_ManClean( Ses_Man_t * pSes )
957
- {
958
- if ( pSes->pSat )
959
- sat_solver_delete( pSes->pSat );
960
- Ses_ManCleanLight( pSes );
961
- }
962
-
963
- /**Function*************************************************************
964
-
965
- Synopsis [Access variables based on indexes.]
966
-
967
- ***********************************************************************/
968
- static inline int Ses_ManSimVar( Ses_Man_t * pSes, int i, int t )
969
- {
970
- assert( i < pSes->nGates );
971
- assert( t < pSes->nRows );
972
-
973
- return pSes->nSimOffset + pSes->nRows * i + t;
974
- }
975
-
976
- static inline int Ses_ManOutputVar( Ses_Man_t * pSes, int h, int i )
977
- {
978
- assert( h < pSes->nSpecFunc );
979
- assert( i < pSes->nGates );
980
-
981
- return pSes->nOutputOffset + pSes->nGates * h + i;
982
- }
983
-
984
- static inline int Ses_ManGateVar( Ses_Man_t * pSes, int i, int p, int q )
985
- {
986
- assert( i < pSes->nGates );
987
- assert( p < 2 );
988
- assert( q < 2 );
989
- assert( p > 0 || q > 0 );
990
-
991
- return pSes->nGateOffset + i * 3 + ( p << 1 ) + q - 1;
992
- }
993
-
994
- static inline int Ses_ManSelectVar( Ses_Man_t * pSes, int i, int j, int k )
995
- {
996
- int a;
997
- int offset;
998
-
999
- assert( i < pSes->nGates );
1000
- assert( k < pSes->nSpecVars + i );
1001
- assert( j < k );
1002
-
1003
- offset = pSes->nSelectOffset;
1004
- for ( a = pSes->nSpecVars; a < pSes->nSpecVars + i; ++a )
1005
- offset += a * ( a - 1 ) / 2;
1006
-
1007
- return offset + ( -j * ( 1 + j - 2 * ( pSes->nSpecVars + i ) ) ) / 2 + ( k - j - 1 );
1008
- }
1009
-
1010
- static inline int Ses_ManDepthVar( Ses_Man_t * pSes, int i, int j )
1011
- {
1012
- assert( i < pSes->nGates );
1013
- assert( j <= pSes->nArrTimeMax + i );
1014
-
1015
- return pSes->nDepthOffset + i * pSes->nArrTimeMax + ( ( i * ( i + 1 ) ) / 2 ) + j;
1016
- }
1017
-
1018
- /**Function*************************************************************
1019
-
1020
- Synopsis [Compute truth table from a solution.]
1021
-
1022
- ***********************************************************************/
1023
- static word * Ses_ManDeriveTruth( Ses_Man_t * pSes, char * pSol, int fInvert )
1024
- {
1025
- int i, f, j, k, w, nGates = pSol[ABC_EXACT_SOL_NGATES];
1026
- char * p;
1027
- word * pTruth = NULL, * pTruth0, * pTruth1;
1028
- assert( pSol[ABC_EXACT_SOL_NFUNC] == 1 );
1029
-
1030
- p = pSol + 3;
1031
-
1032
- memset( pSes->pTtObjs, 0, sizeof( word ) * 4 * nGates );
1033
-
1034
- for ( i = 0; i < nGates; ++i )
1035
- {
1036
- f = *p++;
1037
- assert( *p++ == 2 );
1038
- j = *p++;
1039
- k = *p++;
1040
-
1041
- pTruth0 = j < pSes->nSpecVars ? &s_Truths8[j << 2] : &pSes->pTtObjs[( j - pSes->nSpecVars ) << 2];
1042
- pTruth1 = k < pSes->nSpecVars ? &s_Truths8[k << 2] : &pSes->pTtObjs[( k - pSes->nSpecVars ) << 2];
1043
-
1044
- pTruth = &pSes->pTtObjs[i << 2];
1045
-
1046
- if ( f & 1 )
1047
- for ( w = 0; w < pSes->nSpecWords; ++w )
1048
- pTruth[w] |= ~pTruth0[w] & pTruth1[w];
1049
- if ( ( f >> 1 ) & 1 )
1050
- for ( w = 0; w < pSes->nSpecWords; ++w )
1051
- pTruth[w] |= pTruth0[w] & ~pTruth1[w];
1052
- if ( ( f >> 2 ) & 1 )
1053
- for ( w = 0; w < pSes->nSpecWords; ++w )
1054
- pTruth[w] |= pTruth0[w] & pTruth1[w];
1055
- }
1056
-
1057
- assert( Abc_Lit2Var( *p ) == nGates - 1 );
1058
- if ( fInvert && Abc_LitIsCompl( *p ) )
1059
- Abc_TtNot( pTruth, pSes->nSpecWords );
1060
-
1061
- return pTruth;
1062
- }
1063
-
1064
- /**Function*************************************************************
1065
-
1066
- Synopsis [Setup variables to find network with nGates gates.]
1067
-
1068
- ***********************************************************************/
1069
- static void Ses_ManCreateVars( Ses_Man_t * pSes, int nGates )
1070
- {
1071
- int i;
1072
-
1073
- if ( pSes->fSatVerbose )
1074
- {
1075
- printf( "create variables for network with %d functions over %d variables and %d/%d gates\n", pSes->nSpecFunc, pSes->nSpecVars, nGates, pSes->nMaxGates );
1076
- }
1077
-
1078
- pSes->nGates = nGates;
1079
- pSes->nSimVars = nGates * pSes->nRows;
1080
- pSes->nOutputVars = pSes->nSpecFunc * nGates;
1081
- pSes->nGateVars = nGates * 3;
1082
- pSes->nSelectVars = 0;
1083
- for ( i = pSes->nSpecVars; i < pSes->nSpecVars + nGates; ++i )
1084
- pSes->nSelectVars += ( i * ( i - 1 ) ) / 2;
1085
- pSes->nDepthVars = pSes->nMaxDepth > 0 ? nGates * pSes->nArrTimeMax + ( nGates * ( nGates + 1 ) ) / 2 : 0;
1086
-
1087
- /* pSes->nSimOffset = 0; */
1088
- /* pSes->nOutputOffset = pSes->nSimVars; */
1089
- /* pSes->nGateOffset = pSes->nSimVars + pSes->nOutputVars; */
1090
- /* pSes->nSelectOffset = pSes->nSimVars + pSes->nOutputVars + pSes->nGateVars; */
1091
- /* pSes->nDepthOffset = pSes->nSimVars + pSes->nOutputVars + pSes->nGateVars + pSes->nSelectVars; */
1092
-
1093
- pSes->nDepthOffset = 0;
1094
- pSes->nSelectOffset = pSes->nDepthVars;
1095
- pSes->nGateOffset = pSes->nDepthVars + pSes->nSelectVars;
1096
- pSes->nOutputOffset = pSes->nDepthVars + pSes->nSelectVars + pSes->nGateVars;
1097
- pSes->nSimOffset = pSes->nDepthVars + pSes->nSelectVars + pSes->nGateVars + pSes->nOutputVars;
1098
-
1099
- /* pSes->nDepthOffset = 0; */
1100
- /* pSes->nSelectOffset = pSes->nDepthVars; */
1101
- /* pSes->nOutputOffset = pSes->nDepthVars + pSes->nSelectVars; */
1102
- /* pSes->nGateOffset = pSes->nDepthVars + pSes->nSelectVars + pSes->nOutputVars; */
1103
- /* pSes->nSimOffset = pSes->nDepthVars + pSes->nSelectVars + pSes->nOutputVars + pSes->nGateVars; */
1104
-
1105
- /* if we already have a SAT solver, then restart it (this saves a lot of time) */
1106
- if ( pSes->pSat )
1107
- sat_solver_restart( pSes->pSat );
1108
- else
1109
- pSes->pSat = sat_solver_new();
1110
- sat_solver_setnvars( pSes->pSat, pSes->nSimVars + pSes->nOutputVars + pSes->nGateVars + pSes->nSelectVars + pSes->nDepthVars );
1111
- }
1112
-
1113
- /**Function*************************************************************
1114
-
1115
- Synopsis [Create clauses.]
1116
-
1117
- ***********************************************************************/
1118
- static inline void Ses_ManGateCannotHaveChild( Ses_Man_t * pSes, int i, int j )
1119
- {
1120
- int k;
1121
-
1122
- for ( k = 0; k < j; ++k )
1123
- Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManSelectVar( pSes, i, k, j ), 1 ) );
1124
- for ( k = j + 1; k < pSes->nSpecVars + i; ++k )
1125
- Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManSelectVar( pSes, i, j, k ), 1 ) );
1126
- }
1127
-
1128
- static inline void Ses_ManCreateMainClause( Ses_Man_t * pSes, int t, int i, int j, int k, int a, int b, int c )
1129
- {
1130
- int pLits[5], ctr = 0;
1131
-
1132
- pLits[ctr++] = Abc_Var2Lit( Ses_ManSelectVar( pSes, i, j, k ), 1 );
1133
- pLits[ctr++] = Abc_Var2Lit( Ses_ManSimVar( pSes, i, t ), a );
1134
-
1135
- if ( j < pSes->nSpecVars )
1136
- {
1137
- if ( ( ( ( t + 1 ) & ( 1 << j ) ) ? 1 : 0 ) != b )
1138
- return;
1139
- }
1140
- else
1141
- pLits[ctr++] = Abc_Var2Lit( Ses_ManSimVar( pSes, j - pSes->nSpecVars, t ), b );
1142
-
1143
- if ( k < pSes->nSpecVars )
1144
- {
1145
- if ( ( ( ( t + 1 ) & ( 1 << k ) ) ? 1 : 0 ) != c )
1146
- return;
1147
- }
1148
- else
1149
- pLits[ctr++] = Abc_Var2Lit( Ses_ManSimVar( pSes, k - pSes->nSpecVars, t ), c );
1150
-
1151
- if ( b > 0 || c > 0 )
1152
- pLits[ctr++] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, b, c ), 1 - a );
1153
-
1154
- sat_solver_addclause( pSes->pSat, pLits, pLits + ctr );
1155
- }
1156
-
1157
- static int inline Ses_ManCreateTruthTableClause( Ses_Man_t * pSes, int t )
1158
- {
1159
- int i, j, k, h;
1160
- int pLits[3];
1161
-
1162
- for ( i = 0; i < pSes->nGates; ++i )
1163
- {
1164
- /* main clauses */
1165
- for ( j = 0; j < pSes->nSpecVars + i; ++j )
1166
- for ( k = j + 1; k < pSes->nSpecVars + i; ++k )
1167
- {
1168
- Ses_ManCreateMainClause( pSes, t, i, j, k, 0, 0, 1 );
1169
- Ses_ManCreateMainClause( pSes, t, i, j, k, 0, 1, 0 );
1170
- Ses_ManCreateMainClause( pSes, t, i, j, k, 0, 1, 1 );
1171
- Ses_ManCreateMainClause( pSes, t, i, j, k, 1, 0, 0 );
1172
- Ses_ManCreateMainClause( pSes, t, i, j, k, 1, 0, 1 );
1173
- Ses_ManCreateMainClause( pSes, t, i, j, k, 1, 1, 0 );
1174
- Ses_ManCreateMainClause( pSes, t, i, j, k, 1, 1, 1 );
1175
- }
1176
-
1177
- /* output clauses */
1178
- if ( pSes->nSpecFunc != 1 )
1179
- for ( h = 0; h < pSes->nSpecFunc; ++h )
1180
- {
1181
- pLits[0] = Abc_Var2Lit( Ses_ManOutputVar( pSes, h, i ), 1 );
1182
- pLits[1] = Abc_Var2Lit( Ses_ManSimVar( pSes, i, t ), 1 - Abc_TtGetBit( &pSes->pSpec[h << 2], t + 1 ) );
1183
- if ( !sat_solver_addclause( pSes->pSat, pLits, pLits + 2 ) )
1184
- return 0;
1185
- }
1186
- }
1187
-
1188
- if ( pSes->nSpecFunc == 1 )
1189
- Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManSimVar( pSes, pSes->nGates - 1, t ), 1 - Abc_TtGetBit( pSes->pSpec, t + 1 ) ) );
1190
-
1191
- return 1;
1192
- }
1193
-
1194
- static int Ses_ManCreateClauses( Ses_Man_t * pSes )
1195
- {
1196
- extern int Extra_TruthVarsSymm( unsigned * pTruth, int nVars, int iVar0, int iVar1 );
1197
-
1198
- int h, i, j, k, t, ii, jj, kk, iii, p, q;
1199
- int pLits[3];
1200
- Vec_Int_t * vLits = NULL;
1201
-
1202
- for ( t = 0; t < pSes->nRows; ++t )
1203
- {
1204
- if ( Abc_TtGetBit( pSes->pTtValues, t ) )
1205
- if ( !Ses_ManCreateTruthTableClause( pSes, t ) )
1206
- return 0;
1207
- }
1208
-
1209
- /* if there is only one output, we know it must point to the last gate */
1210
- if ( pSes->nSpecFunc == 1 )
1211
- {
1212
- for ( i = 0; i < pSes->nGates - 1; ++i )
1213
- Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManOutputVar( pSes, 0, i ), 1 ) );
1214
- Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManOutputVar( pSes, 0, pSes->nGates - 1 ), 0 ) );
1215
-
1216
- vLits = Vec_IntAlloc( 0u );
1217
- }
1218
- else
1219
- {
1220
- vLits = Vec_IntAlloc( 0u );
1221
-
1222
- /* some output is selected */
1223
- for ( h = 0; h < pSes->nSpecFunc; ++h )
1224
- {
1225
- Vec_IntGrowResize( vLits, pSes->nGates );
1226
- for ( i = 0; i < pSes->nGates; ++i )
1227
- Vec_IntSetEntry( vLits, i, Abc_Var2Lit( Ses_ManOutputVar( pSes, h, i ), 0 ) );
1228
- sat_solver_addclause( pSes->pSat, Vec_IntArray( vLits ), Vec_IntArray( vLits ) + pSes->nGates );
1229
- }
1230
- }
1231
-
1232
- /* each gate has two operands */
1233
- for ( i = 0; i < pSes->nGates; ++i )
1234
- {
1235
- Vec_IntGrowResize( vLits, ( ( pSes->nSpecVars + i ) * ( pSes->nSpecVars + i - 1 ) ) / 2 );
1236
- jj = 0;
1237
- for ( j = 0; j < pSes->nSpecVars + i; ++j )
1238
- for ( k = j + 1; k < pSes->nSpecVars + i; ++k )
1239
- Vec_IntSetEntry( vLits, jj++, Abc_Var2Lit( Ses_ManSelectVar( pSes, i, j, k ), 0 ) );
1240
- sat_solver_addclause( pSes->pSat, Vec_IntArray( vLits ), Vec_IntArray( vLits ) + jj );
1241
- }
1242
-
1243
- /* gate decomposition (makes it worse) */
1244
- /* if ( fDecVariable >= 0 && pSes->nGates >= 2 ) */
1245
- /* { */
1246
- /* pLits[0] = Abc_Var2Lit( Ses_ManSelectVar( pSes, pSes->nGates - 1, fDecVariable, pSes->nSpecVars + pSes->nGates - 2 ), 0 ); */
1247
- /* if ( !sat_solver_addclause( pSes->pSat, pLits, pLits + 1 ) ) */
1248
- /* { */
1249
- /* Vec_IntFree( vLits ); */
1250
- /* return 0; */
1251
- /* } */
1252
-
1253
- /* for ( k = 1; k < pSes->nSpecVars + pSes->nGates - 1; ++k ) */
1254
- /* for ( j = 0; j < k; ++j ) */
1255
- /* if ( j != fDecVariable || k != pSes->nSpecVars + pSes->nGates - 2 ) */
1256
- /* { */
1257
- /* pLits[0] = Abc_Var2Lit( Ses_ManSelectVar( pSes, pSes->nGates - 1, j, k ), 1 ); */
1258
- /* if ( !sat_solver_addclause( pSes->pSat, pLits, pLits + 1 ) ) */
1259
- /* { */
1260
- /* Vec_IntFree( vLits ); */
1261
- /* return 0; */
1262
- /* } */
1263
- /* } */
1264
- /* } */
1265
-
1266
- /* only AIG */
1267
- if ( pSes->fMakeAIG )
1268
- {
1269
- for ( i = 0; i < pSes->nGates; ++i )
1270
- {
1271
- /* not 2 ones */
1272
- pLits[0] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, 0, 1 ), 1 );
1273
- pLits[1] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, 1, 0 ), 1 );
1274
- pLits[2] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, 1, 1 ), 0 );
1275
- sat_solver_addclause( pSes->pSat, pLits, pLits + 3 );
1276
-
1277
- pLits[0] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, 0, 1 ), 1 );
1278
- pLits[1] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, 1, 0 ), 0 );
1279
- pLits[2] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, 1, 1 ), 1 );
1280
- sat_solver_addclause( pSes->pSat, pLits, pLits + 3 );
1281
-
1282
- pLits[0] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, 0, 1 ), 0 );
1283
- pLits[1] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, 1, 0 ), 1 );
1284
- pLits[2] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, 1, 1 ), 1 );
1285
- sat_solver_addclause( pSes->pSat, pLits, pLits + 3 );
1286
- }
1287
- }
1288
-
1289
- /* only binary clauses */
1290
- if ( 1 ) /* TODO: add some meaningful parameter */
1291
- {
1292
- for ( i = 0; i < pSes->nGates; ++i )
1293
- {
1294
- pLits[0] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, 0, 1 ), 0 );
1295
- pLits[1] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, 1, 0 ), 0 );
1296
- pLits[2] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, 1, 1 ), 0 );
1297
- sat_solver_addclause( pSes->pSat, pLits, pLits + 3 );
1298
-
1299
- pLits[0] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, 0, 1 ), 1 );
1300
- pLits[1] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, 1, 0 ), 0 );
1301
- pLits[2] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, 1, 1 ), 1 );
1302
- sat_solver_addclause( pSes->pSat, pLits, pLits + 3 );
1303
-
1304
- pLits[0] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, 0, 1 ), 0 );
1305
- pLits[1] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, 1, 0 ), 1 );
1306
- pLits[2] = Abc_Var2Lit( Ses_ManGateVar( pSes, i, 1, 1 ), 1 );
1307
- sat_solver_addclause( pSes->pSat, pLits, pLits + 3 );
1308
- }
1309
-
1310
- for ( i = 0; i < pSes->nGates; ++i )
1311
- for ( k = 1; k < pSes->nSpecVars + i; ++k )
1312
- for ( j = 0; j < k; ++j )
1313
- {
1314
- pLits[0] = Abc_Var2Lit( Ses_ManSelectVar( pSes, i, j, k ), 1 );
1315
-
1316
- for ( kk = 1; kk < pSes->nSpecVars + i; ++kk )
1317
- for ( jj = 0; jj < kk; ++jj )
1318
- {
1319
- if ( k == kk && j == jj ) continue;
1320
- pLits[1] = Abc_Var2Lit( Ses_ManSelectVar( pSes, i, jj, kk ), 1 );
1321
-
1322
- if ( pLits[0] < pLits[1] )
1323
- sat_solver_addclause( pSes->pSat, pLits, pLits + 2 );
1324
- }
1325
- }
1326
-
1327
- /* Vec_IntGrowResize( vLits, pSes->nGates * ( pSes->nSpecVars + pSes->nGates - 2 ) ); */
1328
-
1329
- /* for ( j = 0; j < pSes->nSpecVars; ++j ) */
1330
- /* { */
1331
- /* jj = 0; */
1332
- /* for ( i = 0; i < pSes->nGates; ++i ) */
1333
- /* { */
1334
- /* for ( k = 0; k < j; ++k ) */
1335
- /* Vec_IntSetEntry( vLits, jj++, Abc_Var2Lit( Ses_ManSelectVar( pSes, i, k, j ), 0 ) ); */
1336
- /* for ( k = j + 1; k < pSes->nSpecVars + i; ++k ) */
1337
- /* Vec_IntSetEntry( vLits, jj++, Abc_Var2Lit( Ses_ManSelectVar( pSes, i, j, k ), 0 ) ); */
1338
- /* } */
1339
- /* sat_solver_addclause( pSes->pSat, Vec_IntArray( vLits ), Vec_IntArray( vLits ) + jj ); */
1340
- /* } */
1341
- }
1342
-
1343
- /* EXTRA stair decomposition */
1344
- if (Vec_IntSize( pSes->vStairDecVars ) )
1345
- {
1346
- Vec_IntForEachEntry( pSes->vStairDecVars, j, i )
1347
- {
1348
- if ( pSes->nGates - 2 - i < j )
1349
- {
1350
- continue;
1351
- }
1352
- Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManSelectVar( pSes, pSes->nGates - 1 - i, j, pSes->nSpecVars + pSes->nGates - 2 - i ), 0 ) );
1353
-
1354
- //printf( "dec %d for var %d\n", pSes->pStairDecFunc[i], j );
1355
-
1356
- switch ( pSes->pStairDecFunc[i] )
1357
- {
1358
- case 1: /* AND(x,g) */
1359
- Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManGateVar( pSes, pSes->nGates - 1 - i, 0, 1 ), 1 ) );
1360
- //Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManGateVar( pSes, pSes->nGates - 1 - i, 1, 0 ), 1 ) );
1361
- //Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManGateVar( pSes, pSes->nGates - 1 - i, 1, 1 ), 0 ) );
1362
- break;
1363
- case 2: /* AND(!x,g) */
1364
- //Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManGateVar( pSes, pSes->nGates - 1 - i, 0, 1 ), 0 ) );
1365
- Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManGateVar( pSes, pSes->nGates - 1 - i, 1, 0 ), 1 ) );
1366
- Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManGateVar( pSes, pSes->nGates - 1 - i, 1, 1 ), 1 ) );
1367
- break;
1368
- case 3: /* OR(x,g) */
1369
- //Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManGateVar( pSes, pSes->nGates - 1 - i, 0, 1 ), 0 ) );
1370
- Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManGateVar( pSes, pSes->nGates - 1 - i, 1, 0 ), 0 ) );
1371
- Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManGateVar( pSes, pSes->nGates - 1 - i, 1, 1 ), 0 ) );
1372
- break;
1373
- case 4: /* OR(!x,g) */
1374
- ////Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManGateVar( pSes, pSes->nGates - 1 - i, 0, 1 ), 0 ) );
1375
- ////Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManGateVar( pSes, pSes->nGates - 1 - i, 1, 0 ), 1 ) );
1376
- ////Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManGateVar( pSes, pSes->nGates - 1 - i, 1, 1 ), 0 ) );
1377
- break;
1378
- case 5: /* XOR(x,g) */
1379
- Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManGateVar( pSes, pSes->nGates - 1 - i, 0, 1 ), 0 ) );
1380
- Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManGateVar( pSes, pSes->nGates - 1 - i, 1, 0 ), 0 ) );
1381
- Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManGateVar( pSes, pSes->nGates - 1 - i, 1, 1 ), 1 ) );
1382
- break;
1383
- default:
1384
- printf( "func: %d\n", pSes->pStairDecFunc[i] );
1385
- assert( 0 );
1386
- }
1387
- }
1388
- }
1389
-
1390
- /* EXTRA clauses: use gate i at least once */
1391
- Vec_IntGrowResize( vLits, pSes->nSpecFunc + pSes->nGates * ( pSes->nSpecVars + pSes->nGates - 2 ) );
1392
- for ( i = 0; i < pSes->nGates; ++i )
1393
- {
1394
- jj = 0;
1395
- for ( h = 0; h < pSes->nSpecFunc; ++h )
1396
- Vec_IntSetEntry( vLits, jj++, Abc_Var2Lit( Ses_ManOutputVar( pSes, h, i ), 0 ) );
1397
- for ( ii = i + 1; ii < pSes->nGates; ++ii )
1398
- {
1399
- for ( j = 0; j < pSes->nSpecVars + i; ++j )
1400
- Vec_IntSetEntry( vLits, jj++, Abc_Var2Lit( Ses_ManSelectVar( pSes, ii, j, pSes->nSpecVars + i ), 0 ) );
1401
- for ( j = pSes->nSpecVars + i + 1; j < pSes->nSpecVars + ii; ++j )
1402
- Vec_IntSetEntry( vLits, jj++, Abc_Var2Lit( Ses_ManSelectVar( pSes, ii, pSes->nSpecVars + i, j ), 0 ) );
1403
- }
1404
- sat_solver_addclause( pSes->pSat, Vec_IntArray( vLits ), Vec_IntArray( vLits ) + jj );
1405
- }
1406
- Vec_IntFree( vLits );
1407
-
1408
- /* EXTRA clauses: no reapplying operand */
1409
- if ( pSes->nGates > 1 )
1410
- for ( i = 0; i < pSes->nGates - 1; ++i )
1411
- for ( ii = i + 1; ii < pSes->nGates; ++ii )
1412
- for ( k = 1; k < pSes->nSpecVars + i; ++k )
1413
- for ( j = 0; j < k; ++j )
1414
- {
1415
- pLits[0] = Abc_Var2Lit( Ses_ManSelectVar( pSes, i, j, k ), 1 );
1416
- pLits[1] = Abc_Var2Lit( Ses_ManSelectVar( pSes, ii, j, pSes->nSpecVars + i ), 1 );
1417
- sat_solver_addclause( pSes->pSat, pLits, pLits + 2 );
1418
-
1419
- pLits[1] = Abc_Var2Lit( Ses_ManSelectVar( pSes, ii, k, pSes->nSpecVars + i ), 1 );
1420
- sat_solver_addclause( pSes->pSat, pLits, pLits + 2 );
1421
- }
1422
- if ( pSes->nGates > 2 )
1423
- for ( i = 0; i < pSes->nGates - 2; ++i )
1424
- for ( ii = i + 1; ii < pSes->nGates - 1; ++ii )
1425
- for ( iii = ii + 1; iii < pSes->nGates; ++iii )
1426
- for ( k = 1; k < pSes->nSpecVars + i; ++k )
1427
- for ( j = 0; j < k; ++j )
1428
- {
1429
- pLits[0] = Abc_Var2Lit( Ses_ManSelectVar( pSes, i, j, k ), 1 );
1430
- pLits[1] = Abc_Var2Lit( Ses_ManSelectVar( pSes, ii, j, k ), 1 );
1431
- pLits[2] = Abc_Var2Lit( Ses_ManSelectVar( pSes, iii, i, ii ), 1 );
1432
- sat_solver_addclause( pSes->pSat, pLits, pLits + 3 );
1433
- }
1434
-
1435
- /* EXTRA clauses: co-lexicographic order */
1436
- for ( i = 0; i < pSes->nGates - 1; ++i )
1437
- {
1438
- for ( k = 2; k < pSes->nSpecVars + i; ++k )
1439
- {
1440
- for ( j = 1; j < k; ++j )
1441
- for ( jj = 0; jj < j; ++jj )
1442
- {
1443
- pLits[0] = Abc_Var2Lit( Ses_ManSelectVar( pSes, i, j, k ), 1 );
1444
- pLits[1] = Abc_Var2Lit( Ses_ManSelectVar( pSes, i + 1, jj, k ), 1 );
1445
- sat_solver_addclause( pSes->pSat, pLits, pLits + 2 );
1446
- }
1447
-
1448
- for ( j = 0; j < k; ++j )
1449
- for ( kk = 1; kk < k; ++kk )
1450
- for ( jj = 0; jj < kk; ++jj )
1451
- {
1452
- pLits[0] = Abc_Var2Lit( Ses_ManSelectVar( pSes, i, j, k ), 1 );
1453
- pLits[1] = Abc_Var2Lit( Ses_ManSelectVar( pSes, i + 1, jj, kk ), 1 );
1454
- sat_solver_addclause( pSes->pSat, pLits, pLits + 2 );
1455
- }
1456
- }
1457
- }
1458
-
1459
- /* EXTRA clauses: symmetric variables */
1460
- if ( /*pSes->nMaxDepth == -1 &&*/ pSes->nSpecFunc == 1 ) /* only check if there is one output function */
1461
- for ( q = 1; q < pSes->nSpecVars; ++q )
1462
- for ( p = 0; p < q; ++p )
1463
- if ( Extra_TruthVarsSymm( (unsigned*)( pSes->pSpec ), pSes->nSpecVars, p, q ) &&
1464
- ( !pSes->pArrTimeProfile || ( pSes->pArrTimeProfile[p] <= pSes->pArrTimeProfile[q] ) ) )
1465
- {
1466
- if ( pSes->fSatVerbose )
1467
- printf( "variables %d and %d are symmetric\n", p, q );
1468
- for ( i = 0; i < pSes->nGates; ++i )
1469
- for ( j = 0; j < q; ++j )
1470
- {
1471
- if ( j == p ) continue;
1472
-
1473
- vLits = Vec_IntAlloc( 0 );
1474
- Vec_IntPush( vLits, Abc_Var2Lit( Ses_ManSelectVar( pSes, i, j, q ), 1 ) );
1475
- for ( ii = 0; ii < i; ++ii )
1476
- for ( kk = 1; kk < pSes->nSpecVars + ii; ++kk )
1477
- for ( jj = 0; jj < kk; ++jj )
1478
- if ( jj == p || kk == p )
1479
- Vec_IntPush( vLits, Abc_Var2Lit( Ses_ManSelectVar( pSes, ii, jj, kk ), 0 ) );
1480
- sat_solver_addclause( pSes->pSat, Vec_IntArray( vLits ), Vec_IntLimit( vLits ) );
1481
- Vec_IntFree( vLits );
1482
- }
1483
- }
1484
-
1485
- return 1;
1486
- }
1487
-
1488
- static int Ses_ManCreateDepthClauses( Ses_Man_t * pSes )
1489
- {
1490
- int i, j, k, jj, kk, d, h;
1491
- int pLits[3];
1492
-
1493
- for ( i = 0; i < pSes->nGates; ++i )
1494
- {
1495
- /* propagate depths from children */
1496
- for ( k = 1; k < i; ++k )
1497
- for ( j = 0; j < k; ++j )
1498
- {
1499
- pLits[0] = Abc_Var2Lit( Ses_ManSelectVar( pSes, i, pSes->nSpecVars + j, pSes->nSpecVars + k ), 1 );
1500
- for ( jj = 0; jj <= pSes->nArrTimeMax + j; ++jj )
1501
- {
1502
- pLits[1] = Abc_Var2Lit( Ses_ManDepthVar( pSes, j, jj ), 1 );
1503
- pLits[2] = Abc_Var2Lit( Ses_ManDepthVar( pSes, i, jj + 1 ), 0 );
1504
- sat_solver_addclause( pSes->pSat, pLits, pLits + 3 );
1505
- }
1506
- }
1507
-
1508
- for ( k = 0; k < i; ++k )
1509
- for ( j = 0; j < pSes->nSpecVars + k; ++j )
1510
- {
1511
- pLits[0] = Abc_Var2Lit( Ses_ManSelectVar( pSes, i, j, pSes->nSpecVars + k ), 1 );
1512
- for ( kk = 0; kk <= pSes->nArrTimeMax + k; ++kk )
1513
- {
1514
- pLits[1] = Abc_Var2Lit( Ses_ManDepthVar( pSes, k, kk ), 1 );
1515
- pLits[2] = Abc_Var2Lit( Ses_ManDepthVar( pSes, i, kk + 1 ), 0 );
1516
- sat_solver_addclause( pSes->pSat, pLits, pLits + 3 );
1517
- }
1518
- }
1519
-
1520
- /* propagate depths from arrival times at PIs */
1521
- if ( pSes->pArrTimeProfile )
1522
- {
1523
- for ( k = 1; k < pSes->nSpecVars + i; ++k )
1524
- for ( j = 0; j < ( ( k < pSes->nSpecVars ) ? k : pSes->nSpecVars ); ++j )
1525
- {
1526
- d = pSes->pArrTimeProfile[j];
1527
- if ( k < pSes->nSpecVars && pSes->pArrTimeProfile[k] > d )
1528
- d = pSes->pArrTimeProfile[k];
1529
-
1530
- pLits[0] = Abc_Var2Lit( Ses_ManSelectVar( pSes, i, j, k ), 1 );
1531
- pLits[1] = Abc_Var2Lit( Ses_ManDepthVar( pSes, i, d ), 0 );
1532
- sat_solver_addclause( pSes->pSat, pLits, pLits + 2 );
1533
- }
1534
- }
1535
- else
1536
- /* arrival times are 0 */
1537
- Vec_IntPush( pSes->vAssump, Abc_Var2Lit( Ses_ManDepthVar( pSes, i, 0 ), 0 ) );
1538
-
1539
- /* reverse order encoding of depth variables */
1540
- for ( j = 1; j <= pSes->nArrTimeMax + i; ++j )
1541
- {
1542
- pLits[0] = Abc_Var2Lit( Ses_ManDepthVar( pSes, i, j ), 1 );
1543
- pLits[1] = Abc_Var2Lit( Ses_ManDepthVar( pSes, i, j - 1 ), 0 );
1544
- sat_solver_addclause( pSes->pSat, pLits, pLits + 2 );
1545
- }
1546
-
1547
- /* constrain maximum depth */
1548
- if ( pSes->nMaxDepth < pSes->nArrTimeMax + i )
1549
- for ( h = 0; h < pSes->nSpecFunc; ++h )
1550
- {
1551
- pLits[0] = Abc_Var2Lit( Ses_ManOutputVar( pSes, h, i ), 1 );
1552
- pLits[1] = Abc_Var2Lit( Ses_ManDepthVar( pSes, i, pSes->nMaxDepth ), 1 );
1553
- if ( !sat_solver_addclause( pSes->pSat, pLits, pLits + 2 ) )
1554
- return 0;
1555
- }
1556
- }
1557
-
1558
- return 1;
1559
- }
1560
-
1561
- /**Function*************************************************************
1562
-
1563
- Synopsis [Solve.]
1564
-
1565
- ***********************************************************************/
1566
- static inline double Sat_Wrd2Dbl( word w ) { return (double)(unsigned)(w&0x3FFFFFFF) + (double)(1<<30)*(unsigned)(w>>30); }
1567
-
1568
- static inline int Ses_ManSolve( Ses_Man_t * pSes )
1569
- {
1570
- int status;
1571
- abctime timeStart, timeDelta;
1572
-
1573
- if ( pSes->fSatVerbose )
1574
- {
1575
- printf( "SAT CL: %7d VA: %5d", sat_solver_nclauses( pSes->pSat ), sat_solver_nvars( pSes->pSat ) );
1576
- fflush( stdout );
1577
- }
1578
-
1579
- timeStart = Abc_Clock();
1580
- status = sat_solver_solve( pSes->pSat, Vec_IntArray( pSes->vAssump ), Vec_IntLimit( pSes->vAssump ), pSes->nBTLimit, 0, 0, 0 );
1581
- timeDelta = Abc_Clock() - timeStart;
1582
-
1583
- if ( pSes->fSatVerbose )
1584
- printf( " RE: %2d ST: %4.f CO: %7.0f DE: %6.0f PR: %6.0f\n",
1585
- status,
1586
- Sat_Wrd2Dbl( pSes->pSat->stats.starts ), Sat_Wrd2Dbl( pSes->pSat->stats.conflicts ),
1587
- Sat_Wrd2Dbl( pSes->pSat->stats.decisions ), Sat_Wrd2Dbl( pSes->pSat->stats.propagations ) );
1588
- //Sat_SolverPrintStats( stdout, pSes->pSat );
1589
-
1590
- pSes->timeSat += timeDelta;
1591
-
1592
- if ( status == l_True )
1593
- {
1594
- pSes->nSatCalls++;
1595
- pSes->timeSatSat += timeDelta;
1596
- return 1;
1597
- }
1598
- else if ( status == l_False )
1599
- {
1600
- pSes->nUnsatCalls++;
1601
- pSes->timeSatUnsat += timeDelta;
1602
- return 0;
1603
- }
1604
- else
1605
- {
1606
- pSes->nUndefCalls++;
1607
- pSes->timeSatUndef += timeDelta;
1608
- if ( pSes->fSatVerbose )
1609
- {
1610
- //Sat_SolverWriteDimacs( pSes->pSat, "/tmp/test.cnf", Vec_IntArray( pSes->vAssump ), Vec_IntLimit( pSes->vAssump ), 1 );
1611
- //exit( 42 );
1612
-
1613
- printf( "resource limit reached\n" );
1614
- }
1615
- return 2;
1616
- }
1617
- }
1618
-
1619
- /**Function*************************************************************
1620
-
1621
- Synopsis [Extract solution.]
1622
-
1623
- ***********************************************************************/
1624
- // char is an array of short integers that stores the synthesized network
1625
- // using the following format
1626
- // | nvars | nfunc | ngates | gate[1] | ... | gate[ngates] | func[1] | .. | func[nfunc] |
1627
- // nvars: integer with number of variables
1628
- // nfunc: integer with number of functions
1629
- // ngates: integer with number of gates
1630
- // gate[i]: | op | nfanin | fanin[1] | ... | fanin[nfanin] |
1631
- // op: integer of gate's truth table (divided by 2, because gate is normal)
1632
- // nfanin: integer with number of fanins
1633
- // fanin[i]: integer to primary input or other gate
1634
- // func[i]: | fanin | delay | pin[1] | ... | pin[nvars] |
1635
- // fanin: integer as literal to some gate (not primary input), can be complemented
1636
- // delay: maximum delay to output (taking arrival times into account, not normalized) or 0 if not specified
1637
- // pin[i]: pin to pin delay to input i or 0 if not specified or if there is no connection to input i
1638
- // NOTE: since outputs can only point to gates, delay and pin-to-pin times cannot be 0
1639
- static char * Ses_ManExtractSolution( Ses_Man_t * pSes )
1640
- {
1641
- int nSol, h, i, j, k, l, aj, ak, d, nOp;
1642
- char * pSol, * p;
1643
- int * pPerm = NULL; /* will be a 2d array [i][l] where is is gate id and l is PI id */
1644
-
1645
- /* compute length of solution, for now all gates have 2 inputs */
1646
- nSol = 3 + pSes->nGates * 4 + pSes->nSpecFunc * ( 2 + pSes->nSpecVars );
1647
-
1648
- p = pSol = ABC_CALLOC( char, nSol );
1649
-
1650
- /* header */
1651
- *p++ = pSes->nSpecVars;
1652
- *p++ = pSes->nSpecFunc;
1653
- *p++ = pSes->nGates;
1654
-
1655
- /* gates */
1656
- for ( i = 0; i < pSes->nGates; ++i )
1657
- {
1658
- nOp = sat_solver_var_value( pSes->pSat, Ses_ManGateVar( pSes, i, 0, 1 ) );
1659
- nOp |= sat_solver_var_value( pSes->pSat, Ses_ManGateVar( pSes, i, 1, 0 ) ) << 1;
1660
- nOp |= sat_solver_var_value( pSes->pSat, Ses_ManGateVar( pSes, i, 1, 1 ) ) << 2;
1661
-
1662
- *p++ = nOp;
1663
- *p++ = 2;
1664
-
1665
- if ( pSes->fExtractVerbose )
1666
- printf( "add gate %d with operation %d", pSes->nSpecVars + i, nOp );
1667
-
1668
- for ( k = 0; k < pSes->nSpecVars + i; ++k )
1669
- for ( j = 0; j < k; ++j )
1670
- if ( sat_solver_var_value( pSes->pSat, Ses_ManSelectVar( pSes, i, j, k ) ) )
1671
- {
1672
- if ( pSes->fExtractVerbose )
1673
- printf( " and operands %d and %d", j, k );
1674
- *p++ = j;
1675
- *p++ = k;
1676
- k = pSes->nSpecVars + i;
1677
- break;
1678
- }
1679
-
1680
- if ( pSes->fExtractVerbose )
1681
- {
1682
- if ( pSes->nMaxDepth > 0 )
1683
- {
1684
- printf( " and depth vector " );
1685
- for ( j = 0; j <= pSes->nArrTimeMax + i; ++j )
1686
- printf( "%d", sat_solver_var_value( pSes->pSat, Ses_ManDepthVar( pSes, i, j ) ) );
1687
- }
1688
- printf( "\n" );
1689
- }
1690
- }
1691
-
1692
- /* pin-to-pin delay */
1693
- if ( pSes->nMaxDepth != -1 )
1694
- {
1695
- pPerm = ABC_CALLOC( int, pSes->nGates * pSes->nSpecVars );
1696
- for ( i = 0; i < pSes->nGates; ++i )
1697
- {
1698
- /* since all gates are binary for now */
1699
- j = pSol[3 + i * 4 + 2];
1700
- k = pSol[3 + i * 4 + 3];
1701
-
1702
- for ( l = 0; l < pSes->nSpecVars; ++l )
1703
- {
1704
- /* pin-to-pin delay to input l of child nodes */
1705
- aj = j < pSes->nSpecVars ? 0 : pPerm[(j - pSes->nSpecVars) * pSes->nSpecVars + l];
1706
- ak = k < pSes->nSpecVars ? 0 : pPerm[(k - pSes->nSpecVars) * pSes->nSpecVars + l];
1707
-
1708
- if ( aj == 0 && ak == 0 )
1709
- pPerm[i * pSes->nSpecVars + l] = ( l == j || l == k ) ? 1 : 0;
1710
- else
1711
- pPerm[i * pSes->nSpecVars + l] = Abc_MaxInt( aj, ak ) + 1;
1712
- }
1713
- }
1714
- }
1715
-
1716
- /* outputs */
1717
- for ( h = 0; h < pSes->nSpecFunc; ++h )
1718
- for ( i = 0; i < pSes->nGates; ++i )
1719
- if ( sat_solver_var_value( pSes->pSat, Ses_ManOutputVar( pSes, h, i ) ) )
1720
- {
1721
- *p++ = Abc_Var2Lit( i, ( pSes->bSpecInv >> h ) & 1 );
1722
- d = 0;
1723
- if ( pSes->nMaxDepth != -1 )
1724
- for ( l = 0; l < pSes->nSpecVars; ++l )
1725
- {
1726
- if ( pSes->pArrTimeProfile )
1727
- d = Abc_MaxInt( d, pSes->pArrTimeProfile[l] + pPerm[i * pSes->nSpecVars + l] );
1728
- else
1729
- d = Abc_MaxInt( d, pPerm[i * pSes->nSpecVars + l] );
1730
- }
1731
- *p++ = d;
1732
- if ( pSes->pArrTimeProfile && pSes->fExtractVerbose )
1733
- printf( "output %d points to gate %d and has normalized delay %d (nArrTimeDelta = %d)\n", h, pSes->nSpecVars + i, d, pSes->nArrTimeDelta );
1734
- for ( l = 0; l < pSes->nSpecVars; ++l )
1735
- {
1736
- d = ( pSes->nMaxDepth != -1 ) ? pPerm[i * pSes->nSpecVars + l] : 0;
1737
- if ( pSes->pArrTimeProfile && pSes->fExtractVerbose )
1738
- printf( " pin-to-pin arrival time from input %d is %d (pArrTimeProfile = %d)\n", l, d, pSes->pArrTimeProfile[l] );
1739
- *p++ = d;
1740
- }
1741
- }
1742
-
1743
- /* pin-to-pin delays */
1744
- if ( pSes->nMaxDepth != -1 )
1745
- ABC_FREE( pPerm );
1746
-
1747
- /* have we used all the fields? */
1748
- assert( ( p - pSol ) == nSol );
1749
-
1750
- /* printf( "found network: " ); */
1751
- /* Abc_TtPrintHexRev( stdout, Ses_ManDeriveTruth( pSes, pSol, 1 ), pSes->nSpecVars ); */
1752
- /* printf( "\n" ); */
1753
-
1754
- return pSol;
1755
- }
1756
-
1757
- static Abc_Ntk_t * Ses_ManExtractNtk( char const * pSol )
1758
- {
1759
- int h, i;
1760
- char const * p;
1761
- Abc_Ntk_t * pNtk;
1762
- Abc_Obj_t * pObj;
1763
- Vec_Ptr_t * pGates, * vNames;
1764
- char pGateTruth[5];
1765
- char * pSopCover;
1766
-
1767
- pNtk = Abc_NtkAlloc( ABC_NTK_LOGIC, ABC_FUNC_SOP, 1 );
1768
- pNtk->pName = Extra_UtilStrsav( "exact" );
1769
- pGates = Vec_PtrAlloc( pSol[ABC_EXACT_SOL_NVARS] + pSol[ABC_EXACT_SOL_NGATES] );
1770
- pGateTruth[3] = '0';
1771
- pGateTruth[4] = '\0';
1772
- vNames = Abc_NodeGetFakeNames( pSol[ABC_EXACT_SOL_NVARS] + pSol[ABC_EXACT_SOL_NFUNC] );
1773
-
1774
- /* primary inputs */
1775
- Vec_PtrPush( pNtk->vObjs, NULL );
1776
- for ( i = 0; i < pSol[ABC_EXACT_SOL_NVARS]; ++i )
1777
- {
1778
- pObj = Abc_NtkCreatePi( pNtk );
1779
- Abc_ObjAssignName( pObj, (char*)Vec_PtrEntry( vNames, i ), NULL );
1780
- Vec_PtrPush( pGates, pObj );
1781
- }
1782
-
1783
- /* gates */
1784
- p = pSol + 3;
1785
- for ( i = 0; i < pSol[ABC_EXACT_SOL_NGATES]; ++i )
1786
- {
1787
- pGateTruth[2] = '0' + ( *p & 1 );
1788
- pGateTruth[1] = '0' + ( ( *p >> 1 ) & 1 );
1789
- pGateTruth[0] = '0' + ( ( *p >> 2 ) & 1 );
1790
- ++p;
1791
-
1792
- assert( *p == 2 ); /* binary gate */
1793
- ++p;
1794
-
1795
- pSopCover = Abc_SopFromTruthBin( pGateTruth );
1796
- pObj = Abc_NtkCreateNode( pNtk );
1797
- pObj->pData = Abc_SopRegister( (Mem_Flex_t*)pNtk->pManFunc, pSopCover );
1798
- Vec_PtrPush( pGates, pObj );
1799
- ABC_FREE( pSopCover );
1800
-
1801
- Abc_ObjAddFanin( pObj, (Abc_Obj_t *)Vec_PtrEntry( pGates, *p++ ) );
1802
- Abc_ObjAddFanin( pObj, (Abc_Obj_t *)Vec_PtrEntry( pGates, *p++ ) );
1803
- }
1804
-
1805
- /* outputs */
1806
- for ( h = 0; h < pSol[ABC_EXACT_SOL_NFUNC]; ++h )
1807
- {
1808
- pObj = Abc_NtkCreatePo( pNtk );
1809
- Abc_ObjAssignName( pObj, (char*)Vec_PtrEntry( vNames, pSol[ABC_EXACT_SOL_NVARS] + h ), NULL );
1810
- if ( Abc_LitIsCompl( *p ) )
1811
- Abc_ObjAddFanin( pObj, Abc_NtkCreateNodeInv( pNtk, (Abc_Obj_t *)Vec_PtrEntry( pGates, pSol[ABC_EXACT_SOL_NVARS] + Abc_Lit2Var( *p ) ) ) );
1812
- else
1813
- Abc_ObjAddFanin( pObj, (Abc_Obj_t *)Vec_PtrEntry( pGates, pSol[ABC_EXACT_SOL_NVARS] + Abc_Lit2Var( *p ) ) );
1814
- p += ( 2 + pSol[ABC_EXACT_SOL_NVARS] );
1815
- }
1816
- Abc_NodeFreeNames( vNames );
1817
-
1818
- Vec_PtrFree( pGates );
1819
-
1820
- if ( !Abc_NtkCheck( pNtk ) )
1821
- printf( "Ses_ManExtractSolution(): Network check has failed.\n" );
1822
-
1823
- return pNtk;
1824
- }
1825
-
1826
- static Gia_Man_t * Ses_ManExtractGia( char const * pSol )
1827
- {
1828
- int h, i;
1829
- char const * p;
1830
- Gia_Man_t * pGia;
1831
- Vec_Int_t * pGates;
1832
- Vec_Ptr_t * vNames;
1833
- int nObj, nChild1, nChild2, fChild1Comp, fChild2Comp;
1834
-
1835
- pGia = Gia_ManStart( pSol[ABC_EXACT_SOL_NVARS] + pSol[ABC_EXACT_SOL_NGATES] + pSol[ABC_EXACT_SOL_NFUNC] + 1 );
1836
- pGia->nConstrs = 0;
1837
- pGia->pName = Extra_UtilStrsav( "exact" );
1838
-
1839
- pGates = Vec_IntAlloc( pSol[ABC_EXACT_SOL_NVARS] + pSol[ABC_EXACT_SOL_NGATES] );
1840
- vNames = Abc_NodeGetFakeNames( pSol[ABC_EXACT_SOL_NVARS] + pSol[ABC_EXACT_SOL_NFUNC] );
1841
-
1842
- /* primary inputs */
1843
- pGia->vNamesIn = Vec_PtrStart( pSol[ABC_EXACT_SOL_NVARS] );
1844
- for ( i = 0; i < pSol[ABC_EXACT_SOL_NVARS]; ++i )
1845
- {
1846
- nObj = Gia_ManAppendCi( pGia );
1847
- Vec_IntPush( pGates, nObj );
1848
- Vec_PtrSetEntry( pGia->vNamesIn, i, Extra_UtilStrsav( (const char*)Vec_PtrEntry( vNames, i ) ) );
1849
- }
1850
-
1851
- /* gates */
1852
- p = pSol + 3;
1853
- for ( i = 0; i < pSol[ABC_EXACT_SOL_NGATES]; ++i )
1854
- {
1855
- assert( p[1] == 2 );
1856
- nChild1 = Vec_IntEntry( pGates, p[2] );
1857
- nChild2 = Vec_IntEntry( pGates, p[3] );
1858
- fChild1Comp = fChild2Comp = 0;
1859
-
1860
- if ( *p & 1 )
1861
- {
1862
- nChild1 = Abc_LitNot( nChild1 );
1863
- fChild1Comp = 1;
1864
- }
1865
- if ( ( *p >> 1 ) & 1 )
1866
- {
1867
- nChild2 = Abc_LitNot( nChild2 );
1868
- fChild2Comp = 1;
1869
- }
1870
- nObj = Gia_ManAppendAnd( pGia, nChild1, nChild2 );
1871
- if ( fChild1Comp && fChild2Comp )
1872
- {
1873
- assert( ( *p >> 2 ) & 1 );
1874
- nObj = Abc_LitNot( nObj );
1875
- }
1876
-
1877
- Vec_IntPush( pGates, nObj );
1878
-
1879
- p += 4;
1880
- }
1881
-
1882
- /* outputs */
1883
- pGia->vNamesOut = Vec_PtrStart( pSol[ABC_EXACT_SOL_NFUNC] );
1884
- for ( h = 0; h < pSol[ABC_EXACT_SOL_NFUNC]; ++h )
1885
- {
1886
- nObj = Vec_IntEntry( pGates, pSol[ABC_EXACT_SOL_NVARS] + Abc_Lit2Var( *p ) );
1887
- if ( Abc_LitIsCompl( *p ) )
1888
- nObj = Abc_LitNot( nObj );
1889
- Gia_ManAppendCo( pGia, nObj );
1890
- Vec_PtrSetEntry( pGia->vNamesOut, h, Extra_UtilStrsav( (const char*)Vec_PtrEntry( vNames, pSol[ABC_EXACT_SOL_NVARS] + h ) ) );
1891
- p += ( 2 + pSol[ABC_EXACT_SOL_NVARS] );
1892
- }
1893
- Abc_NodeFreeNames( vNames );
1894
-
1895
- Vec_IntFree( pGates );
1896
-
1897
- return pGia;
1898
- }
1899
-
1900
- /**Function*************************************************************
1901
-
1902
- Synopsis [Debug.]
1903
-
1904
- ***********************************************************************/
1905
- static void Ses_ManPrintRuntime( Ses_Man_t * pSes )
1906
- {
1907
- printf( "Runtime breakdown:\n" );
1908
- ABC_PRTP( "Sat ", pSes->timeSat, pSes->timeTotal );
1909
- ABC_PRTP( " Sat ", pSes->timeSatSat, pSes->timeTotal );
1910
- ABC_PRTP( " Unsat ", pSes->timeSatUnsat, pSes->timeTotal );
1911
- ABC_PRTP( " Undef ", pSes->timeSatUndef, pSes->timeTotal );
1912
- ABC_PRTP( "Instance", pSes->timeInstance, pSes->timeTotal );
1913
- ABC_PRTP( "ALL ", pSes->timeTotal, pSes->timeTotal );
1914
- }
1915
-
1916
- static inline void Ses_ManPrintFuncs( Ses_Man_t * pSes )
1917
- {
1918
- int h;
1919
-
1920
- printf( "find optimum circuit for %d %d-variable functions:\n", pSes->nSpecFunc, pSes->nSpecVars );
1921
- for ( h = 0; h < pSes->nSpecFunc; ++h )
1922
- {
1923
- printf( " func %d: ", h + 1 );
1924
- Abc_TtPrintHexRev( stdout, &pSes->pSpec[h << 2], pSes->nSpecVars );
1925
- printf( "\n" );
1926
- }
1927
-
1928
- if ( pSes->nMaxDepth != -1 )
1929
- {
1930
- printf( " max depth = %d\n", pSes->nMaxDepth );
1931
- if ( pSes->pArrTimeProfile )
1932
- {
1933
- printf( " arrival times =" );
1934
- for ( h = 0; h < pSes->nSpecVars; ++h )
1935
- printf( " %d", pSes->pArrTimeProfile[h] );
1936
- printf( "\n" );
1937
- }
1938
- }
1939
- }
1940
-
1941
- static inline void Ses_ManPrintVars( Ses_Man_t * pSes )
1942
- {
1943
- int h, i, j, k, p, q, t;
1944
-
1945
- for ( i = 0; i < pSes->nGates; ++i )
1946
- for ( t = 0; t < pSes->nRows; ++t )
1947
- printf( "x(%d, %d) : %d\n", i, t, Ses_ManSimVar( pSes, i, t ) );
1948
-
1949
- for ( h = 0; h < pSes->nSpecFunc; ++h )
1950
- for ( i = 0; i < pSes->nGates; ++i )
1951
- printf( "h(%d, %d) : %d\n", h, i, Ses_ManOutputVar( pSes, h, i ) );
1952
-
1953
- for ( i = 0; i < pSes->nGates; ++i )
1954
- for ( p = 0; p <= 1; ++p )
1955
- for ( q = 0; q <= 1; ++ q)
1956
- {
1957
- if ( p == 0 && q == 0 ) { continue; }
1958
- printf( "f(%d, %d, %d) : %d\n", i, p, q, Ses_ManGateVar( pSes, i, p, q ) );
1959
- }
1960
-
1961
- for ( i = 0; i < pSes->nGates; ++i )
1962
- for ( j = 0; j < pSes->nSpecVars + i; ++j )
1963
- for ( k = j + 1; k < pSes->nSpecVars + i; ++k )
1964
- printf( "s(%d, %d, %d) : %d\n", i, j, k, Ses_ManSelectVar( pSes, i, j, k ) );
1965
-
1966
- if ( pSes->nMaxDepth > 0 )
1967
- for ( i = 0; i < pSes->nGates; ++i )
1968
- for ( j = 0; j <= i; ++j )
1969
- printf( "d(%d, %d) : %d\n", i, j, Ses_ManDepthVar( pSes, i, j ) );
1970
-
1971
- }
1972
-
1973
- /**Function*************************************************************
1974
-
1975
- Synopsis [Synthesis algorithm.]
1976
-
1977
- ***********************************************************************/
1978
- static void Ses_ManComputeMaxGates( Ses_Man_t * pSes )
1979
- {
1980
- int s = 1, lvl = pSes->nMaxDepth, avail = pSes->nSpecVars, l;
1981
-
1982
- pSes->nMaxGates = 0;
1983
-
1984
- /* s is the number of gates we have in the current level */
1985
- while ( s && /* while there are nodes to branch from */
1986
- lvl && /* while we are at some level */
1987
- avail * 2 > s /* while there are still enough available nodes (heuristic) */ )
1988
- {
1989
- /* erase from s if we have arriving nodes */
1990
- for ( l = 0; l < pSes->nSpecVars; ++l )
1991
- if ( pSes->pArrTimeProfile[l] == lvl )
1992
- {
1993
- --s;
1994
- --avail;
1995
- }
1996
-
1997
- --lvl;
1998
- pSes->nMaxGates += s;
1999
- s *= 2;
2000
- }
2001
- }
2002
-
2003
- // returns 0, if current max depth and arrival times are not consistent
2004
- static int Ses_CheckDepthConsistency( Ses_Man_t * pSes )
2005
- {
2006
- int l, i, fAdded, nLevel;
2007
- int fMaxGatesLevel2 = 1;
2008
-
2009
- Vec_IntClear( pSes->vStairDecVars );
2010
- pSes->fDecStructure = 0;
2011
-
2012
- for ( l = 0; l < pSes->nSpecVars; ++l )
2013
- {
2014
- if ( pSes->pArrTimeProfile[l] >= pSes->nMaxDepth )
2015
- {
2016
- if ( pSes->fReasonVerbose )
2017
- printf( "give up due to impossible arrival time (depth = %d, input = %d, arrival time = %d)", pSes->nMaxDepth, l, pSes->pArrTimeProfile[l] );
2018
- return 0;
2019
- }
2020
- else if ( pSes->nSpecFunc == 1 && pSes->pArrTimeProfile[l] + 1 == pSes->nMaxDepth )
2021
- {
2022
- if ( ( pSes->fDecStructure == 1 && pSes->nSpecVars > 2 ) || pSes->fDecStructure == 2 )
2023
- {
2024
- if ( pSes->fReasonVerbose )
2025
- printf( "give up due to impossible decomposition (depth = %d, input = %d, arrival time = %d)", pSes->nMaxDepth, l, pSes->pArrTimeProfile[l] );
2026
- return 0;
2027
- }
2028
-
2029
- pSes->fDecStructure++;
2030
-
2031
- /* A subset B <=> A and B = A */
2032
- if ( !( ( pSes->pDecVars >> l ) & 1 ) )
2033
- {
2034
- if ( pSes->fReasonVerbose )
2035
- printf( "give up due to impossible decomposition (depth = %d, input = %d, arrival time = %d)", pSes->nMaxDepth, l, pSes->pArrTimeProfile[l] );
2036
- return 0;
2037
- }
2038
- }
2039
- }
2040
-
2041
- /* more complicated decomposition */
2042
- if ( pSes->fDecStructure )
2043
- {
2044
- nLevel = 1;
2045
- while ( 1 )
2046
- {
2047
- fAdded = 0;
2048
-
2049
- for ( l = 0; l < pSes->nSpecVars; ++l )
2050
- if ( pSes->pArrTimeProfile[l] + nLevel == pSes->nMaxDepth )
2051
- {
2052
- if ( fAdded )
2053
- {
2054
- assert( nLevel == Vec_IntSize( pSes->vStairDecVars ) );
2055
- if ( fAdded > 1 || ( nLevel + 1 < pSes->nSpecVars ) )
2056
- {
2057
- if ( pSes->fReasonVerbose )
2058
- printf( "give up due to impossible decomposition at level %d", nLevel );
2059
- return 0;
2060
- }
2061
- }
2062
- else
2063
- {
2064
- Vec_IntPush( pSes->vStairDecVars, l );
2065
- }
2066
- fAdded++;
2067
- }
2068
-
2069
- if ( !fAdded ) break;
2070
- ++nLevel;
2071
- }
2072
-
2073
- if ( Vec_IntSize( pSes->vStairDecVars ) && !Abc_TtIsStairDecomposable( pSes->pSpec, pSes->nSpecWords, Vec_IntArray( pSes->vStairDecVars ), Vec_IntSize( pSes->vStairDecVars ), pSes->pStairDecFunc ) )
2074
- {
2075
- if ( pSes->fReasonVerbose )
2076
- {
2077
- printf( "give up due to impossible stair decomposition at level %d: ", nLevel );
2078
- Vec_IntPrint( pSes->vStairDecVars );
2079
- }
2080
- return 0;
2081
- }
2082
- }
2083
-
2084
- /* check if depth's match with structure at second level from top */
2085
- if ( pSes->fDecStructure )
2086
- fMaxGatesLevel2 = ( pSes->nSpecVars == 3 ) ? 2 : 1;
2087
- else
2088
- fMaxGatesLevel2 = ( pSes->nSpecVars == 4 ) ? 4 : 3;
2089
-
2090
- i = 0;
2091
- for ( l = 0; l < pSes->nSpecVars; ++l )
2092
- if ( pSes->pArrTimeProfile[l] + 2 == pSes->nMaxDepth )
2093
- if ( ++i > fMaxGatesLevel2 )
2094
- {
2095
- if ( pSes->fReasonVerbose )
2096
- printf( "give up due to impossible decomposition at second level (depth = %d, input = %d, arrival time = %d)", pSes->nMaxDepth, l, pSes->pArrTimeProfile[l] );
2097
- return 0;
2098
- }
2099
-
2100
- /* check if depth's match with structure at third level from top */
2101
- if ( pSes->nSpecVars > 4 && pSes->fDecStructure && i == 1 ) /* we have f = AND(x_i, AND(x_j, g)) (x_i and x_j may be complemented) */
2102
- {
2103
- i = 0;
2104
- for ( l = 0; l < pSes->nSpecVars; ++l )
2105
- if ( pSes->pArrTimeProfile[l] + 3 == pSes->nMaxDepth )
2106
- if ( ++i > 1 )
2107
- {
2108
- if ( pSes->fReasonVerbose )
2109
- printf( "give up due to impossible decomposition at third level (depth = %d, input = %d, arrival time = %d)", pSes->nMaxDepth, l, pSes->pArrTimeProfile[l] );
2110
- return 0;
2111
- }
2112
- }
2113
-
2114
- return 1;
2115
- }
2116
-
2117
- // returns 0, if current max depth and #gates are not consistent
2118
- static int Ses_CheckGatesConsistency( Ses_Man_t * pSes, int nGates )
2119
- {
2120
- /* give up if number of gates is impossible for given depth */
2121
- if ( pSes->nMaxDepth != -1 && nGates >= ( 1 << pSes->nMaxDepth ) )
2122
- {
2123
- if ( pSes->fReasonVerbose )
2124
- printf( "give up due to impossible depth (depth = %d, gates = %d)", pSes->nMaxDepth, nGates );
2125
- return 0;
2126
- }
2127
-
2128
- /* give up if number of gates is impossible for given depth and arrival times */
2129
- if ( pSes->nMaxDepth != -1 && pSes->pArrTimeProfile && nGates > pSes->nMaxGates )
2130
- {
2131
- if ( pSes->fReasonVerbose )
2132
- printf( "give up due to impossible depth and arrival times (depth = %d, gates = %d)", pSes->nMaxDepth, nGates );
2133
- return 0;
2134
- }
2135
-
2136
- if ( pSes->fDecStructure && nGates >= ( 1 << ( pSes->nMaxDepth - 1 ) ) + 1 )
2137
- {
2138
- if ( pSes->fReasonVerbose )
2139
- printf( "give up due to impossible depth in AND-dec structure (depth = %d, gates = %d)", pSes->nMaxDepth, nGates );
2140
- return 0;
2141
- }
2142
-
2143
- /* give up if number of gates gets practically too large */
2144
- if ( nGates >= ( 1 << pSes->nSpecVars ) )
2145
- {
2146
- if ( pSes->fReasonVerbose )
2147
- printf( "give up due to impossible number of gates" );
2148
- return 0;
2149
- }
2150
-
2151
- return 1;
2152
- }
2153
-
2154
- static void Abc_ExactCopyDepthAndArrivalTimes( int nVars, int nDepthFrom, int * nDepthTo, int * pTimesFrom, int * pTimesTo )
2155
- {
2156
- int l;
2157
-
2158
- *nDepthTo = nDepthFrom;
2159
- for ( l = 0; l < nVars; ++l )
2160
- pTimesTo[l] = pTimesFrom[l];
2161
- }
2162
-
2163
- static void Ses_ManStoreDepthAndArrivalTimes( Ses_Man_t * pSes )
2164
- {
2165
- if ( pSes->nMaxDepth == -1 ) return;
2166
- Abc_ExactCopyDepthAndArrivalTimes( pSes->nSpecVars, pSes->nMaxDepth, &pSes->nMaxDepthTmp, pSes->pArrTimeProfile, pSes->pArrTimeProfileTmp );
2167
- }
2168
-
2169
- static void Ses_ManRestoreDepthAndArrivalTimes( Ses_Man_t * pSes )
2170
- {
2171
- if ( pSes->nMaxDepth == -1 ) return;
2172
- Abc_ExactCopyDepthAndArrivalTimes( pSes->nSpecVars, pSes->nMaxDepthTmp, &pSes->nMaxDepth, pSes->pArrTimeProfileTmp, pSes->pArrTimeProfile );
2173
- }
2174
-
2175
- static void Abc_ExactAdjustDepthAndArrivalTimes( int nVars, int nGates, int nDepthFrom, int * nDepthTo, int * pTimesFrom, int * pTimesTo, int nTimesMax )
2176
- {
2177
- int l;
2178
-
2179
- *nDepthTo = Abc_MinInt( nDepthFrom, nGates );
2180
- for ( l = 0; l < nVars; ++l )
2181
- pTimesTo[l] = Abc_MinInt( pTimesFrom[l], Abc_MaxInt( 0, nGates - 1 - nTimesMax + pTimesFrom[l] ) );
2182
- }
2183
-
2184
- static void Ses_AdjustDepthAndArrivalTimes( Ses_Man_t * pSes, int nGates )
2185
- {
2186
- Abc_ExactAdjustDepthAndArrivalTimes( pSes->nSpecVars, nGates, pSes->nMaxDepthTmp, &pSes->nMaxDepth, pSes->pArrTimeProfileTmp, pSes->pArrTimeProfile, pSes->nArrTimeMax - 1 );
2187
- }
2188
-
2189
- /* return: (2: continue, 1: found, 0: gave up) */
2190
- static int Ses_ManFindNetworkExact( Ses_Man_t * pSes, int nGates )
2191
- {
2192
- int f, fSat;
2193
- abctime timeStart;
2194
-
2195
- /* solve */
2196
- timeStart = Abc_Clock();
2197
- Vec_IntClear( pSes->vPolar );
2198
- Vec_IntClear( pSes->vAssump );
2199
- Ses_ManCreateVars( pSes, nGates );
2200
-
2201
- if ( pSes->nMaxDepth != -1 )
2202
- {
2203
- f = Ses_ManCreateDepthClauses( pSes );
2204
- pSes->timeInstance += ( Abc_Clock() - timeStart );
2205
- if ( !f ) return 2; /* proven UNSAT while creating clauses */
2206
- }
2207
-
2208
- sat_solver_set_polarity( pSes->pSat, Vec_IntArray( pSes->vPolar ), Vec_IntSize( pSes->vPolar ) );
2209
-
2210
- /* first solve */
2211
- fSat = Ses_ManSolve( pSes );
2212
- if ( fSat == 0 )
2213
- return 2; /* UNSAT, continue with next # of gates */
2214
- else if ( fSat == 2 )
2215
- {
2216
- pSes->fHitResLimit = 1;
2217
- return 0;
2218
- }
2219
-
2220
- timeStart = Abc_Clock();
2221
- f = Ses_ManCreateClauses( pSes );
2222
- pSes->timeInstance += ( Abc_Clock() - timeStart );
2223
- if ( !f ) return 2; /* proven UNSAT while creating clauses */
2224
-
2225
- fSat = Ses_ManSolve( pSes );
2226
- if ( fSat == 1 )
2227
- return 1;
2228
- else if ( fSat == 2 )
2229
- {
2230
- pSes->fHitResLimit = 1;
2231
- return 0;
2232
- }
2233
-
2234
- return 2; /* UNSAT continue */
2235
- }
2236
-
2237
- // is there a network for a given number of gates
2238
- /* return: (3: impossible, 2: continue, 1: found, 0: gave up) */
2239
- static int Ses_ManFindNetworkExactCEGAR( Ses_Man_t * pSes, int nGates, char ** pSol )
2240
- {
2241
- int fRes, iMint, fSat, i;
2242
- word pTruth[4];
2243
-
2244
- /* debug */
2245
- Abc_DebugErase( pSes->nDebugOffset + ( nGates > 10 ? 5 : 4 ), pSes->fVeryVerbose );
2246
- Abc_DebugPrintIntInt( " (%d/%d)", nGates, pSes->nMaxGates, pSes->fVeryVerbose );
2247
-
2248
- /* do #gates and max depth allow for a network? */
2249
- if ( !Ses_CheckGatesConsistency( pSes, nGates ) )
2250
- return 3;
2251
-
2252
- for ( i = 0; i < pSes->nRandRowAssigns; ++i )
2253
- Abc_TtSetBit( pSes->pTtValues, rand() % pSes->nRows );
2254
-
2255
- fRes = Ses_ManFindNetworkExact( pSes, nGates );
2256
- if ( fRes != 1 ) return fRes;
2257
-
2258
- while ( true )
2259
- {
2260
- *pSol = Ses_ManExtractSolution( pSes );
2261
- Abc_TtXor( pTruth, Ses_ManDeriveTruth( pSes, *pSol, 0 ), pSes->pSpec, pSes->nSpecWords, 0 );
2262
- iMint = Abc_TtFindFirstBit( pTruth, pSes->nSpecVars );
2263
-
2264
- if ( iMint == -1 || (pSes->nSpecVars < 6 && iMint > pSes->nRows) )
2265
- {
2266
- assert( fRes == 1 );
2267
- return 1;
2268
- }
2269
- ABC_FREE( *pSol );
2270
-
2271
- if ( pSes->fKeepRowAssigns )
2272
- Abc_TtSetBit( pSes->pTtValues, iMint - 1 );
2273
- if ( !Ses_ManCreateTruthTableClause( pSes, iMint - 1 ) ) /* UNSAT, continue */
2274
- return 2;
2275
-
2276
- if ( ( fSat = Ses_ManSolve( pSes ) ) == 1 ) continue;
2277
-
2278
- return ( fSat == 2 ) ? 0 : 2;
2279
- }
2280
- }
2281
-
2282
- // find minimum size by increasing the number of gates
2283
- static char * Ses_ManFindMinimumSizeBottomUp( Ses_Man_t * pSes )
2284
- {
2285
- int nGates = pSes->nStartGates, fRes;
2286
- char * pSol = NULL;
2287
-
2288
- /* store whether call was unsuccessful due to resource limit and not due to impossible constraint */
2289
- pSes->fHitResLimit = 0;
2290
-
2291
- pSes->nDebugOffset = pSes->nMaxGates >= 10 ? 3 : 2;
2292
-
2293
- /* adjust number of gates if there is a stair decomposition */
2294
- if ( Vec_IntSize( pSes->vStairDecVars ) )
2295
- nGates = Abc_MaxInt( nGates, Vec_IntSize( pSes->vStairDecVars ) - 1 );
2296
-
2297
- //Ses_ManStoreDepthAndArrivalTimes( pSes );
2298
-
2299
- memset( pSes->pTtValues, 0, 4 * sizeof( word ) );
2300
-
2301
- Abc_DebugPrintIntInt( " (%d/%d)", nGates, pSes->nMaxGates, pSes->fVeryVerbose );
2302
-
2303
- while ( true )
2304
- {
2305
- ++nGates;
2306
-
2307
- fRes = Ses_ManFindNetworkExactCEGAR( pSes, nGates, &pSol );
2308
-
2309
- if ( fRes == 0 )
2310
- {
2311
- pSes->fHitResLimit = 1;
2312
- break;
2313
- }
2314
- else if ( fRes == 1 || fRes == 3 )
2315
- break;
2316
- }
2317
-
2318
- Abc_DebugErase( pSes->nDebugOffset + ( nGates >= 10 ? 5 : 4 ), pSes->fVeryVerbose );
2319
-
2320
- return pSol;
2321
- }
2322
-
2323
- static char * Ses_ManFindMinimumSizeTopDown( Ses_Man_t * pSes, int nMinGates )
2324
- {
2325
- int nGates = pSes->nMaxGates, fRes;
2326
- char * pSol = NULL, * pSol2 = NULL;
2327
-
2328
- pSes->fHitResLimit = 0;
2329
-
2330
- Abc_DebugPrintIntInt( " (%d/%d)", nGates, pSes->nMaxGates, pSes->fVeryVerbose );
2331
-
2332
- while ( true )
2333
- {
2334
- fRes = Ses_ManFindNetworkExactCEGAR( pSes, nGates, &pSol2 );
2335
-
2336
- if ( fRes == 0 )
2337
- {
2338
- pSes->fHitResLimit = 1;
2339
- break;
2340
- }
2341
- else if ( fRes == 2 || fRes == 3 )
2342
- break;
2343
-
2344
- pSol = pSol2;
2345
-
2346
- if ( nGates == nMinGates )
2347
- break;
2348
-
2349
- --nGates;
2350
- }
2351
-
2352
- Abc_DebugErase( pSes->nDebugOffset + ( nGates >= 10 ? 5 : 4 ), pSes->fVeryVerbose );
2353
-
2354
- return pSol;
2355
- }
2356
-
2357
- static char * Ses_ManFindMinimumSize( Ses_Man_t * pSes )
2358
- {
2359
- char * pSol = NULL;
2360
- int i = pSes->nStartGates + 1, fRes;
2361
-
2362
- /* if more than one function, no CEGAR */
2363
- if ( pSes->nSpecFunc > 1 )
2364
- {
2365
- while ( true )
2366
- {
2367
- if ( pSes->fVerbose )
2368
- {
2369
- printf( "try with %d gates\n", i );
2370
- }
2371
-
2372
- memset( pSes->pTtValues, ~0, 4 * sizeof( word ) );
2373
- fRes = Ses_ManFindNetworkExact( pSes, i++ );
2374
- if ( fRes == 2 ) continue;
2375
- if ( fRes == 0 ) break;
2376
-
2377
- pSol = Ses_ManExtractSolution( pSes );
2378
- break;
2379
- }
2380
-
2381
- return pSol;
2382
- }
2383
-
2384
- /* do the arrival times allow for a network? */
2385
- if ( pSes->nMaxDepth != -1 && pSes->pArrTimeProfile )
2386
- {
2387
- if ( !Ses_CheckDepthConsistency( pSes ) )
2388
- return 0;
2389
- Ses_ManComputeMaxGates( pSes );
2390
- }
2391
-
2392
- pSol = Ses_ManFindMinimumSizeBottomUp( pSes );
2393
-
2394
- if ( !pSol && pSes->nMaxDepth != -1 && pSes->fHitResLimit && pSes->nGates != pSes->nMaxGates )
2395
- return Ses_ManFindMinimumSizeTopDown( pSes, pSes->nGates + 1 );
2396
- else
2397
- return pSol;
2398
- }
2399
-
2400
-
2401
- /**Function*************************************************************
2402
-
2403
- Synopsis [Find minimum size networks with a SAT solver.]
2404
-
2405
- Description [If nMaxDepth is -1, then depth constraints are ignored.
2406
- If nMaxDepth is not -1, one can set pArrTimeProfile which should have the length of nVars.
2407
- One can ignore pArrTimeProfile by setting it to NULL.]
2408
-
2409
- SideEffects []
2410
-
2411
- SeeAlso []
2412
-
2413
- ***********************************************************************/
2414
- Abc_Ntk_t * Abc_NtkFindExact( word * pTruth, int nVars, int nFunc, int nMaxDepth, int * pArrTimeProfile, int nBTLimit, int nStartGates, int fVerbose )
2415
- {
2416
- Ses_Man_t * pSes;
2417
- char * pSol;
2418
- Abc_Ntk_t * pNtk = NULL;
2419
- abctime timeStart;
2420
-
2421
- /* some checks */
2422
- assert( nVars >= 2 && nVars <= 8 );
2423
-
2424
- timeStart = Abc_Clock();
2425
-
2426
- pSes = Ses_ManAlloc( pTruth, nVars, nFunc, nMaxDepth, pArrTimeProfile, 0, nBTLimit, fVerbose );
2427
- pSes->nStartGates = nStartGates;
2428
- pSes->fReasonVerbose = 0;
2429
- pSes->fSatVerbose = 0;
2430
- if ( fVerbose )
2431
- Ses_ManPrintFuncs( pSes );
2432
-
2433
- if ( ( pSol = Ses_ManFindMinimumSize( pSes ) ) != NULL )
2434
- {
2435
- pNtk = Ses_ManExtractNtk( pSol );
2436
- ABC_FREE( pSol );
2437
- }
2438
-
2439
- pSes->timeTotal = Abc_Clock() - timeStart;
2440
-
2441
- if ( fVerbose )
2442
- Ses_ManPrintRuntime( pSes );
2443
-
2444
- /* cleanup */
2445
- Ses_ManClean( pSes );
2446
-
2447
- return pNtk;
2448
- }
2449
-
2450
- Gia_Man_t * Gia_ManFindExact( word * pTruth, int nVars, int nFunc, int nMaxDepth, int * pArrTimeProfile, int nBTLimit, int nStartGates, int fVerbose )
2451
- {
2452
- Ses_Man_t * pSes;
2453
- char * pSol;
2454
- Gia_Man_t * pGia = NULL;
2455
- abctime timeStart;
2456
-
2457
- /* some checks */
2458
- assert( nVars >= 2 && nVars <= 8 );
2459
-
2460
- timeStart = Abc_Clock();
2461
-
2462
- pSes = Ses_ManAlloc( pTruth, nVars, nFunc, nMaxDepth, pArrTimeProfile, 1, nBTLimit, fVerbose );
2463
- pSes->nStartGates = nStartGates;
2464
- pSes->fVeryVerbose = 1;
2465
- pSes->fExtractVerbose = 0;
2466
- pSes->fSatVerbose = 0;
2467
- pSes->fReasonVerbose = 1;
2468
- if ( fVerbose )
2469
- Ses_ManPrintFuncs( pSes );
2470
-
2471
- if ( ( pSol = Ses_ManFindMinimumSize( pSes ) ) != NULL )
2472
- {
2473
- pGia = Ses_ManExtractGia( pSol );
2474
- ABC_FREE( pSol );
2475
- }
2476
-
2477
- pSes->timeTotal = Abc_Clock() - timeStart;
2478
-
2479
- if ( fVerbose )
2480
- Ses_ManPrintRuntime( pSes );
2481
-
2482
- /* cleanup */
2483
- Ses_ManClean( pSes );
2484
-
2485
- return pGia;
2486
- }
2487
-
2488
- /**Function*************************************************************
2489
-
2490
- Synopsis [Some test cases.]
2491
-
2492
- ***********************************************************************/
2493
-
2494
- Abc_Ntk_t * Abc_NtkFromTruthTable( word * pTruth, int nVars )
2495
- {
2496
- Abc_Ntk_t * pNtk;
2497
- Mem_Flex_t * pMan;
2498
- char * pSopCover;
2499
-
2500
- pMan = Mem_FlexStart();
2501
- pSopCover = Abc_SopCreateFromTruth( pMan, nVars, (unsigned*)pTruth );
2502
- pNtk = Abc_NtkCreateWithNode( pSopCover );
2503
- Abc_NtkShortNames( pNtk );
2504
- Mem_FlexStop( pMan, 0 );
2505
-
2506
- return pNtk;
2507
- }
2508
-
2509
- void Abc_ExactTestSingleOutput( int fVerbose )
2510
- {
2511
- extern void Abc_NtkCecSat( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int nConfLimit, int nInsLimit );
2512
-
2513
- word pTruth[4] = {0xcafe, 0, 0, 0};
2514
- Abc_Ntk_t * pNtk, * pNtk2, * pNtk3, * pNtk4;
2515
- int pArrTimeProfile[4] = {6, 2, 8, 5};
2516
-
2517
- pNtk = Abc_NtkFromTruthTable( pTruth, 4 );
2518
-
2519
- pNtk2 = Abc_NtkFindExact( pTruth, 4, 1, -1, NULL, 0, 0, fVerbose );
2520
- Abc_NtkShortNames( pNtk2 );
2521
- Abc_NtkCecSat( pNtk, pNtk2, 10000, 0 );
2522
- assert( pNtk2 );
2523
- assert( Abc_NtkNodeNum( pNtk2 ) == 6 );
2524
- Abc_NtkDelete( pNtk2 );
2525
-
2526
- pNtk3 = Abc_NtkFindExact( pTruth, 4, 1, 3, NULL, 0, 0, fVerbose );
2527
- Abc_NtkShortNames( pNtk3 );
2528
- Abc_NtkCecSat( pNtk, pNtk3, 10000, 0 );
2529
- assert( pNtk3 );
2530
- assert( Abc_NtkLevel( pNtk3 ) <= 3 );
2531
- Abc_NtkDelete( pNtk3 );
2532
-
2533
- pNtk4 = Abc_NtkFindExact( pTruth, 4, 1, 9, pArrTimeProfile, 50000, 0, fVerbose );
2534
- Abc_NtkShortNames( pNtk4 );
2535
- Abc_NtkCecSat( pNtk, pNtk4, 10000, 0 );
2536
- assert( pNtk4 );
2537
- assert( Abc_NtkLevel( pNtk4 ) <= 9 );
2538
- Abc_NtkDelete( pNtk4 );
2539
-
2540
- assert( !Abc_NtkFindExact( pTruth, 4, 1, 2, NULL, 50000, 0, fVerbose ) );
2541
-
2542
- assert( !Abc_NtkFindExact( pTruth, 4, 1, 8, pArrTimeProfile, 50000, 0, fVerbose ) );
2543
-
2544
- Abc_NtkDelete( pNtk );
2545
- }
2546
-
2547
- void Abc_ExactTestSingleOutputAIG( int fVerbose )
2548
- {
2549
- word pTruth[4] = {0xcafe, 0, 0, 0};
2550
- Abc_Ntk_t * pNtk;
2551
- Gia_Man_t * pGia, * pGia2, * pGia3, * pGia4, * pMiter;
2552
- Cec_ParCec_t ParsCec, * pPars = &ParsCec;
2553
- int pArrTimeProfile[4] = {6, 2, 8, 5};
2554
-
2555
- Cec_ManCecSetDefaultParams( pPars );
2556
-
2557
- pNtk = Abc_NtkFromTruthTable( pTruth, 4 );
2558
- Abc_NtkToAig( pNtk );
2559
- pGia = Abc_NtkAigToGia( pNtk, 1 );
2560
-
2561
- pGia2 = Gia_ManFindExact( pTruth, 4, 1, -1, NULL, 0, 0, fVerbose );
2562
- pMiter = Gia_ManMiter( pGia, pGia2, 0, 1, 0, 0, 1 );
2563
- assert( pMiter );
2564
- Cec_ManVerify( pMiter, pPars );
2565
- Gia_ManStop( pMiter );
2566
-
2567
- pGia3 = Gia_ManFindExact( pTruth, 4, 1, 3, NULL, 0, 0, fVerbose );
2568
- pMiter = Gia_ManMiter( pGia, pGia3, 0, 1, 0, 0, 1 );
2569
- assert( pMiter );
2570
- Cec_ManVerify( pMiter, pPars );
2571
- Gia_ManStop( pMiter );
2572
-
2573
- pGia4 = Gia_ManFindExact( pTruth, 4, 1, 9, pArrTimeProfile, 50000, 0, fVerbose );
2574
- pMiter = Gia_ManMiter( pGia, pGia4, 0, 1, 0, 0, 1 );
2575
- assert( pMiter );
2576
- Cec_ManVerify( pMiter, pPars );
2577
- Gia_ManStop( pMiter );
2578
-
2579
- assert( !Gia_ManFindExact( pTruth, 4, 1, 2, NULL, 50000, 0, fVerbose ) );
2580
-
2581
- assert( !Gia_ManFindExact( pTruth, 4, 1, 8, pArrTimeProfile, 50000, 0, fVerbose ) );
2582
-
2583
- Gia_ManStop( pGia );
2584
- Gia_ManStop( pGia2 );
2585
- Gia_ManStop( pGia3 );
2586
- Gia_ManStop( pGia4 );
2587
- }
2588
-
2589
- void Abc_ExactTest( int fVerbose )
2590
- {
2591
- Abc_ExactTestSingleOutput( fVerbose );
2592
- Abc_ExactTestSingleOutputAIG( fVerbose );
2593
-
2594
- printf( "\n" );
2595
- }
2596
-
2597
-
2598
- /**Function*************************************************************
2599
-
2600
- Synopsis [APIs for integraging with the mapper.]
2601
-
2602
- ***********************************************************************/
2603
- // may need to have a static pointer to the SAT-based synthesis engine and/or loaded library
2604
- // this procedure should return 1, if the engine/library are available, and 0 otherwise
2605
- int Abc_ExactIsRunning()
2606
- {
2607
- return s_pSesStore != NULL;
2608
- }
2609
- // this procedure returns the number of inputs of the library
2610
- // for example, somebody may try to map into 10-cuts while the library only contains 8-functions
2611
- int Abc_ExactInputNum()
2612
- {
2613
- return 8;
2614
- }
2615
- // start exact store manager
2616
- void Abc_ExactStart( int nBTLimit, int fMakeAIG, int fVerbose, int fVeryVerbose, const char * pFilename )
2617
- {
2618
- if ( !s_pSesStore )
2619
- {
2620
- s_pSesStore = Ses_StoreAlloc( nBTLimit, fMakeAIG, fVerbose );
2621
- s_pSesStore->fVeryVerbose = fVeryVerbose;
2622
- if ( pFilename )
2623
- {
2624
- Ses_StoreRead( s_pSesStore, pFilename, 1, 0, 0, 0 );
2625
-
2626
- s_pSesStore->szDBName = ABC_CALLOC( char, strlen( pFilename ) + 1 );
2627
- strcpy( s_pSesStore->szDBName, pFilename );
2628
- }
2629
- if ( s_pSesStore->fVeryVerbose )
2630
- {
2631
- s_pSesStore->pDebugEntries = fopen( "bms.debug", "w" );
2632
- }
2633
- }
2634
- else
2635
- printf( "BMS manager already started\n" );
2636
- }
2637
- // stop exact store manager
2638
- void Abc_ExactStop( const char * pFilename )
2639
- {
2640
- if ( s_pSesStore )
2641
- {
2642
- if ( pFilename )
2643
- Ses_StoreWrite( s_pSesStore, pFilename, 1, 0, 0, 0 );
2644
- if ( s_pSesStore->pDebugEntries )
2645
- fclose( s_pSesStore->pDebugEntries );
2646
- Ses_StoreClean( s_pSesStore );
2647
- }
2648
- else
2649
- printf( "BMS manager has not been started\n" );
2650
- }
2651
- // show statistics about store manager
2652
- void Abc_ExactStats()
2653
- {
2654
- int i;
2655
-
2656
- if ( !s_pSesStore )
2657
- {
2658
- printf( "BMS manager has not been started\n" );
2659
- return;
2660
- }
2661
-
2662
- printf( "-------------------------------------------------------------------------------------------------------------------------------\n" );
2663
- printf( " 0 1 2 3 4 5 6 7 8 total\n" );
2664
- printf( "-------------------------------------------------------------------------------------------------------------------------------\n" );
2665
- printf( "number of considered cuts :" );
2666
- for ( i = 0; i < 9; ++i )
2667
- printf( "%10lu", s_pSesStore->pCutCount[i] );
2668
- printf( "%10lu\n", s_pSesStore->nCutCount );
2669
- printf( " - trivial :" );
2670
- for ( i = 0; i < 9; ++i )
2671
- printf( "%10lu", s_pSesStore->pSynthesizedTrivial[i] );
2672
- printf( "%10lu\n", s_pSesStore->nSynthesizedTrivial );
2673
- printf( " - synth (imp) :" );
2674
- for ( i = 0; i < 9; ++i )
2675
- printf( "%10lu", s_pSesStore->pSynthesizedImp[i] );
2676
- printf( "%10lu\n", s_pSesStore->nSynthesizedImp );
2677
- printf( " - synth (res) :" );
2678
- for ( i = 0; i < 9; ++i )
2679
- printf( "%10lu", s_pSesStore->pSynthesizedRL[i] );
2680
- printf( "%10lu\n", s_pSesStore->nSynthesizedRL );
2681
- printf( " - not synth (imp) :" );
2682
- for ( i = 0; i < 9; ++i )
2683
- printf( "%10lu", s_pSesStore->pUnsynthesizedImp[i] );
2684
- printf( "%10lu\n", s_pSesStore->nUnsynthesizedImp );
2685
- printf( " - not synth (res) :" );
2686
- for ( i = 0; i < 9; ++i )
2687
- printf( "%10lu", s_pSesStore->pUnsynthesizedRL[i] );
2688
- printf( "%10lu\n", s_pSesStore->nUnsynthesizedRL );
2689
- printf( " - cache hits :" );
2690
- for ( i = 0; i < 9; ++i )
2691
- printf( "%10lu", s_pSesStore->pCacheHits[i] );
2692
- printf( "%10lu\n", s_pSesStore->nCacheHits );
2693
- printf( "-------------------------------------------------------------------------------------------------------------------------------\n" );
2694
- printf( "number of entries : %d\n", s_pSesStore->nEntriesCount );
2695
- printf( "number of valid entries : %d\n", s_pSesStore->nValidEntriesCount );
2696
- printf( "number of invalid entries : %d\n", s_pSesStore->nEntriesCount - s_pSesStore->nValidEntriesCount );
2697
- printf( "-------------------------------------------------------------------------------------------------------------------------------\n" );
2698
- printf( "number of SAT calls : %lu\n", s_pSesStore->nSatCalls );
2699
- printf( "number of UNSAT calls : %lu\n", s_pSesStore->nUnsatCalls );
2700
- printf( "number of UNDEF calls : %lu\n", s_pSesStore->nUndefCalls );
2701
-
2702
- printf( "-------------------------------------------------------------------------------------------------------------------------------\n" );
2703
- printf( "Runtime breakdown:\n" );
2704
- ABC_PRTP( "Exact ", s_pSesStore->timeExact, s_pSesStore->timeTotal );
2705
- ABC_PRTP( " Sat ", s_pSesStore->timeSat, s_pSesStore->timeTotal );
2706
- ABC_PRTP( " Sat ", s_pSesStore->timeSatSat, s_pSesStore->timeTotal );
2707
- ABC_PRTP( " Unsat ", s_pSesStore->timeSatUnsat, s_pSesStore->timeTotal );
2708
- ABC_PRTP( " Undef ", s_pSesStore->timeSatUndef, s_pSesStore->timeTotal );
2709
- ABC_PRTP( " Instance", s_pSesStore->timeInstance, s_pSesStore->timeTotal );
2710
- ABC_PRTP( "Other ", s_pSesStore->timeTotal - s_pSesStore->timeExact, s_pSesStore->timeTotal );
2711
- ABC_PRTP( "ALL ", s_pSesStore->timeTotal, s_pSesStore->timeTotal );
2712
- }
2713
- // this procedure takes TT and input arrival times (pArrTimeProfile) and return the smallest output arrival time;
2714
- // it also returns the pin-to-pin delays (pPerm) between each cut leaf and the cut output and the cut area cost (Cost)
2715
- // the area cost should not exceed 2048, if the cut is implementable; otherwise, it should be ABC_INFINITY
2716
- int Abc_ExactDelayCost( word * pTruth, int nVars, int * pArrTimeProfile, char * pPerm, int * Cost, int AigLevel )
2717
- {
2718
- int i, nMaxArrival, nDelta, l;
2719
- Ses_Man_t * pSes = NULL;
2720
- char * pSol = NULL, * pSol2 = NULL, * p;
2721
- int pNormalArrTime[8];
2722
- int Delay = ABC_INFINITY, nMaxDepth, fResLimit;
2723
- abctime timeStart = Abc_Clock(), timeStartExact;
2724
-
2725
- /* some checks */
2726
- if ( nVars < 0 || nVars > 8 )
2727
- {
2728
- printf( "invalid truth table size %d\n", nVars );
2729
- assert( 0 );
2730
- }
2731
-
2732
- /* statistics */
2733
- s_pSesStore->nCutCount++;
2734
- s_pSesStore->pCutCount[nVars]++;
2735
-
2736
- if ( nVars == 0 )
2737
- {
2738
- s_pSesStore->nSynthesizedTrivial++;
2739
- s_pSesStore->pSynthesizedTrivial[0]++;
2740
-
2741
- *Cost = 0;
2742
- s_pSesStore->timeTotal += ( Abc_Clock() - timeStart );
2743
- return 0;
2744
- }
2745
-
2746
- if ( nVars == 1 )
2747
- {
2748
- s_pSesStore->nSynthesizedTrivial++;
2749
- s_pSesStore->pSynthesizedTrivial[1]++;
2750
-
2751
- *Cost = 0;
2752
- pPerm[0] = (char)0;
2753
- s_pSesStore->timeTotal += ( Abc_Clock() - timeStart );
2754
- return pArrTimeProfile[0];
2755
- }
2756
-
2757
- for ( l = 0; l < nVars; ++l )
2758
- pNormalArrTime[l] = pArrTimeProfile[l];
2759
-
2760
- nDelta = Abc_NormalizeArrivalTimes( pNormalArrTime, nVars, &nMaxArrival );
2761
-
2762
- *Cost = ABC_INFINITY;
2763
-
2764
- if ( Ses_StoreGetEntry( s_pSesStore, pTruth, nVars, pNormalArrTime, &pSol ) )
2765
- {
2766
- s_pSesStore->nCacheHits++;
2767
- s_pSesStore->pCacheHits[nVars]++;
2768
- }
2769
- else
2770
- {
2771
- if ( s_pSesStore->fVeryVerbose )
2772
- {
2773
- printf( ANSI_COLOR_CYAN );
2774
- Abc_TtPrintHexRev( stdout, pTruth, nVars );
2775
- printf( ANSI_COLOR_RESET );
2776
- printf( " [%d", pNormalArrTime[0] );
2777
- for ( l = 1; l < nVars; ++l )
2778
- printf( " %d", pNormalArrTime[l] );
2779
- printf( "]@%d:", AigLevel );
2780
- fflush( stdout );
2781
- }
2782
-
2783
- nMaxDepth = pNormalArrTime[0];
2784
- for ( i = 1; i < nVars; ++i )
2785
- nMaxDepth = Abc_MaxInt( nMaxDepth, pNormalArrTime[i] );
2786
- nMaxDepth += nVars + 1;
2787
- if ( AigLevel != -1 )
2788
- nMaxDepth = Abc_MinInt( AigLevel - nDelta, nMaxDepth + nVars + 1 );
2789
-
2790
- timeStartExact = Abc_Clock();
2791
-
2792
- pSes = Ses_ManAlloc( pTruth, nVars, 1 /* nSpecFunc */, nMaxDepth, pNormalArrTime, s_pSesStore->fMakeAIG, s_pSesStore->nBTLimit, s_pSesStore->fVerbose );
2793
- pSes->fVeryVerbose = s_pSesStore->fVeryVerbose;
2794
- pSes->pSat = s_pSesStore->pSat;
2795
- pSes->nStartGates = nVars - 2;
2796
-
2797
- while ( pSes->nMaxDepth ) /* there is improvement */
2798
- {
2799
- if ( s_pSesStore->fVeryVerbose )
2800
- {
2801
- printf( " %d", pSes->nMaxDepth );
2802
- fflush( stdout );
2803
- }
2804
-
2805
- if ( ( pSol2 = Ses_ManFindMinimumSize( pSes ) ) != NULL )
2806
- {
2807
- if ( s_pSesStore->fVeryVerbose )
2808
- {
2809
- if ( pSes->nMaxDepth >= 10 ) printf( "\b" );
2810
- printf( "\b" ANSI_COLOR_GREEN "%d" ANSI_COLOR_RESET, pSes->nMaxDepth );
2811
- }
2812
- if ( pSol )
2813
- ABC_FREE( pSol );
2814
- pSol = pSol2;
2815
- pSes->nMaxDepth--;
2816
- }
2817
- else
2818
- {
2819
- if ( s_pSesStore->fVeryVerbose )
2820
- {
2821
- if ( pSes->nMaxDepth >= 10 ) printf( "\b" );
2822
- printf( "\b%s%d" ANSI_COLOR_RESET, pSes->fHitResLimit ? ANSI_COLOR_RED : ANSI_COLOR_YELLOW, pSes->nMaxDepth );
2823
- }
2824
- break;
2825
- }
2826
- }
2827
-
2828
- if ( s_pSesStore->fVeryVerbose )
2829
- printf( " \n" );
2830
-
2831
- /* log unsuccessful case for debugging */
2832
- if ( s_pSesStore->pDebugEntries && pSes->fHitResLimit )
2833
- Ses_StorePrintDebugEntry( s_pSesStore, pTruth, nVars, pNormalArrTime, pSes->nMaxDepth, pSol, nVars - 2 );
2834
-
2835
- pSes->timeTotal = Abc_Clock() - timeStartExact;
2836
-
2837
- /* statistics */
2838
- s_pSesStore->nSatCalls += pSes->nSatCalls;
2839
- s_pSesStore->nUnsatCalls += pSes->nUnsatCalls;
2840
- s_pSesStore->nUndefCalls += pSes->nUndefCalls;
2841
-
2842
- s_pSesStore->timeSat += pSes->timeSat;
2843
- s_pSesStore->timeSatSat += pSes->timeSatSat;
2844
- s_pSesStore->timeSatUnsat += pSes->timeSatUnsat;
2845
- s_pSesStore->timeSatUndef += pSes->timeSatUndef;
2846
- s_pSesStore->timeInstance += pSes->timeInstance;
2847
- s_pSesStore->timeExact += pSes->timeTotal;
2848
-
2849
- /* cleanup (we need to clean before adding since pTruth may have been modified by pSes) */
2850
- fResLimit = pSes->fHitResLimit;
2851
- Ses_ManCleanLight( pSes );
2852
-
2853
- /* store solution */
2854
- Ses_StoreAddEntry( s_pSesStore, pTruth, nVars, pNormalArrTime, pSol, fResLimit );
2855
- }
2856
-
2857
- if ( pSol )
2858
- {
2859
- *Cost = pSol[ABC_EXACT_SOL_NGATES];
2860
- p = pSol + 3 + 4 * pSol[ABC_EXACT_SOL_NGATES] + 1;
2861
- Delay = *p++;
2862
- for ( l = 0; l < nVars; ++l )
2863
- pPerm[l] = *p++;
2864
- }
2865
-
2866
- if ( pSol )
2867
- {
2868
- int Delay2 = 0;
2869
- for ( l = 0; l < nVars; ++l )
2870
- {
2871
- //printf( "%d ", pPerm[l] );
2872
- Delay2 = Abc_MaxInt( Delay2, pArrTimeProfile[l] + pPerm[l] );
2873
- }
2874
- //printf( " output arrival = %d recomputed = %d\n", Delay, Delay2 );
2875
- //if ( Delay != Delay2 )
2876
- //{
2877
- // printf( "^--- BUG!\n" );
2878
- // assert( 0 );
2879
- //}
2880
-
2881
- s_pSesStore->timeTotal += ( Abc_Clock() - timeStart );
2882
- return Delay2;
2883
- }
2884
- else
2885
- {
2886
- assert( *Cost == ABC_INFINITY );
2887
-
2888
- s_pSesStore->timeTotal += ( Abc_Clock() - timeStart );
2889
- return ABC_INFINITY;
2890
- }
2891
- }
2892
- // this procedure returns a new node whose output in terms of the given fanins
2893
- // has the smallest possible arrival time (in agreement with the above Abc_ExactDelayCost)
2894
- Abc_Obj_t * Abc_ExactBuildNode( word * pTruth, int nVars, int * pArrTimeProfile, Abc_Obj_t ** pFanins, Abc_Ntk_t * pNtk )
2895
- {
2896
- char * pSol = NULL;
2897
- int i, j, nMaxArrival;
2898
- int pNormalArrTime[8];
2899
- char const * p;
2900
- Abc_Obj_t * pObj;
2901
- Vec_Ptr_t * pGates;
2902
- char pGateTruth[5];
2903
- char * pSopCover;
2904
- abctime timeStart = Abc_Clock();
2905
-
2906
- if ( nVars == 0 )
2907
- {
2908
- s_pSesStore->timeTotal += ( Abc_Clock() - timeStart );
2909
- return (pTruth[0] & 1) ? Abc_NtkCreateNodeConst1(pNtk) : Abc_NtkCreateNodeConst0(pNtk);
2910
- }
2911
- if ( nVars == 1 )
2912
- {
2913
- s_pSesStore->timeTotal += ( Abc_Clock() - timeStart );
2914
- return (pTruth[0] & 1) ? Abc_NtkCreateNodeInv(pNtk, pFanins[0]) : Abc_NtkCreateNodeBuf(pNtk, pFanins[0]);
2915
- }
2916
-
2917
- for ( i = 0; i < nVars; ++i )
2918
- pNormalArrTime[i] = pArrTimeProfile[i];
2919
- Abc_NormalizeArrivalTimes( pNormalArrTime, nVars, &nMaxArrival );
2920
- assert( Ses_StoreGetEntry( s_pSesStore, pTruth, nVars, pNormalArrTime, &pSol ) );
2921
- if ( !pSol )
2922
- {
2923
- s_pSesStore->timeTotal += ( Abc_Clock() - timeStart );
2924
- return NULL;
2925
- }
2926
-
2927
- assert( pSol[ABC_EXACT_SOL_NVARS] == nVars );
2928
- assert( pSol[ABC_EXACT_SOL_NFUNC] == 1 );
2929
-
2930
- pGates = Vec_PtrAlloc( nVars + pSol[ABC_EXACT_SOL_NGATES] );
2931
- pGateTruth[3] = '0';
2932
- pGateTruth[4] = '\0';
2933
-
2934
- /* primary inputs */
2935
- for ( i = 0; i < nVars; ++i )
2936
- {
2937
- assert( pFanins[i] );
2938
- Vec_PtrPush( pGates, pFanins[i] );
2939
- }
2940
-
2941
- /* gates */
2942
- p = pSol + 3;
2943
- for ( i = 0; i < pSol[ABC_EXACT_SOL_NGATES]; ++i )
2944
- {
2945
- pGateTruth[2] = '0' + ( *p & 1 );
2946
- pGateTruth[1] = '0' + ( ( *p >> 1 ) & 1 );
2947
- pGateTruth[0] = '0' + ( ( *p >> 2 ) & 1 );
2948
- ++p;
2949
-
2950
- assert( *p == 2 ); /* binary gate */
2951
- ++p;
2952
-
2953
- /* invert truth table if we are last gate and inverted */
2954
- if ( i + 1 == pSol[ABC_EXACT_SOL_NGATES] && Abc_LitIsCompl( *( p + 2 ) ) )
2955
- for ( j = 0; j < 4; ++j )
2956
- pGateTruth[j] = ( pGateTruth[j] == '0' ) ? '1' : '0';
2957
-
2958
- pSopCover = Abc_SopFromTruthBin( pGateTruth );
2959
- pObj = Abc_NtkCreateNode( pNtk );
2960
- assert( pObj );
2961
- pObj->pData = Abc_SopRegister( (Mem_Flex_t*)pNtk->pManFunc, pSopCover );
2962
- Vec_PtrPush( pGates, pObj );
2963
- ABC_FREE( pSopCover );
2964
-
2965
- Abc_ObjAddFanin( pObj, (Abc_Obj_t *)Vec_PtrEntry( pGates, *p++ ) );
2966
- Abc_ObjAddFanin( pObj, (Abc_Obj_t *)Vec_PtrEntry( pGates, *p++ ) );
2967
- }
2968
-
2969
- /* output */
2970
- pObj = (Abc_Obj_t *)Vec_PtrEntry( pGates, nVars + Abc_Lit2Var( *p ) );
2971
-
2972
- Vec_PtrFree( pGates );
2973
-
2974
- s_pSesStore->timeTotal += ( Abc_Clock() - timeStart );
2975
- return pObj;
2976
- }
2977
-
2978
- void Abc_ExactStoreTest( int fVerbose )
2979
- {
2980
- int i;
2981
- word pTruth[4] = {0xcafe, 0, 0, 0};
2982
- int pArrTimeProfile[4] = {6, 2, 8, 5};
2983
- Abc_Ntk_t * pNtk;
2984
- Abc_Obj_t * pFanins[4];
2985
- Vec_Ptr_t * vNames;
2986
- char pPerm[4];
2987
- int Cost;
2988
-
2989
- pNtk = Abc_NtkAlloc( ABC_NTK_LOGIC, ABC_FUNC_SOP, 1 );
2990
- pNtk->pName = Extra_UtilStrsav( "exact" );
2991
- vNames = Abc_NodeGetFakeNames( 4u );
2992
-
2993
- /* primary inputs */
2994
- Vec_PtrPush( pNtk->vObjs, NULL );
2995
- for ( i = 0; i < 4; ++i )
2996
- {
2997
- pFanins[i] = Abc_NtkCreatePi( pNtk );
2998
- Abc_ObjAssignName( pFanins[i], (char*)Vec_PtrEntry( vNames, i ), NULL );
2999
- }
3000
- Abc_NodeFreeNames( vNames );
3001
-
3002
- Abc_ExactStart( 10000, 1, fVerbose, 0, NULL );
3003
-
3004
- assert( !Abc_ExactBuildNode( pTruth, 4, pArrTimeProfile, pFanins, pNtk ) );
3005
-
3006
- assert( Abc_ExactDelayCost( pTruth, 4, pArrTimeProfile, pPerm, &Cost, 12 ) == 1 );
3007
-
3008
- assert( Abc_ExactBuildNode( pTruth, 4, pArrTimeProfile, pFanins, pNtk ) );
3009
-
3010
- (*pArrTimeProfile)++;
3011
- assert( !Abc_ExactBuildNode( pTruth, 4, pArrTimeProfile, pFanins, pNtk ) );
3012
- (*pArrTimeProfile)--;
3013
-
3014
- Abc_ExactStop( NULL );
3015
-
3016
- Abc_NtkDelete( pNtk );
3017
- }
3018
-
3019
- ////////////////////////////////////////////////////////////////////////
3020
- /// END OF FILE ///
3021
- ////////////////////////////////////////////////////////////////////////
3022
-
3023
-
3024
- ABC_NAMESPACE_IMPL_END