The source code and dockerfile for the GSW2024 AI Lab.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

3704 lines
125 KiB

2 months ago
  1. <html>
  2. <head><title>The dddmp package: all functions </title></head>
  3. <body>
  4. A set of internal low-level routines of the dddmp package
  5. doing:
  6. <ul>
  7. <li> read and write of node codes in binary mode,
  8. <li> read and write of integers in binary mode,
  9. <li> marking/unmarking nodes as visited,
  10. <li> numbering nodes.
  11. </ul>
  12. <HR>
  13. <DL>
  14. <dt><pre>
  15. <A NAME="DddmpBddReadHeaderCnf"></A>
  16. static Dddmp_Hdr_t * <I></I>
  17. <B>DddmpBddReadHeaderCnf</B>(
  18. char * <b>file</b>, <i>IN: file name</i>
  19. FILE * <b>fp</b> <i>IN: file pointer</i>
  20. )
  21. </pre>
  22. <dd> Reads the header of a dump file. Builds a Dddmp_Hdr_t struct
  23. containing all infos in the header, for next manipulations.
  24. <p>
  25. <dd> <b>Side Effects</b> none
  26. <p>
  27. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpLoadCnf.c"TARGET="ABSTRACT"><CODE>dddmpLoadCnf.c</CODE></A>
  28. <dt><pre>
  29. <A NAME="DddmpBddReadHeader"></A>
  30. static Dddmp_Hdr_t * <I></I>
  31. <B>DddmpBddReadHeader</B>(
  32. char * <b>file</b>, <i>IN: file name</i>
  33. FILE * <b>fp</b> <i>IN: file pointer</i>
  34. )
  35. </pre>
  36. <dd> Reads the header of a dump file. Builds a Dddmp_Hdr_t struct
  37. containing all infos in the header, for next manipulations.
  38. <p>
  39. <dd> <b>Side Effects</b> none
  40. <p>
  41. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpLoad.c"TARGET="ABSTRACT"><CODE>dddmpLoad.c</CODE></A>
  42. <dt><pre>
  43. <A NAME="DddmpClearVisitedAdd"></A>
  44. void <I></I>
  45. <B>DddmpClearVisitedAdd</B>(
  46. DdNode * <b>f</b> <i>IN: BDD node to be marked (as not visited)</i>
  47. )
  48. </pre>
  49. <dd> Marks a node as not visited
  50. <p>
  51. <dd> <b>Side Effects</b> None
  52. <p>
  53. <dd> <b>See Also</b> <code><a href="#DddmpVisitedAdd">DddmpVisitedAdd</a>
  54. ()
  55. <a href="#DddmpSetVisitedAdd">DddmpSetVisitedAdd</a>
  56. ()
  57. </code>
  58. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeAdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeAdd.c</CODE></A>
  59. <dt><pre>
  60. <A NAME="DddmpClearVisitedBdd"></A>
  61. void <I></I>
  62. <B>DddmpClearVisitedBdd</B>(
  63. DdNode * <b>f</b> <i>IN: BDD node to be marked (as not visited)</i>
  64. )
  65. </pre>
  66. <dd> Marks a node as not visited
  67. <p>
  68. <dd> <b>Side Effects</b> None
  69. <p>
  70. <dd> <b>See Also</b> <code><a href="#DddmpVisited">DddmpVisited</a>
  71. ()
  72. <a href="#DddmpSetVisited">DddmpSetVisited</a>
  73. ()
  74. </code>
  75. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeBdd.c</CODE></A>
  76. <dt><pre>
  77. <A NAME="DddmpClearVisitedCnfRecur"></A>
  78. static int <I></I>
  79. <B>DddmpClearVisitedCnfRecur</B>(
  80. DdNode * <b>f</b> <i>IN: root of the BDD to be marked</i>
  81. )
  82. </pre>
  83. <dd> Mark ALL nodes as not visited (it recurs on the node children)
  84. <p>
  85. <dd> <b>Side Effects</b> None
  86. <p>
  87. <dd> <b>See Also</b> <code><a href="#DddmpVisitedCnf">DddmpVisitedCnf</a>
  88. ()
  89. <a href="#DddmpSetVisitedCnf">DddmpSetVisitedCnf</a>
  90. ()
  91. </code>
  92. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  93. <dt><pre>
  94. <A NAME="DddmpClearVisitedCnfRecur"></A>
  95. static int <I></I>
  96. <B>DddmpClearVisitedCnfRecur</B>(
  97. DdNode * <b>f</b> <i>IN: root of the BDD to be marked</i>
  98. )
  99. </pre>
  100. <dd> Mark ALL nodes as not visited (it recurs on the node children)
  101. <p>
  102. <dd> <b>Side Effects</b> None
  103. <p>
  104. <dd> <b>See Also</b> <code><a href="#DddmpVisitedCnf">DddmpVisitedCnf</a>
  105. ()
  106. <a href="#DddmpSetVisitedCnf">DddmpSetVisitedCnf</a>
  107. ()
  108. </code>
  109. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  110. <dt><pre>
  111. <A NAME="DddmpClearVisitedCnf"></A>
  112. static void <I></I>
  113. <B>DddmpClearVisitedCnf</B>(
  114. DdNode * <b>f</b> <i>IN: BDD node to be marked (as not visited)</i>
  115. )
  116. </pre>
  117. <dd> Marks a node as not visited
  118. <p>
  119. <dd> <b>Side Effects</b> None
  120. <p>
  121. <dd> <b>See Also</b> <code><a href="#DddmpVisitedCnf">DddmpVisitedCnf</a>
  122. ()
  123. <a href="#DddmpSetVisitedCnf">DddmpSetVisitedCnf</a>
  124. ()
  125. </code>
  126. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  127. <dt><pre>
  128. <A NAME="DddmpClearVisitedCnf"></A>
  129. static void <I></I>
  130. <B>DddmpClearVisitedCnf</B>(
  131. DdNode * <b>f</b> <i>IN: BDD node to be marked (as not visited)</i>
  132. )
  133. </pre>
  134. <dd> Marks a node as not visited
  135. <p>
  136. <dd> <b>Side Effects</b> None
  137. <p>
  138. <dd> <b>See Also</b> <code><a href="#DddmpVisitedCnf">DddmpVisitedCnf</a>
  139. ()
  140. <a href="#DddmpSetVisitedCnf">DddmpSetVisitedCnf</a>
  141. ()
  142. </code>
  143. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  144. <dt><pre>
  145. <A NAME="DddmpClearVisited"></A>
  146. void <I></I>
  147. <B>DddmpClearVisited</B>(
  148. DdNode * <b>f</b> <i>IN: BDD node to be marked (as not visited)</i>
  149. )
  150. </pre>
  151. <dd> Marks a node as not visited
  152. <p>
  153. <dd> <b>Side Effects</b> None
  154. <p>
  155. <dd> <b>See Also</b> <code><a href="#DddmpVisited">DddmpVisited</a>
  156. ()
  157. <a href="#DddmpSetVisited">DddmpSetVisited</a>
  158. ()
  159. </code>
  160. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeBdd.c</CODE></A>
  161. <dt><pre>
  162. <A NAME="DddmpCnfClauses2Bdd"></A>
  163. static int <I></I>
  164. <B>DddmpCnfClauses2Bdd</B>(
  165. Dddmp_Hdr_t * <b>Hdr</b>, <i>IN: file header</i>
  166. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  167. int ** <b>cnfTable</b>, <i>IN: CNF table for clauses</i>
  168. int <b>mode</b>, <i>IN: computation mode</i>
  169. DdNode *** <b>rootsPtrPtr</b> <i>OUT: array of returned BDD roots (by reference)</i>
  170. )
  171. </pre>
  172. <dd> Transforms CNF clauses into BDDs. Clauses are stored in an
  173. internal structure previously read. The results can be given in
  174. different format according to the mode selection:
  175. IFF mode == 0 Return the Clauses without Conjunction
  176. IFF mode == 1 Return the sets of BDDs without Quantification
  177. IFF mode == 2 Return the sets of BDDs AFTER Existential Quantification
  178. <p>
  179. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpLoadCnf.c"TARGET="ABSTRACT"><CODE>dddmpLoadCnf.c</CODE></A>
  180. <dt><pre>
  181. <A NAME="DddmpCuddBddArrayStoreCnf"></A>
  182. static int <I></I>
  183. <B>DddmpCuddBddArrayStoreCnf</B>(
  184. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  185. DdNode ** <b>f</b>, <i>IN: array of BDD roots to be stored</i>
  186. int <b>rootN</b>, <i>IN: # of output BDD roots to be stored</i>
  187. Dddmp_DecompCnfStoreType <b>mode</b>, <i>IN: format selection</i>
  188. int <b>noHeader</b>, <i>IN: do not store header iff 1</i>
  189. char ** <b>varNames</b>, <i>IN: array of variable names (or NULL)</i>
  190. int * <b>bddIds</b>, <i>IN: array of BDD node Ids (or NULL)</i>
  191. int * <b>bddAuxIds</b>, <i>IN: array of BDD Aux Ids (or NULL)</i>
  192. int * <b>cnfIds</b>, <i>IN: array of CNF ids (or NULL)</i>
  193. int <b>idInitial</b>, <i>IN: starting id for cutting variables</i>
  194. int <b>edgeInTh</b>, <i>IN: Max # Incoming Edges</i>
  195. int <b>pathLengthTh</b>, <i>IN: Max Path Length</i>
  196. char * <b>fname</b>, <i>IN: file name</i>
  197. FILE * <b>fp</b>, <i>IN: pointer to the store file</i>
  198. int * <b>clauseNPtr</b>, <i>OUT: number of clause stored</i>
  199. int * <b>varNewNPtr</b> <i>OUT: number of new variable created</i>
  200. )
  201. </pre>
  202. <dd> Dumps the argument array of BDDs/ADDs to file in CNF format.
  203. The following arrays: varNames, bddIds, bddAuxIds, and cnfIds
  204. fix the correspondence among variable names, BDD ids, BDD
  205. auxiliary ids and the ids used to store the CNF problem.
  206. All these arrays are automatically created iff NULL.
  207. Auxiliary variable, iff necessary, are created starting from value
  208. idInitial.
  209. Iff idInitial is <= 0 its value is selected as the number of internal
  210. CUDD variable + 2.
  211. Auxiliary variables, i.e., cut points are inserted following these
  212. criterias:
  213. * edgeInTh
  214. indicates the maximum number of incoming edges up to which
  215. no cut point (auxiliary variable) is inserted.
  216. If edgeInTh:
  217. * is equal to -1 no cut point due to incoming edges are inserted
  218. (MaxtermByMaxterm method.)
  219. * is equal to 0 a cut point is inserted for each node with a single
  220. incoming edge, i.e., each node, (NodeByNode method).
  221. * is equal to n a cut point is inserted for each node with (n+1)
  222. incoming edges.
  223. * pathLengthTh
  224. indicates the maximum length path up to which no cut points
  225. (auxiliary variable) is inserted.
  226. If the path length between two nodes exceeds this value, a cut point
  227. is inserted.
  228. If pathLengthTh:
  229. * is equal to -1 no cut point due path length are inserted
  230. (MaxtermByMaxterm method.)
  231. * is equal to 0 a cut point is inserted for each node (NodeByNode
  232. method).
  233. * is equal to n a cut point is inserted on path whose length is
  234. equal to (n+1).
  235. Notice that the maximum number of literals in a clause is equal
  236. to (pathLengthTh + 2), i.e., for each path we have to keep into
  237. account a CNF variable for each node plus 2 added variables for
  238. the bottom and top-path cut points.
  239. <p>
  240. <dd> <b>Side Effects</b> Nodes are temporarily removed from the unique hash table.
  241. They are re-linked after the store operation in a modified
  242. order.
  243. <p>
  244. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddStore">Dddmp_cuddBddStore</a>
  245. </code>
  246. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreCnf.c"TARGET="ABSTRACT"><CODE>dddmpStoreCnf.c</CODE></A>
  247. <dt><pre>
  248. <A NAME="DddmpCuddBddArrayStore"></A>
  249. int <I></I>
  250. <B>DddmpCuddBddArrayStore</B>(
  251. Dddmp_DecompType <b>ddType</b>, <i>IN: Selects the decomp type BDD</i>
  252. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  253. char * <b>ddname</b>, <i>IN: DD name (or NULL)</i>
  254. int <b>nRoots</b>, <i>IN: number of output BDD roots to be stored</i>
  255. DdNode ** <b>f</b>, <i>IN: array of DD roots to be stored</i>
  256. char ** <b>rootnames</b>, <i>IN: array of root names (or NULL)</i>
  257. char ** <b>varnames</b>, <i>IN: array of variable names (or NULL)</i>
  258. int * <b>auxids</b>, <i>IN: array of converted var IDs</i>
  259. int <b>mode</b>, <i>IN: storing mode selector</i>
  260. Dddmp_VarInfoType <b>varinfo</b>, <i>IN: extra info for variables in text mode</i>
  261. char * <b>fname</b>, <i>IN: File name</i>
  262. FILE * <b>fp</b> <i>IN: File pointer to the store file</i>
  263. )
  264. </pre>
  265. <dd> Dumps the argument array of BDDs to file.
  266. Internal function doing inner steps of store for BDDs.
  267. <p>
  268. <dd> <b>Side Effects</b> Nodes are temporarily removed from the unique hash
  269. table. They are re-linked after the store operation in a
  270. modified order.
  271. <p>
  272. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddStore">Dddmp_cuddBddStore</a>
  273. <a href="#Dddmp_cuddBddLoad">Dddmp_cuddBddLoad</a>
  274. <a href="#Dddmp_cuddBddArrayLoad">Dddmp_cuddBddArrayLoad</a>
  275. </code>
  276. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreBdd.c"TARGET="ABSTRACT"><CODE>dddmpStoreBdd.c</CODE></A>
  277. <dt><pre>
  278. <A NAME="DddmpCuddDdArrayLoadCnf"></A>
  279. static int <I></I>
  280. <B>DddmpCuddDdArrayLoadCnf</B>(
  281. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  282. Dddmp_RootMatchType <b>rootmatchmode</b>, <i>IN: storing mode selector</i>
  283. char ** <b>rootmatchnames</b>, <i>IN: sorted names for loaded roots</i>
  284. Dddmp_VarMatchType <b>varmatchmode</b>, <i>IN: storing mode selector</i>
  285. char ** <b>varmatchnames</b>, <i>IN: array of variable names, by ids</i>
  286. int * <b>varmatchauxids</b>, <i>IN: array of variable auxids, by ids</i>
  287. int * <b>varcomposeids</b>, <i>IN: array of new ids, by ids</i>
  288. int <b>mode</b>, <i>IN: computation mode</i>
  289. char * <b>file</b>, <i>IN: file name</i>
  290. FILE * <b>fp</b>, <i>IN: file pointer</i>
  291. DdNode *** <b>rootsPtrPtr</b>, <i>OUT: array of BDD roots</i>
  292. int * <b>nRoots</b> <i>OUT: number of BDDs returned</i>
  293. )
  294. </pre>
  295. <dd> Reads a dump file representing the argument BDDs in CNF
  296. format.
  297. IFF mode == 0 Return the Clauses without Conjunction
  298. IFF mode == 1 Return the sets of BDDs without Quantification
  299. IFF mode == 2 Return the sets of BDDs AFTER Existential Quantification
  300. <p>
  301. <dd> <b>Side Effects</b> A vector of pointers to DD nodes is allocated and freed.
  302. <p>
  303. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddArrayLoad">Dddmp_cuddBddArrayLoad</a>
  304. </code>
  305. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpLoadCnf.c"TARGET="ABSTRACT"><CODE>dddmpLoadCnf.c</CODE></A>
  306. <dt><pre>
  307. <A NAME="DddmpCuddDdArrayLoad"></A>
  308. static int <I></I>
  309. <B>DddmpCuddDdArrayLoad</B>(
  310. Dddmp_DecompType <b>ddType</b>, <i>IN: Selects decomp type</i>
  311. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  312. Dddmp_RootMatchType <b>rootMatchMode</b>, <i>IN: storing mode selector</i>
  313. char ** <b>rootmatchnames</b>, <i>IN: sorted names for loaded roots</i>
  314. Dddmp_VarMatchType <b>varMatchMode</b>, <i>IN: storing mode selector</i>
  315. char ** <b>varmatchnames</b>, <i>IN: array of variable names, by ids</i>
  316. int * <b>varmatchauxids</b>, <i>IN: array of variable auxids, by ids</i>
  317. int * <b>varcomposeids</b>, <i>IN: array of new ids, by ids</i>
  318. int <b>mode</b>, <i>IN: requested input file format</i>
  319. char * <b>file</b>, <i>IN: file name</i>
  320. FILE * <b>fp</b>, <i>IN: file pointer</i>
  321. DdNode *** <b>pproots</b> <i>OUT: array BDD roots (by reference)</i>
  322. )
  323. </pre>
  324. <dd> Reads a dump file representing the argument BDDs. The header is
  325. common to both text and binary mode. The node list is either
  326. in text or binary format. A dynamic vector of DD pointers
  327. is allocated to support conversion from DD indexes to pointers.
  328. Several criteria are supported for variable match between file
  329. and dd manager. Several changes/permutations/compositions are allowed
  330. for variables while loading DDs. Variable of the dd manager are allowed
  331. to match with variables on file on ids, permids, varnames,
  332. varauxids; also direct composition between ids and
  333. composeids is supported. More in detail:
  334. <ol>
  335. <li> varMatchMode=DDDMP_VAR_MATCHIDS <p>
  336. allows the loading of a DD keeping variable IDs unchanged
  337. (regardless of the variable ordering of the reading manager); this
  338. is useful, for example, when swapping DDs to file and restoring them
  339. later from file, after possible variable reordering activations.
  340. <li> varMatchMode=DDDMP_VAR_MATCHPERMIDS <p>
  341. is used to allow variable match according to the position in the ordering.
  342. <li> varMatchMode=DDDMP_VAR_MATCHNAMES <p>
  343. requires a non NULL varmatchnames parameter; this is a vector of
  344. strings in one-to-one correspondence with variable IDs of the
  345. reading manager. Variables in the DD file read are matched with
  346. manager variables according to their name (a non NULL varnames
  347. parameter was required while storing the DD file).
  348. <li> varMatchMode=DDDMP_VAR_MATCHIDS <p>
  349. has a meaning similar to DDDMP_VAR_MATCHNAMES, but integer auxiliary
  350. IDs are used instead of strings; the additional non NULL
  351. varmatchauxids parameter is needed.
  352. <li> varMatchMode=DDDMP_VAR_COMPOSEIDS <p>
  353. uses the additional varcomposeids parameter is used as array of
  354. variable ids to be composed with ids stored in file.
  355. </ol>
  356. In the present implementation, the array varnames (3), varauxids (4)
  357. and composeids (5) need to have one entry for each variable in the
  358. DD manager (NULL pointers are allowed for unused variables
  359. in varnames). Hence variables need to be already present in the
  360. manager. All arrays are sorted according to IDs.
  361. <p>
  362. <dd> <b>Side Effects</b> A vector of pointers to DD nodes is allocated and freed.
  363. <p>
  364. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddArrayStore">Dddmp_cuddBddArrayStore</a>
  365. </code>
  366. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpLoad.c"TARGET="ABSTRACT"><CODE>dddmpLoad.c</CODE></A>
  367. <dt><pre>
  368. <A NAME="DddmpCuddDdArrayStoreBdd"></A>
  369. int <I></I>
  370. <B>DddmpCuddDdArrayStoreBdd</B>(
  371. Dddmp_DecompType <b>ddType</b>, <i>IN: Selects the decomp type: BDD or ADD</i>
  372. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  373. char * <b>ddname</b>, <i>IN: DD name (or NULL)</i>
  374. int <b>nRoots</b>, <i>IN: number of output BDD roots to be stored</i>
  375. DdNode ** <b>f</b>, <i>IN: array of DD roots to be stored</i>
  376. char ** <b>rootnames</b>, <i>IN: array of root names (or NULL)</i>
  377. char ** <b>varnames</b>, <i>IN: array of variable names (or NULL)</i>
  378. int * <b>auxids</b>, <i>IN: array of converted var IDs</i>
  379. int <b>mode</b>, <i>IN: storing mode selector</i>
  380. Dddmp_VarInfoType <b>varinfo</b>, <i>IN: extra info for variables in text mode</i>
  381. char * <b>fname</b>, <i>IN: File name</i>
  382. FILE * <b>fp</b> <i>IN: File pointer to the store file</i>
  383. )
  384. </pre>
  385. <dd> Dumps the argument array of BDDs/ADDs to file. Internal
  386. function doing inner steps of store for BDDs and ADDs.
  387. ADD store is presently supported only with the text format.
  388. <p>
  389. <dd> <b>Side Effects</b> Nodes are temporarily removed from the unique hash
  390. table. They are re-linked after the store operation in a
  391. modified order.
  392. <p>
  393. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddStore">Dddmp_cuddBddStore</a>
  394. <a href="#Dddmp_cuddBddLoad">Dddmp_cuddBddLoad</a>
  395. <a href="#Dddmp_cuddBddArrayLoad">Dddmp_cuddBddArrayLoad</a>
  396. </code>
  397. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreAdd.c"TARGET="ABSTRACT"><CODE>dddmpStoreAdd.c</CODE></A>
  398. <dt><pre>
  399. <A NAME="DddmpCuddDdArrayStoreBlifBody"></A>
  400. static int <I></I>
  401. <B>DddmpCuddDdArrayStoreBlifBody</B>(
  402. DdManager * <b>ddMgr</b>, <i>IN: Manager</i>
  403. int <b>n</b>, <i>IN: Number of output nodes to be dumped</i>
  404. DdNode ** <b>f</b>, <i>IN: Array of output nodes to be dumped</i>
  405. char ** <b>inputNames</b>, <i>IN: Array of input names (or NULL)</i>
  406. char ** <b>outputNames</b>, <i>IN: Array of output names (or NULL)</i>
  407. FILE * <b>fp</b> <i>IN: Pointer to the dump file</i>
  408. )
  409. </pre>
  410. <dd> Writes a blif body representing the argument BDDs as a
  411. network of multiplexers. One multiplexer is written for each BDD
  412. node. It returns 1 in case of success; 0 otherwise (e.g.,
  413. out-of-memory, file system full, or an ADD with constants different
  414. from 0 and 1).
  415. DddmpCuddDdArrayStoreBlif does not close the file: This is the
  416. caller responsibility.
  417. DddmpCuddDdArrayStoreBlif uses a minimal unique subset of
  418. the hexadecimal address of a node as name for it. If the argument
  419. inputNames is non-null, it is assumed to hold the pointers to the names
  420. of the inputs. Similarly for outputNames. This function prints out only
  421. .names part.
  422. <p>
  423. <dd> <b>Side Effects</b> None
  424. <p>
  425. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreMisc.c"TARGET="ABSTRACT"><CODE>dddmpStoreMisc.c</CODE></A>
  426. <dt><pre>
  427. <A NAME="DddmpCuddDdArrayStoreBlifStep"></A>
  428. static int <I></I>
  429. <B>DddmpCuddDdArrayStoreBlifStep</B>(
  430. DdManager * <b>ddMgr</b>, <i></i>
  431. DdNode * <b>f</b>, <i></i>
  432. FILE * <b>fp</b>, <i></i>
  433. st_table * <b>visited</b>, <i></i>
  434. char ** <b>names</b> <i></i>
  435. )
  436. </pre>
  437. <dd> Performs the recursive step of DddmpCuddDdArrayStoreBlif.
  438. Traverses the BDD f and writes a multiplexer-network description to
  439. the file pointed by fp in blif format.
  440. f is assumed to be a regular pointer and DddmpCuddDdArrayStoreBlifStep
  441. guarantees this assumption in the recursive calls.
  442. <p>
  443. <dd> <b>Side Effects</b> None
  444. <p>
  445. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreMisc.c"TARGET="ABSTRACT"><CODE>dddmpStoreMisc.c</CODE></A>
  446. <dt><pre>
  447. <A NAME="DddmpCuddDdArrayStoreBlif"></A>
  448. static int <I></I>
  449. <B>DddmpCuddDdArrayStoreBlif</B>(
  450. DdManager * <b>ddMgr</b>, <i>IN: Manager</i>
  451. int <b>n</b>, <i>IN: Number of output nodes to be dumped</i>
  452. DdNode ** <b>f</b>, <i>IN: Array of output nodes to be dumped</i>
  453. char ** <b>inputNames</b>, <i>IN: Array of input names (or NULL)</i>
  454. char ** <b>outputNames</b>, <i>IN: Array of output names (or NULL)</i>
  455. char * <b>modelName</b>, <i>IN: Model name (or NULL)</i>
  456. FILE * <b>fp</b> <i>IN: Pointer to the dump file</i>
  457. )
  458. </pre>
  459. <dd> Writes a blif file representing the argument BDDs as a
  460. network of multiplexers. One multiplexer is written for each BDD
  461. node. It returns 1 in case of success; 0 otherwise (e.g.,
  462. out-of-memory, file system full, or an ADD with constants different
  463. from 0 and 1).
  464. DddmpCuddDdArrayStoreBlif does not close the file: This is the
  465. caller responsibility.
  466. DddmpCuddDdArrayStoreBlif uses a minimal unique subset of
  467. the hexadecimal address of a node as name for it. If the argument
  468. inames is non-null, it is assumed to hold the pointers to the names
  469. of the inputs. Similarly for outputNames.
  470. It prefixes the string "NODE" to each nome to have "regular" names
  471. for each elements.
  472. <p>
  473. <dd> <b>Side Effects</b> None
  474. <p>
  475. <dd> <b>See Also</b> <code><a href="#DddmpCuddDdArrayStoreBlifBody">DddmpCuddDdArrayStoreBlifBody</a>
  476. <a href="#Cudd_DumpBlif">Cudd_DumpBlif</a>
  477. </code>
  478. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreMisc.c"TARGET="ABSTRACT"><CODE>dddmpStoreMisc.c</CODE></A>
  479. <dt><pre>
  480. <A NAME="DddmpCuddDdArrayStorePrefixBody"></A>
  481. static int <I></I>
  482. <B>DddmpCuddDdArrayStorePrefixBody</B>(
  483. DdManager * <b>ddMgr</b>, <i>IN: Manager</i>
  484. int <b>n</b>, <i>IN: Number of output nodes to be dumped</i>
  485. DdNode ** <b>f</b>, <i>IN: Array of output nodes to be dumped</i>
  486. char ** <b>inputNames</b>, <i>IN: Array of input names (or NULL)</i>
  487. char ** <b>outputNames</b>, <i>IN: Array of output names (or NULL)</i>
  488. FILE * <b>fp</b> <i>IN: Pointer to the dump file</i>
  489. )
  490. </pre>
  491. <dd> One multiplexer is written for each BDD node.
  492. It returns 1 in case of success; 0 otherwise (e.g., out-of-memory, file
  493. system full, or an ADD with constants different from 0 and 1).
  494. It does not close the file: This is the caller responsibility.
  495. It uses a minimal unique subset of the hexadecimal address of a node as
  496. name for it.
  497. If the argument inputNames is non-null, it is assumed to hold the
  498. pointers to the names of the inputs. Similarly for outputNames.
  499. For each BDD node of function f, variable v, then child T, and else
  500. child E it stores:
  501. f = v * T + v' * E
  502. that is
  503. (OR f (AND v T) (AND (NOT v) E))
  504. If E is a complemented child this results in the following
  505. (OR f (AND v T) (AND (NOT v) (NOT E)))
  506. <p>
  507. <dd> <b>Side Effects</b> None
  508. <p>
  509. <dd> <b>See Also</b> <code><a href="#DddmpCuddDdArrayStoreBlif">DddmpCuddDdArrayStoreBlif</a>
  510. </code>
  511. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreMisc.c"TARGET="ABSTRACT"><CODE>dddmpStoreMisc.c</CODE></A>
  512. <dt><pre>
  513. <A NAME="DddmpCuddDdArrayStorePrefixStep"></A>
  514. static int <I></I>
  515. <B>DddmpCuddDdArrayStorePrefixStep</B>(
  516. DdManager * <b>ddMgr</b>, <i></i>
  517. DdNode * <b>f</b>, <i></i>
  518. FILE * <b>fp</b>, <i></i>
  519. st_table * <b>visited</b>, <i></i>
  520. char ** <b>names</b> <i></i>
  521. )
  522. </pre>
  523. <dd> Performs the recursive step of
  524. DddmpCuddDdArrayStorePrefixBody.
  525. Traverses the BDD f and writes a multiplexer-network description to the
  526. file pointed by fp.
  527. For each BDD node of function f, variable v, then child T, and else
  528. child E it stores:
  529. f = v * T + v' * E
  530. that is
  531. (OR f (AND v T) (AND (NOT v) E))
  532. If E is a complemented child this results in the following
  533. (OR f (AND v T) (AND (NOT v) (NOT E)))
  534. f is assumed to be a regular pointer and the function guarantees this
  535. assumption in the recursive calls.
  536. <p>
  537. <dd> <b>Side Effects</b> None
  538. <p>
  539. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreMisc.c"TARGET="ABSTRACT"><CODE>dddmpStoreMisc.c</CODE></A>
  540. <dt><pre>
  541. <A NAME="DddmpCuddDdArrayStorePrefix"></A>
  542. static int <I></I>
  543. <B>DddmpCuddDdArrayStorePrefix</B>(
  544. DdManager * <b>ddMgr</b>, <i>IN: Manager</i>
  545. int <b>n</b>, <i>IN: Number of output nodes to be dumped</i>
  546. DdNode ** <b>f</b>, <i>IN: Array of output nodes to be dumped</i>
  547. char ** <b>inputNames</b>, <i>IN: Array of input names (or NULL)</i>
  548. char ** <b>outputNames</b>, <i>IN: Array of output names (or NULL)</i>
  549. char * <b>modelName</b>, <i>IN: Model name (or NULL)</i>
  550. FILE * <b>fp</b> <i>IN: Pointer to the dump file</i>
  551. )
  552. </pre>
  553. <dd> One multiplexer is written for each BDD node.
  554. It returns 1 in case of success; 0 otherwise (e.g., out-of-memory, file
  555. system full, or an ADD with constants different from 0 and 1).
  556. It does not close the file: This is the caller responsibility.
  557. It uses a minimal unique subset of the hexadecimal address of a node as
  558. name for it.
  559. If the argument inputNames is non-null, it is assumed to hold the
  560. pointers to the names of the inputs. Similarly for outputNames.
  561. For each BDD node of function f, variable v, then child T, and else
  562. child E it stores:
  563. f = v * T + v' * E
  564. that is
  565. (OR f (AND v T) (AND (NOT v) E))
  566. If E is a complemented child this results in the following
  567. (OR f (AND v T) (AND (NOT v) (NOT E)))
  568. Comments (COMMENT) are added at the beginning of the description to
  569. describe inputs and outputs of the design.
  570. A buffer (BUF) is add on the output to cope with complemented functions.
  571. <p>
  572. <dd> <b>Side Effects</b> None
  573. <p>
  574. <dd> <b>See Also</b> <code><a href="#DddmpCuddDdArrayStoreBlif">DddmpCuddDdArrayStoreBlif</a>
  575. </code>
  576. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreMisc.c"TARGET="ABSTRACT"><CODE>dddmpStoreMisc.c</CODE></A>
  577. <dt><pre>
  578. <A NAME="DddmpCuddDdArrayStoreSmvBody"></A>
  579. static int <I></I>
  580. <B>DddmpCuddDdArrayStoreSmvBody</B>(
  581. DdManager * <b>ddMgr</b>, <i>IN: Manager</i>
  582. int <b>n</b>, <i>IN: Number of output nodes to be dumped</i>
  583. DdNode ** <b>f</b>, <i>IN: Array of output nodes to be dumped</i>
  584. char ** <b>inputNames</b>, <i>IN: Array of input names (or NULL)</i>
  585. char ** <b>outputNames</b>, <i>IN: Array of output names (or NULL)</i>
  586. FILE * <b>fp</b> <i>IN: Pointer to the dump file</i>
  587. )
  588. </pre>
  589. <dd> One multiplexer is written for each BDD node.
  590. It returns 1 in case of success; 0 otherwise (e.g., out-of-memory, file
  591. system full, or an ADD with constants different from 0 and 1).
  592. It does not close the file: This is the caller responsibility.
  593. It uses a minimal unique subset of the hexadecimal address of a node as
  594. name for it.
  595. If the argument inputNames is non-null, it is assumed to hold the
  596. pointers to the names of the inputs. Similarly for outputNames.
  597. For each BDD node of function f, variable v, then child T, and else
  598. child E it stores:
  599. f = v * T + v' * E
  600. that is
  601. (OR f (AND v T) (AND (NOT v) E))
  602. If E is a complemented child this results in the following
  603. (OR f (AND v T) (AND (NOT v) (NOT E)))
  604. <p>
  605. <dd> <b>Side Effects</b> None
  606. <p>
  607. <dd> <b>See Also</b> <code><a href="#DddmpCuddDdArrayStoreBlif">DddmpCuddDdArrayStoreBlif</a>
  608. </code>
  609. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreMisc.c"TARGET="ABSTRACT"><CODE>dddmpStoreMisc.c</CODE></A>
  610. <dt><pre>
  611. <A NAME="DddmpCuddDdArrayStoreSmvStep"></A>
  612. static int <I></I>
  613. <B>DddmpCuddDdArrayStoreSmvStep</B>(
  614. DdManager * <b>ddMgr</b>, <i></i>
  615. DdNode * <b>f</b>, <i></i>
  616. FILE * <b>fp</b>, <i></i>
  617. st_table * <b>visited</b>, <i></i>
  618. char ** <b>names</b> <i></i>
  619. )
  620. </pre>
  621. <dd> Performs the recursive step of
  622. DddmpCuddDdArrayStoreSmvBody.
  623. Traverses the BDD f and writes a multiplexer-network description to the
  624. file pointed by fp.
  625. For each BDD node of function f, variable v, then child T, and else
  626. child E it stores:
  627. f = v * T + v' * E
  628. that is
  629. (OR f (AND v T) (AND (NOT v) E))
  630. If E is a complemented child this results in the following
  631. (OR f (AND v T) (AND (NOT v) (NOT E)))
  632. f is assumed to be a regular pointer and the function guarantees this
  633. assumption in the recursive calls.
  634. <p>
  635. <dd> <b>Side Effects</b> None
  636. <p>
  637. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreMisc.c"TARGET="ABSTRACT"><CODE>dddmpStoreMisc.c</CODE></A>
  638. <dt><pre>
  639. <A NAME="DddmpCuddDdArrayStoreSmv"></A>
  640. static int <I></I>
  641. <B>DddmpCuddDdArrayStoreSmv</B>(
  642. DdManager * <b>ddMgr</b>, <i>IN: Manager</i>
  643. int <b>n</b>, <i>IN: Number of output nodes to be dumped</i>
  644. DdNode ** <b>f</b>, <i>IN: Array of output nodes to be dumped</i>
  645. char ** <b>inputNames</b>, <i>IN: Array of input names (or NULL)</i>
  646. char ** <b>outputNames</b>, <i>IN: Array of output names (or NULL)</i>
  647. char * <b>modelName</b>, <i>IN: Model name (or NULL)</i>
  648. FILE * <b>fp</b> <i>IN: Pointer to the dump file</i>
  649. )
  650. </pre>
  651. <dd> One multiplexer is written for each BDD node.
  652. It returns 1 in case of success; 0 otherwise (e.g., out-of-memory, file
  653. system full, or an ADD with constants different from 0 and 1).
  654. It does not close the file: This is the caller responsibility.
  655. It uses a minimal unique subset of the hexadecimal address of a node as
  656. name for it.
  657. If the argument inputNames is non-null, it is assumed to hold the
  658. pointers to the names of the inputs. Similarly for outputNames.
  659. For each BDD node of function f, variable v, then child T, and else
  660. child E it stores:
  661. f = v * T + v' * E
  662. that is
  663. (OR f (AND v T) (AND (NOT v) E))
  664. If E is a complemented child this results in the following
  665. (OR f (AND v T) (AND (NOT v) (NOT E)))
  666. Comments (COMMENT) are added at the beginning of the description to
  667. describe inputs and outputs of the design.
  668. A buffer (BUF) is add on the output to cope with complemented functions.
  669. <p>
  670. <dd> <b>Side Effects</b> None
  671. <p>
  672. <dd> <b>See Also</b> <code><a href="#DddmpCuddDdArrayStoreBlif">DddmpCuddDdArrayStoreBlif</a>
  673. </code>
  674. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreMisc.c"TARGET="ABSTRACT"><CODE>dddmpStoreMisc.c</CODE></A>
  675. <dt><pre>
  676. <A NAME="DddmpDdNodesCheckIncomingAndScanPath"></A>
  677. static void <I></I>
  678. <B>DddmpDdNodesCheckIncomingAndScanPath</B>(
  679. DdNode * <b>f</b>, <i>IN: BDD node to be numbered</i>
  680. int <b>pathLengthCurrent</b>, <i>IN: Current Path Length</i>
  681. int <b>edgeInTh</b>, <i>IN: Max # In-Edges, after a Insert Cut Point</i>
  682. int <b>pathLengthTh</b> <i>IN: Max Path Length (after, Insert a Cut Point)</i>
  683. )
  684. </pre>
  685. <dd> Number nodes recursively in post-order.
  686. The "visited" flag is used with the right polarity.
  687. The node is assigned to a new CNF variable only if it is a "shared"
  688. node (i.e. the number of its incoming edges is greater than 1).
  689. <p>
  690. <dd> <b>Side Effects</b> "visited" flags are set.
  691. <p>
  692. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  693. <dt><pre>
  694. <A NAME="DddmpDdNodesCheckIncomingAndScanPath"></A>
  695. static void <I></I>
  696. <B>DddmpDdNodesCheckIncomingAndScanPath</B>(
  697. DdNode * <b>f</b>, <i>IN: BDD node to be numbered</i>
  698. int <b>pathLengthCurrent</b>, <i>IN: Current Path Length</i>
  699. int <b>edgeInTh</b>, <i>IN: Max # In-Edges, after a Insert Cut Point</i>
  700. int <b>pathLengthTh</b> <i>IN: Max Path Length (after, Insert a Cut Point)</i>
  701. )
  702. </pre>
  703. <dd> Number nodes recursively in post-order.
  704. The "visited" flag is used with the right polarity.
  705. The node is assigned to a new CNF variable only if it is a "shared"
  706. node (i.e. the number of its incoming edges is greater than 1).
  707. <p>
  708. <dd> <b>Side Effects</b> "visited" flags are set.
  709. <p>
  710. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  711. <dt><pre>
  712. <A NAME="DddmpDdNodesCountEdgesAndNumber"></A>
  713. int <I></I>
  714. <B>DddmpDdNodesCountEdgesAndNumber</B>(
  715. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  716. DdNode ** <b>f</b>, <i>IN: Array of BDDs</i>
  717. int <b>rootN</b>, <i>IN: Number of BDD roots in the array of BDDs</i>
  718. int <b>edgeInTh</b>, <i>IN: Max # In-Edges, after a Insert Cut Point</i>
  719. int <b>pathLengthTh</b>, <i>IN: Max Path Length (after, Insert a Cut Point)</i>
  720. int * <b>cnfIds</b>, <i>OUT: CNF identifiers for variables</i>
  721. int <b>id</b> <i>OUT: Number of Temporary Variables Introduced</i>
  722. )
  723. </pre>
  724. <dd> Removes nodes from unique table and numbers each node according
  725. to the number of its incoming BDD edges.
  726. <p>
  727. <dd> <b>Side Effects</b> Nodes are temporarily removed from unique table
  728. <p>
  729. <dd> <b>See Also</b> <code><a href="#RemoveFromUniqueRecurCnf()">RemoveFromUniqueRecurCnf()</a>
  730. </code>
  731. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  732. <dt><pre>
  733. <A NAME="DddmpDdNodesCountEdgesAndNumber"></A>
  734. int <I></I>
  735. <B>DddmpDdNodesCountEdgesAndNumber</B>(
  736. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  737. DdNode ** <b>f</b>, <i>IN: Array of BDDs</i>
  738. int <b>rootN</b>, <i>IN: Number of BDD roots in the array of BDDs</i>
  739. int <b>edgeInTh</b>, <i>IN: Max # In-Edges, after a Insert Cut Point</i>
  740. int <b>pathLengthTh</b>, <i>IN: Max Path Length (after, Insert a Cut Point)</i>
  741. int * <b>cnfIds</b>, <i>OUT: CNF identifiers for variables</i>
  742. int <b>id</b> <i>OUT: Number of Temporary Variables Introduced</i>
  743. )
  744. </pre>
  745. <dd> Removes nodes from unique table and numbers each node according
  746. to the number of its incoming BDD edges.
  747. <p>
  748. <dd> <b>Side Effects</b> Nodes are temporarily removed from unique table
  749. <p>
  750. <dd> <b>See Also</b> <code><a href="#RemoveFromUniqueRecurCnf()">RemoveFromUniqueRecurCnf()</a>
  751. </code>
  752. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  753. <dt><pre>
  754. <A NAME="DddmpDdNodesCountEdgesRecur"></A>
  755. static int <I></I>
  756. <B>DddmpDdNodesCountEdgesRecur</B>(
  757. DdNode * <b>f</b> <i>IN: root of the BDD</i>
  758. )
  759. </pre>
  760. <dd> Counts (recursively) the number of incoming edges for each
  761. node of a BDD. This number is stored in the index field.
  762. <p>
  763. <dd> <b>Side Effects</b> "visited" flags remain untouched.
  764. <p>
  765. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  766. <dt><pre>
  767. <A NAME="DddmpDdNodesCountEdgesRecur"></A>
  768. static int <I></I>
  769. <B>DddmpDdNodesCountEdgesRecur</B>(
  770. DdNode * <b>f</b> <i>IN: root of the BDD</i>
  771. )
  772. </pre>
  773. <dd> Counts (recursively) the number of incoming edges for each
  774. node of a BDD. This number is stored in the index field.
  775. <p>
  776. <dd> <b>Side Effects</b> "visited" flags remain untouched.
  777. <p>
  778. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  779. <dt><pre>
  780. <A NAME="DddmpDdNodesNumberEdgesRecur"></A>
  781. static int <I></I>
  782. <B>DddmpDdNodesNumberEdgesRecur</B>(
  783. DdNode * <b>f</b>, <i>IN: BDD node to be numbered</i>
  784. int * <b>cnfIds</b>, <i>IN: possible source for numbering</i>
  785. int <b>id</b> <i>IN/OUT: possible source for numbering</i>
  786. )
  787. </pre>
  788. <dd> Number nodes recursively in post-order.
  789. The "visited" flag is used with the inverse polarity.
  790. Numbering follows the subsequent strategy:
  791. * if the index = 0 it remains so
  792. * if the index >= 1 it gets enumerated.
  793. This implies that the node is assigned to a new CNF variable only if
  794. it is not a terminal node otherwise it is assigned the index of
  795. the BDD variable.
  796. <p>
  797. <dd> <b>Side Effects</b> "visited" flags are reset.
  798. <p>
  799. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  800. <dt><pre>
  801. <A NAME="DddmpDdNodesNumberEdgesRecur"></A>
  802. static int <I></I>
  803. <B>DddmpDdNodesNumberEdgesRecur</B>(
  804. DdNode * <b>f</b>, <i>IN: BDD node to be numbered</i>
  805. int * <b>cnfIds</b>, <i>IN: possible source for numbering</i>
  806. int <b>id</b> <i>IN/OUT: possible source for numbering</i>
  807. )
  808. </pre>
  809. <dd> Number nodes recursively in post-order.
  810. The "visited" flag is used with the inverse polarity.
  811. Numbering follows the subsequent strategy:
  812. * if the index = 0 it remains so
  813. * if the index >= 1 it gets enumerated.
  814. This implies that the node is assigned to a new CNF variable only if
  815. it is not a terminal node otherwise it is assigned the index of
  816. the BDD variable.
  817. <p>
  818. <dd> <b>Side Effects</b> "visited" flags are reset.
  819. <p>
  820. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  821. <dt><pre>
  822. <A NAME="DddmpDdNodesResetCountRecur"></A>
  823. static int <I></I>
  824. <B>DddmpDdNodesResetCountRecur</B>(
  825. DdNode * <b>f</b> <i>IN: root of the BDD whose counters are reset</i>
  826. )
  827. </pre>
  828. <dd> Resets counter and visited flag for ALL nodes of a BDD (it
  829. recurs on the node children). The index field of the node is
  830. used as counter.
  831. <p>
  832. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  833. <dt><pre>
  834. <A NAME="DddmpDdNodesResetCountRecur"></A>
  835. static int <I></I>
  836. <B>DddmpDdNodesResetCountRecur</B>(
  837. DdNode * <b>f</b> <i>IN: root of the BDD whose counters are reset</i>
  838. )
  839. </pre>
  840. <dd> Resets counter and visited flag for ALL nodes of a BDD (it
  841. recurs on the node children). The index field of the node is
  842. used as counter.
  843. <p>
  844. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  845. <dt><pre>
  846. <A NAME="DddmpFreeHeaderCnf"></A>
  847. static void <I></I>
  848. <B>DddmpFreeHeaderCnf</B>(
  849. Dddmp_Hdr_t * <b>Hdr</b> <i>IN: pointer to header</i>
  850. )
  851. </pre>
  852. <dd> Frees the internal header structure by freeing all internal
  853. fields first.
  854. <p>
  855. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpLoadCnf.c"TARGET="ABSTRACT"><CODE>dddmpLoadCnf.c</CODE></A>
  856. <dt><pre>
  857. <A NAME="DddmpFreeHeader"></A>
  858. static void <I></I>
  859. <B>DddmpFreeHeader</B>(
  860. Dddmp_Hdr_t * <b>Hdr</b> <i>IN: pointer to header</i>
  861. )
  862. </pre>
  863. <dd> Frees the internal header structureby freeing all internal
  864. fields first.
  865. <p>
  866. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpLoad.c"TARGET="ABSTRACT"><CODE>dddmpLoad.c</CODE></A>
  867. <dt><pre>
  868. <A NAME="DddmpIntArrayDup"></A>
  869. int * <I></I>
  870. <B>DddmpIntArrayDup</B>(
  871. int * <b>array</b>, <i>IN: array of ints to be duplicated</i>
  872. int <b>n</b> <i>IN: size of the array</i>
  873. )
  874. </pre>
  875. <dd> Allocates memory and copies source array
  876. <p>
  877. <dd> <b>Side Effects</b> None
  878. <p>
  879. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpUtil.c"TARGET="ABSTRACT"><CODE>dddmpUtil.c</CODE></A>
  880. <dt><pre>
  881. <A NAME="DddmpIntArrayRead"></A>
  882. int * <I></I>
  883. <B>DddmpIntArrayRead</B>(
  884. FILE * <b>fp</b>, <i>IN: input file</i>
  885. int <b>n</b> <i>IN: size of the array</i>
  886. )
  887. </pre>
  888. <dd> Allocates memory and inputs source array
  889. <p>
  890. <dd> <b>Side Effects</b> None
  891. <p>
  892. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpUtil.c"TARGET="ABSTRACT"><CODE>dddmpUtil.c</CODE></A>
  893. <dt><pre>
  894. <A NAME="DddmpIntArrayWrite"></A>
  895. int <I></I>
  896. <B>DddmpIntArrayWrite</B>(
  897. FILE * <b>fp</b>, <i>IN: output file</i>
  898. int * <b>array</b>, <i>IN: array of ints</i>
  899. int <b>n</b> <i>IN: size of the array</i>
  900. )
  901. </pre>
  902. <dd> Outputs an array of ints to a specified file
  903. <p>
  904. <dd> <b>Side Effects</b> None
  905. <p>
  906. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpUtil.c"TARGET="ABSTRACT"><CODE>dddmpUtil.c</CODE></A>
  907. <dt><pre>
  908. <A NAME="DddmpNumberAddNodes"></A>
  909. int <I></I>
  910. <B>DddmpNumberAddNodes</B>(
  911. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  912. DdNode ** <b>f</b>, <i>IN: array of BDDs</i>
  913. int <b>n</b> <i>IN: number of BDD roots in the array of BDDs</i>
  914. )
  915. </pre>
  916. <dd> Node numbering is required to convert pointers to integers.
  917. Since nodes are removed from unique table, no new nodes should
  918. be generated before re-inserting nodes in the unique table
  919. (DddmpUnnumberDdNodes()).
  920. <p>
  921. <dd> <b>Side Effects</b> Nodes are temporarily removed from unique table
  922. <p>
  923. <dd> <b>See Also</b> <code><a href="#RemoveFromUniqueRecurAdd">RemoveFromUniqueRecurAdd</a>
  924. ()
  925. <a href="#NumberNodeRecurAdd">NumberNodeRecurAdd</a>
  926. ()
  927. <a href="#DddmpUnnumberDdNodesAdd">DddmpUnnumberDdNodesAdd</a>
  928. ()
  929. </code>
  930. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeAdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeAdd.c</CODE></A>
  931. <dt><pre>
  932. <A NAME="DddmpNumberBddNodes"></A>
  933. int <I></I>
  934. <B>DddmpNumberBddNodes</B>(
  935. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  936. DdNode ** <b>f</b>, <i>IN: array of BDDs</i>
  937. int <b>n</b> <i>IN: number of BDD roots in the array of BDDs</i>
  938. )
  939. </pre>
  940. <dd> Node numbering is required to convert pointers to integers.
  941. Since nodes are removed from unique table, no new nodes should
  942. be generated before re-inserting nodes in the unique table
  943. (DddmpUnnumberBddNodes ()).
  944. <p>
  945. <dd> <b>Side Effects</b> Nodes are temporarily removed from unique table
  946. <p>
  947. <dd> <b>See Also</b> <code><a href="#RemoveFromUniqueRecur()">RemoveFromUniqueRecur()</a>
  948. <a href="#NumberNodeRecur()">NumberNodeRecur()</a>
  949. <a href="#DddmpUnnumberBddNodes">DddmpUnnumberBddNodes</a>
  950. ()
  951. </code>
  952. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeBdd.c</CODE></A>
  953. <dt><pre>
  954. <A NAME="DddmpNumberDdNodesCnf"></A>
  955. int <I></I>
  956. <B>DddmpNumberDdNodesCnf</B>(
  957. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  958. DdNode ** <b>f</b>, <i>IN: array of BDDs</i>
  959. int <b>rootN</b>, <i>IN: number of BDD roots in the array of BDDs</i>
  960. int * <b>cnfIds</b>, <i>OUT: CNF identifiers for variables</i>
  961. int <b>id</b> <i>OUT: number of Temporary Variables Introduced</i>
  962. )
  963. </pre>
  964. <dd> Node numbering is required to convert pointers to integers.
  965. Since nodes are removed from unique table, no new nodes should
  966. be generated before re-inserting nodes in the unique table
  967. (DddmpUnnumberDdNodesCnf()).
  968. <p>
  969. <dd> <b>Side Effects</b> Nodes are temporarily removed from unique table
  970. <p>
  971. <dd> <b>See Also</b> <code><a href="#RemoveFromUniqueRecurCnf()">RemoveFromUniqueRecurCnf()</a>
  972. <a href="#NumberNodeRecurCnf()">NumberNodeRecurCnf()</a>
  973. <a href="#DddmpUnnumberDdNodesCnf()">DddmpUnnumberDdNodesCnf()</a>
  974. </code>
  975. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  976. <dt><pre>
  977. <A NAME="DddmpNumberDdNodesCnf"></A>
  978. int <I></I>
  979. <B>DddmpNumberDdNodesCnf</B>(
  980. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  981. DdNode ** <b>f</b>, <i>IN: array of BDDs</i>
  982. int <b>rootN</b>, <i>IN: number of BDD roots in the array of BDDs</i>
  983. int * <b>cnfIds</b>, <i>OUT: CNF identifiers for variables</i>
  984. int <b>id</b> <i>OUT: number of Temporary Variables Introduced</i>
  985. )
  986. </pre>
  987. <dd> Node numbering is required to convert pointers to integers.
  988. Since nodes are removed from unique table, no new nodes should
  989. be generated before re-inserting nodes in the unique table
  990. (DddmpUnnumberDdNodesCnf()).
  991. <p>
  992. <dd> <b>Side Effects</b> Nodes are temporarily removed from unique table
  993. <p>
  994. <dd> <b>See Also</b> <code><a href="#RemoveFromUniqueRecurCnf()">RemoveFromUniqueRecurCnf()</a>
  995. <a href="#NumberNodeRecurCnf()">NumberNodeRecurCnf()</a>
  996. <a href="#DddmpUnnumberDdNodesCnf()">DddmpUnnumberDdNodesCnf()</a>
  997. </code>
  998. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  999. <dt><pre>
  1000. <A NAME="DddmpNumberDdNodes"></A>
  1001. int <I></I>
  1002. <B>DddmpNumberDdNodes</B>(
  1003. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  1004. DdNode ** <b>f</b>, <i>IN: array of BDDs</i>
  1005. int <b>n</b> <i>IN: number of BDD roots in the array of BDDs</i>
  1006. )
  1007. </pre>
  1008. <dd> Node numbering is required to convert pointers to integers.
  1009. Since nodes are removed from unique table, no new nodes should
  1010. be generated before re-inserting nodes in the unique table
  1011. (DddmpUnnumberDdNodes()).
  1012. <p>
  1013. <dd> <b>Side Effects</b> Nodes are temporarily removed from unique table
  1014. <p>
  1015. <dd> <b>See Also</b> <code><a href="#RemoveFromUniqueRecur()">RemoveFromUniqueRecur()</a>
  1016. <a href="#NumberNodeRecur()">NumberNodeRecur()</a>
  1017. <a href="#DddmpUnnumberDdNodes()">DddmpUnnumberDdNodes()</a>
  1018. </code>
  1019. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeBdd.c</CODE></A>
  1020. <dt><pre>
  1021. <A NAME="DddmpPrintBddAndNextRecur"></A>
  1022. static int <I></I>
  1023. <B>DddmpPrintBddAndNextRecur</B>(
  1024. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  1025. DdNode * <b>f</b> <i>IN: root of the BDD to be displayed</i>
  1026. )
  1027. </pre>
  1028. <dd> Prints debug info for a BDD on the screen. It recurs on
  1029. node's children.
  1030. <p>
  1031. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  1032. <dt><pre>
  1033. <A NAME="DddmpPrintBddAndNextRecur"></A>
  1034. static int <I></I>
  1035. <B>DddmpPrintBddAndNextRecur</B>(
  1036. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  1037. DdNode * <b>f</b> <i>IN: root of the BDD to be displayed</i>
  1038. )
  1039. </pre>
  1040. <dd> Prints debug info for a BDD on the screen. It recurs on
  1041. node's children.
  1042. <p>
  1043. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  1044. <dt><pre>
  1045. <A NAME="DddmpPrintBddAndNext"></A>
  1046. int <I></I>
  1047. <B>DddmpPrintBddAndNext</B>(
  1048. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  1049. DdNode ** <b>f</b>, <i>IN: Array of BDDs to be displayed</i>
  1050. int <b>rootN</b> <i>IN: Number of BDD roots in the array of BDDs</i>
  1051. )
  1052. </pre>
  1053. <dd> Prints debug information for an array of BDDs on the screen
  1054. <p>
  1055. <dd> <b>Side Effects</b> None
  1056. <p>
  1057. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  1058. <dt><pre>
  1059. <A NAME="DddmpPrintBddAndNext"></A>
  1060. int <I></I>
  1061. <B>DddmpPrintBddAndNext</B>(
  1062. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  1063. DdNode ** <b>f</b>, <i>IN: Array of BDDs to be displayed</i>
  1064. int <b>rootN</b> <i>IN: Number of BDD roots in the array of BDDs</i>
  1065. )
  1066. </pre>
  1067. <dd> Prints debug information for an array of BDDs on the screen
  1068. <p>
  1069. <dd> <b>Side Effects</b> None
  1070. <p>
  1071. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  1072. <dt><pre>
  1073. <A NAME="DddmpReadCnfClauses"></A>
  1074. static int <I></I>
  1075. <B>DddmpReadCnfClauses</B>(
  1076. Dddmp_Hdr_t * <b>Hdr</b>, <i>IN: file header</i>
  1077. int *** <b>cnfTable</b>, <i>OUT: CNF table for clauses</i>
  1078. FILE * <b>fp</b> <i>IN: source file</i>
  1079. )
  1080. </pre>
  1081. <dd> Read the CNF clauses from the file in the standard DIMACS
  1082. format. Store all the clauses in an internal structure for
  1083. future transformation into BDDs.
  1084. <p>
  1085. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpLoadCnf.c"TARGET="ABSTRACT"><CODE>dddmpLoadCnf.c</CODE></A>
  1086. <dt><pre>
  1087. <A NAME="DddmpReadCode"></A>
  1088. int <I></I>
  1089. <B>DddmpReadCode</B>(
  1090. FILE * <b>fp</b>, <i>IN: file where to read the code</i>
  1091. struct binary_dd_code * <b>pcode</b> <i>OUT: the read code</i>
  1092. )
  1093. </pre>
  1094. <dd> Reads a 1 byte node code. See DddmpWriteCode()
  1095. for code description.
  1096. <p>
  1097. <dd> <b>Side Effects</b> None
  1098. <p>
  1099. <dd> <b>See Also</b> <code><a href="#DddmpWriteCode()">DddmpWriteCode()</a>
  1100. </code>
  1101. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpBinary.c"TARGET="ABSTRACT"><CODE>dddmpBinary.c</CODE></A>
  1102. <dt><pre>
  1103. <A NAME="DddmpReadInt"></A>
  1104. int <I></I>
  1105. <B>DddmpReadInt</B>(
  1106. FILE * <b>fp</b>, <i>IN: file where to read the integer</i>
  1107. int * <b>pid</b> <i>OUT: the read integer</i>
  1108. )
  1109. </pre>
  1110. <dd> Reads an integer coded on a sequence of bytes. See
  1111. DddmpWriteInt() for format.
  1112. <p>
  1113. <dd> <b>Side Effects</b> None
  1114. <p>
  1115. <dd> <b>See Also</b> <code><a href="#DddmpWriteInt()">DddmpWriteInt()</a>
  1116. </code>
  1117. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpBinary.c"TARGET="ABSTRACT"><CODE>dddmpBinary.c</CODE></A>
  1118. <dt><pre>
  1119. <A NAME="DddmpReadNodeIndexAdd"></A>
  1120. int <I></I>
  1121. <B>DddmpReadNodeIndexAdd</B>(
  1122. DdNode * <b>f</b> <i>IN: BDD node</i>
  1123. )
  1124. </pre>
  1125. <dd> Reads the index of a node. LSB is skipped (used as visited
  1126. flag).
  1127. <p>
  1128. <dd> <b>Side Effects</b> None
  1129. <p>
  1130. <dd> <b>See Also</b> <code><a href="#DddmpWriteNodeIndexAdd">DddmpWriteNodeIndexAdd</a>
  1131. ()
  1132. <a href="#DddmpSetVisitedAdd">DddmpSetVisitedAdd</a>
  1133. ()
  1134. <a href="#DddmpVisitedAdd">DddmpVisitedAdd</a>
  1135. ()
  1136. </code>
  1137. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeAdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeAdd.c</CODE></A>
  1138. <dt><pre>
  1139. <A NAME="DddmpReadNodeIndexBdd"></A>
  1140. int <I></I>
  1141. <B>DddmpReadNodeIndexBdd</B>(
  1142. DdNode * <b>f</b> <i>IN: BDD node</i>
  1143. )
  1144. </pre>
  1145. <dd> Reads the index of a node. LSB is skipped (used as visited
  1146. flag).
  1147. <p>
  1148. <dd> <b>Side Effects</b> None
  1149. <p>
  1150. <dd> <b>See Also</b> <code><a href="#DddmpWriteNodeIndexBdd">DddmpWriteNodeIndexBdd</a>
  1151. ()
  1152. <a href="#DddmpSetVisitedBdd">DddmpSetVisitedBdd</a>
  1153. ()
  1154. <a href="#DddmpVisitedBdd">DddmpVisitedBdd</a>
  1155. ()
  1156. </code>
  1157. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeBdd.c</CODE></A>
  1158. <dt><pre>
  1159. <A NAME="DddmpReadNodeIndexCnf"></A>
  1160. int <I></I>
  1161. <B>DddmpReadNodeIndexCnf</B>(
  1162. DdNode * <b>f</b> <i>IN: BDD node</i>
  1163. )
  1164. </pre>
  1165. <dd> Reads the index of a node. LSB is skipped (used as visited
  1166. flag).
  1167. <p>
  1168. <dd> <b>Side Effects</b> None
  1169. <p>
  1170. <dd> <b>See Also</b> <code><a href="#DddmpWriteNodeIndexCnf()">DddmpWriteNodeIndexCnf()</a>
  1171. <a href="#DddmpSetVisitedCnf">DddmpSetVisitedCnf</a>
  1172. ()
  1173. <a href="#DddmpVisitedCnf">DddmpVisitedCnf</a>
  1174. ()
  1175. </code>
  1176. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  1177. <dt><pre>
  1178. <A NAME="DddmpReadNodeIndexCnf"></A>
  1179. static int <I></I>
  1180. <B>DddmpReadNodeIndexCnf</B>(
  1181. DdNode * <b>f</b> <i>IN: BDD node</i>
  1182. )
  1183. </pre>
  1184. <dd> Reads the index of a node. LSB is skipped (used as visited
  1185. flag).
  1186. <p>
  1187. <dd> <b>Side Effects</b> None
  1188. <p>
  1189. <dd> <b>See Also</b> <code><a href="#DddmpWriteNodeIndexCnf()">DddmpWriteNodeIndexCnf()</a>
  1190. <a href="#DddmpSetVisitedCnf">DddmpSetVisitedCnf</a>
  1191. ()
  1192. <a href="#DddmpVisitedCnf">DddmpVisitedCnf</a>
  1193. ()
  1194. </code>
  1195. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  1196. <dt><pre>
  1197. <A NAME="DddmpReadNodeIndex"></A>
  1198. int <I></I>
  1199. <B>DddmpReadNodeIndex</B>(
  1200. DdNode * <b>f</b> <i>IN: BDD node</i>
  1201. )
  1202. </pre>
  1203. <dd> Reads the index of a node. LSB is skipped (used as visited
  1204. flag).
  1205. <p>
  1206. <dd> <b>Side Effects</b> None
  1207. <p>
  1208. <dd> <b>See Also</b> <code><a href="#DddmpWriteNodeIndex()">DddmpWriteNodeIndex()</a>
  1209. <a href="#DddmpSetVisited">DddmpSetVisited</a>
  1210. ()
  1211. <a href="#DddmpVisited">DddmpVisited</a>
  1212. ()
  1213. </code>
  1214. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeBdd.c</CODE></A>
  1215. <dt><pre>
  1216. <A NAME="DddmpSetVisitedAdd"></A>
  1217. void <I></I>
  1218. <B>DddmpSetVisitedAdd</B>(
  1219. DdNode * <b>f</b> <i>IN: BDD node to be marked (as visited)</i>
  1220. )
  1221. </pre>
  1222. <dd> Marks a node as visited
  1223. <p>
  1224. <dd> <b>Side Effects</b> None
  1225. <p>
  1226. <dd> <b>See Also</b> <code><a href="#DddmpVisitedAdd">DddmpVisitedAdd</a>
  1227. ()
  1228. <a href="#DddmpClearVisitedAdd">DddmpClearVisitedAdd</a>
  1229. ()
  1230. </code>
  1231. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeAdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeAdd.c</CODE></A>
  1232. <dt><pre>
  1233. <A NAME="DddmpSetVisitedBdd"></A>
  1234. void <I></I>
  1235. <B>DddmpSetVisitedBdd</B>(
  1236. DdNode * <b>f</b> <i>IN: BDD node to be marked (as visited)</i>
  1237. )
  1238. </pre>
  1239. <dd> Marks a node as visited
  1240. <p>
  1241. <dd> <b>Side Effects</b> None
  1242. <p>
  1243. <dd> <b>See Also</b> <code><a href="#DddmpVisitedBdd">DddmpVisitedBdd</a>
  1244. ()
  1245. <a href="#DddmpClearVisitedBdd">DddmpClearVisitedBdd</a>
  1246. ()
  1247. </code>
  1248. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeBdd.c</CODE></A>
  1249. <dt><pre>
  1250. <A NAME="DddmpSetVisitedCnf"></A>
  1251. static void <I></I>
  1252. <B>DddmpSetVisitedCnf</B>(
  1253. DdNode * <b>f</b> <i>IN: BDD node to be marked (as visited)</i>
  1254. )
  1255. </pre>
  1256. <dd> Marks a node as visited
  1257. <p>
  1258. <dd> <b>Side Effects</b> None
  1259. <p>
  1260. <dd> <b>See Also</b> <code><a href="#DddmpVisitedCnf">DddmpVisitedCnf</a>
  1261. ()
  1262. <a href="#DddmpClearVisitedCnf">DddmpClearVisitedCnf</a>
  1263. ()
  1264. </code>
  1265. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  1266. <dt><pre>
  1267. <A NAME="DddmpSetVisitedCnf"></A>
  1268. void <I></I>
  1269. <B>DddmpSetVisitedCnf</B>(
  1270. DdNode * <b>f</b> <i>IN: BDD node to be marked (as visited)</i>
  1271. )
  1272. </pre>
  1273. <dd> Marks a node as visited
  1274. <p>
  1275. <dd> <b>Side Effects</b> None
  1276. <p>
  1277. <dd> <b>See Also</b> <code><a href="#DddmpVisitedCnf">DddmpVisitedCnf</a>
  1278. ()
  1279. <a href="#DddmpClearVisitedCnf">DddmpClearVisitedCnf</a>
  1280. ()
  1281. </code>
  1282. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  1283. <dt><pre>
  1284. <A NAME="DddmpSetVisited"></A>
  1285. void <I></I>
  1286. <B>DddmpSetVisited</B>(
  1287. DdNode * <b>f</b> <i>IN: BDD node to be marked (as visited)</i>
  1288. )
  1289. </pre>
  1290. <dd> Marks a node as visited
  1291. <p>
  1292. <dd> <b>Side Effects</b> None
  1293. <p>
  1294. <dd> <b>See Also</b> <code><a href="#DddmpVisited">DddmpVisited</a>
  1295. ()
  1296. <a href="#DddmpClearVisited">DddmpClearVisited</a>
  1297. ()
  1298. </code>
  1299. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeBdd.c</CODE></A>
  1300. <dt><pre>
  1301. <A NAME="DddmpStrArrayDup"></A>
  1302. char ** <I></I>
  1303. <B>DddmpStrArrayDup</B>(
  1304. char ** <b>array</b>, <i>IN: array of strings to be duplicated</i>
  1305. int <b>n</b> <i>IN: size of the array</i>
  1306. )
  1307. </pre>
  1308. <dd> Allocates memory and copies source array
  1309. <p>
  1310. <dd> <b>Side Effects</b> None
  1311. <p>
  1312. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpUtil.c"TARGET="ABSTRACT"><CODE>dddmpUtil.c</CODE></A>
  1313. <dt><pre>
  1314. <A NAME="DddmpStrArrayFree"></A>
  1315. void <I></I>
  1316. <B>DddmpStrArrayFree</B>(
  1317. char ** <b>array</b>, <i>IN: array of strings</i>
  1318. int <b>n</b> <i>IN: size of the array</i>
  1319. )
  1320. </pre>
  1321. <dd> Frees memory for strings and the array of pointers
  1322. <p>
  1323. <dd> <b>Side Effects</b> None
  1324. <p>
  1325. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpUtil.c"TARGET="ABSTRACT"><CODE>dddmpUtil.c</CODE></A>
  1326. <dt><pre>
  1327. <A NAME="DddmpStrArrayRead"></A>
  1328. char ** <I></I>
  1329. <B>DddmpStrArrayRead</B>(
  1330. FILE * <b>fp</b>, <i>IN: input file</i>
  1331. int <b>n</b> <i>IN: size of the array</i>
  1332. )
  1333. </pre>
  1334. <dd> Allocates memory and inputs source array
  1335. <p>
  1336. <dd> <b>Side Effects</b> None
  1337. <p>
  1338. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpUtil.c"TARGET="ABSTRACT"><CODE>dddmpUtil.c</CODE></A>
  1339. <dt><pre>
  1340. <A NAME="DddmpStrArrayWrite"></A>
  1341. int <I></I>
  1342. <B>DddmpStrArrayWrite</B>(
  1343. FILE * <b>fp</b>, <i>IN: output file</i>
  1344. char ** <b>array</b>, <i>IN: array of strings</i>
  1345. int <b>n</b> <i>IN: size of the array</i>
  1346. )
  1347. </pre>
  1348. <dd> Outputs an array of strings to a specified file
  1349. <p>
  1350. <dd> <b>Side Effects</b> None
  1351. <p>
  1352. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpUtil.c"TARGET="ABSTRACT"><CODE>dddmpUtil.c</CODE></A>
  1353. <dt><pre>
  1354. <A NAME="DddmpStrDup"></A>
  1355. char * <I></I>
  1356. <B>DddmpStrDup</B>(
  1357. char * <b>str</b> <i>IN: string to be duplicated</i>
  1358. )
  1359. </pre>
  1360. <dd> Allocates memory and copies source string
  1361. <p>
  1362. <dd> <b>Side Effects</b> None
  1363. <p>
  1364. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpUtil.c"TARGET="ABSTRACT"><CODE>dddmpUtil.c</CODE></A>
  1365. <dt><pre>
  1366. <A NAME="DddmpUnnumberAddNodes"></A>
  1367. void <I></I>
  1368. <B>DddmpUnnumberAddNodes</B>(
  1369. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  1370. DdNode ** <b>f</b>, <i>IN: array of BDDs</i>
  1371. int <b>n</b> <i>IN: number of BDD roots in the array of BDDs</i>
  1372. )
  1373. </pre>
  1374. <dd> Node indexes are no more needed. Nodes are re-linked in the
  1375. unique table.
  1376. <p>
  1377. <dd> <b>Side Effects</b> None
  1378. <p>
  1379. <dd> <b>See Also</b> <code><a href="#DddmpNumberDdNodeAdd">DddmpNumberDdNodeAdd</a>
  1380. ()
  1381. </code>
  1382. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeAdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeAdd.c</CODE></A>
  1383. <dt><pre>
  1384. <A NAME="DddmpUnnumberBddNodes"></A>
  1385. void <I></I>
  1386. <B>DddmpUnnumberBddNodes</B>(
  1387. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  1388. DdNode ** <b>f</b>, <i>IN: array of BDDs</i>
  1389. int <b>n</b> <i>IN: number of BDD roots in the array of BDDs</i>
  1390. )
  1391. </pre>
  1392. <dd> Node indexes are no more needed. Nodes are re-linked in the
  1393. unique table.
  1394. <p>
  1395. <dd> <b>Side Effects</b> None
  1396. <p>
  1397. <dd> <b>See Also</b> <code><a href="#DddmpNumberBddNode">DddmpNumberBddNode</a>
  1398. ()
  1399. </code>
  1400. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeBdd.c</CODE></A>
  1401. <dt><pre>
  1402. <A NAME="DddmpUnnumberDdNodesCnf"></A>
  1403. void <I></I>
  1404. <B>DddmpUnnumberDdNodesCnf</B>(
  1405. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  1406. DdNode ** <b>f</b>, <i>IN: array of BDDs</i>
  1407. int <b>rootN</b> <i>IN: number of BDD roots in the array of BDDs</i>
  1408. )
  1409. </pre>
  1410. <dd> Node indexes are no more needed. Nodes are re-linked in the
  1411. unique table.
  1412. <p>
  1413. <dd> <b>Side Effects</b> None
  1414. <p>
  1415. <dd> <b>See Also</b> <code><a href="#DddmpNumberDdNode()">DddmpNumberDdNode()</a>
  1416. </code>
  1417. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  1418. <dt><pre>
  1419. <A NAME="DddmpUnnumberDdNodesCnf"></A>
  1420. void <I></I>
  1421. <B>DddmpUnnumberDdNodesCnf</B>(
  1422. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  1423. DdNode ** <b>f</b>, <i>IN: array of BDDs</i>
  1424. int <b>rootN</b> <i>IN: number of BDD roots in the array of BDDs</i>
  1425. )
  1426. </pre>
  1427. <dd> Node indexes are no more needed. Nodes are re-linked in the
  1428. unique table.
  1429. <p>
  1430. <dd> <b>Side Effects</b> None
  1431. <p>
  1432. <dd> <b>See Also</b> <code><a href="#DddmpNumberDdNode()">DddmpNumberDdNode()</a>
  1433. </code>
  1434. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  1435. <dt><pre>
  1436. <A NAME="DddmpUnnumberDdNodes"></A>
  1437. void <I></I>
  1438. <B>DddmpUnnumberDdNodes</B>(
  1439. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  1440. DdNode ** <b>f</b>, <i>IN: array of BDDs</i>
  1441. int <b>n</b> <i>IN: number of BDD roots in the array of BDDs</i>
  1442. )
  1443. </pre>
  1444. <dd> Node indexes are no more needed. Nodes are re-linked in the
  1445. unique table.
  1446. <p>
  1447. <dd> <b>Side Effects</b> None
  1448. <p>
  1449. <dd> <b>See Also</b> <code><a href="#DddmpNumberDdNode()">DddmpNumberDdNode()</a>
  1450. </code>
  1451. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeBdd.c</CODE></A>
  1452. <dt><pre>
  1453. <A NAME="DddmpVisitedAdd"></A>
  1454. int <I></I>
  1455. <B>DddmpVisitedAdd</B>(
  1456. DdNode * <b>f</b> <i>IN: BDD node to be tested</i>
  1457. )
  1458. </pre>
  1459. <dd> Returns true if node is visited
  1460. <p>
  1461. <dd> <b>Side Effects</b> None
  1462. <p>
  1463. <dd> <b>See Also</b> <code><a href="#DddmpSetVisitedAdd">DddmpSetVisitedAdd</a>
  1464. ()
  1465. <a href="#DddmpClearVisitedAdd">DddmpClearVisitedAdd</a>
  1466. ()
  1467. </code>
  1468. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeAdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeAdd.c</CODE></A>
  1469. <dt><pre>
  1470. <A NAME="DddmpVisitedBdd"></A>
  1471. int <I></I>
  1472. <B>DddmpVisitedBdd</B>(
  1473. DdNode * <b>f</b> <i>IN: BDD node to be tested</i>
  1474. )
  1475. </pre>
  1476. <dd> Returns true if node is visited
  1477. <p>
  1478. <dd> <b>Side Effects</b> None
  1479. <p>
  1480. <dd> <b>See Also</b> <code><a href="#DddmpSetVisitedBdd">DddmpSetVisitedBdd</a>
  1481. ()
  1482. <a href="#DddmpClearVisitedBdd">DddmpClearVisitedBdd</a>
  1483. ()
  1484. </code>
  1485. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeBdd.c</CODE></A>
  1486. <dt><pre>
  1487. <A NAME="DddmpVisitedCnf"></A>
  1488. int <I></I>
  1489. <B>DddmpVisitedCnf</B>(
  1490. DdNode * <b>f</b> <i>IN: BDD node to be tested</i>
  1491. )
  1492. </pre>
  1493. <dd> Returns true if node is visited
  1494. <p>
  1495. <dd> <b>Side Effects</b> None
  1496. <p>
  1497. <dd> <b>See Also</b> <code><a href="#DddmpSetVisitedCnf">DddmpSetVisitedCnf</a>
  1498. ()
  1499. <a href="#DddmpClearVisitedCnf">DddmpClearVisitedCnf</a>
  1500. ()
  1501. </code>
  1502. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  1503. <dt><pre>
  1504. <A NAME="DddmpVisitedCnf"></A>
  1505. static int <I></I>
  1506. <B>DddmpVisitedCnf</B>(
  1507. DdNode * <b>f</b> <i>IN: BDD node to be tested</i>
  1508. )
  1509. </pre>
  1510. <dd> Returns true if node is visited
  1511. <p>
  1512. <dd> <b>Side Effects</b> None
  1513. <p>
  1514. <dd> <b>See Also</b> <code><a href="#DddmpSetVisitedCnf">DddmpSetVisitedCnf</a>
  1515. ()
  1516. <a href="#DddmpClearVisitedCnf">DddmpClearVisitedCnf</a>
  1517. ()
  1518. </code>
  1519. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  1520. <dt><pre>
  1521. <A NAME="DddmpVisited"></A>
  1522. int <I></I>
  1523. <B>DddmpVisited</B>(
  1524. DdNode * <b>f</b> <i>IN: BDD node to be tested</i>
  1525. )
  1526. </pre>
  1527. <dd> Returns true if node is visited
  1528. <p>
  1529. <dd> <b>Side Effects</b> None
  1530. <p>
  1531. <dd> <b>See Also</b> <code><a href="#DddmpSetVisited">DddmpSetVisited</a>
  1532. ()
  1533. <a href="#DddmpClearVisited">DddmpClearVisited</a>
  1534. ()
  1535. </code>
  1536. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeBdd.c</CODE></A>
  1537. <dt><pre>
  1538. <A NAME="DddmpWriteCode"></A>
  1539. int <I></I>
  1540. <B>DddmpWriteCode</B>(
  1541. FILE * <b>fp</b>, <i>IN: file where to write the code</i>
  1542. struct binary_dd_code <b>code</b> <i>IN: the code to be written</i>
  1543. )
  1544. </pre>
  1545. <dd> outputs a 1 byte node code using the following format:
  1546. <pre>
  1547. Unused : 1 bit;
  1548. V : 2 bits; (variable code)
  1549. T : 2 bits; (Then code)
  1550. Ecompl : 1 bit; (Else complemented)
  1551. E : 2 bits; (Else code)
  1552. </pre>
  1553. Ecompl is set with complemented edges.
  1554. <p>
  1555. <dd> <b>Side Effects</b> None
  1556. <p>
  1557. <dd> <b>See Also</b> <code><a href="#DddmpReadCode()">DddmpReadCode()</a>
  1558. </code>
  1559. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpBinary.c"TARGET="ABSTRACT"><CODE>dddmpBinary.c</CODE></A>
  1560. <dt><pre>
  1561. <A NAME="DddmpWriteInt"></A>
  1562. int <I></I>
  1563. <B>DddmpWriteInt</B>(
  1564. FILE * <b>fp</b>, <i>IN: file where to write the integer</i>
  1565. int <b>id</b> <i>IN: integer to be written</i>
  1566. )
  1567. </pre>
  1568. <dd> Writes an integer as a sequence of bytes (MSByte first).
  1569. For each byte 7 bits are used for data and one (LSBit) as link
  1570. with a further byte (LSB = 1 means one more byte).
  1571. <p>
  1572. <dd> <b>Side Effects</b> None
  1573. <p>
  1574. <dd> <b>See Also</b> <code><a href="#DddmpReadInt()">DddmpReadInt()</a>
  1575. </code>
  1576. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpBinary.c"TARGET="ABSTRACT"><CODE>dddmpBinary.c</CODE></A>
  1577. <dt><pre>
  1578. <A NAME="DddmpWriteNodeIndexAdd"></A>
  1579. void <I></I>
  1580. <B>DddmpWriteNodeIndexAdd</B>(
  1581. DdNode * <b>f</b>, <i>IN: BDD node</i>
  1582. int <b>id</b> <i>IN: index to be written</i>
  1583. )
  1584. </pre>
  1585. <dd> The index of the node is written in the "next" field of
  1586. a DdNode struct. LSB is not used (set to 0). It is used as
  1587. "visited" flag in DD traversals.
  1588. <p>
  1589. <dd> <b>Side Effects</b> None
  1590. <p>
  1591. <dd> <b>See Also</b> <code><a href="#DddmpReadNodeIndexAdd">DddmpReadNodeIndexAdd</a>
  1592. ()
  1593. <a href="#DddmpSetVisitedAdd">DddmpSetVisitedAdd</a>
  1594. ()
  1595. <a href="#DddmpVisitedAdd">DddmpVisitedAdd</a>
  1596. ()
  1597. </code>
  1598. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeAdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeAdd.c</CODE></A>
  1599. <dt><pre>
  1600. <A NAME="DddmpWriteNodeIndexBdd"></A>
  1601. void <I></I>
  1602. <B>DddmpWriteNodeIndexBdd</B>(
  1603. DdNode * <b>f</b>, <i>IN: BDD node</i>
  1604. int <b>id</b> <i>IN: index to be written</i>
  1605. )
  1606. </pre>
  1607. <dd> The index of the node is written in the "next" field of
  1608. a DdNode struct. LSB is not used (set to 0). It is used as
  1609. "visited" flag in DD traversals.
  1610. <p>
  1611. <dd> <b>Side Effects</b> None
  1612. <p>
  1613. <dd> <b>See Also</b> <code><a href="#DddmpReadNodeIndexBdd()">DddmpReadNodeIndexBdd()</a>
  1614. <a href="#DddmpSetVisitedBdd">DddmpSetVisitedBdd</a>
  1615. ()
  1616. <a href="#DddmpVisitedBdd">DddmpVisitedBdd</a>
  1617. ()
  1618. </code>
  1619. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeBdd.c</CODE></A>
  1620. <dt><pre>
  1621. <A NAME="DddmpWriteNodeIndexCnfBis"></A>
  1622. int <I></I>
  1623. <B>DddmpWriteNodeIndexCnfBis</B>(
  1624. DdNode * <b>f</b>, <i>IN: BDD node</i>
  1625. int <b>id</b> <i>IN: index to be written</i>
  1626. )
  1627. </pre>
  1628. <dd> The index of the node is written in the "next" field of
  1629. a DdNode struct. LSB is not used (set to 0). It is used as
  1630. "visited" flag in DD traversals.
  1631. <p>
  1632. <dd> <b>Side Effects</b> None
  1633. <p>
  1634. <dd> <b>See Also</b> <code><a href="#DddmpReadNodeIndexCnf()">DddmpReadNodeIndexCnf()</a>
  1635. <a href="#DddmpSetVisitedCnf">DddmpSetVisitedCnf</a>
  1636. ()
  1637. <a href="#DddmpVisitedCnf">DddmpVisitedCnf</a>
  1638. ()
  1639. </code>
  1640. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  1641. <dt><pre>
  1642. <A NAME="DddmpWriteNodeIndexCnfWithTerminalCheck"></A>
  1643. static int <I></I>
  1644. <B>DddmpWriteNodeIndexCnfWithTerminalCheck</B>(
  1645. DdNode * <b>f</b>, <i>IN: BDD node</i>
  1646. int * <b>cnfIds</b>, <i>IN: possible source for the index to be written</i>
  1647. int <b>id</b> <i>IN: possible source for the index to be written</i>
  1648. )
  1649. </pre>
  1650. <dd> The index of the node is written in the "next" field of
  1651. a DdNode struct. LSB is not used (set to 0). It is used as
  1652. "visited" flag in DD traversals. The index corresponds to
  1653. the BDD node variable if both the node's children are a
  1654. constant node, otherwise a new CNF variable is used.
  1655. <p>
  1656. <dd> <b>Side Effects</b> None
  1657. <p>
  1658. <dd> <b>See Also</b> <code><a href="#DddmpReadNodeIndexCnf()">DddmpReadNodeIndexCnf()</a>
  1659. <a href="#DddmpSetVisitedCnf">DddmpSetVisitedCnf</a>
  1660. ()
  1661. <a href="#DddmpVisitedCnf">DddmpVisitedCnf</a>
  1662. ()
  1663. </code>
  1664. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  1665. <dt><pre>
  1666. <A NAME="DddmpWriteNodeIndexCnf"></A>
  1667. int <I></I>
  1668. <B>DddmpWriteNodeIndexCnf</B>(
  1669. DdNode * <b>f</b>, <i>IN: BDD node</i>
  1670. int <b>id</b> <i>IN: index to be written</i>
  1671. )
  1672. </pre>
  1673. <dd> The index of the node is written in the "next" field of
  1674. a DdNode struct. LSB is not used (set to 0). It is used as
  1675. "visited" flag in DD traversals.
  1676. <p>
  1677. <dd> <b>Side Effects</b> None
  1678. <p>
  1679. <dd> <b>See Also</b> <code><a href="#DddmpReadNodeIndexCnf()">DddmpReadNodeIndexCnf()</a>
  1680. <a href="#DddmpSetVisitedCnf">DddmpSetVisitedCnf</a>
  1681. ()
  1682. <a href="#DddmpVisitedCnf">DddmpVisitedCnf</a>
  1683. ()
  1684. </code>
  1685. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  1686. <dt><pre>
  1687. <A NAME="DddmpWriteNodeIndexCnf"></A>
  1688. static int <I></I>
  1689. <B>DddmpWriteNodeIndexCnf</B>(
  1690. DdNode * <b>f</b>, <i>IN: BDD node</i>
  1691. int * <b>cnfIds</b>, <i>IN: possible source for the index to be written</i>
  1692. int <b>id</b> <i>IN: possible source for the index to be written</i>
  1693. )
  1694. </pre>
  1695. <dd> The index of the node is written in the "next" field of
  1696. a DdNode struct. LSB is not used (set to 0). It is used as
  1697. "visited" flag in DD traversals. The index corresponds to
  1698. the BDD node variable if both the node's children are a
  1699. constant node, otherwise a new CNF variable is used.
  1700. <p>
  1701. <dd> <b>Side Effects</b> None
  1702. <p>
  1703. <dd> <b>See Also</b> <code><a href="#DddmpReadNodeIndexCnf()">DddmpReadNodeIndexCnf()</a>
  1704. <a href="#DddmpSetVisitedCnf">DddmpSetVisitedCnf</a>
  1705. ()
  1706. <a href="#DddmpVisitedCnf">DddmpVisitedCnf</a>
  1707. ()
  1708. </code>
  1709. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  1710. <dt><pre>
  1711. <A NAME="DddmpWriteNodeIndex"></A>
  1712. void <I></I>
  1713. <B>DddmpWriteNodeIndex</B>(
  1714. DdNode * <b>f</b>, <i>IN: BDD node</i>
  1715. int <b>id</b> <i>IN: index to be written</i>
  1716. )
  1717. </pre>
  1718. <dd> The index of the node is written in the "next" field of
  1719. a DdNode struct. LSB is not used (set to 0). It is used as
  1720. "visited" flag in DD traversals.
  1721. <p>
  1722. <dd> <b>Side Effects</b> None
  1723. <p>
  1724. <dd> <b>See Also</b> <code><a href="#DddmpReadNodeIndex()">DddmpReadNodeIndex()</a>
  1725. <a href="#DddmpSetVisited">DddmpSetVisited</a>
  1726. ()
  1727. <a href="#DddmpVisited">DddmpVisited</a>
  1728. ()
  1729. </code>
  1730. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeBdd.c</CODE></A>
  1731. <dt><pre>
  1732. <A NAME="Dddmp_Bin2Text"></A>
  1733. int <I></I>
  1734. <B>Dddmp_Bin2Text</B>(
  1735. char * <b>filein</b>, <i>IN: name of binary file</i>
  1736. char * <b>fileout</b> <i>IN: name of ASCII file</i>
  1737. )
  1738. </pre>
  1739. <dd> Converts from binary to ASCII format. A BDD array is loaded and
  1740. and stored to the target file.
  1741. <p>
  1742. <dd> <b>Side Effects</b> None
  1743. <p>
  1744. <dd> <b>See Also</b> <code><a href="#Dddmp_Text2Bin()">Dddmp_Text2Bin()</a>
  1745. </code>
  1746. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpConvert.c"TARGET="ABSTRACT"><CODE>dddmpConvert.c</CODE></A>
  1747. <dt><pre>
  1748. <A NAME="Dddmp_Text2Bin"></A>
  1749. int <I></I>
  1750. <B>Dddmp_Text2Bin</B>(
  1751. char * <b>filein</b>, <i>IN: name of ASCII file</i>
  1752. char * <b>fileout</b> <i>IN: name of binary file</i>
  1753. )
  1754. </pre>
  1755. <dd> Converts from ASCII to binary format. A BDD array is loaded and
  1756. and stored to the target file.
  1757. <p>
  1758. <dd> <b>Side Effects</b> None
  1759. <p>
  1760. <dd> <b>See Also</b> <code><a href="#Dddmp_Bin2Text()">Dddmp_Bin2Text()</a>
  1761. </code>
  1762. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpConvert.c"TARGET="ABSTRACT"><CODE>dddmpConvert.c</CODE></A>
  1763. <dt><pre>
  1764. <A NAME="Dddmp_cuddAddArrayLoad"></A>
  1765. int <I></I>
  1766. <B>Dddmp_cuddAddArrayLoad</B>(
  1767. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  1768. Dddmp_RootMatchType <b>rootMatchMode</b>, <i>IN: storing mode selector</i>
  1769. char ** <b>rootmatchnames</b>, <i>IN: sorted names for loaded roots</i>
  1770. Dddmp_VarMatchType <b>varMatchMode</b>, <i>IN: storing mode selector</i>
  1771. char ** <b>varmatchnames</b>, <i>IN: array of variable names, by ids</i>
  1772. int * <b>varmatchauxids</b>, <i>IN: array of variable auxids, by ids</i>
  1773. int * <b>varcomposeids</b>, <i>IN: array of new ids, by ids</i>
  1774. int <b>mode</b>, <i>IN: requested input file format</i>
  1775. char * <b>file</b>, <i>IN: file name</i>
  1776. FILE * <b>fp</b>, <i>IN: file pointer</i>
  1777. DdNode *** <b>pproots</b> <i>OUT: array of returned BDD roots</i>
  1778. )
  1779. </pre>
  1780. <dd> Reads a dump file representing the argument ADDs. See
  1781. BDD load functions for detailed explanation.
  1782. <p>
  1783. <dd> <b>Side Effects</b> A vector of pointers to DD nodes is allocated and freed.
  1784. <p>
  1785. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddArrayStore">Dddmp_cuddBddArrayStore</a>
  1786. </code>
  1787. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpLoad.c"TARGET="ABSTRACT"><CODE>dddmpLoad.c</CODE></A>
  1788. <dt><pre>
  1789. <A NAME="Dddmp_cuddAddArrayStore"></A>
  1790. int <I></I>
  1791. <B>Dddmp_cuddAddArrayStore</B>(
  1792. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  1793. char * <b>ddname</b>, <i>IN: DD name (or NULL)</i>
  1794. int <b>nRoots</b>, <i>IN: number of output BDD roots to be stored</i>
  1795. DdNode ** <b>f</b>, <i>IN: array of ADD roots to be stored</i>
  1796. char ** <b>rootnames</b>, <i>IN: array of root names (or NULL)</i>
  1797. char ** <b>varnames</b>, <i>IN: array of variable names (or NULL)</i>
  1798. int * <b>auxids</b>, <i>IN: array of converted var IDs</i>
  1799. int <b>mode</b>, <i>IN: storing mode selector</i>
  1800. Dddmp_VarInfoType <b>varinfo</b>, <i>IN: extra info for variables in text mode</i>
  1801. char * <b>fname</b>, <i>IN: File name</i>
  1802. FILE * <b>fp</b> <i>IN: File pointer to the store file</i>
  1803. )
  1804. </pre>
  1805. <dd> Dumps the argument array of ADDs to file. Dumping is
  1806. either in text or binary form. see the corresponding BDD dump
  1807. function for further details.
  1808. <p>
  1809. <dd> <b>Side Effects</b> Nodes are temporarily removed from the unique hash
  1810. table. They are re-linked after the store operation in a
  1811. modified order.
  1812. <p>
  1813. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddAddStore">Dddmp_cuddAddStore</a>
  1814. <a href="#Dddmp_cuddAddLoad">Dddmp_cuddAddLoad</a>
  1815. <a href="#Dddmp_cuddAddArrayLoad">Dddmp_cuddAddArrayLoad</a>
  1816. </code>
  1817. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreAdd.c"TARGET="ABSTRACT"><CODE>dddmpStoreAdd.c</CODE></A>
  1818. <dt><pre>
  1819. <A NAME="Dddmp_cuddAddLoad"></A>
  1820. DdNode * <I></I>
  1821. <B>Dddmp_cuddAddLoad</B>(
  1822. DdManager * <b>ddMgr</b>, <i>IN: Manager</i>
  1823. Dddmp_VarMatchType <b>varMatchMode</b>, <i>IN: storing mode selector</i>
  1824. char ** <b>varmatchnames</b>, <i>IN: array of variable names by IDs</i>
  1825. int * <b>varmatchauxids</b>, <i>IN: array of variable auxids by IDs</i>
  1826. int * <b>varcomposeids</b>, <i>IN: array of new ids by IDs</i>
  1827. int <b>mode</b>, <i>IN: requested input file format</i>
  1828. char * <b>file</b>, <i>IN: file name</i>
  1829. FILE * <b>fp</b> <i>IN: file pointer</i>
  1830. )
  1831. </pre>
  1832. <dd> Reads a dump file representing the argument ADD.
  1833. Dddmp_cuddAddArrayLoad is used through a dummy array.
  1834. <p>
  1835. <dd> <b>Side Effects</b> A vector of pointers to DD nodes is allocated and freed.
  1836. <p>
  1837. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddAddStore">Dddmp_cuddAddStore</a>
  1838. <a href="#Dddmp_cuddAddArrayLoad">Dddmp_cuddAddArrayLoad</a>
  1839. </code>
  1840. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpLoad.c"TARGET="ABSTRACT"><CODE>dddmpLoad.c</CODE></A>
  1841. <dt><pre>
  1842. <A NAME="Dddmp_cuddAddStore"></A>
  1843. int <I></I>
  1844. <B>Dddmp_cuddAddStore</B>(
  1845. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  1846. char * <b>ddname</b>, <i>IN: DD name (or NULL)</i>
  1847. DdNode * <b>f</b>, <i>IN: ADD root to be stored</i>
  1848. char ** <b>varnames</b>, <i>IN: array of variable names (or NULL)</i>
  1849. int * <b>auxids</b>, <i>IN: array of converted var ids</i>
  1850. int <b>mode</b>, <i>IN: storing mode selector</i>
  1851. Dddmp_VarInfoType <b>varinfo</b>, <i>IN: extra info for variables in text mode</i>
  1852. char * <b>fname</b>, <i>IN: File name</i>
  1853. FILE * <b>fp</b> <i>IN: File pointer to the store file</i>
  1854. )
  1855. </pre>
  1856. <dd> Dumps the argument ADD to file. Dumping is done through
  1857. Dddmp_cuddAddArrayStore, And a dummy array of 1 ADD root is
  1858. used for this purpose.
  1859. <p>
  1860. <dd> <b>Side Effects</b> Nodes are temporarily removed from unique hash. They are
  1861. re-linked after the store operation in a modified order.
  1862. <p>
  1863. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddAddLoad">Dddmp_cuddAddLoad</a>
  1864. <a href="#Dddmp_cuddAddArrayLoad">Dddmp_cuddAddArrayLoad</a>
  1865. </code>
  1866. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreAdd.c"TARGET="ABSTRACT"><CODE>dddmpStoreAdd.c</CODE></A>
  1867. <dt><pre>
  1868. <A NAME="Dddmp_cuddBddArrayLoadCnf"></A>
  1869. int <I></I>
  1870. <B>Dddmp_cuddBddArrayLoadCnf</B>(
  1871. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  1872. Dddmp_RootMatchType <b>rootmatchmode</b>, <i>IN: storing mode selector</i>
  1873. char ** <b>rootmatchnames</b>, <i>IN: sorted names for loaded roots</i>
  1874. Dddmp_VarMatchType <b>varmatchmode</b>, <i>IN: storing mode selector</i>
  1875. char ** <b>varmatchnames</b>, <i>IN: array of variable names, by IDs</i>
  1876. int * <b>varmatchauxids</b>, <i>IN: array of variable auxids, by IDs</i>
  1877. int * <b>varcomposeids</b>, <i>IN: array of new ids, by IDs</i>
  1878. int <b>mode</b>, <i>IN: computation Mode</i>
  1879. char * <b>file</b>, <i>IN: file name</i>
  1880. FILE * <b>fp</b>, <i>IN: file pointer</i>
  1881. DdNode *** <b>rootsPtrPtr</b>, <i>OUT: array of returned BDD roots</i>
  1882. int * <b>nRoots</b> <i>OUT: number of BDDs returned</i>
  1883. )
  1884. </pre>
  1885. <dd> Reads a dump file representing the argument BDD in a
  1886. CNF formula.
  1887. <p>
  1888. <dd> <b>Side Effects</b> A vector of pointers to DD nodes is allocated and freed.
  1889. <p>
  1890. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddArrayLoad">Dddmp_cuddBddArrayLoad</a>
  1891. </code>
  1892. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpLoadCnf.c"TARGET="ABSTRACT"><CODE>dddmpLoadCnf.c</CODE></A>
  1893. <dt><pre>
  1894. <A NAME="Dddmp_cuddBddArrayLoad"></A>
  1895. int <I></I>
  1896. <B>Dddmp_cuddBddArrayLoad</B>(
  1897. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  1898. Dddmp_RootMatchType <b>rootMatchMode</b>, <i>IN: storing mode selector</i>
  1899. char ** <b>rootmatchnames</b>, <i>IN: sorted names for loaded roots</i>
  1900. Dddmp_VarMatchType <b>varMatchMode</b>, <i>IN: storing mode selector</i>
  1901. char ** <b>varmatchnames</b>, <i>IN: array of variable names, by ids</i>
  1902. int * <b>varmatchauxids</b>, <i>IN: array of variable auxids, by ids</i>
  1903. int * <b>varcomposeids</b>, <i>IN: array of new ids, by ids</i>
  1904. int <b>mode</b>, <i>IN: requested input file format</i>
  1905. char * <b>file</b>, <i>IN: file name</i>
  1906. FILE * <b>fp</b>, <i>IN: file pointer</i>
  1907. DdNode *** <b>pproots</b> <i>OUT: array of returned BDD roots</i>
  1908. )
  1909. </pre>
  1910. <dd> Reads a dump file representing the argument BDDs. The header is
  1911. common to both text and binary mode. The node list is either
  1912. in text or binary format. A dynamic vector of DD pointers
  1913. is allocated to support conversion from DD indexes to pointers.
  1914. Several criteria are supported for variable match between file
  1915. and dd manager. Several changes/permutations/compositions are allowed
  1916. for variables while loading DDs. Variable of the dd manager are allowed
  1917. to match with variables on file on ids, permids, varnames,
  1918. varauxids; also direct composition between ids and
  1919. composeids is supported. More in detail:
  1920. <ol>
  1921. <li> varMatchMode=DDDMP_VAR_MATCHIDS <p>
  1922. allows the loading of a DD keeping variable IDs unchanged
  1923. (regardless of the variable ordering of the reading manager); this
  1924. is useful, for example, when swapping DDs to file and restoring them
  1925. later from file, after possible variable reordering activations.
  1926. <li> varMatchMode=DDDMP_VAR_MATCHPERMIDS <p>
  1927. is used to allow variable match according to the position in the
  1928. ordering.
  1929. <li> varMatchMode=DDDMP_VAR_MATCHNAMES <p>
  1930. requires a non NULL varmatchnames parameter; this is a vector of
  1931. strings in one-to-one correspondence with variable IDs of the
  1932. reading manager. Variables in the DD file read are matched with
  1933. manager variables according to their name (a non NULL varnames
  1934. parameter was required while storing the DD file).
  1935. <li> varMatchMode=DDDMP_VAR_MATCHIDS <p>
  1936. has a meaning similar to DDDMP_VAR_MATCHNAMES, but integer auxiliary
  1937. IDs are used instead of strings; the additional non NULL
  1938. varmatchauxids parameter is needed.
  1939. <li> varMatchMode=DDDMP_VAR_COMPOSEIDS <p>
  1940. uses the additional varcomposeids parameter is used as array of
  1941. variable ids to be composed with ids stored in file.
  1942. </ol>
  1943. In the present implementation, the array varnames (3), varauxids (4)
  1944. and composeids (5) need to have one entry for each variable in the
  1945. DD manager (NULL pointers are allowed for unused variables
  1946. in varnames). Hence variables need to be already present in the
  1947. manager. All arrays are sorted according to IDs.
  1948. All the loaded BDDs are referenced before returning them.
  1949. <p>
  1950. <dd> <b>Side Effects</b> A vector of pointers to DD nodes is allocated and freed.
  1951. <p>
  1952. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddArrayStore">Dddmp_cuddBddArrayStore</a>
  1953. </code>
  1954. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpLoad.c"TARGET="ABSTRACT"><CODE>dddmpLoad.c</CODE></A>
  1955. <dt><pre>
  1956. <A NAME="Dddmp_cuddBddArrayStoreBlif"></A>
  1957. int <I></I>
  1958. <B>Dddmp_cuddBddArrayStoreBlif</B>(
  1959. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  1960. int <b>nroots</b>, <i>IN: number of output BDD roots to be stored</i>
  1961. DdNode ** <b>f</b>, <i>IN: array of BDD roots to be stored</i>
  1962. char ** <b>inputNames</b>, <i>IN: array of variable names (or NULL)</i>
  1963. char ** <b>outputNames</b>, <i>IN: array of root names (or NULL)</i>
  1964. char * <b>modelName</b>, <i>IN: Model Name</i>
  1965. char * <b>fname</b>, <i>IN: File name</i>
  1966. FILE * <b>fp</b> <i>IN: File pointer to the store file</i>
  1967. )
  1968. </pre>
  1969. <dd> Dumps the argument BDD to file.
  1970. Dumping is done through Dddmp_cuddBddArrayStoreBLif.
  1971. A dummy array of 1 BDD root is used for this purpose.
  1972. <p>
  1973. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddArrayStorePrefix">Dddmp_cuddBddArrayStorePrefix</a>
  1974. </code>
  1975. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreMisc.c"TARGET="ABSTRACT"><CODE>dddmpStoreMisc.c</CODE></A>
  1976. <dt><pre>
  1977. <A NAME="Dddmp_cuddBddArrayStoreCnf"></A>
  1978. int <I></I>
  1979. <B>Dddmp_cuddBddArrayStoreCnf</B>(
  1980. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  1981. DdNode ** <b>f</b>, <i>IN: array of BDD roots to be stored</i>
  1982. int <b>rootN</b>, <i>IN: # output BDD roots to be stored</i>
  1983. Dddmp_DecompCnfStoreType <b>mode</b>, <i>IN: format selection</i>
  1984. int <b>noHeader</b>, <i>IN: do not store header iff 1</i>
  1985. char ** <b>varNames</b>, <i>IN: array of variable names (or NULL)</i>
  1986. int * <b>bddIds</b>, <i>IN: array of converted var IDs</i>
  1987. int * <b>bddAuxIds</b>, <i>IN: array of BDD node Auxiliary Ids</i>
  1988. int * <b>cnfIds</b>, <i>IN: array of converted var IDs</i>
  1989. int <b>idInitial</b>, <i>IN: starting id for cutting variables</i>
  1990. int <b>edgeInTh</b>, <i>IN: Max # Incoming Edges</i>
  1991. int <b>pathLengthTh</b>, <i>IN: Max Path Length</i>
  1992. char * <b>fname</b>, <i>IN: file name</i>
  1993. FILE * <b>fp</b>, <i>IN: pointer to the store file</i>
  1994. int * <b>clauseNPtr</b>, <i>OUT: number of clause stored</i>
  1995. int * <b>varNewNPtr</b> <i>OUT: number of new variable created</i>
  1996. )
  1997. </pre>
  1998. <dd> Dumps the argument array of BDDs to file.
  1999. <p>
  2000. <dd> <b>Side Effects</b> Nodes are temporarily removed from the unique hash
  2001. table. They are re-linked after the store operation in a
  2002. modified order.
  2003. Three methods are allowed:
  2004. * NodeByNode method: Insert a cut-point for each BDD node (but the
  2005. terminal nodes)
  2006. * MaxtermByMaxterm method: Insert no cut-points, i.e. the off-set of
  2007. trhe function is stored
  2008. * Best method: Tradeoff between the previous two methods.
  2009. Auxiliary variables, i.e., cut points are inserted following these
  2010. criterias:
  2011. * edgeInTh
  2012. indicates the maximum number of incoming edges up to which
  2013. no cut point (auxiliary variable) is inserted.
  2014. If edgeInTh:
  2015. * is equal to -1 no cut point due to incoming edges are inserted
  2016. (MaxtermByMaxterm method.)
  2017. * is equal to 0 a cut point is inserted for each node with a single
  2018. incoming edge, i.e., each node, (NodeByNode method).
  2019. * is equal to n a cut point is inserted for each node with (n+1)
  2020. incoming edges.
  2021. * pathLengthTh
  2022. indicates the maximum length path up to which no cut points
  2023. (auxiliary variable) is inserted.
  2024. If the path length between two nodes exceeds this value, a cut point
  2025. is inserted.
  2026. If pathLengthTh:
  2027. * is equal to -1 no cut point due path length are inserted
  2028. (MaxtermByMaxterm method.)
  2029. * is equal to 0 a cut point is inserted for each node (NodeByNode
  2030. method).
  2031. * is equal to n a cut point is inserted on path whose length is
  2032. equal to (n+1).
  2033. Notice that the maximum number of literals in a clause is equal
  2034. to (pathLengthTh + 2), i.e., for each path we have to keep into
  2035. account a CNF variable for each node plus 2 added variables for
  2036. the bottom and top-path cut points.
  2037. The stored file can contain a file header or not depending on the
  2038. noHeader parameter (IFF 0, usual setting, the header is usually stored.
  2039. This option can be useful in storing multiple BDDs, as separate BDDs,
  2040. on the same file leaving the opening of the file to the caller.
  2041. <p>
  2042. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreCnf.c"TARGET="ABSTRACT"><CODE>dddmpStoreCnf.c</CODE></A>
  2043. <dt><pre>
  2044. <A NAME="Dddmp_cuddBddArrayStorePrefix"></A>
  2045. int <I></I>
  2046. <B>Dddmp_cuddBddArrayStorePrefix</B>(
  2047. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2048. int <b>nroots</b>, <i>IN: number of output BDD roots to be stored</i>
  2049. DdNode ** <b>f</b>, <i>IN: array of BDD roots to be stored</i>
  2050. char ** <b>inputNames</b>, <i>IN: array of variable names (or NULL)</i>
  2051. char ** <b>outputNames</b>, <i>IN: array of root names (or NULL)</i>
  2052. char * <b>modelName</b>, <i>IN: Model Name</i>
  2053. char * <b>fname</b>, <i>IN: File name</i>
  2054. FILE * <b>fp</b> <i>IN: File pointer to the store file</i>
  2055. )
  2056. </pre>
  2057. <dd> Dumps the argument BDD to file.
  2058. Dumping is done through Dddmp_cuddBddArrayStorePrefix.
  2059. A dummy array of 1 BDD root is used for this purpose.
  2060. <p>
  2061. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddArrayStore">Dddmp_cuddBddArrayStore</a>
  2062. </code>
  2063. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreMisc.c"TARGET="ABSTRACT"><CODE>dddmpStoreMisc.c</CODE></A>
  2064. <dt><pre>
  2065. <A NAME="Dddmp_cuddBddArrayStoreSmv"></A>
  2066. int <I></I>
  2067. <B>Dddmp_cuddBddArrayStoreSmv</B>(
  2068. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2069. int <b>nroots</b>, <i>IN: number of output BDD roots to be stored</i>
  2070. DdNode ** <b>f</b>, <i>IN: array of BDD roots to be stored</i>
  2071. char ** <b>inputNames</b>, <i>IN: array of variable names (or NULL)</i>
  2072. char ** <b>outputNames</b>, <i>IN: array of root names (or NULL)</i>
  2073. char * <b>modelName</b>, <i>IN: Model Name</i>
  2074. char * <b>fname</b>, <i>IN: File name</i>
  2075. FILE * <b>fp</b> <i>IN: File pointer to the store file</i>
  2076. )
  2077. </pre>
  2078. <dd> Dumps the argument BDD to file.
  2079. Dumping is done through Dddmp_cuddBddArrayStorePrefix.
  2080. A dummy array of 1 BDD root is used for this purpose.
  2081. <p>
  2082. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddArrayStore">Dddmp_cuddBddArrayStore</a>
  2083. </code>
  2084. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreMisc.c"TARGET="ABSTRACT"><CODE>dddmpStoreMisc.c</CODE></A>
  2085. <dt><pre>
  2086. <A NAME="Dddmp_cuddBddArrayStore"></A>
  2087. int <I></I>
  2088. <B>Dddmp_cuddBddArrayStore</B>(
  2089. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2090. char * <b>ddname</b>, <i>IN: dd name (or NULL)</i>
  2091. int <b>nRoots</b>, <i>IN: number of output BDD roots to be stored</i>
  2092. DdNode ** <b>f</b>, <i>IN: array of BDD roots to be stored</i>
  2093. char ** <b>rootnames</b>, <i>IN: array of root names (or NULL)</i>
  2094. char ** <b>varnames</b>, <i>IN: array of variable names (or NULL)</i>
  2095. int * <b>auxids</b>, <i>IN: array of converted var IDs</i>
  2096. int <b>mode</b>, <i>IN: storing mode selector</i>
  2097. Dddmp_VarInfoType <b>varinfo</b>, <i>IN: extra info for variables in text mode</i>
  2098. char * <b>fname</b>, <i>IN: File name</i>
  2099. FILE * <b>fp</b> <i>IN: File pointer to the store file</i>
  2100. )
  2101. </pre>
  2102. <dd> Dumps the argument array of BDDs to file. Dumping is either
  2103. in text or binary form. BDDs are stored to the fp (already
  2104. open) file if not NULL. Otherwise the file whose name is
  2105. fname is opened in write mode. The header has the same format
  2106. for both textual and binary dump. Names are allowed for input
  2107. variables (vnames) and for represented functions (rnames).
  2108. For sake of generality and because of dynamic variable
  2109. ordering both variable IDs and permuted IDs are included.
  2110. New IDs are also supported (auxids). Variables are identified
  2111. with incremental numbers. according with their positiom in
  2112. the support set. In text mode, an extra info may be added,
  2113. chosen among the following options: name, ID, PermID, or an
  2114. auxiliary id. Since conversion from DD pointers to integers
  2115. is required, DD nodes are temporarily removed from the unique
  2116. hash table. This allows the use of the next field to store
  2117. node IDs.
  2118. <p>
  2119. <dd> <b>Side Effects</b> Nodes are temporarily removed from the unique hash
  2120. table. They are re-linked after the store operation in a
  2121. modified order.
  2122. <p>
  2123. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddStore">Dddmp_cuddBddStore</a>
  2124. <a href="#Dddmp_cuddBddLoad">Dddmp_cuddBddLoad</a>
  2125. <a href="#Dddmp_cuddBddArrayLoad">Dddmp_cuddBddArrayLoad</a>
  2126. </code>
  2127. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreBdd.c"TARGET="ABSTRACT"><CODE>dddmpStoreBdd.c</CODE></A>
  2128. <dt><pre>
  2129. <A NAME="Dddmp_cuddBddDisplayBinary"></A>
  2130. int <I></I>
  2131. <B>Dddmp_cuddBddDisplayBinary</B>(
  2132. char * <b>fileIn</b>, <i>IN: name of binary file</i>
  2133. char * <b>fileOut</b> <i>IN: name of text file</i>
  2134. )
  2135. </pre>
  2136. <dd> Display a binary dump file in a text file
  2137. <p>
  2138. <dd> <b>Side Effects</b> None
  2139. <p>
  2140. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddStore">Dddmp_cuddBddStore</a>
  2141. <a href="#Dddmp_cuddBddLoad">Dddmp_cuddBddLoad</a>
  2142. </code>
  2143. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDbg.c"TARGET="ABSTRACT"><CODE>dddmpDbg.c</CODE></A>
  2144. <dt><pre>
  2145. <A NAME="Dddmp_cuddBddLoadCnf"></A>
  2146. int <I></I>
  2147. <B>Dddmp_cuddBddLoadCnf</B>(
  2148. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2149. Dddmp_VarMatchType <b>varmatchmode</b>, <i>IN: storing mode selector</i>
  2150. char ** <b>varmatchnames</b>, <i>IN: array of variable names, by IDs</i>
  2151. int * <b>varmatchauxids</b>, <i>IN: array of variable auxids, by IDs</i>
  2152. int * <b>varcomposeids</b>, <i>IN: array of new ids accessed, by IDs</i>
  2153. int <b>mode</b>, <i>IN: computation mode</i>
  2154. char * <b>file</b>, <i>IN: file name</i>
  2155. FILE * <b>fp</b>, <i>IN: file pointer</i>
  2156. DdNode *** <b>rootsPtrPtr</b>, <i>OUT: array of returned BDD roots</i>
  2157. int * <b>nRoots</b> <i>OUT: number of BDDs returned</i>
  2158. )
  2159. </pre>
  2160. <dd> Reads a dump file representing the argument BDD in a
  2161. CNF formula.
  2162. Dddmp_cuddBddArrayLoadCnf is used through a dummy array.
  2163. The results is returned in different formats depending on the
  2164. mode selection:
  2165. IFF mode == 0 Return the Clauses without Conjunction
  2166. IFF mode == 1 Return the sets of BDDs without Quantification
  2167. IFF mode == 2 Return the sets of BDDs AFTER Existential Quantification
  2168. <p>
  2169. <dd> <b>Side Effects</b> A vector of pointers to DD nodes is allocated and freed.
  2170. <p>
  2171. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddLoad">Dddmp_cuddBddLoad</a>
  2172. <a href="#Dddmp_cuddBddArrayLoad">Dddmp_cuddBddArrayLoad</a>
  2173. </code>
  2174. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpLoadCnf.c"TARGET="ABSTRACT"><CODE>dddmpLoadCnf.c</CODE></A>
  2175. <dt><pre>
  2176. <A NAME="Dddmp_cuddBddLoad"></A>
  2177. DdNode * <I></I>
  2178. <B>Dddmp_cuddBddLoad</B>(
  2179. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2180. Dddmp_VarMatchType <b>varMatchMode</b>, <i>IN: storing mode selector</i>
  2181. char ** <b>varmatchnames</b>, <i>IN: array of variable names - by IDs</i>
  2182. int * <b>varmatchauxids</b>, <i>IN: array of variable auxids - by IDs</i>
  2183. int * <b>varcomposeids</b>, <i>IN: array of new ids accessed - by IDs</i>
  2184. int <b>mode</b>, <i>IN: requested input file format</i>
  2185. char * <b>file</b>, <i>IN: file name</i>
  2186. FILE * <b>fp</b> <i>IN: file pointer</i>
  2187. )
  2188. </pre>
  2189. <dd> Reads a dump file representing the argument BDD.
  2190. Dddmp_cuddBddArrayLoad is used through a dummy array (see this
  2191. function's description for more details).
  2192. Mode, the requested input file format, is checked against
  2193. the file format.
  2194. The loaded BDDs is referenced before returning it.
  2195. <p>
  2196. <dd> <b>Side Effects</b> A vector of pointers to DD nodes is allocated and freed.
  2197. <p>
  2198. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddStore">Dddmp_cuddBddStore</a>
  2199. <a href="#Dddmp_cuddBddArrayLoad">Dddmp_cuddBddArrayLoad</a>
  2200. </code>
  2201. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpLoad.c"TARGET="ABSTRACT"><CODE>dddmpLoad.c</CODE></A>
  2202. <dt><pre>
  2203. <A NAME="Dddmp_cuddBddStoreBlif"></A>
  2204. int <I></I>
  2205. <B>Dddmp_cuddBddStoreBlif</B>(
  2206. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2207. int <b>nRoots</b>, <i>IN: Number of BDD roots</i>
  2208. DdNode * <b>f</b>, <i>IN: BDD root to be stored</i>
  2209. char ** <b>inputNames</b>, <i>IN: Array of variable names</i>
  2210. char ** <b>outputNames</b>, <i>IN: Array of root names</i>
  2211. char * <b>modelName</b>, <i>IN: Model Name</i>
  2212. char * <b>fileName</b>, <i>IN: File name</i>
  2213. FILE * <b>fp</b> <i>IN: File pointer to the store file</i>
  2214. )
  2215. </pre>
  2216. <dd> Dumps the argument BDD to file.
  2217. Dumping is done through Dddmp_cuddBddArrayStoreBlif.
  2218. A dummy array of 1 BDD root is used for this purpose.
  2219. <p>
  2220. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddStorePrefix">Dddmp_cuddBddStorePrefix</a>
  2221. </code>
  2222. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreMisc.c"TARGET="ABSTRACT"><CODE>dddmpStoreMisc.c</CODE></A>
  2223. <dt><pre>
  2224. <A NAME="Dddmp_cuddBddStoreCnf"></A>
  2225. int <I></I>
  2226. <B>Dddmp_cuddBddStoreCnf</B>(
  2227. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2228. DdNode * <b>f</b>, <i>IN: BDD root to be stored</i>
  2229. Dddmp_DecompCnfStoreType <b>mode</b>, <i>IN: format selection</i>
  2230. int <b>noHeader</b>, <i>IN: do not store header iff 1</i>
  2231. char ** <b>varNames</b>, <i>IN: array of variable names (or NULL)</i>
  2232. int * <b>bddIds</b>, <i>IN: array of var ids</i>
  2233. int * <b>bddAuxIds</b>, <i>IN: array of BDD node Auxiliary Ids</i>
  2234. int * <b>cnfIds</b>, <i>IN: array of CNF var ids</i>
  2235. int <b>idInitial</b>, <i>IN: starting id for cutting variables</i>
  2236. int <b>edgeInTh</b>, <i>IN: Max # Incoming Edges</i>
  2237. int <b>pathLengthTh</b>, <i>IN: Max Path Length</i>
  2238. char * <b>fname</b>, <i>IN: file name</i>
  2239. FILE * <b>fp</b>, <i>IN: pointer to the store file</i>
  2240. int * <b>clauseNPtr</b>, <i>OUT: number of clause stored</i>
  2241. int * <b>varNewNPtr</b> <i>OUT: number of new variable created</i>
  2242. )
  2243. </pre>
  2244. <dd> Dumps the argument BDD to file.
  2245. This task is performed by calling the function
  2246. Dddmp_cuddBddArrayStoreCnf.
  2247. <p>
  2248. <dd> <b>Side Effects</b> Nodes are temporarily removed from unique hash. They are
  2249. re-linked after the store operation in a modified order.
  2250. <p>
  2251. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddArrayStoreCnf">Dddmp_cuddBddArrayStoreCnf</a>
  2252. </code>
  2253. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreCnf.c"TARGET="ABSTRACT"><CODE>dddmpStoreCnf.c</CODE></A>
  2254. <dt><pre>
  2255. <A NAME="Dddmp_cuddBddStorePrefix"></A>
  2256. int <I></I>
  2257. <B>Dddmp_cuddBddStorePrefix</B>(
  2258. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2259. int <b>nRoots</b>, <i>IN: Number of BDD roots</i>
  2260. DdNode * <b>f</b>, <i>IN: BDD root to be stored</i>
  2261. char ** <b>inputNames</b>, <i>IN: Array of variable names</i>
  2262. char ** <b>outputNames</b>, <i>IN: Array of root names</i>
  2263. char * <b>modelName</b>, <i>IN: Model Name</i>
  2264. char * <b>fileName</b>, <i>IN: File name</i>
  2265. FILE * <b>fp</b> <i>IN: File pointer to the store file</i>
  2266. )
  2267. </pre>
  2268. <dd> Dumps the argument BDD to file.
  2269. Dumping is done through Dddmp_cuddBddArrayStorePrefix.
  2270. A dummy array of 1 BDD root is used for this purpose.
  2271. <p>
  2272. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddStore">Dddmp_cuddBddStore</a>
  2273. </code>
  2274. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreMisc.c"TARGET="ABSTRACT"><CODE>dddmpStoreMisc.c</CODE></A>
  2275. <dt><pre>
  2276. <A NAME="Dddmp_cuddBddStoreSmv"></A>
  2277. int <I></I>
  2278. <B>Dddmp_cuddBddStoreSmv</B>(
  2279. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2280. int <b>nRoots</b>, <i>IN: Number of BDD roots</i>
  2281. DdNode * <b>f</b>, <i>IN: BDD root to be stored</i>
  2282. char ** <b>inputNames</b>, <i>IN: Array of variable names</i>
  2283. char ** <b>outputNames</b>, <i>IN: Array of root names</i>
  2284. char * <b>modelName</b>, <i>IN: Model Name</i>
  2285. char * <b>fileName</b>, <i>IN: File name</i>
  2286. FILE * <b>fp</b> <i>IN: File pointer to the store file</i>
  2287. )
  2288. </pre>
  2289. <dd> Dumps the argument BDD to file.
  2290. Dumping is done through Dddmp_cuddBddArrayStorePrefix.
  2291. A dummy array of 1 BDD root is used for this purpose.
  2292. <p>
  2293. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddStore">Dddmp_cuddBddStore</a>
  2294. </code>
  2295. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreMisc.c"TARGET="ABSTRACT"><CODE>dddmpStoreMisc.c</CODE></A>
  2296. <dt><pre>
  2297. <A NAME="Dddmp_cuddBddStore"></A>
  2298. int <I></I>
  2299. <B>Dddmp_cuddBddStore</B>(
  2300. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2301. char * <b>ddname</b>, <i>IN: DD name (or NULL)</i>
  2302. DdNode * <b>f</b>, <i>IN: BDD root to be stored</i>
  2303. char ** <b>varnames</b>, <i>IN: array of variable names (or NULL)</i>
  2304. int * <b>auxids</b>, <i>IN: array of converted var ids</i>
  2305. int <b>mode</b>, <i>IN: storing mode selector</i>
  2306. Dddmp_VarInfoType <b>varinfo</b>, <i>IN: extra info for variables in text mode</i>
  2307. char * <b>fname</b>, <i>IN: File name</i>
  2308. FILE * <b>fp</b> <i>IN: File pointer to the store file</i>
  2309. )
  2310. </pre>
  2311. <dd> Dumps the argument BDD to file. Dumping is done through
  2312. Dddmp_cuddBddArrayStore. A dummy array of 1 BDD root is
  2313. used for this purpose.
  2314. <p>
  2315. <dd> <b>Side Effects</b> Nodes are temporarily removed from unique hash. They are
  2316. re-linked after the store operation in a modified order.
  2317. <p>
  2318. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddLoad">Dddmp_cuddBddLoad</a>
  2319. <a href="#Dddmp_cuddBddArrayLoad">Dddmp_cuddBddArrayLoad</a>
  2320. </code>
  2321. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreBdd.c"TARGET="ABSTRACT"><CODE>dddmpStoreBdd.c</CODE></A>
  2322. <dt><pre>
  2323. <A NAME="Dddmp_cuddHeaderLoadCnf"></A>
  2324. int <I></I>
  2325. <B>Dddmp_cuddHeaderLoadCnf</B>(
  2326. int * <b>nVars</b>, <i>OUT: number of DD variables</i>
  2327. int * <b>nsuppvars</b>, <i>OUT: number of support variables</i>
  2328. char *** <b>suppVarNames</b>, <i>OUT: array of support variable names</i>
  2329. char *** <b>orderedVarNames</b>, <i>OUT: array of variable names</i>
  2330. int ** <b>varIds</b>, <i>OUT: array of variable ids</i>
  2331. int ** <b>varComposeIds</b>, <i>OUT: array of permids ids</i>
  2332. int ** <b>varAuxIds</b>, <i>OUT: array of variable aux ids</i>
  2333. int * <b>nRoots</b>, <i>OUT: number of root in the file</i>
  2334. char * <b>file</b>, <i>IN: file name</i>
  2335. FILE * <b>fp</b> <i>IN: file pointer</i>
  2336. )
  2337. </pre>
  2338. <dd> Reads the header of a dump file representing the argument BDDs.
  2339. Returns main information regarding DD type stored in the file,
  2340. the variable ordering used, the number of variables, etc.
  2341. It reads only the header of the file NOT the BDD/ADD section.
  2342. <p>
  2343. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddArrayLoad">Dddmp_cuddBddArrayLoad</a>
  2344. </code>
  2345. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpLoadCnf.c"TARGET="ABSTRACT"><CODE>dddmpLoadCnf.c</CODE></A>
  2346. <dt><pre>
  2347. <A NAME="Dddmp_cuddHeaderLoad"></A>
  2348. int <I></I>
  2349. <B>Dddmp_cuddHeaderLoad</B>(
  2350. Dddmp_DecompType * <b>ddType</b>, <i>OUT: selects the proper decomp type</i>
  2351. int * <b>nVars</b>, <i>OUT: number of DD variables</i>
  2352. int * <b>nsuppvars</b>, <i>OUT: number of support variables</i>
  2353. char *** <b>suppVarNames</b>, <i>OUT: array of support variable names</i>
  2354. char *** <b>orderedVarNames</b>, <i>OUT: array of variable names</i>
  2355. int ** <b>varIds</b>, <i>OUT: array of variable ids</i>
  2356. int ** <b>varComposeIds</b>, <i>OUT: array of permids ids</i>
  2357. int ** <b>varAuxIds</b>, <i>OUT: array of variable aux ids</i>
  2358. int * <b>nRoots</b>, <i>OUT: number of root in the file</i>
  2359. char * <b>file</b>, <i>IN: file name</i>
  2360. FILE * <b>fp</b> <i>IN: file pointer</i>
  2361. )
  2362. </pre>
  2363. <dd> Reads the header of a dump file representing the argument BDDs.
  2364. Returns main information regarding DD type stored in the file,
  2365. the variable ordering used, the number of variables, etc.
  2366. It reads only the header of the file NOT the BDD/ADD section.
  2367. <p>
  2368. <dd> <b>See Also</b> <code><a href="#Dddmp_cuddBddArrayLoad">Dddmp_cuddBddArrayLoad</a>
  2369. </code>
  2370. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpLoad.c"TARGET="ABSTRACT"><CODE>dddmpLoad.c</CODE></A>
  2371. <dt><pre>
  2372. <A NAME="FindVarname"></A>
  2373. int <I></I>
  2374. <B>FindVarname</B>(
  2375. char * <b>name</b>, <i>IN: name to look for</i>
  2376. char ** <b>array</b>, <i>IN: search array</i>
  2377. int <b>n</b> <i>IN: size of the array</i>
  2378. )
  2379. </pre>
  2380. <dd> Binary search of a name within a sorted array of strings.
  2381. Used when matching names of variables.
  2382. <p>
  2383. <dd> <b>Side Effects</b> None
  2384. <p>
  2385. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpUtil.c"TARGET="ABSTRACT"><CODE>dddmpUtil.c</CODE></A>
  2386. <dt><pre>
  2387. <A NAME="NodeBinaryStoreBdd"></A>
  2388. static int <I></I>
  2389. <B>NodeBinaryStoreBdd</B>(
  2390. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2391. DdNode * <b>f</b>, <i>IN: DD node to be stored</i>
  2392. int <b>mode</b>, <i>IN: store mode</i>
  2393. int * <b>supportids</b>, <i>IN: internal ids for variables</i>
  2394. char ** <b>varnames</b>, <i>IN: names of variables: to be stored with nodes</i>
  2395. int * <b>outids</b>, <i>IN: output ids for variables</i>
  2396. FILE * <b>fp</b>, <i>IN: store file</i>
  2397. int <b>idf</b>, <i>IN: index of the node</i>
  2398. int <b>vf</b>, <i>IN: variable of the node</i>
  2399. int <b>idT</b>, <i>IN: index of the Then node</i>
  2400. int <b>idE</b>, <i>IN: index of the Else node</i>
  2401. int <b>vT</b>, <i>IN: variable of the Then node</i>
  2402. int <b>vE</b>, <i>IN: variable of the Else node</i>
  2403. DdNode * <b>T</b>, <i>IN: Then node</i>
  2404. DdNode * <b>E</b> <i>IN: Else node</i>
  2405. )
  2406. </pre>
  2407. <dd> Store 1 0 0 for the terminal node.
  2408. Store id, left child pointer, right pointer for all the other nodes.
  2409. Store every information as coded binary values.
  2410. <p>
  2411. <dd> <b>Side Effects</b> None
  2412. <p>
  2413. <dd> <b>See Also</b> <code><a href="#NodeTextStoreBdd">NodeTextStoreBdd</a>
  2414. </code>
  2415. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreBdd.c"TARGET="ABSTRACT"><CODE>dddmpStoreBdd.c</CODE></A>
  2416. <dt><pre>
  2417. <A NAME="NodeStoreRecurAdd"></A>
  2418. static int <I></I>
  2419. <B>NodeStoreRecurAdd</B>(
  2420. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2421. DdNode * <b>f</b>, <i>IN: DD node to be stored</i>
  2422. int <b>mode</b>, <i>IN: store mode</i>
  2423. int * <b>supportids</b>, <i>IN: internal ids for variables</i>
  2424. char ** <b>varnames</b>, <i>IN: names of variables: to be stored with nodes</i>
  2425. int * <b>outids</b>, <i>IN: output ids for variables</i>
  2426. FILE * <b>fp</b> <i>IN: store file</i>
  2427. )
  2428. </pre>
  2429. <dd> Stores a node to file in either test or binary mode.<l>
  2430. In text mode a node is represented (on a text line basis) as
  2431. <UL>
  2432. <LI> node-index [var-extrainfo] var-index Then-index Else-index
  2433. </UL>
  2434. where all indexes are integer numbers and var-extrainfo
  2435. (optional redundant field) is either an integer or a string
  2436. (variable name). Node-index is redundant (due to the node
  2437. ordering) but we keep it for readability.<p>
  2438. In binary mode nodes are represented as a sequence of bytes,
  2439. representing var-index, Then-index, and Else-index in an
  2440. optimized way. Only the first byte (code) is mandatory.
  2441. Integer indexes are represented in absolute or relative mode,
  2442. where relative means offset wrt. a Then/Else node info.
  2443. Suppose Var(NodeId), Then(NodeId) and Else(NodeId) represent
  2444. infos about a given node.<p>
  2445. The generic "NodeId" node is stored as
  2446. <UL>
  2447. <LI> code-byte
  2448. <LI> [var-info]
  2449. <LI> [Then-info]
  2450. <LI> [Else-info]
  2451. </UL>
  2452. where code-byte contains bit fields
  2453. <UL>
  2454. <LI>Unused : 1 bit
  2455. <LI>Variable: 2 bits, one of the following codes
  2456. <UL>
  2457. <LI>DDDMP_ABSOLUTE_ID var-info = Var(NodeId) follows
  2458. <LI>DDDMP_RELATIVE_ID Var(NodeId) is represented in relative form as
  2459. var-info = Min(Var(Then(NodeId)),Var(Else(NodeId))) -Var(NodeId)
  2460. <LI>DDDMP_RELATIVE_1 No var-info follows, because
  2461. Var(NodeId) = Min(Var(Then(NodeId)),Var(Else(NodeId)))-1
  2462. <LI>DDDMP_TERMINAL Node is a terminal, no var info required
  2463. </UL>
  2464. <LI>T : 2 bits, with codes similar to V
  2465. <UL>
  2466. <LI>DDDMP_ABSOLUTE_ID Then-info = Then(NodeId) follows
  2467. <LI>DDDMP_RELATIVE_ID Then(NodeId) is represented in relative form as
  2468. Then-info = Nodeid-Then(NodeId)
  2469. <LI>DDDMP_RELATIVE_1 No info on Then(NodeId) follows, because
  2470. Then(NodeId) = NodeId-1
  2471. <LI>DDDMP_TERMINAL Then Node is a terminal, no info required (for BDDs)
  2472. </UL>
  2473. <LI>Ecompl : 1 bit, if 1 means complemented edge
  2474. <LI>E : 2 bits, with codes and meanings as for the Then edge
  2475. </UL>
  2476. var-info, Then-info, Else-info (if required) are represented as unsigned
  2477. integer values on a sufficient set of bytes (MSByte first).
  2478. <p>
  2479. <dd> <b>Side Effects</b> None
  2480. <p>
  2481. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreAdd.c"TARGET="ABSTRACT"><CODE>dddmpStoreAdd.c</CODE></A>
  2482. <dt><pre>
  2483. <A NAME="NodeStoreRecurBdd"></A>
  2484. static int <I></I>
  2485. <B>NodeStoreRecurBdd</B>(
  2486. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2487. DdNode * <b>f</b>, <i>IN: DD node to be stored</i>
  2488. int <b>mode</b>, <i>IN: store mode</i>
  2489. int * <b>supportids</b>, <i>IN: internal ids for variables</i>
  2490. char ** <b>varnames</b>, <i>IN: names of variables: to be stored with nodes</i>
  2491. int * <b>outids</b>, <i>IN: output ids for variables</i>
  2492. FILE * <b>fp</b> <i>IN: store file</i>
  2493. )
  2494. </pre>
  2495. <dd> Stores a node to file in either test or binary mode.<l>
  2496. In text mode a node is represented (on a text line basis) as
  2497. <UL>
  2498. <LI> node-index [var-extrainfo] var-index Then-index Else-index
  2499. </UL>
  2500. where all indexes are integer numbers and var-extrainfo
  2501. (optional redundant field) is either an integer or a string
  2502. (variable name). Node-index is redundant (due to the node
  2503. ordering) but we keep it for readability.<p>
  2504. In binary mode nodes are represented as a sequence of bytes,
  2505. representing var-index, Then-index, and Else-index in an
  2506. optimized way. Only the first byte (code) is mandatory.
  2507. Integer indexes are represented in absolute or relative mode,
  2508. where relative means offset wrt. a Then/Else node info.
  2509. Suppose Var(NodeId), Then(NodeId) and Else(NodeId) represent
  2510. infos about a given node.<p>
  2511. The generic "NodeId" node is stored as
  2512. <UL>
  2513. <LI> code-byte
  2514. <LI> [var-info]
  2515. <LI> [Then-info]
  2516. <LI> [Else-info]
  2517. </UL>
  2518. where code-byte contains bit fields
  2519. <UL>
  2520. <LI>Unused : 1 bit
  2521. <LI>Variable: 2 bits, one of the following codes
  2522. <UL>
  2523. <LI>DDDMP_ABSOLUTE_ID var-info = Var(NodeId) follows
  2524. <LI>DDDMP_RELATIVE_ID Var(NodeId) is represented in relative form as
  2525. var-info = Min(Var(Then(NodeId)),Var(Else(NodeId))) -Var(NodeId)
  2526. <LI>DDDMP_RELATIVE_1 No var-info follows, because
  2527. Var(NodeId) = Min(Var(Then(NodeId)),Var(Else(NodeId)))-1
  2528. <LI>DDDMP_TERMINAL Node is a terminal, no var info required
  2529. </UL>
  2530. <LI>T : 2 bits, with codes similar to V
  2531. <UL>
  2532. <LI>DDDMP_ABSOLUTE_ID Then-info = Then(NodeId) follows
  2533. <LI>DDDMP_RELATIVE_ID Then(NodeId) is represented in relative form as
  2534. Then-info = Nodeid-Then(NodeId)
  2535. <LI>DDDMP_RELATIVE_1 No info on Then(NodeId) follows, because
  2536. Then(NodeId) = NodeId-1
  2537. <LI>DDDMP_TERMINAL Then Node is a terminal, no info required (for BDDs)
  2538. </UL>
  2539. <LI>Ecompl : 1 bit, if 1 means complemented edge
  2540. <LI>E : 2 bits, with codes and meanings as for the Then edge
  2541. </UL>
  2542. var-info, Then-info, Else-info (if required) are represented as unsigned
  2543. integer values on a sufficient set of bytes (MSByte first).
  2544. <p>
  2545. <dd> <b>Side Effects</b> None
  2546. <p>
  2547. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreBdd.c"TARGET="ABSTRACT"><CODE>dddmpStoreBdd.c</CODE></A>
  2548. <dt><pre>
  2549. <A NAME="NodeTextStoreAdd"></A>
  2550. static int <I></I>
  2551. <B>NodeTextStoreAdd</B>(
  2552. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2553. DdNode * <b>f</b>, <i>IN: DD node to be stored</i>
  2554. int <b>mode</b>, <i>IN: store mode</i>
  2555. int * <b>supportids</b>, <i>IN: internal ids for variables</i>
  2556. char ** <b>varnames</b>, <i>IN: names of variables: to be stored with nodes</i>
  2557. int * <b>outids</b>, <i>IN: output ids for variables</i>
  2558. FILE * <b>fp</b>, <i>IN: Store file</i>
  2559. int <b>idf</b>, <i>IN: index of the current node</i>
  2560. int <b>vf</b>, <i>IN: variable of the current node</i>
  2561. int <b>idT</b>, <i>IN: index of the Then node</i>
  2562. int <b>idE</b> <i>IN: index of the Else node</i>
  2563. )
  2564. </pre>
  2565. <dd> Store 1 0 0 for the terminal node.
  2566. Store id, left child pointer, right pointer for all the other nodes.
  2567. <p>
  2568. <dd> <b>Side Effects</b> None
  2569. <p>
  2570. <dd> <b>See Also</b> <code><a href="#NodeBinaryStore">NodeBinaryStore</a>
  2571. </code>
  2572. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreAdd.c"TARGET="ABSTRACT"><CODE>dddmpStoreAdd.c</CODE></A>
  2573. <dt><pre>
  2574. <A NAME="NodeTextStoreBdd"></A>
  2575. static int <I></I>
  2576. <B>NodeTextStoreBdd</B>(
  2577. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2578. DdNode * <b>f</b>, <i>IN: DD node to be stored</i>
  2579. int <b>mode</b>, <i>IN: store mode</i>
  2580. int * <b>supportids</b>, <i>IN: internal ids for variables</i>
  2581. char ** <b>varnames</b>, <i>IN: names of variables: to be stored with nodes</i>
  2582. int * <b>outids</b>, <i>IN: output ids for variables</i>
  2583. FILE * <b>fp</b>, <i>IN: Store file</i>
  2584. int <b>idf</b>, <i>IN: index of the current node</i>
  2585. int <b>vf</b>, <i>IN: variable of the current node</i>
  2586. int <b>idT</b>, <i>IN: index of the Then node</i>
  2587. int <b>idE</b> <i>IN: index of the Else node</i>
  2588. )
  2589. </pre>
  2590. <dd> Store 1 0 0 for the terminal node.
  2591. Store id, left child pointer, right pointer for all the other nodes.
  2592. <p>
  2593. <dd> <b>Side Effects</b> None
  2594. <p>
  2595. <dd> <b>See Also</b> <code><a href="#NodeBinaryStoreBdd">NodeBinaryStoreBdd</a>
  2596. </code>
  2597. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreBdd.c"TARGET="ABSTRACT"><CODE>dddmpStoreBdd.c</CODE></A>
  2598. <dt><pre>
  2599. <A NAME="NumberNodeRecurAdd"></A>
  2600. static int <I></I>
  2601. <B>NumberNodeRecurAdd</B>(
  2602. DdNode * <b>f</b>, <i>IN: root of the BDD to be numbered</i>
  2603. int <b>id</b> <i>IN/OUT: index to be assigned to the node</i>
  2604. )
  2605. </pre>
  2606. <dd> Number nodes recursively in post-order.
  2607. The "visited" flag is used with inverse polarity, because all nodes
  2608. were set "visited" when removing them from unique.
  2609. <p>
  2610. <dd> <b>Side Effects</b> "visited" flags are reset.
  2611. <p>
  2612. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeAdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeAdd.c</CODE></A>
  2613. <dt><pre>
  2614. <A NAME="NumberNodeRecurBdd"></A>
  2615. static int <I></I>
  2616. <B>NumberNodeRecurBdd</B>(
  2617. DdNode * <b>f</b>, <i>IN: root of the BDD to be numbered</i>
  2618. int <b>id</b> <i>IN/OUT: index to be assigned to the node</i>
  2619. )
  2620. </pre>
  2621. <dd> Number nodes recursively in post-order.
  2622. The "visited" flag is used with inverse polarity, because all nodes
  2623. were set "visited" when removing them from unique.
  2624. <p>
  2625. <dd> <b>Side Effects</b> "visited" flags are reset.
  2626. <p>
  2627. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeBdd.c</CODE></A>
  2628. <dt><pre>
  2629. <A NAME="NumberNodeRecurCnf"></A>
  2630. static int <I></I>
  2631. <B>NumberNodeRecurCnf</B>(
  2632. DdNode * <b>f</b>, <i>IN: root of the BDD to be numbered</i>
  2633. int * <b>cnfIds</b>, <i>IN: possible source for numbering</i>
  2634. int <b>id</b> <i>IN/OUT: possible source for numbering</i>
  2635. )
  2636. </pre>
  2637. <dd> Number nodes recursively in post-order.
  2638. The "visited" flag is used with inverse polarity, because all nodes
  2639. were set "visited" when removing them from unique.
  2640. <p>
  2641. <dd> <b>Side Effects</b> "visited" flags are reset.
  2642. <p>
  2643. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  2644. <dt><pre>
  2645. <A NAME="NumberNodeRecurCnf"></A>
  2646. static int <I></I>
  2647. <B>NumberNodeRecurCnf</B>(
  2648. DdNode * <b>f</b>, <i>IN: root of the BDD to be numbered</i>
  2649. int * <b>cnfIds</b>, <i>IN: possible source for numbering</i>
  2650. int <b>id</b> <i>IN/OUT: possible source for numbering</i>
  2651. )
  2652. </pre>
  2653. <dd> Number nodes recursively in post-order.
  2654. The "visited" flag is used with inverse polarity, because all nodes
  2655. were set "visited" when removing them from unique.
  2656. <p>
  2657. <dd> <b>Side Effects</b> "visited" flags are reset.
  2658. <p>
  2659. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  2660. <dt><pre>
  2661. <A NAME="NumberNodeRecur"></A>
  2662. static int <I></I>
  2663. <B>NumberNodeRecur</B>(
  2664. DdNode * <b>f</b>, <i>IN: root of the BDD to be numbered</i>
  2665. int <b>id</b> <i>IN/OUT: index to be assigned to the node</i>
  2666. )
  2667. </pre>
  2668. <dd> Number nodes recursively in post-order.
  2669. The "visited" flag is used with inverse polarity, because all nodes
  2670. were set "visited" when removing them from unique.
  2671. <p>
  2672. <dd> <b>Side Effects</b> "visited" flags are reset.
  2673. <p>
  2674. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeBdd.c</CODE></A>
  2675. <dt><pre>
  2676. <A NAME="QsortStrcmp"></A>
  2677. int <I></I>
  2678. <B>QsortStrcmp</B>(
  2679. const void * <b>ps1</b>, <i>IN: pointer to the first string</i>
  2680. const void * <b>ps2</b> <i>IN: pointer to the second string</i>
  2681. )
  2682. </pre>
  2683. <dd> String compare for qsort
  2684. <p>
  2685. <dd> <b>Side Effects</b> None
  2686. <p>
  2687. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpUtil.c"TARGET="ABSTRACT"><CODE>dddmpUtil.c</CODE></A>
  2688. <dt><pre>
  2689. <A NAME="ReadByteBinary"></A>
  2690. static int <I></I>
  2691. <B>ReadByteBinary</B>(
  2692. FILE * <b>fp</b>, <i>IN: file where to read the byte</i>
  2693. unsigned char * <b>cp</b> <i>OUT: the read byte</i>
  2694. )
  2695. </pre>
  2696. <dd> inputs a byte to file fp. 0x00 has been used as escape character
  2697. to filter <CR>, <LF> and <ctrl-Z>. This is done for
  2698. compatibility between unix and dos/windows systems.
  2699. <p>
  2700. <dd> <b>Side Effects</b> None
  2701. <p>
  2702. <dd> <b>See Also</b> <code><a href="#WriteByteBinary()">WriteByteBinary()</a>
  2703. </code>
  2704. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpBinary.c"TARGET="ABSTRACT"><CODE>dddmpBinary.c</CODE></A>
  2705. <dt><pre>
  2706. <A NAME="RemoveFromUniqueRecurAdd"></A>
  2707. static void <I></I>
  2708. <B>RemoveFromUniqueRecurAdd</B>(
  2709. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2710. DdNode * <b>f</b> <i>IN: root of the BDD to be extracted</i>
  2711. )
  2712. </pre>
  2713. <dd> Removes a node from the unique table by locating the proper
  2714. subtable and unlinking the node from it. It recurs on the
  2715. children of the node. Constants remain untouched.
  2716. <p>
  2717. <dd> <b>Side Effects</b> Nodes are left with the "visited" flag true.
  2718. <p>
  2719. <dd> <b>See Also</b> <code><a href="#RestoreInUniqueRecurAdd">RestoreInUniqueRecurAdd</a>
  2720. ()
  2721. </code>
  2722. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeAdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeAdd.c</CODE></A>
  2723. <dt><pre>
  2724. <A NAME="RemoveFromUniqueRecurBdd"></A>
  2725. static void <I></I>
  2726. <B>RemoveFromUniqueRecurBdd</B>(
  2727. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2728. DdNode * <b>f</b> <i>IN: root of the BDD to be extracted</i>
  2729. )
  2730. </pre>
  2731. <dd> Removes a node from the unique table by locating the proper
  2732. subtable and unlinking the node from it. It recurs on the
  2733. children of the node. Constants remain untouched.
  2734. <p>
  2735. <dd> <b>Side Effects</b> Nodes are left with the "visited" flag true.
  2736. <p>
  2737. <dd> <b>See Also</b> <code><a href="#RestoreInUniqueRecurBdd">RestoreInUniqueRecurBdd</a>
  2738. ()
  2739. </code>
  2740. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeBdd.c</CODE></A>
  2741. <dt><pre>
  2742. <A NAME="RemoveFromUniqueRecurCnf"></A>
  2743. static void <I></I>
  2744. <B>RemoveFromUniqueRecurCnf</B>(
  2745. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2746. DdNode * <b>f</b> <i>IN: root of the BDD to be extracted</i>
  2747. )
  2748. </pre>
  2749. <dd> Removes a node from the unique table by locating the proper
  2750. subtable and unlinking the node from it. It recurs on on the
  2751. children of the node. Constants remain untouched.
  2752. <p>
  2753. <dd> <b>Side Effects</b> Nodes are left with the "visited" flag true.
  2754. <p>
  2755. <dd> <b>See Also</b> <code><a href="#RestoreInUniqueRecurCnf()">RestoreInUniqueRecurCnf()</a>
  2756. </code>
  2757. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  2758. <dt><pre>
  2759. <A NAME="RemoveFromUniqueRecurCnf"></A>
  2760. static void <I></I>
  2761. <B>RemoveFromUniqueRecurCnf</B>(
  2762. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2763. DdNode * <b>f</b> <i>IN: root of the BDD to be extracted</i>
  2764. )
  2765. </pre>
  2766. <dd> Removes a node from the unique table by locating the proper
  2767. subtable and unlinking the node from it. It recurs on son nodes.
  2768. <p>
  2769. <dd> <b>Side Effects</b> Nodes are left with the "visited" flag true.
  2770. <p>
  2771. <dd> <b>See Also</b> <code><a href="#RestoreInUniqueRecurCnf()">RestoreInUniqueRecurCnf()</a>
  2772. </code>
  2773. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  2774. <dt><pre>
  2775. <A NAME="RemoveFromUniqueRecur"></A>
  2776. static void <I></I>
  2777. <B>RemoveFromUniqueRecur</B>(
  2778. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2779. DdNode * <b>f</b> <i>IN: root of the BDD to be extracted</i>
  2780. )
  2781. </pre>
  2782. <dd> Removes a node from the unique table by locating the proper
  2783. subtable and unlinking the node from it. It recurs on the
  2784. children of the node.
  2785. <p>
  2786. <dd> <b>Side Effects</b> Nodes are left with the "visited" flag true.
  2787. <p>
  2788. <dd> <b>See Also</b> <code><a href="#RestoreInUniqueRecur()">RestoreInUniqueRecur()</a>
  2789. </code>
  2790. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeBdd.c</CODE></A>
  2791. <dt><pre>
  2792. <A NAME="RestoreInUniqueRecurAdd"></A>
  2793. static void <I></I>
  2794. <B>RestoreInUniqueRecurAdd</B>(
  2795. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2796. DdNode * <b>f</b> <i>IN: root of the BDD to be restored</i>
  2797. )
  2798. </pre>
  2799. <dd> Restores a node in unique table (recursively)
  2800. <p>
  2801. <dd> <b>Side Effects</b> Nodes are not restored in the same order as before removal
  2802. <p>
  2803. <dd> <b>See Also</b> <code><a href="#RemoveFromUniqueAdd">RemoveFromUniqueAdd</a>
  2804. ()
  2805. </code>
  2806. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeAdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeAdd.c</CODE></A>
  2807. <dt><pre>
  2808. <A NAME="RestoreInUniqueRecurBdd"></A>
  2809. static void <I></I>
  2810. <B>RestoreInUniqueRecurBdd</B>(
  2811. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2812. DdNode * <b>f</b> <i>IN: root of the BDD to be restored</i>
  2813. )
  2814. </pre>
  2815. <dd> Restores a node in unique table (recursively)
  2816. <p>
  2817. <dd> <b>Side Effects</b> Nodes are not restored in the same order as before removal
  2818. <p>
  2819. <dd> <b>See Also</b> <code><a href="#RemoveFromUnique()">RemoveFromUnique()</a>
  2820. </code>
  2821. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpNodeBdd.c</CODE></A>
  2822. <dt><pre>
  2823. <A NAME="RestoreInUniqueRecurCnf"></A>
  2824. static void <I></I>
  2825. <B>RestoreInUniqueRecurCnf</B>(
  2826. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2827. DdNode * <b>f</b> <i>IN: root of the BDD to be restored</i>
  2828. )
  2829. </pre>
  2830. <dd> Restores a node in unique table (recursive)
  2831. <p>
  2832. <dd> <b>Side Effects</b> Nodes are not restored in the same order as before removal
  2833. <p>
  2834. <dd> <b>See Also</b> <code><a href="#RemoveFromUnique()">RemoveFromUnique()</a>
  2835. </code>
  2836. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeCnf.c</CODE></A>
  2837. <dt><pre>
  2838. <A NAME="RestoreInUniqueRecurCnf"></A>
  2839. static void <I></I>
  2840. <B>RestoreInUniqueRecurCnf</B>(
  2841. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2842. DdNode * <b>f</b> <i>IN: root of the BDD to be restored</i>
  2843. )
  2844. </pre>
  2845. <dd> Restores a node in unique table (recursive)
  2846. <p>
  2847. <dd> <b>Side Effects</b> Nodes are not restored in the same order as before removal
  2848. <p>
  2849. <dd> <b>See Also</b> <code><a href="#RemoveFromUnique()">RemoveFromUnique()</a>
  2850. </code>
  2851. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpNodeCnf.c"TARGET="ABSTRACT"><CODE>dddmpNodeCnf.c</CODE></A>
  2852. <dt><pre>
  2853. <A NAME="RestoreInUniqueRecur"></A>
  2854. static void <I></I>
  2855. <B>RestoreInUniqueRecur</B>(
  2856. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2857. DdNode * <b>f</b> <i>IN: root of the BDD to be restored</i>
  2858. )
  2859. </pre>
  2860. <dd> Restores a node in unique table (recursively)
  2861. <p>
  2862. <dd> <b>Side Effects</b> Nodes are not restored in the same order as before removal
  2863. <p>
  2864. <dd> <b>See Also</b> <code><a href="#RemoveFromUnique()">RemoveFromUnique()</a>
  2865. </code>
  2866. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpDdNodeBdd.c"TARGET="ABSTRACT"><CODE>dddmpDdNodeBdd.c</CODE></A>
  2867. <dt><pre>
  2868. <A NAME="StoreCnfBestNotSharedRecur"></A>
  2869. static int <I></I>
  2870. <B>StoreCnfBestNotSharedRecur</B>(
  2871. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2872. DdNode * <b>node</b>, <i>IN: BDD to store</i>
  2873. int <b>idf</b>, <i>IN: Id to store</i>
  2874. int * <b>bddIds</b>, <i>IN: BDD identifiers</i>
  2875. int * <b>cnfIds</b>, <i>IN: corresponding CNF identifiers</i>
  2876. FILE * <b>fp</b>, <i>IN: file pointer</i>
  2877. int * <b>list</b>, <i>IN: temporary array to store cubes</i>
  2878. int * <b>clauseN</b>, <i>OUT: number of stored clauses</i>
  2879. int * <b>varMax</b> <i>OUT: maximum identifier of the variables created</i>
  2880. )
  2881. </pre>
  2882. <dd> Performs the recursive step of Print Best on Not Shared
  2883. sub-BDDs, i.e., print out information for the nodes belonging to
  2884. BDDs not shared (whose root has just one incoming edge).
  2885. <p>
  2886. <dd> <b>Side Effects</b> None
  2887. <p>
  2888. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreCnf.c"TARGET="ABSTRACT"><CODE>dddmpStoreCnf.c</CODE></A>
  2889. <dt><pre>
  2890. <A NAME="StoreCnfBestSharedRecur"></A>
  2891. static int <I></I>
  2892. <B>StoreCnfBestSharedRecur</B>(
  2893. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2894. DdNode * <b>node</b>, <i>IN: BDD to store</i>
  2895. int * <b>bddIds</b>, <i>IN: BDD identifiers</i>
  2896. int * <b>cnfIds</b>, <i>IN: corresponding CNF identifiers</i>
  2897. FILE * <b>fp</b>, <i>IN: file pointer</i>
  2898. int * <b>list</b>, <i>IN: temporary array to store cubes</i>
  2899. int * <b>clauseN</b>, <i>OUT: number of stored clauses</i>
  2900. int * <b>varMax</b> <i>OUT: maximum identifier of the variables created</i>
  2901. )
  2902. </pre>
  2903. <dd> Performs the recursive step of Print Best on Not Shared
  2904. sub-BDDs, i.e., print out information for the nodes belonging to
  2905. BDDs not shared (whose root has just one incoming edge).
  2906. <p>
  2907. <dd> <b>Side Effects</b> None
  2908. <p>
  2909. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreCnf.c"TARGET="ABSTRACT"><CODE>dddmpStoreCnf.c</CODE></A>
  2910. <dt><pre>
  2911. <A NAME="StoreCnfBest"></A>
  2912. static int <I></I>
  2913. <B>StoreCnfBest</B>(
  2914. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2915. DdNode ** <b>f</b>, <i>IN: array of BDDs to store</i>
  2916. int <b>rootN</b>, <i>IN: number of BDD in the array</i>
  2917. int * <b>bddIds</b>, <i>IN: BDD identifiers</i>
  2918. int * <b>cnfIds</b>, <i>IN: corresponding CNF identifiers</i>
  2919. int <b>idInitial</b>, <i>IN: initial value for numbering new CNF variables</i>
  2920. FILE * <b>fp</b>, <i>IN: file pointer</i>
  2921. int * <b>varMax</b>, <i>OUT: maximum identifier of the variables created</i>
  2922. int * <b>clauseN</b>, <i>OUT: number of stored clauses</i>
  2923. int * <b>rootStartLine</b> <i>OUT: line where root starts</i>
  2924. )
  2925. </pre>
  2926. <dd> Prints a disjoint sum of product cover for the function
  2927. rooted at node intorducing cutting points whenever necessary.
  2928. Each product corresponds to a path from node a leaf
  2929. node different from the logical zero, and different from the
  2930. background value. Uses the standard output. Returns 1 if
  2931. successful, 0 otherwise.
  2932. <p>
  2933. <dd> <b>Side Effects</b> None
  2934. <p>
  2935. <dd> <b>See Also</b> <code><a href="#StoreCnfMaxtermByMaxterm">StoreCnfMaxtermByMaxterm</a>
  2936. </code>
  2937. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreCnf.c"TARGET="ABSTRACT"><CODE>dddmpStoreCnf.c</CODE></A>
  2938. <dt><pre>
  2939. <A NAME="StoreCnfMaxtermByMaxtermRecur"></A>
  2940. static void <I></I>
  2941. <B>StoreCnfMaxtermByMaxtermRecur</B>(
  2942. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2943. DdNode * <b>node</b>, <i>IN: BDD to store</i>
  2944. int * <b>bddIds</b>, <i>IN: BDD identifiers</i>
  2945. int * <b>cnfIds</b>, <i>IN: corresponding CNF identifiers</i>
  2946. FILE * <b>fp</b>, <i>IN: file pointer</i>
  2947. int * <b>list</b>, <i>IN: temporary array to store cubes</i>
  2948. int * <b>clauseN</b>, <i>OUT: number of stored clauses</i>
  2949. int * <b>varMax</b> <i>OUT: maximum identifier of the variables created</i>
  2950. )
  2951. </pre>
  2952. <dd> Performs the recursive step of Print Maxterm.
  2953. Traverse a BDD a print out a cube in CNF format each time a terminal
  2954. node is reached.
  2955. <p>
  2956. <dd> <b>Side Effects</b> None
  2957. <p>
  2958. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreCnf.c"TARGET="ABSTRACT"><CODE>dddmpStoreCnf.c</CODE></A>
  2959. <dt><pre>
  2960. <A NAME="StoreCnfMaxtermByMaxterm"></A>
  2961. static int <I></I>
  2962. <B>StoreCnfMaxtermByMaxterm</B>(
  2963. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2964. DdNode ** <b>f</b>, <i>IN: array of BDDs to store</i>
  2965. int <b>rootN</b>, <i>IN: number of BDDs in the array</i>
  2966. int * <b>bddIds</b>, <i>IN: BDD Identifiers</i>
  2967. int * <b>cnfIds</b>, <i>IN: corresponding CNF Identifiers</i>
  2968. int <b>idInitial</b>, <i>IN: initial value for numbering new CNF variables</i>
  2969. FILE * <b>fp</b>, <i>IN: file pointer</i>
  2970. int * <b>varMax</b>, <i>OUT: maximum identifier of the variables created</i>
  2971. int * <b>clauseN</b>, <i>OUT: number of stored clauses</i>
  2972. int * <b>rootStartLine</b> <i>OUT: line where root starts</i>
  2973. )
  2974. </pre>
  2975. <dd> Prints a disjoint sum of product cover for the function
  2976. rooted at node. Each product corresponds to a path from node a
  2977. leaf node different from the logical zero, and different from
  2978. the background value. Uses the standard output. Returns 1 if
  2979. successful, 0 otherwise.
  2980. <p>
  2981. <dd> <b>Side Effects</b> None
  2982. <p>
  2983. <dd> <b>See Also</b> <code><a href="#StoreCnfBest">StoreCnfBest</a>
  2984. </code>
  2985. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreCnf.c"TARGET="ABSTRACT"><CODE>dddmpStoreCnf.c</CODE></A>
  2986. <dt><pre>
  2987. <A NAME="StoreCnfNodeByNodeRecur"></A>
  2988. static int <I></I>
  2989. <B>StoreCnfNodeByNodeRecur</B>(
  2990. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  2991. DdNode * <b>f</b>, <i>IN: BDD node to be stored</i>
  2992. int * <b>bddIds</b>, <i>IN: BDD ids for variables</i>
  2993. int * <b>cnfIds</b>, <i>IN: CNF ids for variables</i>
  2994. FILE * <b>fp</b>, <i>IN: store file</i>
  2995. int * <b>clauseN</b>, <i>OUT: number of clauses written in the CNF file</i>
  2996. int * <b>varMax</b> <i>OUT: maximum value of id written in the CNF file</i>
  2997. )
  2998. </pre>
  2999. <dd> Performs the recursive step of Dddmp_bddStore.
  3000. Traverse the BDD and store a CNF formula for each "terminal" node.
  3001. <p>
  3002. <dd> <b>Side Effects</b> None
  3003. <p>
  3004. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreCnf.c"TARGET="ABSTRACT"><CODE>dddmpStoreCnf.c</CODE></A>
  3005. <dt><pre>
  3006. <A NAME="StoreCnfNodeByNode"></A>
  3007. static int <I></I>
  3008. <B>StoreCnfNodeByNode</B>(
  3009. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  3010. DdNode ** <b>f</b>, <i>IN: BDD array to be stored</i>
  3011. int <b>rootN</b>, <i>IN: number of BDDs in the array</i>
  3012. int * <b>bddIds</b>, <i>IN: BDD ids for variables</i>
  3013. int * <b>cnfIds</b>, <i>IN: CNF ids for variables</i>
  3014. FILE * <b>fp</b>, <i>IN: store file</i>
  3015. int * <b>clauseN</b>, <i>IN/OUT: number of clauses written in the CNF file</i>
  3016. int * <b>varMax</b>, <i>IN/OUT: maximum value of id written in the CNF file</i>
  3017. int * <b>rootStartLine</b> <i>OUT: CNF line where root starts</i>
  3018. )
  3019. </pre>
  3020. <dd> Store the BDD as CNF clauses.
  3021. Use a multiplexer description for each BDD node.
  3022. <p>
  3023. <dd> <b>Side Effects</b> None
  3024. <p>
  3025. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreCnf.c"TARGET="ABSTRACT"><CODE>dddmpStoreCnf.c</CODE></A>
  3026. <dt><pre>
  3027. <A NAME="StoreCnfOneNode"></A>
  3028. static int <I></I>
  3029. <B>StoreCnfOneNode</B>(
  3030. DdNode * <b>f</b>, <i>IN: node to be stored</i>
  3031. int <b>idf</b>, <i>IN: node CNF Index</i>
  3032. int <b>vf</b>, <i>IN: node BDD Index</i>
  3033. int <b>idT</b>, <i>IN: Then CNF Index with sign = inverted edge</i>
  3034. int <b>idE</b>, <i>IN: Else CNF Index with sign = inverted edge</i>
  3035. FILE * <b>fp</b>, <i>IN: store file</i>
  3036. int * <b>clauseN</b>, <i>OUT: number of clauses</i>
  3037. int * <b>varMax</b> <i>OUT: maximun Index of variable stored</i>
  3038. )
  3039. </pre>
  3040. <dd> Store One Single BDD Node translating it as a multiplexer.
  3041. <p>
  3042. <dd> <b>Side Effects</b> None
  3043. <p>
  3044. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreCnf.c"TARGET="ABSTRACT"><CODE>dddmpStoreCnf.c</CODE></A>
  3045. <dt><pre>
  3046. <A NAME="WriteByteBinary"></A>
  3047. static int <I></I>
  3048. <B>WriteByteBinary</B>(
  3049. FILE * <b>fp</b>, <i>IN: file where to write the byte</i>
  3050. unsigned char <b>c</b> <i>IN: the byte to be written</i>
  3051. )
  3052. </pre>
  3053. <dd> outputs a byte to file fp. Uses 0x00 as escape character
  3054. to filter <CR>, <LF> and <ctrl-Z>.
  3055. This is done for compatibility between unix and dos/windows systems.
  3056. <p>
  3057. <dd> <b>Side Effects</b> None
  3058. <p>
  3059. <dd> <b>See Also</b> <code><a href="#ReadByteBinary()">ReadByteBinary()</a>
  3060. </code>
  3061. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpBinary.c"TARGET="ABSTRACT"><CODE>dddmpBinary.c</CODE></A>
  3062. <dt><pre>
  3063. <A NAME="printCubeCnf"></A>
  3064. static int <I></I>
  3065. <B>printCubeCnf</B>(
  3066. DdManager * <b>ddMgr</b>, <i>IN: DD Manager</i>
  3067. DdNode * <b>node</b>, <i>IN: BDD to store</i>
  3068. int * <b>cnfIds</b>, <i>IN: CNF identifiers</i>
  3069. FILE * <b>fp</b>, <i>IN: file pointer</i>
  3070. int * <b>list</b>, <i>IN: temporary array to store cubes</i>
  3071. int * <b>varMax</b> <i>OUT: maximum identifier of the variables created</i>
  3072. )
  3073. </pre>
  3074. <dd> Print One Cube in CNF Format.
  3075. Return DDDMP_SUCCESS if something is printed out, DDDMP_FAILURE
  3076. is nothing is printed out.
  3077. <p>
  3078. <dd> <b>Side Effects</b> None
  3079. <p>
  3080. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpStoreCnf.c"TARGET="ABSTRACT"><CODE>dddmpStoreCnf.c</CODE></A>
  3081. <dt><pre>
  3082. <A NAME=""></A>
  3083. <I></I>
  3084. <B></B>(
  3085. <b></b> <i></i>
  3086. )
  3087. </pre>
  3088. <dd> Checks for Warnings: If expr==1 it prints out the warning
  3089. on stderr.
  3090. <p>
  3091. <dd> <b>Side Effects</b> None
  3092. <p>
  3093. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmp.h"TARGET="ABSTRACT"><CODE>dddmp.h</CODE></A>
  3094. <dt><pre>
  3095. <A NAME=""></A>
  3096. <I></I>
  3097. <B></B>(
  3098. <b></b> <i></i>
  3099. )
  3100. </pre>
  3101. <dd> Checks for fatal bugs and go to the label to deal with
  3102. the error.
  3103. <p>
  3104. <dd> <b>Side Effects</b> None
  3105. <p>
  3106. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmp.h"TARGET="ABSTRACT"><CODE>dddmp.h</CODE></A>
  3107. <dt><pre>
  3108. <A NAME=""></A>
  3109. <I></I>
  3110. <B></B>(
  3111. <b></b> <i></i>
  3112. )
  3113. </pre>
  3114. <dd> Checks for fatal bugs and return the DDDMP_FAILURE flag.
  3115. <p>
  3116. <dd> <b>Side Effects</b> None
  3117. <p>
  3118. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmp.h"TARGET="ABSTRACT"><CODE>dddmp.h</CODE></A>
  3119. <dt><pre>
  3120. <A NAME=""></A>
  3121. <I></I>
  3122. <B></B>(
  3123. <b></b> <i></i>
  3124. )
  3125. </pre>
  3126. <dd> Conditional safety assertion. It prints out the file
  3127. name and line number where the fatal error occurred.
  3128. Messages are printed out on stderr.
  3129. <p>
  3130. <dd> <b>Side Effects</b> None
  3131. <p>
  3132. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmp.h"TARGET="ABSTRACT"><CODE>dddmp.h</CODE></A>
  3133. <dt><pre>
  3134. <A NAME=""></A>
  3135. <I></I>
  3136. <B></B>(
  3137. <b></b> <i></i>
  3138. )
  3139. </pre>
  3140. <dd> Memory Allocation Macro for DDDMP
  3141. <p>
  3142. <dd> <b>Side Effects</b> None
  3143. <p>
  3144. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpInt.h"TARGET="ABSTRACT"><CODE>dddmpInt.h</CODE></A>
  3145. <dt><pre>
  3146. <A NAME=""></A>
  3147. <I></I>
  3148. <B></B>(
  3149. <b></b> <i></i>
  3150. )
  3151. </pre>
  3152. <dd> Memory Free Macro for DDDMP
  3153. <p>
  3154. <dd> <b>Side Effects</b> None
  3155. <p>
  3156. <DD> <B>Defined in </B> <A HREF="dddmpAllFile.html#dddmpInt.h"TARGET="ABSTRACT"><CODE>dddmpInt.h</CODE></A>
  3157. </DL>
  3158. <HR>
  3159. Last updated on 1040218 17h14
  3160. </BODY></HTML>