emergency commit
[cl-cudd.git] / distr / cudd / doc / cuddExtDet.html
blobed2567e997466df2d04dd329e5974eb6c38521e1
1 <HTML>
2 <HEAD><TITLE>The cudd package</TITLE></HEAD>
3 <BODY>
5 <DL>
6 <dt><pre>
7 <A NAME="Cudd_AddHook"></A>
8 int <I></I>
9 <B>Cudd_AddHook</B>(
10 DdManager * <b>dd</b>, <i></i>
11 DD_HFP <b>f</b>, <i></i>
12 Cudd_HookType <b>where</b> <i></i>
14 </pre>
15 <dd> Adds a function to a hook. A hook is a list of
16 application-provided functions called on certain occasions by the
17 package. Returns 1 if the function is successfully added; 2 if the
18 function was already in the list; 0 otherwise.
19 <p>
21 <dd> <b>Side Effects</b> None
22 <p>
24 <dd> <b>See Also</b> <code><a href="#Cudd_RemoveHook">Cudd_RemoveHook</a>
25 </code>
27 <dt><pre>
28 <A NAME="Cudd_ApaAdd"></A>
29 DdApaDigit <I></I>
30 <B>Cudd_ApaAdd</B>(
31 int <b>digits</b>, <i></i>
32 DdApaNumber <b>a</b>, <i></i>
33 DdApaNumber <b>b</b>, <i></i>
34 DdApaNumber <b>sum</b> <i></i>
36 </pre>
37 <dd> Adds two arbitrary precision integers. Returns the
38 carry out of the most significant digit.
39 <p>
41 <dd> <b>Side Effects</b> The result of the sum is stored in parameter <code>sum</code>.
42 <p>
44 <dt><pre>
45 <A NAME="Cudd_ApaCompareRatios"></A>
46 int <I></I>
47 <B>Cudd_ApaCompareRatios</B>(
48 int <b>digitsFirst</b>, <i></i>
49 DdApaNumber <b>firstNum</b>, <i></i>
50 unsigned int <b>firstDen</b>, <i></i>
51 int <b>digitsSecond</b>, <i></i>
52 DdApaNumber <b>secondNum</b>, <i></i>
53 unsigned int <b>secondDen</b> <i></i>
55 </pre>
56 <dd> Compares the ratios of two arbitrary precision integers
57 to two unsigned ints. Returns 1 if the first number is larger; 0 if
58 they are equal; -1 if the second number is larger.
59 <p>
61 <dd> <b>Side Effects</b> None
62 <p>
64 <dt><pre>
65 <A NAME="Cudd_ApaCompare"></A>
66 int <I></I>
67 <B>Cudd_ApaCompare</B>(
68 int <b>digitsFirst</b>, <i></i>
69 DdApaNumber <b>first</b>, <i></i>
70 int <b>digitsSecond</b>, <i></i>
71 DdApaNumber <b>second</b> <i></i>
73 </pre>
74 <dd> Compares two arbitrary precision integers. Returns 1 if
75 the first number is larger; 0 if they are equal; -1 if the second
76 number is larger.
77 <p>
79 <dd> <b>Side Effects</b> None
80 <p>
82 <dt><pre>
83 <A NAME="Cudd_ApaCopy"></A>
84 void <I></I>
85 <B>Cudd_ApaCopy</B>(
86 int <b>digits</b>, <i></i>
87 DdApaNumber <b>source</b>, <i></i>
88 DdApaNumber <b>dest</b> <i></i>
90 </pre>
91 <dd> Makes a copy of an arbitrary precision integer.
92 <p>
94 <dd> <b>Side Effects</b> Changes parameter <code>dest</code>.
95 <p>
97 <dt><pre>
98 <A NAME="Cudd_ApaCountMinterm"></A>
99 DdApaNumber <I></I>
100 <B>Cudd_ApaCountMinterm</B>(
101 DdManager * <b>manager</b>, <i></i>
102 DdNode * <b>node</b>, <i></i>
103 int <b>nvars</b>, <i></i>
104 int * <b>digits</b> <i></i>
106 </pre>
107 <dd> Counts the number of minterms of a DD. The function is
108 assumed to depend on nvars variables. The minterm count is
109 represented as an arbitrary precision unsigned integer, to allow for
110 any number of variables CUDD supports. Returns a pointer to the
111 array representing the number of minterms of the function rooted at
112 node if successful; NULL otherwise.
115 <dd> <b>Side Effects</b> The number of digits of the result is returned in
116 parameter <code>digits</code>.
119 <dd> <b>See Also</b> <code><a href="#Cudd_CountMinterm">Cudd_CountMinterm</a>
120 </code>
122 <dt><pre>
123 <A NAME="Cudd_ApaIntDivision"></A>
124 unsigned int <I></I>
125 <B>Cudd_ApaIntDivision</B>(
126 int <b>digits</b>, <i></i>
127 DdApaNumber <b>dividend</b>, <i></i>
128 unsigned int <b>divisor</b>, <i></i>
129 DdApaNumber <b>quotient</b> <i></i>
131 </pre>
132 <dd> Divides an arbitrary precision integer by a 32-bit
133 unsigned integer. Returns the remainder of the division. This
134 procedure relies on the assumption that the number of bits of a
135 DdApaDigit plus the number of bits of an unsigned int is less the
136 number of bits of the mantissa of a double. This guarantees that the
137 product of a DdApaDigit and an unsigned int can be represented
138 without loss of precision by a double. On machines where this
139 assumption is not satisfied, this procedure will malfunction.
142 <dd> <b>Side Effects</b> The quotient is returned in parameter <code>quotient</code>.
145 <dd> <b>See Also</b> <code><a href="#Cudd_ApaShortDivision">Cudd_ApaShortDivision</a>
146 </code>
148 <dt><pre>
149 <A NAME="Cudd_ApaNumberOfDigits"></A>
150 int <I></I>
151 <B>Cudd_ApaNumberOfDigits</B>(
152 int <b>binaryDigits</b> <i></i>
154 </pre>
155 <dd> Finds the number of digits for an arbitrary precision
156 integer given the maximum number of binary digits. The number of
157 binary digits should be positive. Returns the number of digits if
158 successful; 0 otherwise.
161 <dd> <b>Side Effects</b> None
164 <dt><pre>
165 <A NAME="Cudd_ApaPowerOfTwo"></A>
166 void <I></I>
167 <B>Cudd_ApaPowerOfTwo</B>(
168 int <b>digits</b>, <i></i>
169 DdApaNumber <b>number</b>, <i></i>
170 int <b>power</b> <i></i>
172 </pre>
173 <dd> Sets an arbitrary precision integer to a power of
174 two. If the power of two is too large to be represented, the number
175 is set to 0.
178 <dd> <b>Side Effects</b> The result is returned in parameter <code>number</code>.
181 <dt><pre>
182 <A NAME="Cudd_ApaPrintDecimal"></A>
183 int <I></I>
184 <B>Cudd_ApaPrintDecimal</B>(
185 FILE * <b>fp</b>, <i></i>
186 int <b>digits</b>, <i></i>
187 DdApaNumber <b>number</b> <i></i>
189 </pre>
190 <dd> Prints an arbitrary precision integer in decimal format.
191 Returns 1 if successful; 0 otherwise.
194 <dd> <b>Side Effects</b> None
197 <dd> <b>See Also</b> <code><a href="#Cudd_ApaPrintHex">Cudd_ApaPrintHex</a>
198 <a href="#Cudd_ApaPrintExponential">Cudd_ApaPrintExponential</a>
199 </code>
201 <dt><pre>
202 <A NAME="Cudd_ApaPrintDensity"></A>
203 int <I></I>
204 <B>Cudd_ApaPrintDensity</B>(
205 FILE * <b>fp</b>, <i></i>
206 DdManager * <b>dd</b>, <i></i>
207 DdNode * <b>node</b>, <i></i>
208 int <b>nvars</b> <i></i>
210 </pre>
211 <dd> Prints the density of a BDD or ADD using
212 arbitrary precision arithmetic. Returns 1 if successful; 0 otherwise.
215 <dd> <b>Side Effects</b> None
218 <dt><pre>
219 <A NAME="Cudd_ApaPrintExponential"></A>
220 int <I></I>
221 <B>Cudd_ApaPrintExponential</B>(
222 FILE * <b>fp</b>, <i></i>
223 int <b>digits</b>, <i></i>
224 DdApaNumber <b>number</b>, <i></i>
225 int <b>precision</b> <i></i>
227 </pre>
228 <dd> Prints an arbitrary precision integer in exponential format.
229 Returns 1 if successful; 0 otherwise.
232 <dd> <b>Side Effects</b> None
235 <dd> <b>See Also</b> <code><a href="#Cudd_ApaPrintHex">Cudd_ApaPrintHex</a>
236 <a href="#Cudd_ApaPrintDecimal">Cudd_ApaPrintDecimal</a>
237 </code>
239 <dt><pre>
240 <A NAME="Cudd_ApaPrintHex"></A>
241 int <I></I>
242 <B>Cudd_ApaPrintHex</B>(
243 FILE * <b>fp</b>, <i></i>
244 int <b>digits</b>, <i></i>
245 DdApaNumber <b>number</b> <i></i>
247 </pre>
248 <dd> Prints an arbitrary precision integer in hexadecimal format.
249 Returns 1 if successful; 0 otherwise.
252 <dd> <b>Side Effects</b> None
255 <dd> <b>See Also</b> <code><a href="#Cudd_ApaPrintDecimal">Cudd_ApaPrintDecimal</a>
256 <a href="#Cudd_ApaPrintExponential">Cudd_ApaPrintExponential</a>
257 </code>
259 <dt><pre>
260 <A NAME="Cudd_ApaPrintMintermExp"></A>
261 int <I></I>
262 <B>Cudd_ApaPrintMintermExp</B>(
263 FILE * <b>fp</b>, <i></i>
264 DdManager * <b>dd</b>, <i></i>
265 DdNode * <b>node</b>, <i></i>
266 int <b>nvars</b>, <i></i>
267 int <b>precision</b> <i></i>
269 </pre>
270 <dd> Prints the number of minterms of a BDD or ADD in
271 exponential format using arbitrary precision arithmetic. Parameter
272 precision controls the number of signficant digits printed. Returns
273 1 if successful; 0 otherwise.
276 <dd> <b>Side Effects</b> None
279 <dd> <b>See Also</b> <code><a href="#Cudd_ApaPrintMinterm">Cudd_ApaPrintMinterm</a>
280 </code>
282 <dt><pre>
283 <A NAME="Cudd_ApaPrintMinterm"></A>
284 int <I></I>
285 <B>Cudd_ApaPrintMinterm</B>(
286 FILE * <b>fp</b>, <i></i>
287 DdManager * <b>dd</b>, <i></i>
288 DdNode * <b>node</b>, <i></i>
289 int <b>nvars</b> <i></i>
291 </pre>
292 <dd> Prints the number of minterms of a BDD or ADD using
293 arbitrary precision arithmetic. Returns 1 if successful; 0 otherwise.
296 <dd> <b>Side Effects</b> None
299 <dd> <b>See Also</b> <code><a href="#Cudd_ApaPrintMintermExp">Cudd_ApaPrintMintermExp</a>
300 </code>
302 <dt><pre>
303 <A NAME="Cudd_ApaSetToLiteral"></A>
304 void <I></I>
305 <B>Cudd_ApaSetToLiteral</B>(
306 int <b>digits</b>, <i></i>
307 DdApaNumber <b>number</b>, <i></i>
308 DdApaDigit <b>literal</b> <i></i>
310 </pre>
311 <dd> Sets an arbitrary precision integer to a one-digit literal.
314 <dd> <b>Side Effects</b> The result is returned in parameter <code>number</code>.
317 <dt><pre>
318 <A NAME="Cudd_ApaShiftRight"></A>
319 void <I></I>
320 <B>Cudd_ApaShiftRight</B>(
321 int <b>digits</b>, <i></i>
322 DdApaDigit <b>in</b>, <i></i>
323 DdApaNumber <b>a</b>, <i></i>
324 DdApaNumber <b>b</b> <i></i>
326 </pre>
327 <dd> Shifts right an arbitrary precision integer by one
328 binary place. The most significant binary digit of the result is
329 taken from parameter <code>in</code>.
332 <dd> <b>Side Effects</b> The result is returned in parameter <code>b</code>.
335 <dt><pre>
336 <A NAME="Cudd_ApaShortDivision"></A>
337 DdApaDigit <I></I>
338 <B>Cudd_ApaShortDivision</B>(
339 int <b>digits</b>, <i></i>
340 DdApaNumber <b>dividend</b>, <i></i>
341 DdApaDigit <b>divisor</b>, <i></i>
342 DdApaNumber <b>quotient</b> <i></i>
344 </pre>
345 <dd> Divides an arbitrary precision integer by a digit.
348 <dd> <b>Side Effects</b> The quotient is returned in parameter <code>quotient</code>.
351 <dt><pre>
352 <A NAME="Cudd_ApaSubtract"></A>
353 DdApaDigit <I></I>
354 <B>Cudd_ApaSubtract</B>(
355 int <b>digits</b>, <i></i>
356 DdApaNumber <b>a</b>, <i></i>
357 DdApaNumber <b>b</b>, <i></i>
358 DdApaNumber <b>diff</b> <i></i>
360 </pre>
361 <dd> Subtracts two arbitrary precision integers. Returns the
362 borrow out of the most significant digit.
365 <dd> <b>Side Effects</b> The result of the subtraction is stored in parameter
366 <code>diff</code>.
369 <dt><pre>
370 <A NAME="Cudd_AutodynDisableZdd"></A>
371 void <I></I>
372 <B>Cudd_AutodynDisableZdd</B>(
373 DdManager * <b>unique</b> <i></i>
375 </pre>
376 <dd> Disables automatic dynamic reordering of ZDDs.
379 <dd> <b>Side Effects</b> None
382 <dd> <b>See Also</b> <code><a href="#Cudd_AutodynEnableZdd">Cudd_AutodynEnableZdd</a>
383 <a href="#Cudd_ReorderingStatusZdd">Cudd_ReorderingStatusZdd</a>
384 <a href="#Cudd_AutodynDisable">Cudd_AutodynDisable</a>
385 </code>
387 <dt><pre>
388 <A NAME="Cudd_AutodynDisable"></A>
389 void <I></I>
390 <B>Cudd_AutodynDisable</B>(
391 DdManager * <b>unique</b> <i></i>
393 </pre>
394 <dd> Disables automatic dynamic reordering.
397 <dd> <b>Side Effects</b> None
400 <dd> <b>See Also</b> <code><a href="#Cudd_AutodynEnable">Cudd_AutodynEnable</a>
401 <a href="#Cudd_ReorderingStatus">Cudd_ReorderingStatus</a>
402 <a href="#Cudd_AutodynDisableZdd">Cudd_AutodynDisableZdd</a>
403 </code>
405 <dt><pre>
406 <A NAME="Cudd_AutodynEnableZdd"></A>
407 void <I></I>
408 <B>Cudd_AutodynEnableZdd</B>(
409 DdManager * <b>unique</b>, <i></i>
410 Cudd_ReorderingType <b>method</b> <i></i>
412 </pre>
413 <dd> Enables automatic dynamic reordering of ZDDs. Parameter
414 method is used to determine the method used for reordering ZDDs. If
415 CUDD_REORDER_SAME is passed, the method is unchanged.
418 <dd> <b>Side Effects</b> None
421 <dd> <b>See Also</b> <code><a href="#Cudd_AutodynDisableZdd">Cudd_AutodynDisableZdd</a>
422 <a href="#Cudd_ReorderingStatusZdd">Cudd_ReorderingStatusZdd</a>
423 <a href="#Cudd_AutodynEnable">Cudd_AutodynEnable</a>
424 </code>
426 <dt><pre>
427 <A NAME="Cudd_AutodynEnable"></A>
428 void <I></I>
429 <B>Cudd_AutodynEnable</B>(
430 DdManager * <b>unique</b>, <i></i>
431 Cudd_ReorderingType <b>method</b> <i></i>
433 </pre>
434 <dd> Enables automatic dynamic reordering of BDDs and
435 ADDs. Parameter method is used to determine the method used for
436 reordering. If CUDD_REORDER_SAME is passed, the method is
437 unchanged.
440 <dd> <b>Side Effects</b> None
443 <dd> <b>See Also</b> <code><a href="#Cudd_AutodynDisable">Cudd_AutodynDisable</a>
444 <a href="#Cudd_ReorderingStatus">Cudd_ReorderingStatus</a>
445 <a href="#Cudd_AutodynEnableZdd">Cudd_AutodynEnableZdd</a>
446 </code>
448 <dt><pre>
449 <A NAME="Cudd_AverageDistance"></A>
450 double <I></I>
451 <B>Cudd_AverageDistance</B>(
452 DdManager * <b>dd</b> <i></i>
454 </pre>
455 <dd> Computes the average distance between adjacent nodes in
456 the manager. Adjacent nodes are node pairs such that the second node
457 is the then child, else child, or next node in the collision list.
460 <dd> <b>Side Effects</b> None
463 <dt><pre>
464 <A NAME="Cudd_BddToAdd"></A>
465 DdNode * <I></I>
466 <B>Cudd_BddToAdd</B>(
467 DdManager * <b>dd</b>, <i></i>
468 DdNode * <b>B</b> <i></i>
470 </pre>
471 <dd> Converts a BDD to a 0-1 ADD. Returns a pointer to the
472 resulting ADD if successful; NULL otherwise.
475 <dd> <b>Side Effects</b> None
478 <dd> <b>See Also</b> <code><a href="#Cudd_addBddPattern">Cudd_addBddPattern</a>
479 <a href="#Cudd_addBddThreshold">Cudd_addBddThreshold</a>
480 <a href="#Cudd_addBddInterval">Cudd_addBddInterval</a>
481 <a href="#Cudd_addBddStrictThreshold">Cudd_addBddStrictThreshold</a>
482 </code>
484 <dt><pre>
485 <A NAME="Cudd_BddToCubeArray"></A>
486 int <I></I>
487 <B>Cudd_BddToCubeArray</B>(
488 DdManager * <b>dd</b>, <i></i>
489 DdNode * <b>cube</b>, <i></i>
490 int * <b>array</b> <i></i>
492 </pre>
493 <dd> Builds a positional array from the BDD of a cube.
494 Array must have one entry for each BDD variable. The positional
495 array has 1 in i-th position if the variable of index i appears in
496 true form in the cube; it has 0 in i-th position if the variable of
497 index i appears in complemented form in the cube; finally, it has 2
498 in i-th position if the variable of index i does not appear in the
499 cube. Returns 1 if successful (the BDD is indeed a cube); 0
500 otherwise.
503 <dd> <b>Side Effects</b> The result is in the array passed by reference.
506 <dd> <b>See Also</b> <code><a href="#Cudd_CubeArrayToBdd">Cudd_CubeArrayToBdd</a>
507 </code>
509 <dt><pre>
510 <A NAME="Cudd_BiasedOverApprox"></A>
511 DdNode * <I></I>
512 <B>Cudd_BiasedOverApprox</B>(
513 DdManager * <b>dd</b>, <i>manager</i>
514 DdNode * <b>f</b>, <i>function to be superset</i>
515 DdNode * <b>b</b>, <i>bias function</i>
516 int <b>numVars</b>, <i>number of variables in the support of f</i>
517 int <b>threshold</b>, <i>when to stop approximation</i>
518 double <b>quality1</b>, <i>minimum improvement for accepted changes when b=1</i>
519 double <b>quality0</b> <i>minimum improvement for accepted changes when b=0</i>
521 </pre>
522 <dd> Extracts a dense superset from a BDD. The procedure is
523 identical to the underapproximation procedure except for the fact that it
524 works on the complement of the given function. Extracting the subset
525 of the complement function is equivalent to extracting the superset
526 of the function.
527 Returns a pointer to the BDD of the superset if successful. NULL if
528 intermediate result causes the procedure to run out of memory. The
529 parameter numVars is the maximum number of variables to be used in
530 minterm calculation. The optimal number
531 should be as close as possible to the size of the support of f.
532 However, it is safe to pass the value returned by Cudd_ReadSize for
533 numVars when the number of variables is under 1023. If numVars is
534 larger than 1023, it will overflow. If a 0 parameter is passed then
535 the procedure will compute a value which will avoid overflow but
536 will cause underflow with 2046 variables or more.
539 <dd> <b>Side Effects</b> None
542 <dd> <b>See Also</b> <code><a href="#Cudd_SupersetHeavyBranch">Cudd_SupersetHeavyBranch</a>
543 <a href="#Cudd_SupersetShortPaths">Cudd_SupersetShortPaths</a>
544 <a href="#Cudd_RemapOverApprox">Cudd_RemapOverApprox</a>
545 <a href="#Cudd_BiasedUnderApprox">Cudd_BiasedUnderApprox</a>
546 <a href="#Cudd_ReadSize">Cudd_ReadSize</a>
547 </code>
549 <dt><pre>
550 <A NAME="Cudd_BiasedUnderApprox"></A>
551 DdNode * <I></I>
552 <B>Cudd_BiasedUnderApprox</B>(
553 DdManager * <b>dd</b>, <i>manager</i>
554 DdNode * <b>f</b>, <i>function to be subset</i>
555 DdNode * <b>b</b>, <i>bias function</i>
556 int <b>numVars</b>, <i>number of variables in the support of f</i>
557 int <b>threshold</b>, <i>when to stop approximation</i>
558 double <b>quality1</b>, <i>minimum improvement for accepted changes when b=1</i>
559 double <b>quality0</b> <i>minimum improvement for accepted changes when b=0</i>
561 </pre>
562 <dd> Extracts a dense subset from a BDD. This procedure uses
563 a biased remapping technique and density as the cost function. The bias
564 is a function. This procedure tries to approximate where the bias is 0
565 and preserve the given function where the bias is 1.
566 Returns a pointer to the BDD of the subset if
567 successful. NULL if the procedure runs out of memory. The parameter
568 numVars is the maximum number of variables to be used in minterm
569 calculation. The optimal number should be as close as possible to
570 the size of the support of f. However, it is safe to pass the value
571 returned by Cudd_ReadSize for numVars when the number of variables
572 is under 1023. If numVars is larger than 1023, it will cause
573 overflow. If a 0 parameter is passed then the procedure will compute
574 a value which will avoid overflow but will cause underflow with 2046
575 variables or more.
578 <dd> <b>Side Effects</b> None
581 <dd> <b>See Also</b> <code><a href="#Cudd_SubsetShortPaths">Cudd_SubsetShortPaths</a>
582 <a href="#Cudd_SubsetHeavyBranch">Cudd_SubsetHeavyBranch</a>
583 <a href="#Cudd_UnderApprox">Cudd_UnderApprox</a>
584 <a href="#Cudd_RemapUnderApprox">Cudd_RemapUnderApprox</a>
585 <a href="#Cudd_ReadSize">Cudd_ReadSize</a>
586 </code>
588 <dt><pre>
589 <A NAME="Cudd_CProjection"></A>
590 DdNode * <I></I>
591 <B>Cudd_CProjection</B>(
592 DdManager * <b>dd</b>, <i></i>
593 DdNode * <b>R</b>, <i></i>
594 DdNode * <b>Y</b> <i></i>
596 </pre>
597 <dd> Computes the compatible projection of relation R with
598 respect to cube Y. Returns a pointer to the c-projection if
599 successful; NULL otherwise. For a comparison between Cudd_CProjection
600 and Cudd_PrioritySelect, see the documentation of the latter.
603 <dd> <b>Side Effects</b> None
606 <dd> <b>See Also</b> <code><a href="#Cudd_PrioritySelect">Cudd_PrioritySelect</a>
607 </code>
609 <dt><pre>
610 <A NAME="Cudd_CheckKeys"></A>
611 int <I></I>
612 <B>Cudd_CheckKeys</B>(
613 DdManager * <b>table</b> <i></i>
615 </pre>
616 <dd> Checks for the following conditions:
617 <ul>
618 <li>Wrong sizes of subtables.
619 <li>Wrong number of keys found in unique subtable.
620 <li>Wrong number of dead found in unique subtable.
621 <li>Wrong number of keys found in the constant table
622 <li>Wrong number of dead found in the constant table
623 <li>Wrong number of total slots found
624 <li>Wrong number of maximum keys found
625 <li>Wrong number of total dead found
626 </ul>
627 Reports the average length of non-empty lists. Returns the number of
628 subtables for which the number of keys is wrong.
631 <dd> <b>Side Effects</b> None
634 <dd> <b>See Also</b> <code><a href="#Cudd_DebugCheck">Cudd_DebugCheck</a>
635 </code>
637 <dt><pre>
638 <A NAME="Cudd_CheckZeroRef"></A>
639 int <I></I>
640 <B>Cudd_CheckZeroRef</B>(
641 DdManager * <b>manager</b> <i></i>
643 </pre>
644 <dd> Checks the unique table for nodes with non-zero
645 reference counts. It is normally called before Cudd_Quit to make sure
646 that there are no memory leaks due to missing Cudd_RecursiveDeref's.
647 Takes into account that reference counts may saturate and that the
648 basic constants and the projection functions are referenced by the
649 manager. Returns the number of nodes with non-zero reference count.
650 (Except for the cases mentioned above.)
653 <dd> <b>Side Effects</b> None
656 <dt><pre>
657 <A NAME="Cudd_ClassifySupport"></A>
658 int <I></I>
659 <B>Cudd_ClassifySupport</B>(
660 DdManager * <b>dd</b>, <i>manager</i>
661 DdNode * <b>f</b>, <i>first DD</i>
662 DdNode * <b>g</b>, <i>second DD</i>
663 DdNode ** <b>common</b>, <i>cube of shared variables</i>
664 DdNode ** <b>onlyF</b>, <i>cube of variables only in f</i>
665 DdNode ** <b>onlyG</b> <i>cube of variables only in g</i>
667 </pre>
668 <dd> Classifies the variables in the support of two DDs
669 <code>f</code> and <code>g</code>, depending on whther they appear
670 in both DDs, only in <code>f</code>, or only in <code>g</code>.
671 Returns 1 if successful; 0 otherwise.
674 <dd> <b>Side Effects</b> The cubes of the three classes of variables are
675 returned as side effects.
678 <dd> <b>See Also</b> <code><a href="#Cudd_Support">Cudd_Support</a>
679 <a href="#Cudd_VectorSupport">Cudd_VectorSupport</a>
680 </code>
682 <dt><pre>
683 <A NAME="Cudd_ClearErrorCode"></A>
684 void <I></I>
685 <B>Cudd_ClearErrorCode</B>(
686 DdManager * <b>dd</b> <i></i>
688 </pre>
689 <dd> Clear the error code of a manager.
692 <dd> <b>Side Effects</b> None
695 <dd> <b>See Also</b> <code><a href="#Cudd_ReadErrorCode">Cudd_ReadErrorCode</a>
696 </code>
698 <dt><pre>
699 <A NAME="Cudd_CofMinterm"></A>
700 double * <I></I>
701 <B>Cudd_CofMinterm</B>(
702 DdManager * <b>dd</b>, <i></i>
703 DdNode * <b>node</b> <i></i>
705 </pre>
706 <dd> Computes the fraction of minterms in the on-set of all
707 the positive cofactors of DD. Returns the pointer to an array of
708 doubles if successful; NULL otherwise. The array has as many
709 positions as there are BDD variables in the manager plus one. The
710 last position of the array contains the fraction of the minterms in
711 the ON-set of the function represented by the BDD or ADD. The other
712 positions of the array hold the variable signatures.
715 <dd> <b>Side Effects</b> None
718 <dt><pre>
719 <A NAME="Cudd_Cofactor"></A>
720 DdNode * <I></I>
721 <B>Cudd_Cofactor</B>(
722 DdManager * <b>dd</b>, <i></i>
723 DdNode * <b>f</b>, <i></i>
724 DdNode * <b>g</b> <i></i>
726 </pre>
727 <dd> Computes the cofactor of f with respect to g; g must be
728 the BDD or the ADD of a cube. Returns a pointer to the cofactor if
729 successful; NULL otherwise.
732 <dd> <b>Side Effects</b> None
735 <dd> <b>See Also</b> <code><a href="#Cudd_bddConstrain">Cudd_bddConstrain</a>
736 <a href="#Cudd_bddRestrict">Cudd_bddRestrict</a>
737 </code>
739 <dt><pre>
740 <A NAME="Cudd_CountLeaves"></A>
741 int <I></I>
742 <B>Cudd_CountLeaves</B>(
743 DdNode * <b>node</b> <i></i>
745 </pre>
746 <dd> Counts the number of leaves in a DD. Returns the number
747 of leaves in the DD rooted at node if successful; CUDD_OUT_OF_MEM
748 otherwise.
751 <dd> <b>Side Effects</b> None
754 <dd> <b>See Also</b> <code><a href="#Cudd_PrintDebug">Cudd_PrintDebug</a>
755 </code>
757 <dt><pre>
758 <A NAME="Cudd_CountMinterm"></A>
759 double <I></I>
760 <B>Cudd_CountMinterm</B>(
761 DdManager * <b>manager</b>, <i></i>
762 DdNode * <b>node</b>, <i></i>
763 int <b>nvars</b> <i></i>
765 </pre>
766 <dd> Counts the number of minterms of a DD. The function is
767 assumed to depend on nvars variables. The minterm count is
768 represented as a double, to allow for a larger number of variables.
769 Returns the number of minterms of the function rooted at node if
770 successful; (double) CUDD_OUT_OF_MEM otherwise.
773 <dd> <b>Side Effects</b> None
776 <dd> <b>See Also</b> <code><a href="#Cudd_PrintDebug">Cudd_PrintDebug</a>
777 <a href="#Cudd_CountPath">Cudd_CountPath</a>
778 </code>
780 <dt><pre>
781 <A NAME="Cudd_CountPathsToNonZero"></A>
782 double <I></I>
783 <B>Cudd_CountPathsToNonZero</B>(
784 DdNode * <b>node</b> <i></i>
786 </pre>
787 <dd> Counts the number of paths to a non-zero terminal of a
788 DD. The path count is
789 represented as a double, to allow for a larger number of variables.
790 Returns the number of paths of the function rooted at node.
793 <dd> <b>Side Effects</b> None
796 <dd> <b>See Also</b> <code><a href="#Cudd_CountMinterm">Cudd_CountMinterm</a>
797 <a href="#Cudd_CountPath">Cudd_CountPath</a>
798 </code>
800 <dt><pre>
801 <A NAME="Cudd_CountPath"></A>
802 double <I></I>
803 <B>Cudd_CountPath</B>(
804 DdNode * <b>node</b> <i></i>
806 </pre>
807 <dd> Counts the number of paths of a DD. Paths to all
808 terminal nodes are counted. The path count is represented as a
809 double, to allow for a larger number of variables. Returns the
810 number of paths of the function rooted at node if successful;
811 (double) CUDD_OUT_OF_MEM otherwise.
814 <dd> <b>Side Effects</b> None
817 <dd> <b>See Also</b> <code><a href="#Cudd_CountMinterm">Cudd_CountMinterm</a>
818 </code>
820 <dt><pre>
821 <A NAME="Cudd_CubeArrayToBdd"></A>
822 DdNode * <I></I>
823 <B>Cudd_CubeArrayToBdd</B>(
824 DdManager * <b>dd</b>, <i></i>
825 int * <b>array</b> <i></i>
827 </pre>
828 <dd> Builds a cube from a positional array. The array must
829 have one integer entry for each BDD variable. If the i-th entry is
830 1, the variable of index i appears in true form in the cube; If the
831 i-th entry is 0, the variable of index i appears complemented in the
832 cube; otherwise the variable does not appear in the cube. Returns a
833 pointer to the BDD for the cube if successful; NULL otherwise.
836 <dd> <b>Side Effects</b> None
839 <dd> <b>See Also</b> <code><a href="#Cudd_bddComputeCube">Cudd_bddComputeCube</a>
840 <a href="#Cudd_IndicesToCube">Cudd_IndicesToCube</a>
841 <a href="#Cudd_BddToCubeArray">Cudd_BddToCubeArray</a>
842 </code>
844 <dt><pre>
845 <A NAME="Cudd_DagSize"></A>
846 int <I></I>
847 <B>Cudd_DagSize</B>(
848 DdNode * <b>node</b> <i></i>
850 </pre>
851 <dd> Counts the number of nodes in a DD. Returns the number
852 of nodes in the graph rooted at node.
855 <dd> <b>Side Effects</b> None
858 <dd> <b>See Also</b> <code><a href="#Cudd_SharingSize">Cudd_SharingSize</a>
859 <a href="#Cudd_PrintDebug">Cudd_PrintDebug</a>
860 </code>
862 <dt><pre>
863 <A NAME="Cudd_DeadAreCounted"></A>
864 int <I></I>
865 <B>Cudd_DeadAreCounted</B>(
866 DdManager * <b>dd</b> <i></i>
868 </pre>
869 <dd> Tells whether dead nodes are counted towards triggering
870 reordering. Returns 1 if dead nodes are counted; 0 otherwise.
873 <dd> <b>Side Effects</b> None
876 <dd> <b>See Also</b> <code><a href="#Cudd_TurnOnCountDead">Cudd_TurnOnCountDead</a>
877 <a href="#Cudd_TurnOffCountDead">Cudd_TurnOffCountDead</a>
878 </code>
880 <dt><pre>
881 <A NAME="Cudd_DebugCheck"></A>
882 int <I></I>
883 <B>Cudd_DebugCheck</B>(
884 DdManager * <b>table</b> <i></i>
886 </pre>
887 <dd> Checks for inconsistencies in the DD heap:
888 <ul>
889 <li> node has illegal index
890 <li> live node has dead children
891 <li> node has illegal Then or Else pointers
892 <li> BDD/ADD node has identical children
893 <li> ZDD node has zero then child
894 <li> wrong number of total nodes
895 <li> wrong number of dead nodes
896 <li> ref count error at node
897 </ul>
898 Returns 0 if no inconsistencies are found; DD_OUT_OF_MEM if there is
899 not enough memory; 1 otherwise.
902 <dd> <b>Side Effects</b> None
905 <dd> <b>See Also</b> <code><a href="#Cudd_CheckKeys">Cudd_CheckKeys</a>
906 </code>
908 <dt><pre>
909 <A NAME="Cudd_Decreasing"></A>
910 DdNode * <I></I>
911 <B>Cudd_Decreasing</B>(
912 DdManager * <b>dd</b>, <i></i>
913 DdNode * <b>f</b>, <i></i>
914 int <b>i</b> <i></i>
916 </pre>
917 <dd> Determines whether the function represented by BDD f is
918 negative unate (monotonic decreasing) in variable i. Returns the
919 constant one is f is unate and the (logical) constant zero if it is not.
920 This function does not generate any new nodes.
923 <dd> <b>Side Effects</b> None
926 <dd> <b>See Also</b> <code><a href="#Cudd_Increasing">Cudd_Increasing</a>
927 </code>
929 <dt><pre>
930 <A NAME="Cudd_DelayedDerefBdd"></A>
931 void <I></I>
932 <B>Cudd_DelayedDerefBdd</B>(
933 DdManager * <b>table</b>, <i></i>
934 DdNode * <b>n</b> <i></i>
936 </pre>
937 <dd> Enqueues node n for later dereferencing. If the queue
938 is full decreases the reference count of the oldest node N to make
939 room for n. If N dies, recursively decreases the reference counts of
940 its children. It is used to dispose of a BDD that is currently not
941 needed, but may be useful again in the near future. The dereferencing
942 proper is done as in Cudd_IterDerefBdd.
945 <dd> <b>Side Effects</b> None
948 <dd> <b>See Also</b> <code><a href="#Cudd_RecursiveDeref">Cudd_RecursiveDeref</a>
949 <a href="#Cudd_IterDerefBdd">Cudd_IterDerefBdd</a>
950 </code>
952 <dt><pre>
953 <A NAME="Cudd_Density"></A>
954 double <I></I>
955 <B>Cudd_Density</B>(
956 DdManager * <b>dd</b>, <i>manager</i>
957 DdNode * <b>f</b>, <i>function whose density is sought</i>
958 int <b>nvars</b> <i>size of the support of f</i>
960 </pre>
961 <dd> Computes the density of a BDD or ADD. The density is
962 the ratio of the number of minterms to the number of nodes. If 0 is
963 passed as number of variables, the number of variables existing in
964 the manager is used. Returns the density if successful; (double)
965 CUDD_OUT_OF_MEM otherwise.
968 <dd> <b>Side Effects</b> None
971 <dd> <b>See Also</b> <code><a href="#Cudd_CountMinterm">Cudd_CountMinterm</a>
972 <a href="#Cudd_DagSize">Cudd_DagSize</a>
973 </code>
975 <dt><pre>
976 <A NAME="Cudd_Deref"></A>
977 void <I></I>
978 <B>Cudd_Deref</B>(
979 DdNode * <b>node</b> <i></i>
981 </pre>
982 <dd> Decreases the reference count of node. It is primarily
983 used in recursive procedures to decrease the ref count of a result
984 node before returning it. This accomplishes the goal of removing the
985 protection applied by a previous Cudd_Ref.
988 <dd> <b>Side Effects</b> None
991 <dd> <b>See Also</b> <code><a href="#Cudd_RecursiveDeref">Cudd_RecursiveDeref</a>
992 <a href="#Cudd_RecursiveDerefZdd">Cudd_RecursiveDerefZdd</a>
993 <a href="#Cudd_Ref">Cudd_Ref</a>
994 </code>
996 <dt><pre>
997 <A NAME="Cudd_DisableGarbageCollection"></A>
998 void <I></I>
999 <B>Cudd_DisableGarbageCollection</B>(
1000 DdManager * <b>dd</b> <i></i>
1002 </pre>
1003 <dd> Disables garbage collection. Garbage collection is
1004 initially enabled. This function may be called to disable it.
1005 However, garbage collection will still occur when a new node must be
1006 created and no memory is left, or when garbage collection is required
1007 for correctness. (E.g., before reordering.)
1010 <dd> <b>Side Effects</b> None
1013 <dd> <b>See Also</b> <code><a href="#Cudd_EnableGarbageCollection">Cudd_EnableGarbageCollection</a>
1014 <a href="#Cudd_GarbageCollectionEnabled">Cudd_GarbageCollectionEnabled</a>
1015 </code>
1017 <dt><pre>
1018 <A NAME="Cudd_DisableReorderingReporting"></A>
1019 int <I></I>
1020 <B>Cudd_DisableReorderingReporting</B>(
1021 DdManager * <b>dd</b> <i></i>
1023 </pre>
1024 <dd> Disables reporting of reordering stats.
1025 Returns 1 if successful; 0 otherwise.
1028 <dd> <b>Side Effects</b> Removes functions from the pre-reordering and post-reordering
1029 hooks.
1032 <dd> <b>See Also</b> <code><a href="#Cudd_EnableReorderingReporting">Cudd_EnableReorderingReporting</a>
1033 <a href="#Cudd_ReorderingReporting">Cudd_ReorderingReporting</a>
1034 </code>
1036 <dt><pre>
1037 <A NAME="Cudd_Disequality"></A>
1038 DdNode * <I></I>
1039 <B>Cudd_Disequality</B>(
1040 DdManager * <b>dd</b>, <i>DD manager</i>
1041 int <b>N</b>, <i>number of x and y variables</i>
1042 int <b>c</b>, <i>right-hand side constant</i>
1043 DdNode ** <b>x</b>, <i>array of x variables</i>
1044 DdNode ** <b>y</b> <i>array of y variables</i>
1046 </pre>
1047 <dd> This function generates a BDD for the function x -y != c.
1048 Both x and y are N-bit numbers, x[0] x[1] ... x[N-1] and
1049 y[0] y[1] ... y[N-1], with 0 the most significant bit.
1050 The BDD is built bottom-up.
1051 It has a linear number of nodes if the variables are ordered as follows:
1052 x[0] y[0] x[1] y[1] ... x[N-1] y[N-1].
1055 <dd> <b>Side Effects</b> None
1058 <dd> <b>See Also</b> <code><a href="#Cudd_Xgty">Cudd_Xgty</a>
1059 </code>
1061 <dt><pre>
1062 <A NAME="Cudd_DumpBlifBody"></A>
1063 int <I></I>
1064 <B>Cudd_DumpBlifBody</B>(
1065 DdManager * <b>dd</b>, <i>manager</i>
1066 int <b>n</b>, <i>number of output nodes to be dumped</i>
1067 DdNode ** <b>f</b>, <i>array of output nodes to be dumped</i>
1068 char ** <b>inames</b>, <i>array of input names (or NULL)</i>
1069 char ** <b>onames</b>, <i>array of output names (or NULL)</i>
1070 FILE * <b>fp</b>, <i>pointer to the dump file</i>
1071 int <b>mv</b> <i>0: blif, 1: blif-MV</i>
1073 </pre>
1074 <dd> Writes a blif body representing the argument BDDs as a
1075 network of multiplexers. No header (.model, .inputs, and .outputs) and
1076 footer (.end) are produced by this function. One multiplexer is written
1077 for each BDD node. It returns 1 in case of success; 0 otherwise (e.g.,
1078 out-of-memory, file system full, or an ADD with constants different
1079 from 0 and 1). Cudd_DumpBlifBody does not close the file: This is the
1080 caller responsibility. Cudd_DumpBlifBody uses a minimal unique subset of
1081 the hexadecimal address of a node as name for it. If the argument
1082 inames is non-null, it is assumed to hold the pointers to the names
1083 of the inputs. Similarly for onames. This function prints out only
1084 .names part.
1087 <dd> <b>Side Effects</b> None
1090 <dd> <b>See Also</b> <code><a href="#Cudd_DumpBlif">Cudd_DumpBlif</a>
1091 <a href="#Cudd_DumpDot">Cudd_DumpDot</a>
1092 <a href="#Cudd_PrintDebug">Cudd_PrintDebug</a>
1093 <a href="#Cudd_DumpDDcal">Cudd_DumpDDcal</a>
1094 <a href="#Cudd_DumpDaVinci">Cudd_DumpDaVinci</a>
1095 <a href="#Cudd_DumpFactoredForm">Cudd_DumpFactoredForm</a>
1096 </code>
1098 <dt><pre>
1099 <A NAME="Cudd_DumpBlif"></A>
1100 int <I></I>
1101 <B>Cudd_DumpBlif</B>(
1102 DdManager * <b>dd</b>, <i>manager</i>
1103 int <b>n</b>, <i>number of output nodes to be dumped</i>
1104 DdNode ** <b>f</b>, <i>array of output nodes to be dumped</i>
1105 char ** <b>inames</b>, <i>array of input names (or NULL)</i>
1106 char ** <b>onames</b>, <i>array of output names (or NULL)</i>
1107 char * <b>mname</b>, <i>model name (or NULL)</i>
1108 FILE * <b>fp</b>, <i>pointer to the dump file</i>
1109 int <b>mv</b> <i>0: blif, 1: blif-MV</i>
1111 </pre>
1112 <dd> Writes a blif file representing the argument BDDs as a
1113 network of multiplexers. One multiplexer is written for each BDD
1114 node. It returns 1 in case of success; 0 otherwise (e.g.,
1115 out-of-memory, file system full, or an ADD with constants different
1116 from 0 and 1). Cudd_DumpBlif does not close the file: This is the
1117 caller responsibility. Cudd_DumpBlif uses a minimal unique subset of
1118 the hexadecimal address of a node as name for it. If the argument
1119 inames is non-null, it is assumed to hold the pointers to the names
1120 of the inputs. Similarly for onames.
1123 <dd> <b>Side Effects</b> None
1126 <dd> <b>See Also</b> <code><a href="#Cudd_DumpBlifBody">Cudd_DumpBlifBody</a>
1127 <a href="#Cudd_DumpDot">Cudd_DumpDot</a>
1128 <a href="#Cudd_PrintDebug">Cudd_PrintDebug</a>
1129 <a href="#Cudd_DumpDDcal">Cudd_DumpDDcal</a>
1130 <a href="#Cudd_DumpDaVinci">Cudd_DumpDaVinci</a>
1131 <a href="#Cudd_DumpFactoredForm">Cudd_DumpFactoredForm</a>
1132 </code>
1134 <dt><pre>
1135 <A NAME="Cudd_DumpDDcal"></A>
1136 int <I></I>
1137 <B>Cudd_DumpDDcal</B>(
1138 DdManager * <b>dd</b>, <i>manager</i>
1139 int <b>n</b>, <i>number of output nodes to be dumped</i>
1140 DdNode ** <b>f</b>, <i>array of output nodes to be dumped</i>
1141 char ** <b>inames</b>, <i>array of input names (or NULL)</i>
1142 char ** <b>onames</b>, <i>array of output names (or NULL)</i>
1143 FILE * <b>fp</b> <i>pointer to the dump file</i>
1145 </pre>
1146 <dd> Writes a DDcal file representing the argument BDDs.
1147 It returns 1 in case of success; 0 otherwise (e.g., out-of-memory or
1148 file system full). Cudd_DumpDDcal does not close the file: This
1149 is the caller responsibility. Cudd_DumpDDcal uses a minimal unique
1150 subset of the hexadecimal address of a node as name for it. If the
1151 argument inames is non-null, it is assumed to hold the pointers to
1152 the names of the inputs. Similarly for onames.
1155 <dd> <b>Side Effects</b> None
1158 <dd> <b>See Also</b> <code><a href="#Cudd_DumpDot">Cudd_DumpDot</a>
1159 <a href="#Cudd_PrintDebug">Cudd_PrintDebug</a>
1160 <a href="#Cudd_DumpBlif">Cudd_DumpBlif</a>
1161 <a href="#Cudd_DumpDaVinci">Cudd_DumpDaVinci</a>
1162 <a href="#Cudd_DumpFactoredForm">Cudd_DumpFactoredForm</a>
1163 </code>
1165 <dt><pre>
1166 <A NAME="Cudd_DumpDaVinci"></A>
1167 int <I></I>
1168 <B>Cudd_DumpDaVinci</B>(
1169 DdManager * <b>dd</b>, <i>manager</i>
1170 int <b>n</b>, <i>number of output nodes to be dumped</i>
1171 DdNode ** <b>f</b>, <i>array of output nodes to be dumped</i>
1172 char ** <b>inames</b>, <i>array of input names (or NULL)</i>
1173 char ** <b>onames</b>, <i>array of output names (or NULL)</i>
1174 FILE * <b>fp</b> <i>pointer to the dump file</i>
1176 </pre>
1177 <dd> Writes a daVinci file representing the argument BDDs.
1178 It returns 1 in case of success; 0 otherwise (e.g., out-of-memory or
1179 file system full). Cudd_DumpDaVinci does not close the file: This
1180 is the caller responsibility. Cudd_DumpDaVinci uses a minimal unique
1181 subset of the hexadecimal address of a node as name for it. If the
1182 argument inames is non-null, it is assumed to hold the pointers to
1183 the names of the inputs. Similarly for onames.
1186 <dd> <b>Side Effects</b> None
1189 <dd> <b>See Also</b> <code><a href="#Cudd_DumpDot">Cudd_DumpDot</a>
1190 <a href="#Cudd_PrintDebug">Cudd_PrintDebug</a>
1191 <a href="#Cudd_DumpBlif">Cudd_DumpBlif</a>
1192 <a href="#Cudd_DumpDDcal">Cudd_DumpDDcal</a>
1193 <a href="#Cudd_DumpFactoredForm">Cudd_DumpFactoredForm</a>
1194 </code>
1196 <dt><pre>
1197 <A NAME="Cudd_DumpDot"></A>
1198 int <I></I>
1199 <B>Cudd_DumpDot</B>(
1200 DdManager * <b>dd</b>, <i>manager</i>
1201 int <b>n</b>, <i>number of output nodes to be dumped</i>
1202 DdNode ** <b>f</b>, <i>array of output nodes to be dumped</i>
1203 char ** <b>inames</b>, <i>array of input names (or NULL)</i>
1204 char ** <b>onames</b>, <i>array of output names (or NULL)</i>
1205 FILE * <b>fp</b> <i>pointer to the dump file</i>
1207 </pre>
1208 <dd> Writes a file representing the argument DDs in a format
1209 suitable for the graph drawing program dot.
1210 It returns 1 in case of success; 0 otherwise (e.g., out-of-memory,
1211 file system full).
1212 Cudd_DumpDot does not close the file: This is the caller
1213 responsibility. Cudd_DumpDot uses a minimal unique subset of the
1214 hexadecimal address of a node as name for it.
1215 If the argument inames is non-null, it is assumed to hold the pointers
1216 to the names of the inputs. Similarly for onames.
1217 Cudd_DumpDot uses the following convention to draw arcs:
1218 <ul>
1219 <li> solid line: THEN arcs;
1220 <li> dotted line: complement arcs;
1221 <li> dashed line: regular ELSE arcs.
1222 </ul>
1223 The dot options are chosen so that the drawing fits on a letter-size
1224 sheet.
1227 <dd> <b>Side Effects</b> None
1230 <dd> <b>See Also</b> <code><a href="#Cudd_DumpBlif">Cudd_DumpBlif</a>
1231 <a href="#Cudd_PrintDebug">Cudd_PrintDebug</a>
1232 <a href="#Cudd_DumpDDcal">Cudd_DumpDDcal</a>
1233 <a href="#Cudd_DumpDaVinci">Cudd_DumpDaVinci</a>
1234 <a href="#Cudd_DumpFactoredForm">Cudd_DumpFactoredForm</a>
1235 </code>
1237 <dt><pre>
1238 <A NAME="Cudd_DumpFactoredForm"></A>
1239 int <I></I>
1240 <B>Cudd_DumpFactoredForm</B>(
1241 DdManager * <b>dd</b>, <i>manager</i>
1242 int <b>n</b>, <i>number of output nodes to be dumped</i>
1243 DdNode ** <b>f</b>, <i>array of output nodes to be dumped</i>
1244 char ** <b>inames</b>, <i>array of input names (or NULL)</i>
1245 char ** <b>onames</b>, <i>array of output names (or NULL)</i>
1246 FILE * <b>fp</b> <i>pointer to the dump file</i>
1248 </pre>
1249 <dd> Writes factored forms representing the argument BDDs.
1250 The format of the factored form is the one used in the genlib files
1251 for technology mapping in sis. It returns 1 in case of success; 0
1252 otherwise (e.g., file system full). Cudd_DumpFactoredForm does not
1253 close the file: This is the caller responsibility. Caution must be
1254 exercised because a factored form may be exponentially larger than
1255 the argument BDD. If the argument inames is non-null, it is assumed
1256 to hold the pointers to the names of the inputs. Similarly for
1257 onames.
1260 <dd> <b>Side Effects</b> None
1263 <dd> <b>See Also</b> <code><a href="#Cudd_DumpDot">Cudd_DumpDot</a>
1264 <a href="#Cudd_PrintDebug">Cudd_PrintDebug</a>
1265 <a href="#Cudd_DumpBlif">Cudd_DumpBlif</a>
1266 <a href="#Cudd_DumpDaVinci">Cudd_DumpDaVinci</a>
1267 <a href="#Cudd_DumpDDcal">Cudd_DumpDDcal</a>
1268 </code>
1270 <dt><pre>
1271 <A NAME="Cudd_Dxygtdxz"></A>
1272 DdNode * <I></I>
1273 <B>Cudd_Dxygtdxz</B>(
1274 DdManager * <b>dd</b>, <i>DD manager</i>
1275 int <b>N</b>, <i>number of x, y, and z variables</i>
1276 DdNode ** <b>x</b>, <i>array of x variables</i>
1277 DdNode ** <b>y</b>, <i>array of y variables</i>
1278 DdNode ** <b>z</b> <i>array of z variables</i>
1280 </pre>
1281 <dd> This function generates a BDD for the function d(x,y)
1282 &gt; d(x,z);
1283 x, y, and z are N-bit numbers, x[0] x[1] ... x[N-1],
1284 y[0] y[1] ... y[N-1], and z[0] z[1] ... z[N-1],
1285 with 0 the most significant bit.
1286 The distance d(x,y) is defined as:
1287 sum_{i=0}^{N-1}(|x_i - y_i| cdot 2^{N-i-1}).
1288 The BDD is built bottom-up.
1289 It has 7*N-3 internal nodes, if the variables are ordered as follows:
1290 x[0] y[0] z[0] x[1] y[1] z[1] ... x[N-1] y[N-1] z[N-1].
1293 <dd> <b>Side Effects</b> None
1296 <dd> <b>See Also</b> <code><a href="#Cudd_PrioritySelect">Cudd_PrioritySelect</a>
1297 <a href="#Cudd_Dxygtdyz">Cudd_Dxygtdyz</a>
1298 <a href="#Cudd_Xgty">Cudd_Xgty</a>
1299 <a href="#Cudd_bddAdjPermuteX">Cudd_bddAdjPermuteX</a>
1300 </code>
1302 <dt><pre>
1303 <A NAME="Cudd_Dxygtdyz"></A>
1304 DdNode * <I></I>
1305 <B>Cudd_Dxygtdyz</B>(
1306 DdManager * <b>dd</b>, <i>DD manager</i>
1307 int <b>N</b>, <i>number of x, y, and z variables</i>
1308 DdNode ** <b>x</b>, <i>array of x variables</i>
1309 DdNode ** <b>y</b>, <i>array of y variables</i>
1310 DdNode ** <b>z</b> <i>array of z variables</i>
1312 </pre>
1313 <dd> This function generates a BDD for the function d(x,y)
1314 &gt; d(y,z);
1315 x, y, and z are N-bit numbers, x[0] x[1] ... x[N-1],
1316 y[0] y[1] ... y[N-1], and z[0] z[1] ... z[N-1],
1317 with 0 the most significant bit.
1318 The distance d(x,y) is defined as:
1319 sum_{i=0}^{N-1}(|x_i - y_i| cdot 2^{N-i-1}).
1320 The BDD is built bottom-up.
1321 It has 7*N-3 internal nodes, if the variables are ordered as follows:
1322 x[0] y[0] z[0] x[1] y[1] z[1] ... x[N-1] y[N-1] z[N-1].
1325 <dd> <b>Side Effects</b> None
1328 <dd> <b>See Also</b> <code><a href="#Cudd_PrioritySelect">Cudd_PrioritySelect</a>
1329 <a href="#Cudd_Dxygtdxz">Cudd_Dxygtdxz</a>
1330 <a href="#Cudd_Xgty">Cudd_Xgty</a>
1331 <a href="#Cudd_bddAdjPermuteX">Cudd_bddAdjPermuteX</a>
1332 </code>
1334 <dt><pre>
1335 <A NAME="Cudd_EnableGarbageCollection"></A>
1336 void <I></I>
1337 <B>Cudd_EnableGarbageCollection</B>(
1338 DdManager * <b>dd</b> <i></i>
1340 </pre>
1341 <dd> Enables garbage collection. Garbage collection is
1342 initially enabled. Therefore it is necessary to call this function
1343 only if garbage collection has been explicitly disabled.
1346 <dd> <b>Side Effects</b> None
1349 <dd> <b>See Also</b> <code><a href="#Cudd_DisableGarbageCollection">Cudd_DisableGarbageCollection</a>
1350 <a href="#Cudd_GarbageCollectionEnabled">Cudd_GarbageCollectionEnabled</a>
1351 </code>
1353 <dt><pre>
1354 <A NAME="Cudd_EnableReorderingReporting"></A>
1355 int <I></I>
1356 <B>Cudd_EnableReorderingReporting</B>(
1357 DdManager * <b>dd</b> <i></i>
1359 </pre>
1360 <dd> Enables reporting of reordering stats.
1361 Returns 1 if successful; 0 otherwise.
1364 <dd> <b>Side Effects</b> Installs functions in the pre-reordering and post-reordering
1365 hooks.
1368 <dd> <b>See Also</b> <code><a href="#Cudd_DisableReorderingReporting">Cudd_DisableReorderingReporting</a>
1369 <a href="#Cudd_ReorderingReporting">Cudd_ReorderingReporting</a>
1370 </code>
1372 <dt><pre>
1373 <A NAME="Cudd_EpdCountMinterm"></A>
1374 int <I></I>
1375 <B>Cudd_EpdCountMinterm</B>(
1376 DdManager * <b>manager</b>, <i></i>
1377 DdNode * <b>node</b>, <i></i>
1378 int <b>nvars</b>, <i></i>
1379 EpDouble * <b>epd</b> <i></i>
1381 </pre>
1382 <dd> Counts the number of minterms of a DD with extended precision.
1383 The function is assumed to depend on nvars variables. The minterm count is
1384 represented as an EpDouble, to allow any number of variables.
1385 Returns 0 if successful; CUDD_OUT_OF_MEM otherwise.
1388 <dd> <b>Side Effects</b> None
1391 <dd> <b>See Also</b> <code><a href="#Cudd_PrintDebug">Cudd_PrintDebug</a>
1392 <a href="#Cudd_CountPath">Cudd_CountPath</a>
1393 </code>
1395 <dt><pre>
1396 <A NAME="Cudd_EqualSupNorm"></A>
1397 int <I></I>
1398 <B>Cudd_EqualSupNorm</B>(
1399 DdManager * <b>dd</b>, <i>manager</i>
1400 DdNode * <b>f</b>, <i>first ADD</i>
1401 DdNode * <b>g</b>, <i>second ADD</i>
1402 CUDD_VALUE_TYPE <b>tolerance</b>, <i>maximum allowed difference</i>
1403 int <b>pr</b> <i>verbosity level</i>
1405 </pre>
1406 <dd> Compares two ADDs for equality within tolerance. Two
1407 ADDs are reported to be equal if the maximum difference between them
1408 (the sup norm of their difference) is less than or equal to the
1409 tolerance parameter. Returns 1 if the two ADDs are equal (within
1410 tolerance); 0 otherwise. If parameter <code>pr</code> is positive
1411 the first failure is reported to the standard output.
1414 <dd> <b>Side Effects</b> None
1417 <dt><pre>
1418 <A NAME="Cudd_EquivDC"></A>
1419 int <I></I>
1420 <B>Cudd_EquivDC</B>(
1421 DdManager * <b>dd</b>, <i></i>
1422 DdNode * <b>F</b>, <i></i>
1423 DdNode * <b>G</b>, <i></i>
1424 DdNode * <b>D</b> <i></i>
1426 </pre>
1427 <dd> Tells whether F and G are identical wherever D is 0. F
1428 and G are either two ADDs or two BDDs. D is either a 0-1 ADD or a
1429 BDD. The function returns 1 if F and G are equivalent, and 0
1430 otherwise. No new nodes are created.
1433 <dd> <b>Side Effects</b> None
1436 <dd> <b>See Also</b> <code><a href="#Cudd_bddLeqUnless">Cudd_bddLeqUnless</a>
1437 </code>
1439 <dt><pre>
1440 <A NAME="Cudd_EstimateCofactorSimple"></A>
1441 int <I></I>
1442 <B>Cudd_EstimateCofactorSimple</B>(
1443 DdNode * <b>node</b>, <i></i>
1444 int <b>i</b> <i></i>
1446 </pre>
1447 <dd> Estimates the number of nodes in a cofactor of a DD.
1448 Returns an estimate of the number of nodes in the positive cofactor of
1449 the graph rooted at node with respect to the variable whose index is i.
1450 This procedure implements with minor changes the algorithm of Cabodi et al.
1451 (ICCAD96). It does not allocate any memory, it does not change the
1452 state of the manager, and it is fast. However, it has been observed to
1453 overestimate the size of the cofactor by as much as a factor of 2.
1456 <dd> <b>Side Effects</b> None
1459 <dd> <b>See Also</b> <code><a href="#Cudd_DagSize">Cudd_DagSize</a>
1460 </code>
1462 <dt><pre>
1463 <A NAME="Cudd_EstimateCofactor"></A>
1464 int <I></I>
1465 <B>Cudd_EstimateCofactor</B>(
1466 DdManager * <b>dd</b>, <i>manager</i>
1467 DdNode * <b>f</b>, <i>function</i>
1468 int <b>i</b>, <i>index of variable</i>
1469 int <b>phase</b> <i>1: positive; 0: negative</i>
1471 </pre>
1472 <dd> Estimates the number of nodes in a cofactor of a DD.
1473 Returns an estimate of the number of nodes in a cofactor of
1474 the graph rooted at node with respect to the variable whose index is i.
1475 In case of failure, returns CUDD_OUT_OF_MEM.
1476 This function uses a refinement of the algorithm of Cabodi et al.
1477 (ICCAD96). The refinement allows the procedure to account for part
1478 of the recombination that may occur in the part of the cofactor above
1479 the cofactoring variable. This procedure does no create any new node.
1480 It does keep a small table of results; therefore it may run out of memory.
1481 If this is a concern, one should use Cudd_EstimateCofactorSimple, which
1482 is faster, does not allocate any memory, but is less accurate.
1485 <dd> <b>Side Effects</b> None
1488 <dd> <b>See Also</b> <code><a href="#Cudd_DagSize">Cudd_DagSize</a>
1489 <a href="#Cudd_EstimateCofactorSimple">Cudd_EstimateCofactorSimple</a>
1490 </code>
1492 <dt><pre>
1493 <A NAME="Cudd_Eval"></A>
1494 DdNode * <I></I>
1495 <B>Cudd_Eval</B>(
1496 DdManager * <b>dd</b>, <i></i>
1497 DdNode * <b>f</b>, <i></i>
1498 int * <b>inputs</b> <i></i>
1500 </pre>
1501 <dd> Finds the value of a DD for a given variable
1502 assignment. The variable assignment is passed in an array of int's,
1503 that should specify a zero or a one for each variable in the support
1504 of the function. Returns a pointer to a constant node. No new nodes
1505 are produced.
1508 <dd> <b>Side Effects</b> None
1511 <dd> <b>See Also</b> <code><a href="#Cudd_bddLeq">Cudd_bddLeq</a>
1512 <a href="#Cudd_addEvalConst">Cudd_addEvalConst</a>
1513 </code>
1515 <dt><pre>
1516 <A NAME="Cudd_ExpectedUsedSlots"></A>
1517 double <I></I>
1518 <B>Cudd_ExpectedUsedSlots</B>(
1519 DdManager * <b>dd</b> <i></i>
1521 </pre>
1522 <dd> Computes the fraction of slots in the unique table that
1523 should be in use. This expected value is based on the assumption
1524 that the hash function distributes the keys randomly; it can be
1525 compared with the result of Cudd_ReadUsedSlots to monitor the
1526 performance of the unique table hash function.
1529 <dd> <b>Side Effects</b> None
1532 <dd> <b>See Also</b> <code><a href="#Cudd_ReadSlots">Cudd_ReadSlots</a>
1533 <a href="#Cudd_ReadUsedSlots">Cudd_ReadUsedSlots</a>
1534 </code>
1536 <dt><pre>
1537 <A NAME="Cudd_FindEssential"></A>
1538 DdNode * <I></I>
1539 <B>Cudd_FindEssential</B>(
1540 DdManager * <b>dd</b>, <i></i>
1541 DdNode * <b>f</b> <i></i>
1543 </pre>
1544 <dd> Returns the cube of the essential variables. A positive
1545 literal means that the variable must be set to 1 for the function to be
1546 1. A negative literal means that the variable must be set to 0 for the
1547 function to be 1. Returns a pointer to the cube BDD if successful;
1548 NULL otherwise.
1551 <dd> <b>Side Effects</b> None
1554 <dd> <b>See Also</b> <code><a href="#Cudd_bddIsVarEssential">Cudd_bddIsVarEssential</a>
1555 </code>
1557 <dt><pre>
1558 <A NAME="Cudd_FindTwoLiteralClauses"></A>
1559 DdTlcInfo * <I></I>
1560 <B>Cudd_FindTwoLiteralClauses</B>(
1561 DdManager * <b>dd</b>, <i></i>
1562 DdNode * <b>f</b> <i></i>
1564 </pre>
1565 <dd> Returns the one- and two-literal clauses of a DD.
1566 Returns a pointer to the structure holding the clauses if
1567 successful; NULL otherwise. For a constant DD, the empty set of clauses
1568 is returned. This is obviously correct for a non-zero constant. For the
1569 constant zero, it is based on the assumption that only those clauses
1570 containing variables in the support of the function are considered. Since
1571 the support of a constant function is empty, no clauses are returned.
1574 <dd> <b>Side Effects</b> None
1577 <dd> <b>See Also</b> <code><a href="#Cudd_FindEssential">Cudd_FindEssential</a>
1578 </code>
1580 <dt><pre>
1581 <A NAME="Cudd_FirstCube"></A>
1582 DdGen * <I></I>
1583 <B>Cudd_FirstCube</B>(
1584 DdManager * <b>dd</b>, <i></i>
1585 DdNode * <b>f</b>, <i></i>
1586 int ** <b>cube</b>, <i></i>
1587 CUDD_VALUE_TYPE * <b>value</b> <i></i>
1589 </pre>
1590 <dd> Defines an iterator on the onset of a decision diagram
1591 and finds its first cube. Returns a generator that contains the
1592 information necessary to continue the enumeration if successful; NULL
1593 otherwise.<p>
1594 A cube is represented as an array of literals, which are integers in
1595 {0, 1, 2}; 0 represents a complemented literal, 1 represents an
1596 uncomplemented literal, and 2 stands for don't care. The enumeration
1597 produces a disjoint cover of the function associated with the diagram.
1598 The size of the array equals the number of variables in the manager at
1599 the time Cudd_FirstCube is called.<p>
1600 For each cube, a value is also returned. This value is always 1 for a
1601 BDD, while it may be different from 1 for an ADD.
1602 For BDDs, the offset is the set of cubes whose value is the logical zero.
1603 For ADDs, the offset is the set of cubes whose value is the
1604 background value. The cubes of the offset are not enumerated.
1607 <dd> <b>Side Effects</b> The first cube and its value are returned as side effects.
1610 <dd> <b>See Also</b> <code><a href="#Cudd_ForeachCube">Cudd_ForeachCube</a>
1611 <a href="#Cudd_NextCube">Cudd_NextCube</a>
1612 <a href="#Cudd_GenFree">Cudd_GenFree</a>
1613 <a href="#Cudd_IsGenEmpty">Cudd_IsGenEmpty</a>
1614 <a href="#Cudd_FirstNode">Cudd_FirstNode</a>
1615 </code>
1617 <dt><pre>
1618 <A NAME="Cudd_FirstNode"></A>
1619 DdGen * <I></I>
1620 <B>Cudd_FirstNode</B>(
1621 DdManager * <b>dd</b>, <i></i>
1622 DdNode * <b>f</b>, <i></i>
1623 DdNode ** <b>node</b> <i></i>
1625 </pre>
1626 <dd> Defines an iterator on the nodes of a decision diagram
1627 and finds its first node. Returns a generator that contains the
1628 information necessary to continue the enumeration if successful;
1629 NULL otherwise. The nodes are enumerated in a reverse topological
1630 order, so that a node is always preceded in the enumeration by its
1631 descendants.
1634 <dd> <b>Side Effects</b> The first node is returned as a side effect.
1637 <dd> <b>See Also</b> <code><a href="#Cudd_ForeachNode">Cudd_ForeachNode</a>
1638 <a href="#Cudd_NextNode">Cudd_NextNode</a>
1639 <a href="#Cudd_GenFree">Cudd_GenFree</a>
1640 <a href="#Cudd_IsGenEmpty">Cudd_IsGenEmpty</a>
1641 <a href="#Cudd_FirstCube">Cudd_FirstCube</a>
1642 </code>
1644 <dt><pre>
1645 <A NAME="Cudd_FirstPrime"></A>
1646 DdGen * <I></I>
1647 <B>Cudd_FirstPrime</B>(
1648 DdManager * <b>dd</b>, <i></i>
1649 DdNode * <b>l</b>, <i></i>
1650 DdNode * <b>u</b>, <i></i>
1651 int ** <b>cube</b> <i></i>
1653 </pre>
1654 <dd> Defines an iterator on a pair of BDDs describing a
1655 (possibly incompletely specified) Boolean functions and finds the
1656 first cube of a cover of the function. Returns a generator
1657 that contains the information necessary to continue the enumeration
1658 if successful; NULL otherwise.<p>
1660 The two argument BDDs are the lower and upper bounds of an interval.
1661 It is a mistake to call this function with a lower bound that is not
1662 less than or equal to the upper bound.<p>
1664 A cube is represented as an array of literals, which are integers in
1665 {0, 1, 2}; 0 represents a complemented literal, 1 represents an
1666 uncomplemented literal, and 2 stands for don't care. The enumeration
1667 produces a prime and irredundant cover of the function associated
1668 with the two BDDs. The size of the array equals the number of
1669 variables in the manager at the time Cudd_FirstCube is called.<p>
1671 This iterator can only be used on BDDs.
1674 <dd> <b>Side Effects</b> The first cube is returned as side effect.
1677 <dd> <b>See Also</b> <code><a href="#Cudd_ForeachPrime">Cudd_ForeachPrime</a>
1678 <a href="#Cudd_NextPrime">Cudd_NextPrime</a>
1679 <a href="#Cudd_GenFree">Cudd_GenFree</a>
1680 <a href="#Cudd_IsGenEmpty">Cudd_IsGenEmpty</a>
1681 <a href="#Cudd_FirstCube">Cudd_FirstCube</a>
1682 <a href="#Cudd_FirstNode">Cudd_FirstNode</a>
1683 </code>
1685 <dt><pre>
1686 <A NAME="Cudd_FreeTree"></A>
1687 void <I></I>
1688 <B>Cudd_FreeTree</B>(
1689 DdManager * <b>dd</b> <i></i>
1691 </pre>
1692 <dd> Frees the variable group tree of the manager.
1695 <dd> <b>Side Effects</b> None
1698 <dd> <b>See Also</b> <code><a href="#Cudd_SetTree">Cudd_SetTree</a>
1699 <a href="#Cudd_ReadTree">Cudd_ReadTree</a>
1700 <a href="#Cudd_FreeZddTree">Cudd_FreeZddTree</a>
1701 </code>
1703 <dt><pre>
1704 <A NAME="Cudd_FreeZddTree"></A>
1705 void <I></I>
1706 <B>Cudd_FreeZddTree</B>(
1707 DdManager * <b>dd</b> <i></i>
1709 </pre>
1710 <dd> Frees the variable group tree of the manager.
1713 <dd> <b>Side Effects</b> None
1716 <dd> <b>See Also</b> <code><a href="#Cudd_SetZddTree">Cudd_SetZddTree</a>
1717 <a href="#Cudd_ReadZddTree">Cudd_ReadZddTree</a>
1718 <a href="#Cudd_FreeTree">Cudd_FreeTree</a>
1719 </code>
1721 <dt><pre>
1722 <A NAME="Cudd_GarbageCollectionEnabled"></A>
1723 int <I></I>
1724 <B>Cudd_GarbageCollectionEnabled</B>(
1725 DdManager * <b>dd</b> <i></i>
1727 </pre>
1728 <dd> Returns 1 if garbage collection is enabled; 0 otherwise.
1731 <dd> <b>Side Effects</b> None
1734 <dd> <b>See Also</b> <code><a href="#Cudd_EnableGarbageCollection">Cudd_EnableGarbageCollection</a>
1735 <a href="#Cudd_DisableGarbageCollection">Cudd_DisableGarbageCollection</a>
1736 </code>
1738 <dt><pre>
1739 <A NAME="Cudd_GenFree"></A>
1740 int <I></I>
1741 <B>Cudd_GenFree</B>(
1742 DdGen * <b>gen</b> <i></i>
1744 </pre>
1745 <dd> Frees a CUDD generator. Always returns 0, so that it can
1746 be used in mis-like foreach constructs.
1749 <dd> <b>Side Effects</b> None
1752 <dd> <b>See Also</b> <code><a href="#Cudd_ForeachCube">Cudd_ForeachCube</a>
1753 <a href="#Cudd_ForeachNode">Cudd_ForeachNode</a>
1754 <a href="#Cudd_FirstCube">Cudd_FirstCube</a>
1755 <a href="#Cudd_NextCube">Cudd_NextCube</a>
1756 <a href="#Cudd_FirstNode">Cudd_FirstNode</a>
1757 <a href="#Cudd_NextNode">Cudd_NextNode</a>
1758 <a href="#Cudd_IsGenEmpty">Cudd_IsGenEmpty</a>
1759 </code>
1761 <dt><pre>
1762 <A NAME="Cudd_Increasing"></A>
1763 DdNode * <I></I>
1764 <B>Cudd_Increasing</B>(
1765 DdManager * <b>dd</b>, <i></i>
1766 DdNode * <b>f</b>, <i></i>
1767 int <b>i</b> <i></i>
1769 </pre>
1770 <dd> Determines whether the function represented by BDD f is
1771 positive unate (monotonic increasing) in variable i. It is based on
1772 Cudd_Decreasing and the fact that f is monotonic increasing in i if
1773 and only if its complement is monotonic decreasing in i.
1776 <dd> <b>Side Effects</b> None
1779 <dd> <b>See Also</b> <code><a href="#Cudd_Decreasing">Cudd_Decreasing</a>
1780 </code>
1782 <dt><pre>
1783 <A NAME="Cudd_IndicesToCube"></A>
1784 DdNode * <I></I>
1785 <B>Cudd_IndicesToCube</B>(
1786 DdManager * <b>dd</b>, <i></i>
1787 int * <b>array</b>, <i></i>
1788 int <b>n</b> <i></i>
1790 </pre>
1791 <dd> Builds a cube of BDD variables from an array of indices.
1792 Returns a pointer to the result if successful; NULL otherwise.
1795 <dd> <b>Side Effects</b> None
1798 <dd> <b>See Also</b> <code><a href="#Cudd_bddComputeCube">Cudd_bddComputeCube</a>
1799 <a href="#Cudd_CubeArrayToBdd">Cudd_CubeArrayToBdd</a>
1800 </code>
1802 <dt><pre>
1803 <A NAME="Cudd_Inequality"></A>
1804 DdNode * <I></I>
1805 <B>Cudd_Inequality</B>(
1806 DdManager * <b>dd</b>, <i>DD manager</i>
1807 int <b>N</b>, <i>number of x and y variables</i>
1808 int <b>c</b>, <i>right-hand side constant</i>
1809 DdNode ** <b>x</b>, <i>array of x variables</i>
1810 DdNode ** <b>y</b> <i>array of y variables</i>
1812 </pre>
1813 <dd> This function generates a BDD for the function x -y &ge; c.
1814 Both x and y are N-bit numbers, x[0] x[1] ... x[N-1] and
1815 y[0] y[1] ... y[N-1], with 0 the most significant bit.
1816 The BDD is built bottom-up.
1817 It has a linear number of nodes if the variables are ordered as follows:
1818 x[0] y[0] x[1] y[1] ... x[N-1] y[N-1].
1821 <dd> <b>Side Effects</b> None
1824 <dd> <b>See Also</b> <code><a href="#Cudd_Xgty">Cudd_Xgty</a>
1825 </code>
1827 <dt><pre>
1828 <A NAME="Cudd_Init"></A>
1829 DdManager * <I></I>
1830 <B>Cudd_Init</B>(
1831 unsigned int <b>numVars</b>, <i>initial number of BDD variables (i.e., subtables)</i>
1832 unsigned int <b>numVarsZ</b>, <i>initial number of ZDD variables (i.e., subtables)</i>
1833 unsigned int <b>numSlots</b>, <i>initial size of the unique tables</i>
1834 unsigned int <b>cacheSize</b>, <i>initial size of the cache</i>
1835 unsigned long <b>maxMemory</b> <i>target maximum memory occupation</i>
1837 </pre>
1838 <dd> Creates a new DD manager, initializes the table, the
1839 basic constants and the projection functions. If maxMemory is 0,
1840 Cudd_Init decides suitable values for the maximum size of the cache
1841 and for the limit for fast unique table growth based on the available
1842 memory. Returns a pointer to the manager if successful; NULL
1843 otherwise.
1846 <dd> <b>Side Effects</b> None
1849 <dd> <b>See Also</b> <code><a href="#Cudd_Quit">Cudd_Quit</a>
1850 </code>
1852 <dt><pre>
1853 <A NAME="Cudd_IsGenEmpty"></A>
1854 int <I></I>
1855 <B>Cudd_IsGenEmpty</B>(
1856 DdGen * <b>gen</b> <i></i>
1858 </pre>
1859 <dd> Queries the status of a generator. Returns 1 if the
1860 generator is empty or NULL; 0 otherswise.
1863 <dd> <b>Side Effects</b> None
1866 <dd> <b>See Also</b> <code><a href="#Cudd_ForeachCube">Cudd_ForeachCube</a>
1867 <a href="#Cudd_ForeachNode">Cudd_ForeachNode</a>
1868 <a href="#Cudd_FirstCube">Cudd_FirstCube</a>
1869 <a href="#Cudd_NextCube">Cudd_NextCube</a>
1870 <a href="#Cudd_FirstNode">Cudd_FirstNode</a>
1871 <a href="#Cudd_NextNode">Cudd_NextNode</a>
1872 <a href="#Cudd_GenFree">Cudd_GenFree</a>
1873 </code>
1875 <dt><pre>
1876 <A NAME="Cudd_IsInHook"></A>
1877 int <I></I>
1878 <B>Cudd_IsInHook</B>(
1879 DdManager * <b>dd</b>, <i></i>
1880 DD_HFP <b>f</b>, <i></i>
1881 Cudd_HookType <b>where</b> <i></i>
1883 </pre>
1884 <dd> Checks whether a function is in a hook. A hook is a list of
1885 application-provided functions called on certain occasions by the
1886 package. Returns 1 if the function is found; 0 otherwise.
1889 <dd> <b>Side Effects</b> None
1892 <dd> <b>See Also</b> <code><a href="#Cudd_AddHook">Cudd_AddHook</a>
1893 <a href="#Cudd_RemoveHook">Cudd_RemoveHook</a>
1894 </code>
1896 <dt><pre>
1897 <A NAME="Cudd_IsNonConstant"></A>
1898 int <I></I>
1899 <B>Cudd_IsNonConstant</B>(
1900 DdNode * <b>f</b> <i></i>
1902 </pre>
1903 <dd> Returns 1 if a DD node is not constant. This function is
1904 useful to test the results of Cudd_bddIteConstant, Cudd_addIteConstant,
1905 Cudd_addEvalConst. These results may be a special value signifying
1906 non-constant. In the other cases the macro Cudd_IsConstant can be used.
1909 <dd> <b>Side Effects</b> None
1912 <dd> <b>See Also</b> <code><a href="#Cudd_IsConstant">Cudd_IsConstant</a>
1913 <a href="#Cudd_bddIteConstant">Cudd_bddIteConstant</a>
1914 <a href="#Cudd_addIteConstant">Cudd_addIteConstant</a>
1915 <a href="#Cudd_addEvalConst">Cudd_addEvalConst</a>
1916 </code>
1918 <dt><pre>
1919 <A NAME="Cudd_IterDerefBdd"></A>
1920 void <I></I>
1921 <B>Cudd_IterDerefBdd</B>(
1922 DdManager * <b>table</b>, <i></i>
1923 DdNode * <b>n</b> <i></i>
1925 </pre>
1926 <dd> Decreases the reference count of node n. If n dies,
1927 recursively decreases the reference counts of its children. It is
1928 used to dispose of a BDD that is no longer needed. It is more
1929 efficient than Cudd_RecursiveDeref, but it cannot be used on
1930 ADDs. The greater efficiency comes from being able to assume that no
1931 constant node will ever die as a result of a call to this
1932 procedure.
1935 <dd> <b>Side Effects</b> None
1938 <dd> <b>See Also</b> <code><a href="#Cudd_RecursiveDeref">Cudd_RecursiveDeref</a>
1939 <a href="#Cudd_DelayedDerefBdd">Cudd_DelayedDerefBdd</a>
1940 </code>
1942 <dt><pre>
1943 <A NAME="Cudd_LargestCube"></A>
1944 DdNode * <I></I>
1945 <B>Cudd_LargestCube</B>(
1946 DdManager * <b>manager</b>, <i></i>
1947 DdNode * <b>f</b>, <i></i>
1948 int * <b>length</b> <i></i>
1950 </pre>
1951 <dd> Finds a largest cube in a DD. f is the DD we want to
1952 get the largest cube for. The problem is translated into the one of
1953 finding a shortest path in f, when both THEN and ELSE arcs are assumed to
1954 have unit length. This yields a largest cube in the disjoint cover
1955 corresponding to the DD. Therefore, it is not necessarily the largest
1956 implicant of f. Returns the largest cube as a BDD.
1959 <dd> <b>Side Effects</b> The number of literals of the cube is returned in length.
1962 <dd> <b>See Also</b> <code><a href="#Cudd_ShortestPath">Cudd_ShortestPath</a>
1963 </code>
1965 <dt><pre>
1966 <A NAME="Cudd_MakeBddFromZddCover"></A>
1967 DdNode * <I></I>
1968 <B>Cudd_MakeBddFromZddCover</B>(
1969 DdManager * <b>dd</b>, <i></i>
1970 DdNode * <b>node</b> <i></i>
1972 </pre>
1973 <dd> Converts a ZDD cover to a BDD graph. If successful, it
1974 returns a BDD node, otherwise it returns NULL.
1977 <dd> <b>See Also</b> <code><a href="#cuddMakeBddFromZddCover">cuddMakeBddFromZddCover</a>
1978 </code>
1980 <dt><pre>
1981 <A NAME="Cudd_MakeTreeNode"></A>
1982 MtrNode * <I></I>
1983 <B>Cudd_MakeTreeNode</B>(
1984 DdManager * <b>dd</b>, <i>manager</i>
1985 unsigned int <b>low</b>, <i>index of the first group variable</i>
1986 unsigned int <b>size</b>, <i>number of variables in the group</i>
1987 unsigned int <b>type</b> <i>MTR_DEFAULT or MTR_FIXED</i>
1989 </pre>
1990 <dd> Creates a new variable group. The group starts at
1991 variable and contains size variables. The parameter low is the index
1992 of the first variable. If the variable already exists, its current
1993 position in the order is known to the manager. If the variable does
1994 not exist yet, the position is assumed to be the same as the index.
1995 The group tree is created if it does not exist yet.
1996 Returns a pointer to the group if successful; NULL otherwise.
1999 <dd> <b>Side Effects</b> The variable tree is changed.
2002 <dd> <b>See Also</b> <code><a href="#Cudd_MakeZddTreeNode">Cudd_MakeZddTreeNode</a>
2003 </code>
2005 <dt><pre>
2006 <A NAME="Cudd_MakeZddTreeNode"></A>
2007 MtrNode * <I></I>
2008 <B>Cudd_MakeZddTreeNode</B>(
2009 DdManager * <b>dd</b>, <i>manager</i>
2010 unsigned int <b>low</b>, <i>index of the first group variable</i>
2011 unsigned int <b>size</b>, <i>number of variables in the group</i>
2012 unsigned int <b>type</b> <i>MTR_DEFAULT or MTR_FIXED</i>
2014 </pre>
2015 <dd> Creates a new ZDD variable group. The group starts at
2016 variable and contains size variables. The parameter low is the index
2017 of the first variable. If the variable already exists, its current
2018 position in the order is known to the manager. If the variable does
2019 not exist yet, the position is assumed to be the same as the index.
2020 The group tree is created if it does not exist yet.
2021 Returns a pointer to the group if successful; NULL otherwise.
2024 <dd> <b>Side Effects</b> The ZDD variable tree is changed.
2027 <dd> <b>See Also</b> <code><a href="#Cudd_MakeTreeNode">Cudd_MakeTreeNode</a>
2028 </code>
2030 <dt><pre>
2031 <A NAME="Cudd_MinHammingDist"></A>
2032 int <I></I>
2033 <B>Cudd_MinHammingDist</B>(
2034 DdManager * <b>dd</b>, <i>DD manager</i>
2035 DdNode * <b>f</b>, <i>function to examine</i>
2036 int * <b>minterm</b>, <i>reference minterm</i>
2037 int <b>upperBound</b> <i>distance above which an approximate answer is OK</i>
2039 </pre>
2040 <dd> Returns the minimum Hamming distance between the
2041 minterms of a function f and a reference minterm. The function is
2042 given as a BDD; the minterm is given as an array of integers, one
2043 for each variable in the manager. Returns the minimum distance if
2044 it is less than the upper bound; the upper bound if the minimum
2045 distance is at least as large; CUDD_OUT_OF_MEM in case of failure.
2048 <dd> <b>Side Effects</b> None
2051 <dd> <b>See Also</b> <code><a href="#Cudd_addHamming">Cudd_addHamming</a>
2052 <a href="#Cudd_bddClosestCube">Cudd_bddClosestCube</a>
2053 </code>
2055 <dt><pre>
2056 <A NAME="Cudd_NewApaNumber"></A>
2057 DdApaNumber <I></I>
2058 <B>Cudd_NewApaNumber</B>(
2059 int <b>digits</b> <i></i>
2061 </pre>
2062 <dd> Allocates memory for an arbitrary precision
2063 integer. Returns a pointer to the allocated memory if successful;
2064 NULL otherwise.
2067 <dd> <b>Side Effects</b> None
2070 <dt><pre>
2071 <A NAME="Cudd_NextCube"></A>
2072 int <I></I>
2073 <B>Cudd_NextCube</B>(
2074 DdGen * <b>gen</b>, <i></i>
2075 int ** <b>cube</b>, <i></i>
2076 CUDD_VALUE_TYPE * <b>value</b> <i></i>
2078 </pre>
2079 <dd> Generates the next cube of a decision diagram onset,
2080 using generator gen. Returns 0 if the enumeration is completed; 1
2081 otherwise.
2084 <dd> <b>Side Effects</b> The cube and its value are returned as side effects. The
2085 generator is modified.
2088 <dd> <b>See Also</b> <code><a href="#Cudd_ForeachCube">Cudd_ForeachCube</a>
2089 <a href="#Cudd_FirstCube">Cudd_FirstCube</a>
2090 <a href="#Cudd_GenFree">Cudd_GenFree</a>
2091 <a href="#Cudd_IsGenEmpty">Cudd_IsGenEmpty</a>
2092 <a href="#Cudd_NextNode">Cudd_NextNode</a>
2093 </code>
2095 <dt><pre>
2096 <A NAME="Cudd_NextNode"></A>
2097 int <I></I>
2098 <B>Cudd_NextNode</B>(
2099 DdGen * <b>gen</b>, <i></i>
2100 DdNode ** <b>node</b> <i></i>
2102 </pre>
2103 <dd> Finds the node of a decision diagram, using generator
2104 gen. Returns 0 if the enumeration is completed; 1 otherwise.
2107 <dd> <b>Side Effects</b> The next node is returned as a side effect.
2110 <dd> <b>See Also</b> <code><a href="#Cudd_ForeachNode">Cudd_ForeachNode</a>
2111 <a href="#Cudd_FirstNode">Cudd_FirstNode</a>
2112 <a href="#Cudd_GenFree">Cudd_GenFree</a>
2113 <a href="#Cudd_IsGenEmpty">Cudd_IsGenEmpty</a>
2114 <a href="#Cudd_NextCube">Cudd_NextCube</a>
2115 </code>
2117 <dt><pre>
2118 <A NAME="Cudd_NextPrime"></A>
2119 int <I></I>
2120 <B>Cudd_NextPrime</B>(
2121 DdGen * <b>gen</b>, <i></i>
2122 int ** <b>cube</b> <i></i>
2124 </pre>
2125 <dd> Generates the next cube of a Boolean function,
2126 using generator gen. Returns 0 if the enumeration is completed; 1
2127 otherwise.
2130 <dd> <b>Side Effects</b> The cube and is returned as side effects. The
2131 generator is modified.
2134 <dd> <b>See Also</b> <code><a href="#Cudd_ForeachPrime">Cudd_ForeachPrime</a>
2135 <a href="#Cudd_FirstPrime">Cudd_FirstPrime</a>
2136 <a href="#Cudd_GenFree">Cudd_GenFree</a>
2137 <a href="#Cudd_IsGenEmpty">Cudd_IsGenEmpty</a>
2138 <a href="#Cudd_NextCube">Cudd_NextCube</a>
2139 <a href="#Cudd_NextNode">Cudd_NextNode</a>
2140 </code>
2142 <dt><pre>
2143 <A NAME="Cudd_NodeReadIndex"></A>
2144 unsigned int <I></I>
2145 <B>Cudd_NodeReadIndex</B>(
2146 DdNode * <b>node</b> <i></i>
2148 </pre>
2149 <dd> Returns the index of the node. The node pointer can be
2150 either regular or complemented.
2153 <dd> <b>Side Effects</b> None
2156 <dd> <b>See Also</b> <code><a href="#Cudd_ReadIndex">Cudd_ReadIndex</a>
2157 </code>
2159 <dt><pre>
2160 <A NAME="Cudd_OutOfMem"></A>
2161 void <I></I>
2162 <B>Cudd_OutOfMem</B>(
2163 long <b>size</b> <i>size of the allocation that failed</i>
2165 </pre>
2166 <dd> Warns that a memory allocation failed.
2167 This function can be used as replacement of MMout_of_memory to prevent
2168 the safe_mem functions of the util package from exiting when malloc
2169 returns NULL. One possible use is in case of discretionary allocations;
2170 for instance, the allocation of memory to enlarge the computed table.
2173 <dd> <b>Side Effects</b> None
2176 <dt><pre>
2177 <A NAME="Cudd_OverApprox"></A>
2178 DdNode * <I></I>
2179 <B>Cudd_OverApprox</B>(
2180 DdManager * <b>dd</b>, <i>manager</i>
2181 DdNode * <b>f</b>, <i>function to be superset</i>
2182 int <b>numVars</b>, <i>number of variables in the support of f</i>
2183 int <b>threshold</b>, <i>when to stop approximation</i>
2184 int <b>safe</b>, <i>enforce safe approximation</i>
2185 double <b>quality</b> <i>minimum improvement for accepted changes</i>
2187 </pre>
2188 <dd> Extracts a dense superset from a BDD. The procedure is
2189 identical to the underapproximation procedure except for the fact that it
2190 works on the complement of the given function. Extracting the subset
2191 of the complement function is equivalent to extracting the superset
2192 of the function.
2193 Returns a pointer to the BDD of the superset if successful. NULL if
2194 intermediate result causes the procedure to run out of memory. The
2195 parameter numVars is the maximum number of variables to be used in
2196 minterm calculation. The optimal number
2197 should be as close as possible to the size of the support of f.
2198 However, it is safe to pass the value returned by Cudd_ReadSize for
2199 numVars when the number of variables is under 1023. If numVars is
2200 larger than 1023, it will overflow. If a 0 parameter is passed then
2201 the procedure will compute a value which will avoid overflow but
2202 will cause underflow with 2046 variables or more.
2205 <dd> <b>Side Effects</b> None
2208 <dd> <b>See Also</b> <code><a href="#Cudd_SupersetHeavyBranch">Cudd_SupersetHeavyBranch</a>
2209 <a href="#Cudd_SupersetShortPaths">Cudd_SupersetShortPaths</a>
2210 <a href="#Cudd_ReadSize">Cudd_ReadSize</a>
2211 </code>
2213 <dt><pre>
2214 <A NAME="Cudd_Prime"></A>
2215 unsigned int <I></I>
2216 <B>Cudd_Prime</B>(
2217 unsigned int <b>p</b> <i></i>
2219 </pre>
2220 <dd> Returns the next prime &gt;= p.
2223 <dd> <b>Side Effects</b> None
2226 <dt><pre>
2227 <A NAME="Cudd_PrintDebug"></A>
2228 int <I></I>
2229 <B>Cudd_PrintDebug</B>(
2230 DdManager * <b>dd</b>, <i></i>
2231 DdNode * <b>f</b>, <i></i>
2232 int <b>n</b>, <i></i>
2233 int <b>pr</b> <i></i>
2235 </pre>
2236 <dd> Prints to the standard output a DD and its statistics.
2237 The statistics include the number of nodes, the number of leaves, and
2238 the number of minterms. (The number of minterms is the number of
2239 assignments to the variables that cause the function to be different
2240 from the logical zero (for BDDs) and from the background value (for
2241 ADDs.) The statistics are printed if pr &gt; 0. Specifically:
2242 <ul>
2243 <li> pr = 0 : prints nothing
2244 <li> pr = 1 : prints counts of nodes and minterms
2245 <li> pr = 2 : prints counts + disjoint sum of product
2246 <li> pr = 3 : prints counts + list of nodes
2247 <li> pr &gt; 3 : prints counts + disjoint sum of product + list of nodes
2248 </ul>
2249 For the purpose of counting the number of minterms, the function is
2250 supposed to depend on n variables. Returns 1 if successful; 0 otherwise.
2253 <dd> <b>Side Effects</b> None
2256 <dd> <b>See Also</b> <code><a href="#Cudd_DagSize">Cudd_DagSize</a>
2257 <a href="#Cudd_CountLeaves">Cudd_CountLeaves</a>
2258 <a href="#Cudd_CountMinterm">Cudd_CountMinterm</a>
2259 <a href="#Cudd_PrintMinterm">Cudd_PrintMinterm</a>
2260 </code>
2262 <dt><pre>
2263 <A NAME="Cudd_PrintInfo"></A>
2264 int <I></I>
2265 <B>Cudd_PrintInfo</B>(
2266 DdManager * <b>dd</b>, <i></i>
2267 FILE * <b>fp</b> <i></i>
2269 </pre>
2270 <dd> Prints out statistics and settings for a CUDD manager.
2271 Returns 1 if successful; 0 otherwise.
2274 <dd> <b>Side Effects</b> None
2277 <dt><pre>
2278 <A NAME="Cudd_PrintLinear"></A>
2279 int <I></I>
2280 <B>Cudd_PrintLinear</B>(
2281 DdManager * <b>table</b> <i></i>
2283 </pre>
2284 <dd> Prints the linear transform matrix. Returns 1 in case of
2285 success; 0 otherwise.
2288 <dd> <b>Side Effects</b> none
2291 <dt><pre>
2292 <A NAME="Cudd_PrintMinterm"></A>
2293 int <I></I>
2294 <B>Cudd_PrintMinterm</B>(
2295 DdManager * <b>manager</b>, <i></i>
2296 DdNode * <b>node</b> <i></i>
2298 </pre>
2299 <dd> Prints a disjoint sum of product cover for the function
2300 rooted at node. Each product corresponds to a path from node to a
2301 leaf node different from the logical zero, and different from the
2302 background value. Uses the package default output file. Returns 1
2303 if successful; 0 otherwise.
2306 <dd> <b>Side Effects</b> None
2309 <dd> <b>See Also</b> <code><a href="#Cudd_PrintDebug">Cudd_PrintDebug</a>
2310 <a href="#Cudd_bddPrintCover">Cudd_bddPrintCover</a>
2311 </code>
2313 <dt><pre>
2314 <A NAME="Cudd_PrintTwoLiteralClauses"></A>
2315 int <I></I>
2316 <B>Cudd_PrintTwoLiteralClauses</B>(
2317 DdManager * <b>dd</b>, <i></i>
2318 DdNode * <b>f</b>, <i></i>
2319 char ** <b>names</b>, <i></i>
2320 FILE * <b>fp</b> <i></i>
2322 </pre>
2323 <dd> Prints the one- and two-literal clauses. Returns 1 if
2324 successful; 0 otherwise. The argument "names" can be NULL, in which case
2325 the variable indices are printed.
2328 <dd> <b>Side Effects</b> None
2331 <dd> <b>See Also</b> <code><a href="#Cudd_FindTwoLiteralClauses">Cudd_FindTwoLiteralClauses</a>
2332 </code>
2334 <dt><pre>
2335 <A NAME="Cudd_PrintVersion"></A>
2336 void <I></I>
2337 <B>Cudd_PrintVersion</B>(
2338 FILE * <b>fp</b> <i></i>
2340 </pre>
2341 <dd> Prints the package version number.
2344 <dd> <b>Side Effects</b> None
2347 <dt><pre>
2348 <A NAME="Cudd_PrioritySelect"></A>
2349 DdNode * <I></I>
2350 <B>Cudd_PrioritySelect</B>(
2351 DdManager * <b>dd</b>, <i>manager</i>
2352 DdNode * <b>R</b>, <i>BDD of the relation</i>
2353 DdNode ** <b>x</b>, <i>array of x variables</i>
2354 DdNode ** <b>y</b>, <i>array of y variables</i>
2355 DdNode ** <b>z</b>, <i>array of z variables (optional: may be NULL)</i>
2356 DdNode * <b>Pi</b>, <i>BDD of the priority function (optional: may be NULL)</i>
2357 int <b>n</b>, <i>size of x, y, and z</i>
2358 DD_PRFP <b>Pifunc</b> <i>function used to build Pi if it is NULL</i>
2360 </pre>
2361 <dd> Selects pairs from a relation R(x,y) (given as a BDD)
2362 in such a way that a given x appears in one pair only. Uses a
2363 priority function to determine which y should be paired to a given x.
2364 Cudd_PrioritySelect returns a pointer to
2365 the selected function if successful; NULL otherwise.
2366 Three of the arguments--x, y, and z--are vectors of BDD variables.
2367 The first two are the variables on which R depends. The third vectore
2368 is a vector of auxiliary variables, used during the computation. This
2369 vector is optional. If a NULL value is passed instead,
2370 Cudd_PrioritySelect will create the working variables on the fly.
2371 The sizes of x and y (and z if it is not NULL) should equal n.
2372 The priority function Pi can be passed as a BDD, or can be built by
2373 Cudd_PrioritySelect. If NULL is passed instead of a DdNode *,
2374 parameter Pifunc is used by Cudd_PrioritySelect to build a BDD for the
2375 priority function. (Pifunc is a pointer to a C function.) If Pi is not
2376 NULL, then Pifunc is ignored. Pifunc should have the same interface as
2377 the standard priority functions (e.g., Cudd_Dxygtdxz).
2378 Cudd_PrioritySelect and Cudd_CProjection can sometimes be used
2379 interchangeably. Specifically, calling Cudd_PrioritySelect with
2380 Cudd_Xgty as Pifunc produces the same result as calling
2381 Cudd_CProjection with the all-zero minterm as reference minterm.
2382 However, depending on the application, one or the other may be
2383 preferable:
2384 <ul>
2385 <li> When extracting representatives from an equivalence relation,
2386 Cudd_CProjection has the advantage of nor requiring the auxiliary
2387 variables.
2388 <li> When computing matchings in general bipartite graphs,
2389 Cudd_PrioritySelect normally obtains better results because it can use
2390 more powerful matching schemes (e.g., Cudd_Dxygtdxz).
2391 </ul>
2394 <dd> <b>Side Effects</b> If called with z == NULL, will create new variables in
2395 the manager.
2398 <dd> <b>See Also</b> <code><a href="#Cudd_Dxygtdxz">Cudd_Dxygtdxz</a>
2399 <a href="#Cudd_Dxygtdyz">Cudd_Dxygtdyz</a>
2400 <a href="#Cudd_Xgty">Cudd_Xgty</a>
2401 <a href="#Cudd_bddAdjPermuteX">Cudd_bddAdjPermuteX</a>
2402 <a href="#Cudd_CProjection">Cudd_CProjection</a>
2403 </code>
2405 <dt><pre>
2406 <A NAME="Cudd_Quit"></A>
2407 void <I></I>
2408 <B>Cudd_Quit</B>(
2409 DdManager * <b>unique</b> <i></i>
2411 </pre>
2412 <dd> Deletes resources associated with a DD manager and
2413 resets the global statistical counters. (Otherwise, another manaqger
2414 subsequently created would inherit the stats of this one.)
2417 <dd> <b>Side Effects</b> None
2420 <dd> <b>See Also</b> <code><a href="#Cudd_Init">Cudd_Init</a>
2421 </code>
2423 <dt><pre>
2424 <A NAME="Cudd_Random"></A>
2425 long <I></I>
2426 <B>Cudd_Random</B>(
2427 <b></b> <i></i>
2429 </pre>
2430 <dd> Portable number generator based on ran2 from "Numerical
2431 Recipes in C." It is a long period (> 2 * 10^18) random number generator
2432 of L'Ecuyer with Bays-Durham shuffle. Returns a long integer uniformly
2433 distributed between 0 and 2147483561 (inclusive of the endpoint values).
2434 The random generator can be explicitly initialized by calling
2435 Cudd_Srandom. If no explicit initialization is performed, then the
2436 seed 1 is assumed.
2439 <dd> <b>Side Effects</b> None
2442 <dd> <b>See Also</b> <code><a href="#Cudd_Srandom">Cudd_Srandom</a>
2443 </code>
2445 <dt><pre>
2446 <A NAME="Cudd_ReadArcviolation"></A>
2447 int <I></I>
2448 <B>Cudd_ReadArcviolation</B>(
2449 DdManager * <b>dd</b> <i></i>
2451 </pre>
2452 <dd> Returns the current value of the arcviolation
2453 parameter. This parameter is used in group sifting to decide how
2454 many arcs into <code>y</code> not coming from <code>x</code> are
2455 tolerable when checking for aggregation due to extended
2456 symmetry. The value should be between 0 and 100. A small value
2457 causes fewer variables to be aggregated. The default value is 0.
2460 <dd> <b>Side Effects</b> None
2463 <dd> <b>See Also</b> <code><a href="#Cudd_SetArcviolation">Cudd_SetArcviolation</a>
2464 </code>
2466 <dt><pre>
2467 <A NAME="Cudd_ReadBackground"></A>
2468 DdNode * <I></I>
2469 <B>Cudd_ReadBackground</B>(
2470 DdManager * <b>dd</b> <i></i>
2472 </pre>
2473 <dd> Reads the background constant of the manager.
2476 <dd> <b>Side Effects</b> None
2479 <dt><pre>
2480 <A NAME="Cudd_ReadCacheHits"></A>
2481 double <I></I>
2482 <B>Cudd_ReadCacheHits</B>(
2483 DdManager * <b>dd</b> <i></i>
2485 </pre>
2486 <dd> Returns the number of cache hits.
2489 <dd> <b>Side Effects</b> None
2492 <dd> <b>See Also</b> <code><a href="#Cudd_ReadCacheLookUps">Cudd_ReadCacheLookUps</a>
2493 </code>
2495 <dt><pre>
2496 <A NAME="Cudd_ReadCacheLookUps"></A>
2497 double <I></I>
2498 <B>Cudd_ReadCacheLookUps</B>(
2499 DdManager * <b>dd</b> <i></i>
2501 </pre>
2502 <dd> Returns the number of cache look-ups.
2505 <dd> <b>Side Effects</b> None
2508 <dd> <b>See Also</b> <code><a href="#Cudd_ReadCacheHits">Cudd_ReadCacheHits</a>
2509 </code>
2511 <dt><pre>
2512 <A NAME="Cudd_ReadCacheSlots"></A>
2513 unsigned int <I></I>
2514 <B>Cudd_ReadCacheSlots</B>(
2515 DdManager * <b>dd</b> <i></i>
2517 </pre>
2518 <dd> Reads the number of slots in the cache.
2521 <dd> <b>Side Effects</b> None
2524 <dd> <b>See Also</b> <code><a href="#Cudd_ReadCacheUsedSlots">Cudd_ReadCacheUsedSlots</a>
2525 </code>
2527 <dt><pre>
2528 <A NAME="Cudd_ReadCacheUsedSlots"></A>
2529 double <I></I>
2530 <B>Cudd_ReadCacheUsedSlots</B>(
2531 DdManager * <b>dd</b> <i></i>
2533 </pre>
2534 <dd> Reads the fraction of used slots in the cache. The unused
2535 slots are those in which no valid data is stored. Garbage collection,
2536 variable reordering, and cache resizing may cause used slots to become
2537 unused.
2540 <dd> <b>Side Effects</b> None
2543 <dd> <b>See Also</b> <code><a href="#Cudd_ReadCacheSlots">Cudd_ReadCacheSlots</a>
2544 </code>
2546 <dt><pre>
2547 <A NAME="Cudd_ReadDead"></A>
2548 unsigned int <I></I>
2549 <B>Cudd_ReadDead</B>(
2550 DdManager * <b>dd</b> <i></i>
2552 </pre>
2553 <dd> Returns the number of dead nodes in the unique table.
2556 <dd> <b>Side Effects</b> None
2559 <dd> <b>See Also</b> <code><a href="#Cudd_ReadKeys">Cudd_ReadKeys</a>
2560 </code>
2562 <dt><pre>
2563 <A NAME="Cudd_ReadEpsilon"></A>
2564 CUDD_VALUE_TYPE <I></I>
2565 <B>Cudd_ReadEpsilon</B>(
2566 DdManager * <b>dd</b> <i></i>
2568 </pre>
2569 <dd> Reads the epsilon parameter of the manager. The epsilon
2570 parameter control the comparison between floating point numbers.
2573 <dd> <b>Side Effects</b> None
2576 <dd> <b>See Also</b> <code><a href="#Cudd_SetEpsilon">Cudd_SetEpsilon</a>
2577 </code>
2579 <dt><pre>
2580 <A NAME="Cudd_ReadErrorCode"></A>
2581 Cudd_ErrorType <I></I>
2582 <B>Cudd_ReadErrorCode</B>(
2583 DdManager * <b>dd</b> <i></i>
2585 </pre>
2586 <dd> Returns the code of the last error. The error codes are
2587 defined in cudd.h.
2590 <dd> <b>Side Effects</b> None
2593 <dd> <b>See Also</b> <code><a href="#Cudd_ClearErrorCode">Cudd_ClearErrorCode</a>
2594 </code>
2596 <dt><pre>
2597 <A NAME="Cudd_ReadGarbageCollectionTime"></A>
2598 long <I></I>
2599 <B>Cudd_ReadGarbageCollectionTime</B>(
2600 DdManager * <b>dd</b> <i></i>
2602 </pre>
2603 <dd> Returns the number of milliseconds spent doing garbage
2604 collection since the manager was initialized.
2607 <dd> <b>Side Effects</b> None
2610 <dd> <b>See Also</b> <code><a href="#Cudd_ReadGarbageCollections">Cudd_ReadGarbageCollections</a>
2611 </code>
2613 <dt><pre>
2614 <A NAME="Cudd_ReadGarbageCollections"></A>
2615 int <I></I>
2616 <B>Cudd_ReadGarbageCollections</B>(
2617 DdManager * <b>dd</b> <i></i>
2619 </pre>
2620 <dd> Returns the number of times garbage collection has
2621 occurred in the manager. The number includes both the calls from
2622 reordering procedures and those caused by requests to create new
2623 nodes.
2626 <dd> <b>Side Effects</b> None
2629 <dd> <b>See Also</b> <code><a href="#Cudd_ReadGarbageCollectionTime">Cudd_ReadGarbageCollectionTime</a>
2630 </code>
2632 <dt><pre>
2633 <A NAME="Cudd_ReadGroupcheck"></A>
2634 Cudd_AggregationType <I></I>
2635 <B>Cudd_ReadGroupcheck</B>(
2636 DdManager * <b>dd</b> <i></i>
2638 </pre>
2639 <dd> Reads the groupcheck parameter of the manager. The
2640 groupcheck parameter determines the aggregation criterion in group
2641 sifting.
2644 <dd> <b>Side Effects</b> None
2647 <dd> <b>See Also</b> <code><a href="#Cudd_SetGroupcheck">Cudd_SetGroupcheck</a>
2648 </code>
2650 <dt><pre>
2651 <A NAME="Cudd_ReadInvPermZdd"></A>
2652 int <I></I>
2653 <B>Cudd_ReadInvPermZdd</B>(
2654 DdManager * <b>dd</b>, <i></i>
2655 int <b>i</b> <i></i>
2657 </pre>
2658 <dd> Returns the index of the ZDD variable currently in the
2659 i-th position of the order. If the index is CUDD_CONST_INDEX, returns
2660 CUDD_CONST_INDEX; otherwise, if the index is out of bounds returns -1.
2663 <dd> <b>Side Effects</b> None
2666 <dd> <b>See Also</b> <code><a href="#Cudd_ReadPerm">Cudd_ReadPerm</a>
2667 <a href="#Cudd_ReadInvPermZdd">Cudd_ReadInvPermZdd</a>
2668 </code>
2670 <dt><pre>
2671 <A NAME="Cudd_ReadInvPerm"></A>
2672 int <I></I>
2673 <B>Cudd_ReadInvPerm</B>(
2674 DdManager * <b>dd</b>, <i></i>
2675 int <b>i</b> <i></i>
2677 </pre>
2678 <dd> Returns the index of the variable currently in the i-th
2679 position of the order. If the index is CUDD_CONST_INDEX, returns
2680 CUDD_CONST_INDEX; otherwise, if the index is out of bounds returns -1.
2683 <dd> <b>Side Effects</b> None
2686 <dd> <b>See Also</b> <code><a href="#Cudd_ReadPerm">Cudd_ReadPerm</a>
2687 <a href="#Cudd_ReadInvPermZdd">Cudd_ReadInvPermZdd</a>
2688 </code>
2690 <dt><pre>
2691 <A NAME="Cudd_ReadIthClause"></A>
2692 int <I></I>
2693 <B>Cudd_ReadIthClause</B>(
2694 DdTlcInfo * <b>tlc</b>, <i></i>
2695 int <b>i</b>, <i></i>
2696 DdHalfWord * <b>var1</b>, <i></i>
2697 DdHalfWord * <b>var2</b>, <i></i>
2698 int * <b>phase1</b>, <i></i>
2699 int * <b>phase2</b> <i></i>
2701 </pre>
2702 <dd> Accesses the i-th clause of a DD given the clause set which
2703 must be already computed. Returns 1 if successful; 0 if i is out of range,
2704 or in case of error.
2707 <dd> <b>Side Effects</b> the four components of a clause are returned as side effects.
2710 <dd> <b>See Also</b> <code><a href="#Cudd_FindTwoLiteralClauses">Cudd_FindTwoLiteralClauses</a>
2711 </code>
2713 <dt><pre>
2714 <A NAME="Cudd_ReadKeys"></A>
2715 unsigned int <I></I>
2716 <B>Cudd_ReadKeys</B>(
2717 DdManager * <b>dd</b> <i></i>
2719 </pre>
2720 <dd> Returns the total number of nodes currently in the unique
2721 table, including the dead nodes.
2724 <dd> <b>Side Effects</b> None
2727 <dd> <b>See Also</b> <code><a href="#Cudd_ReadDead">Cudd_ReadDead</a>
2728 </code>
2730 <dt><pre>
2731 <A NAME="Cudd_ReadLinear"></A>
2732 int <I></I>
2733 <B>Cudd_ReadLinear</B>(
2734 DdManager * <b>table</b>, <i>CUDD manager</i>
2735 int <b>x</b>, <i>row index</i>
2736 int <b>y</b> <i>column index</i>
2738 </pre>
2739 <dd> Reads an entry of the linear transform matrix.
2742 <dd> <b>Side Effects</b> none
2745 <dt><pre>
2746 <A NAME="Cudd_ReadLogicZero"></A>
2747 DdNode * <I></I>
2748 <B>Cudd_ReadLogicZero</B>(
2749 DdManager * <b>dd</b> <i></i>
2751 </pre>
2752 <dd> Returns the zero constant of the manager. The logic zero
2753 constant is the complement of the one constant, and is distinct from
2754 the arithmetic zero.
2757 <dd> <b>Side Effects</b> None
2760 <dd> <b>See Also</b> <code><a href="#Cudd_ReadOne">Cudd_ReadOne</a>
2761 <a href="#Cudd_ReadZero">Cudd_ReadZero</a>
2762 </code>
2764 <dt><pre>
2765 <A NAME="Cudd_ReadLooseUpTo"></A>
2766 unsigned int <I></I>
2767 <B>Cudd_ReadLooseUpTo</B>(
2768 DdManager * <b>dd</b> <i></i>
2770 </pre>
2771 <dd> Reads the looseUpTo parameter of the manager.
2774 <dd> <b>Side Effects</b> None
2777 <dd> <b>See Also</b> <code><a href="#Cudd_SetLooseUpTo">Cudd_SetLooseUpTo</a>
2778 <a href="#Cudd_ReadMinHit">Cudd_ReadMinHit</a>
2779 <a href="#Cudd_ReadMinDead">Cudd_ReadMinDead</a>
2780 </code>
2782 <dt><pre>
2783 <A NAME="Cudd_ReadMaxCacheHard"></A>
2784 unsigned int <I></I>
2785 <B>Cudd_ReadMaxCacheHard</B>(
2786 DdManager * <b>dd</b> <i></i>
2788 </pre>
2789 <dd> Reads the maxCacheHard parameter of the manager.
2792 <dd> <b>Side Effects</b> None
2795 <dd> <b>See Also</b> <code><a href="#Cudd_SetMaxCacheHard">Cudd_SetMaxCacheHard</a>
2796 <a href="#Cudd_ReadMaxCache">Cudd_ReadMaxCache</a>
2797 </code>
2799 <dt><pre>
2800 <A NAME="Cudd_ReadMaxCache"></A>
2801 unsigned int <I></I>
2802 <B>Cudd_ReadMaxCache</B>(
2803 DdManager * <b>dd</b> <i></i>
2805 </pre>
2806 <dd> Returns the soft limit for the cache size. The soft limit
2809 <dd> <b>Side Effects</b> None
2812 <dd> <b>See Also</b> <code><a href="#Cudd_ReadMaxCache">Cudd_ReadMaxCache</a>
2813 </code>
2815 <dt><pre>
2816 <A NAME="Cudd_ReadMaxGrowthAlternate"></A>
2817 double <I></I>
2818 <B>Cudd_ReadMaxGrowthAlternate</B>(
2819 DdManager * <b>dd</b> <i></i>
2821 </pre>
2822 <dd> Reads the maxGrowthAlt parameter of the manager. This
2823 parameter is analogous to the maxGrowth paramter, and is used every
2824 given number of reorderings instead of maxGrowth. The number of
2825 reorderings is set with Cudd_SetReorderingCycle. If the number of
2826 reorderings is 0 (default) maxGrowthAlt is never used.
2829 <dd> <b>Side Effects</b> None
2832 <dd> <b>See Also</b> <code><a href="#Cudd_ReadMaxGrowth">Cudd_ReadMaxGrowth</a>
2833 <a href="#Cudd_SetMaxGrowthAlternate">Cudd_SetMaxGrowthAlternate</a>
2834 <a href="#Cudd_SetReorderingCycle">Cudd_SetReorderingCycle</a>
2835 <a href="#Cudd_ReadReorderingCycle">Cudd_ReadReorderingCycle</a>
2836 </code>
2838 <dt><pre>
2839 <A NAME="Cudd_ReadMaxGrowth"></A>
2840 double <I></I>
2841 <B>Cudd_ReadMaxGrowth</B>(
2842 DdManager * <b>dd</b> <i></i>
2844 </pre>
2845 <dd> Reads the maxGrowth parameter of the manager. This
2846 parameter determines how much the number of nodes can grow during
2847 sifting of a variable. Overall, sifting never increases the size of
2848 the decision diagrams. This parameter only refers to intermediate
2849 results. A lower value will speed up sifting, possibly at the
2850 expense of quality.
2853 <dd> <b>Side Effects</b> None
2856 <dd> <b>See Also</b> <code><a href="#Cudd_SetMaxGrowth">Cudd_SetMaxGrowth</a>
2857 <a href="#Cudd_ReadMaxGrowthAlternate">Cudd_ReadMaxGrowthAlternate</a>
2858 </code>
2860 <dt><pre>
2861 <A NAME="Cudd_ReadMaxLive"></A>
2862 unsigned int <I></I>
2863 <B>Cudd_ReadMaxLive</B>(
2864 DdManager * <b>dd</b> <i></i>
2866 </pre>
2867 <dd> Reads the maximum allowed number of live nodes. When this
2868 number is exceeded, the package returns NULL.
2871 <dd> <b>Side Effects</b> none
2874 <dd> <b>See Also</b> <code><a href="#Cudd_SetMaxLive">Cudd_SetMaxLive</a>
2875 </code>
2877 <dt><pre>
2878 <A NAME="Cudd_ReadMaxMemory"></A>
2879 unsigned long <I></I>
2880 <B>Cudd_ReadMaxMemory</B>(
2881 DdManager * <b>dd</b> <i></i>
2883 </pre>
2884 <dd> Reads the maximum allowed memory. When this
2885 number is exceeded, the package returns NULL.
2888 <dd> <b>Side Effects</b> none
2891 <dd> <b>See Also</b> <code><a href="#Cudd_SetMaxMemory">Cudd_SetMaxMemory</a>
2892 </code>
2894 <dt><pre>
2895 <A NAME="Cudd_ReadMemoryInUse"></A>
2896 unsigned long <I></I>
2897 <B>Cudd_ReadMemoryInUse</B>(
2898 DdManager * <b>dd</b> <i></i>
2900 </pre>
2901 <dd> Returns the memory in use by the manager measured in bytes.
2904 <dd> <b>Side Effects</b> None
2907 <dt><pre>
2908 <A NAME="Cudd_ReadMinDead"></A>
2909 unsigned int <I></I>
2910 <B>Cudd_ReadMinDead</B>(
2911 DdManager * <b>dd</b> <i></i>
2913 </pre>
2914 <dd> Reads the minDead parameter of the manager. The minDead
2915 parameter is used by the package to decide whether to collect garbage
2916 or resize a subtable of the unique table when the subtable becomes
2917 too full. The application can indirectly control the value of minDead
2918 by setting the looseUpTo parameter.
2921 <dd> <b>Side Effects</b> None
2924 <dd> <b>See Also</b> <code><a href="#Cudd_ReadDead">Cudd_ReadDead</a>
2925 <a href="#Cudd_ReadLooseUpTo">Cudd_ReadLooseUpTo</a>
2926 <a href="#Cudd_SetLooseUpTo">Cudd_SetLooseUpTo</a>
2927 </code>
2929 <dt><pre>
2930 <A NAME="Cudd_ReadMinHit"></A>
2931 unsigned int <I></I>
2932 <B>Cudd_ReadMinHit</B>(
2933 DdManager * <b>dd</b> <i></i>
2935 </pre>
2936 <dd> Reads the hit rate that causes resizinig of the computed
2937 table.
2940 <dd> <b>Side Effects</b> None
2943 <dd> <b>See Also</b> <code><a href="#Cudd_SetMinHit">Cudd_SetMinHit</a>
2944 </code>
2946 <dt><pre>
2947 <A NAME="Cudd_ReadMinusInfinity"></A>
2948 DdNode * <I></I>
2949 <B>Cudd_ReadMinusInfinity</B>(
2950 DdManager * <b>dd</b> <i></i>
2952 </pre>
2953 <dd> Reads the minus-infinity constant from the manager.
2956 <dd> <b>Side Effects</b> None
2959 <dt><pre>
2960 <A NAME="Cudd_ReadNextReordering"></A>
2961 unsigned int <I></I>
2962 <B>Cudd_ReadNextReordering</B>(
2963 DdManager * <b>dd</b> <i></i>
2965 </pre>
2966 <dd> Returns the threshold for the next dynamic reordering.
2967 The threshold is in terms of number of nodes and is in effect only
2968 if reordering is enabled. The count does not include the dead nodes,
2969 unless the countDead parameter of the manager has been changed from
2970 its default setting.
2973 <dd> <b>Side Effects</b> None
2976 <dd> <b>See Also</b> <code><a href="#Cudd_SetNextReordering">Cudd_SetNextReordering</a>
2977 </code>
2979 <dt><pre>
2980 <A NAME="Cudd_ReadNodeCount"></A>
2981 long <I></I>
2982 <B>Cudd_ReadNodeCount</B>(
2983 DdManager * <b>dd</b> <i></i>
2985 </pre>
2986 <dd> Reports the number of live nodes in BDDs and ADDs. This
2987 number does not include the isolated projection functions and the
2988 unused constants. These nodes that are not counted are not part of
2989 the DDs manipulated by the application.
2992 <dd> <b>Side Effects</b> None
2995 <dd> <b>See Also</b> <code><a href="#Cudd_ReadPeakNodeCount">Cudd_ReadPeakNodeCount</a>
2996 <a href="#Cudd_zddReadNodeCount">Cudd_zddReadNodeCount</a>
2997 </code>
2999 <dt><pre>
3000 <A NAME="Cudd_ReadNodesDropped"></A>
3001 double <I></I>
3002 <B>Cudd_ReadNodesDropped</B>(
3003 DdManager * <b>dd</b> <i></i>
3005 </pre>
3006 <dd> Returns the number of nodes killed by dereferencing if the
3007 keeping of this statistic is enabled; -1 otherwise. This statistic is
3008 enabled only if the package is compiled with DD_STATS defined.
3011 <dd> <b>Side Effects</b> None
3014 <dd> <b>See Also</b> <code><a href="#Cudd_ReadNodesFreed">Cudd_ReadNodesFreed</a>
3015 </code>
3017 <dt><pre>
3018 <A NAME="Cudd_ReadNodesFreed"></A>
3019 double <I></I>
3020 <B>Cudd_ReadNodesFreed</B>(
3021 DdManager * <b>dd</b> <i></i>
3023 </pre>
3024 <dd> Returns the number of nodes returned to the free list if the
3025 keeping of this statistic is enabled; -1 otherwise. This statistic is
3026 enabled only if the package is compiled with DD_STATS defined.
3029 <dd> <b>Side Effects</b> None
3032 <dd> <b>See Also</b> <code><a href="#Cudd_ReadNodesDropped">Cudd_ReadNodesDropped</a>
3033 </code>
3035 <dt><pre>
3036 <A NAME="Cudd_ReadNumberXovers"></A>
3037 int <I></I>
3038 <B>Cudd_ReadNumberXovers</B>(
3039 DdManager * <b>dd</b> <i></i>
3041 </pre>
3042 <dd> Reads the current number of crossovers used by the
3043 genetic algorithm for variable reordering. A larger number of crossovers will
3044 cause the genetic algorithm to take more time, but will generally
3045 produce better results. The default value is 0, in which case the
3046 package uses three times the number of variables as number of crossovers,
3047 with a maximum of 60.
3050 <dd> <b>Side Effects</b> None
3053 <dd> <b>See Also</b> <code><a href="#Cudd_SetNumberXovers">Cudd_SetNumberXovers</a>
3054 </code>
3056 <dt><pre>
3057 <A NAME="Cudd_ReadOne"></A>
3058 DdNode * <I></I>
3059 <B>Cudd_ReadOne</B>(
3060 DdManager * <b>dd</b> <i></i>
3062 </pre>
3063 <dd> Returns the one constant of the manager. The one
3064 constant is common to ADDs and BDDs.
3067 <dd> <b>Side Effects</b> None
3070 <dd> <b>See Also</b> <code><a href="#Cudd_ReadZero">Cudd_ReadZero</a>
3071 <a href="#Cudd_ReadLogicZero">Cudd_ReadLogicZero</a>
3072 <a href="#Cudd_ReadZddOne">Cudd_ReadZddOne</a>
3073 </code>
3075 <dt><pre>
3076 <A NAME="Cudd_ReadPeakLiveNodeCount"></A>
3077 int <I></I>
3078 <B>Cudd_ReadPeakLiveNodeCount</B>(
3079 DdManager * <b>dd</b> <i></i>
3081 </pre>
3082 <dd> Reports the peak number of live nodes. This count is kept
3083 only if CUDD is compiled with DD_STATS defined. If DD_STATS is not
3084 defined, this function returns -1.
3087 <dd> <b>Side Effects</b> None
3090 <dd> <b>See Also</b> <code><a href="#Cudd_ReadNodeCount">Cudd_ReadNodeCount</a>
3091 <a href="#Cudd_PrintInfo">Cudd_PrintInfo</a>
3092 <a href="#Cudd_ReadPeakNodeCount">Cudd_ReadPeakNodeCount</a>
3093 </code>
3095 <dt><pre>
3096 <A NAME="Cudd_ReadPeakNodeCount"></A>
3097 long <I></I>
3098 <B>Cudd_ReadPeakNodeCount</B>(
3099 DdManager * <b>dd</b> <i></i>
3101 </pre>
3102 <dd> Reports the peak number of nodes. This number includes
3103 node on the free list. At the peak, the number of nodes on the free
3104 list is guaranteed to be less than DD_MEM_CHUNK.
3107 <dd> <b>Side Effects</b> None
3110 <dd> <b>See Also</b> <code><a href="#Cudd_ReadNodeCount">Cudd_ReadNodeCount</a>
3111 <a href="#Cudd_PrintInfo">Cudd_PrintInfo</a>
3112 </code>
3114 <dt><pre>
3115 <A NAME="Cudd_ReadPermZdd"></A>
3116 int <I></I>
3117 <B>Cudd_ReadPermZdd</B>(
3118 DdManager * <b>dd</b>, <i></i>
3119 int <b>i</b> <i></i>
3121 </pre>
3122 <dd> Returns the current position of the i-th ZDD variable
3123 in the order. If the index is CUDD_CONST_INDEX, returns
3124 CUDD_CONST_INDEX; otherwise, if the index is out of bounds returns
3128 <dd> <b>Side Effects</b> None
3131 <dd> <b>See Also</b> <code><a href="#Cudd_ReadInvPermZdd">Cudd_ReadInvPermZdd</a>
3132 <a href="#Cudd_ReadPerm">Cudd_ReadPerm</a>
3133 </code>
3135 <dt><pre>
3136 <A NAME="Cudd_ReadPerm"></A>
3137 int <I></I>
3138 <B>Cudd_ReadPerm</B>(
3139 DdManager * <b>dd</b>, <i></i>
3140 int <b>i</b> <i></i>
3142 </pre>
3143 <dd> Returns the current position of the i-th variable in
3144 the order. If the index is CUDD_CONST_INDEX, returns
3145 CUDD_CONST_INDEX; otherwise, if the index is out of bounds returns
3149 <dd> <b>Side Effects</b> None
3152 <dd> <b>See Also</b> <code><a href="#Cudd_ReadInvPerm">Cudd_ReadInvPerm</a>
3153 <a href="#Cudd_ReadPermZdd">Cudd_ReadPermZdd</a>
3154 </code>
3156 <dt><pre>
3157 <A NAME="Cudd_ReadPlusInfinity"></A>
3158 DdNode * <I></I>
3159 <B>Cudd_ReadPlusInfinity</B>(
3160 DdManager * <b>dd</b> <i></i>
3162 </pre>
3163 <dd> Reads the plus-infinity constant from the manager.
3166 <dd> <b>Side Effects</b> None
3169 <dt><pre>
3170 <A NAME="Cudd_ReadPopulationSize"></A>
3171 int <I></I>
3172 <B>Cudd_ReadPopulationSize</B>(
3173 DdManager * <b>dd</b> <i></i>
3175 </pre>
3176 <dd> Reads the current size of the population used by the
3177 genetic algorithm for variable reordering. A larger population size will
3178 cause the genetic algorithm to take more time, but will generally
3179 produce better results. The default value is 0, in which case the
3180 package uses three times the number of variables as population size,
3181 with a maximum of 120.
3184 <dd> <b>Side Effects</b> None
3187 <dd> <b>See Also</b> <code><a href="#Cudd_SetPopulationSize">Cudd_SetPopulationSize</a>
3188 </code>
3190 <dt><pre>
3191 <A NAME="Cudd_ReadRecomb"></A>
3192 int <I></I>
3193 <B>Cudd_ReadRecomb</B>(
3194 DdManager * <b>dd</b> <i></i>
3196 </pre>
3197 <dd> Returns the current value of the recombination
3198 parameter used in group sifting. A larger (positive) value makes the
3199 aggregation of variables due to the second difference criterion more
3200 likely. A smaller (negative) value makes aggregation less likely.
3203 <dd> <b>Side Effects</b> None
3206 <dd> <b>See Also</b> <code><a href="#Cudd_SetRecomb">Cudd_SetRecomb</a>
3207 </code>
3209 <dt><pre>
3210 <A NAME="Cudd_ReadRecursiveCalls"></A>
3211 double <I></I>
3212 <B>Cudd_ReadRecursiveCalls</B>(
3213 DdManager * <b>dd</b> <i></i>
3215 </pre>
3216 <dd> Returns the number of recursive calls if the package is
3217 compiled with DD_COUNT defined.
3220 <dd> <b>Side Effects</b> None
3223 <dt><pre>
3224 <A NAME="Cudd_ReadReorderingCycle"></A>
3225 int <I></I>
3226 <B>Cudd_ReadReorderingCycle</B>(
3227 DdManager * <b>dd</b> <i></i>
3229 </pre>
3230 <dd> Reads the reordCycle parameter of the manager. This
3231 parameter determines how often the alternate threshold on maximum
3232 growth is used in reordering.
3235 <dd> <b>Side Effects</b> None
3238 <dd> <b>See Also</b> <code><a href="#Cudd_ReadMaxGrowthAlternate">Cudd_ReadMaxGrowthAlternate</a>
3239 <a href="#Cudd_SetMaxGrowthAlternate">Cudd_SetMaxGrowthAlternate</a>
3240 <a href="#Cudd_SetReorderingCycle">Cudd_SetReorderingCycle</a>
3241 </code>
3243 <dt><pre>
3244 <A NAME="Cudd_ReadReorderingTime"></A>
3245 long <I></I>
3246 <B>Cudd_ReadReorderingTime</B>(
3247 DdManager * <b>dd</b> <i></i>
3249 </pre>
3250 <dd> Returns the number of milliseconds spent reordering
3251 variables since the manager was initialized. The time spent in collecting
3252 garbage before reordering is included.
3255 <dd> <b>Side Effects</b> None
3258 <dd> <b>See Also</b> <code><a href="#Cudd_ReadReorderings">Cudd_ReadReorderings</a>
3259 </code>
3261 <dt><pre>
3262 <A NAME="Cudd_ReadReorderings"></A>
3263 int <I></I>
3264 <B>Cudd_ReadReorderings</B>(
3265 DdManager * <b>dd</b> <i></i>
3267 </pre>
3268 <dd> Returns the number of times reordering has occurred in the
3269 manager. The number includes both the calls to Cudd_ReduceHeap from
3270 the application program and those automatically performed by the
3271 package. However, calls that do not even initiate reordering are not
3272 counted. A call may not initiate reordering if there are fewer than
3273 minsize live nodes in the manager, or if CUDD_REORDER_NONE is specified
3274 as reordering method. The calls to Cudd_ShuffleHeap are not counted.
3277 <dd> <b>Side Effects</b> None
3280 <dd> <b>See Also</b> <code><a href="#Cudd_ReduceHeap">Cudd_ReduceHeap</a>
3281 <a href="#Cudd_ReadReorderingTime">Cudd_ReadReorderingTime</a>
3282 </code>
3284 <dt><pre>
3285 <A NAME="Cudd_ReadSiftMaxSwap"></A>
3286 int <I></I>
3287 <B>Cudd_ReadSiftMaxSwap</B>(
3288 DdManager * <b>dd</b> <i></i>
3290 </pre>
3291 <dd> Reads the siftMaxSwap parameter of the manager. This
3292 parameter gives the maximum number of swaps that will be attempted
3293 for each invocation of sifting. The real number of swaps may exceed
3294 the set limit because the package will always complete the sifting
3295 of the variable that causes the limit to be reached.
3298 <dd> <b>Side Effects</b> None
3301 <dd> <b>See Also</b> <code><a href="#Cudd_ReadSiftMaxVar">Cudd_ReadSiftMaxVar</a>
3302 <a href="#Cudd_SetSiftMaxSwap">Cudd_SetSiftMaxSwap</a>
3303 </code>
3305 <dt><pre>
3306 <A NAME="Cudd_ReadSiftMaxVar"></A>
3307 int <I></I>
3308 <B>Cudd_ReadSiftMaxVar</B>(
3309 DdManager * <b>dd</b> <i></i>
3311 </pre>
3312 <dd> Reads the siftMaxVar parameter of the manager. This
3313 parameter gives the maximum number of variables that will be sifted
3314 for each invocation of sifting.
3317 <dd> <b>Side Effects</b> None
3320 <dd> <b>See Also</b> <code><a href="#Cudd_ReadSiftMaxSwap">Cudd_ReadSiftMaxSwap</a>
3321 <a href="#Cudd_SetSiftMaxVar">Cudd_SetSiftMaxVar</a>
3322 </code>
3324 <dt><pre>
3325 <A NAME="Cudd_ReadSize"></A>
3326 int <I></I>
3327 <B>Cudd_ReadSize</B>(
3328 DdManager * <b>dd</b> <i></i>
3330 </pre>
3331 <dd> Returns the number of BDD variables in existance.
3334 <dd> <b>Side Effects</b> None
3337 <dd> <b>See Also</b> <code><a href="#Cudd_ReadZddSize">Cudd_ReadZddSize</a>
3338 </code>
3340 <dt><pre>
3341 <A NAME="Cudd_ReadSlots"></A>
3342 unsigned int <I></I>
3343 <B>Cudd_ReadSlots</B>(
3344 DdManager * <b>dd</b> <i></i>
3346 </pre>
3347 <dd> Returns the total number of slots of the unique table.
3348 This number ismainly for diagnostic purposes.
3351 <dd> <b>Side Effects</b> None
3354 <dt><pre>
3355 <A NAME="Cudd_ReadStderr"></A>
3356 FILE * <I></I>
3357 <B>Cudd_ReadStderr</B>(
3358 DdManager * <b>dd</b> <i></i>
3360 </pre>
3361 <dd> Reads the stderr of a manager. This is the file pointer to
3362 which messages normally going to stderr are written. It is initialized
3363 to stderr. Cudd_SetStderr allows the application to redirect it.
3366 <dd> <b>Side Effects</b> None
3369 <dd> <b>See Also</b> <code><a href="#Cudd_SetStderr">Cudd_SetStderr</a>
3370 <a href="#Cudd_ReadStdout">Cudd_ReadStdout</a>
3371 </code>
3373 <dt><pre>
3374 <A NAME="Cudd_ReadStdout"></A>
3375 FILE * <I></I>
3376 <B>Cudd_ReadStdout</B>(
3377 DdManager * <b>dd</b> <i></i>
3379 </pre>
3380 <dd> Reads the stdout of a manager. This is the file pointer to
3381 which messages normally going to stdout are written. It is initialized
3382 to stdout. Cudd_SetStdout allows the application to redirect it.
3385 <dd> <b>Side Effects</b> None
3388 <dd> <b>See Also</b> <code><a href="#Cudd_SetStdout">Cudd_SetStdout</a>
3389 <a href="#Cudd_ReadStderr">Cudd_ReadStderr</a>
3390 </code>
3392 <dt><pre>
3393 <A NAME="Cudd_ReadSwapSteps"></A>
3394 double <I></I>
3395 <B>Cudd_ReadSwapSteps</B>(
3396 DdManager * <b>dd</b> <i></i>
3398 </pre>
3399 <dd> Reads the number of elementary reordering steps.
3402 <dd> <b>Side Effects</b> none
3405 <dt><pre>
3406 <A NAME="Cudd_ReadSymmviolation"></A>
3407 int <I></I>
3408 <B>Cudd_ReadSymmviolation</B>(
3409 DdManager * <b>dd</b> <i></i>
3411 </pre>
3412 <dd> Returns the current value of the symmviolation
3413 parameter. This parameter is used in group sifting to decide how
3414 many violations to the symmetry conditions <code>f10 = f01</code> or
3415 <code>f11 = f00</code> are tolerable when checking for aggregation
3416 due to extended symmetry. The value should be between 0 and 100. A
3417 small value causes fewer variables to be aggregated. The default
3418 value is 0.
3421 <dd> <b>Side Effects</b> None
3424 <dd> <b>See Also</b> <code><a href="#Cudd_SetSymmviolation">Cudd_SetSymmviolation</a>
3425 </code>
3427 <dt><pre>
3428 <A NAME="Cudd_ReadTree"></A>
3429 MtrNode * <I></I>
3430 <B>Cudd_ReadTree</B>(
3431 DdManager * <b>dd</b> <i></i>
3433 </pre>
3434 <dd> Returns the variable group tree of the manager.
3437 <dd> <b>Side Effects</b> None
3440 <dd> <b>See Also</b> <code><a href="#Cudd_SetTree">Cudd_SetTree</a>
3441 <a href="#Cudd_FreeTree">Cudd_FreeTree</a>
3442 <a href="#Cudd_ReadZddTree">Cudd_ReadZddTree</a>
3443 </code>
3445 <dt><pre>
3446 <A NAME="Cudd_ReadUniqueLinks"></A>
3447 double <I></I>
3448 <B>Cudd_ReadUniqueLinks</B>(
3449 DdManager * <b>dd</b> <i></i>
3451 </pre>
3452 <dd> Returns the number of links followed during look-ups in the
3453 unique table if the keeping of this statistic is enabled; -1 otherwise.
3454 If an item is found in the first position of its collision list, the
3455 number of links followed is taken to be 0. If it is in second position,
3456 the number of links is 1, and so on. This statistic is enabled only if
3457 the package is compiled with DD_UNIQUE_PROFILE defined.
3460 <dd> <b>Side Effects</b> None
3463 <dd> <b>See Also</b> <code><a href="#Cudd_ReadUniqueLookUps">Cudd_ReadUniqueLookUps</a>
3464 </code>
3466 <dt><pre>
3467 <A NAME="Cudd_ReadUniqueLookUps"></A>
3468 double <I></I>
3469 <B>Cudd_ReadUniqueLookUps</B>(
3470 DdManager * <b>dd</b> <i></i>
3472 </pre>
3473 <dd> Returns the number of look-ups in the unique table if the
3474 keeping of this statistic is enabled; -1 otherwise. This statistic is
3475 enabled only if the package is compiled with DD_UNIQUE_PROFILE defined.
3478 <dd> <b>Side Effects</b> None
3481 <dd> <b>See Also</b> <code><a href="#Cudd_ReadUniqueLinks">Cudd_ReadUniqueLinks</a>
3482 </code>
3484 <dt><pre>
3485 <A NAME="Cudd_ReadUsedSlots"></A>
3486 double <I></I>
3487 <B>Cudd_ReadUsedSlots</B>(
3488 DdManager * <b>dd</b> <i></i>
3490 </pre>
3491 <dd> Reads the fraction of used slots in the unique
3492 table. The unused slots are those in which no valid data is
3493 stored. Garbage collection, variable reordering, and subtable
3494 resizing may cause used slots to become unused.
3497 <dd> <b>Side Effects</b> None
3500 <dd> <b>See Also</b> <code><a href="#Cudd_ReadSlots">Cudd_ReadSlots</a>
3501 </code>
3503 <dt><pre>
3504 <A NAME="Cudd_ReadVars"></A>
3505 DdNode * <I></I>
3506 <B>Cudd_ReadVars</B>(
3507 DdManager * <b>dd</b>, <i></i>
3508 int <b>i</b> <i></i>
3510 </pre>
3511 <dd> Returns the i-th element of the vars array if it falls
3512 within the array bounds; NULL otherwise. If i is the index of an
3513 existing variable, this function produces the same result as
3514 Cudd_bddIthVar. However, if the i-th var does not exist yet,
3515 Cudd_bddIthVar will create it, whereas Cudd_ReadVars will not.
3518 <dd> <b>Side Effects</b> None
3521 <dd> <b>See Also</b> <code><a href="#Cudd_bddIthVar">Cudd_bddIthVar</a>
3522 </code>
3524 <dt><pre>
3525 <A NAME="Cudd_ReadZddOne"></A>
3526 DdNode * <I></I>
3527 <B>Cudd_ReadZddOne</B>(
3528 DdManager * <b>dd</b>, <i></i>
3529 int <b>i</b> <i></i>
3531 </pre>
3532 <dd> Returns the ZDD for the constant 1 function.
3533 The representation of the constant 1 function as a ZDD depends on
3534 how many variables it (nominally) depends on. The index of the
3535 topmost variable in the support is given as argument <code>i</code>.
3538 <dd> <b>Side Effects</b> None
3541 <dd> <b>See Also</b> <code><a href="#Cudd_ReadOne">Cudd_ReadOne</a>
3542 </code>
3544 <dt><pre>
3545 <A NAME="Cudd_ReadZddSize"></A>
3546 int <I></I>
3547 <B>Cudd_ReadZddSize</B>(
3548 DdManager * <b>dd</b> <i></i>
3550 </pre>
3551 <dd> Returns the number of ZDD variables in existance.
3554 <dd> <b>Side Effects</b> None
3557 <dd> <b>See Also</b> <code><a href="#Cudd_ReadSize">Cudd_ReadSize</a>
3558 </code>
3560 <dt><pre>
3561 <A NAME="Cudd_ReadZddTree"></A>
3562 MtrNode * <I></I>
3563 <B>Cudd_ReadZddTree</B>(
3564 DdManager * <b>dd</b> <i></i>
3566 </pre>
3567 <dd> Returns the variable group tree of the manager.
3570 <dd> <b>Side Effects</b> None
3573 <dd> <b>See Also</b> <code><a href="#Cudd_SetZddTree">Cudd_SetZddTree</a>
3574 <a href="#Cudd_FreeZddTree">Cudd_FreeZddTree</a>
3575 <a href="#Cudd_ReadTree">Cudd_ReadTree</a>
3576 </code>
3578 <dt><pre>
3579 <A NAME="Cudd_ReadZero"></A>
3580 DdNode * <I></I>
3581 <B>Cudd_ReadZero</B>(
3582 DdManager * <b>dd</b> <i></i>
3584 </pre>
3585 <dd> Returns the zero constant of the manager. The zero
3586 constant is the arithmetic zero, rather than the logic zero. The
3587 latter is the complement of the one constant.
3590 <dd> <b>Side Effects</b> None
3593 <dd> <b>See Also</b> <code><a href="#Cudd_ReadOne">Cudd_ReadOne</a>
3594 <a href="#Cudd_ReadLogicZero">Cudd_ReadLogicZero</a>
3595 </code>
3597 <dt><pre>
3598 <A NAME="Cudd_RecursiveDerefZdd"></A>
3599 void <I></I>
3600 <B>Cudd_RecursiveDerefZdd</B>(
3601 DdManager * <b>table</b>, <i></i>
3602 DdNode * <b>n</b> <i></i>
3604 </pre>
3605 <dd> Decreases the reference count of ZDD node n. If n dies,
3606 recursively decreases the reference counts of its children. It is
3607 used to dispose of a ZDD that is no longer needed.
3610 <dd> <b>Side Effects</b> None
3613 <dd> <b>See Also</b> <code><a href="#Cudd_Deref">Cudd_Deref</a>
3614 <a href="#Cudd_Ref">Cudd_Ref</a>
3615 <a href="#Cudd_RecursiveDeref">Cudd_RecursiveDeref</a>
3616 </code>
3618 <dt><pre>
3619 <A NAME="Cudd_RecursiveDeref"></A>
3620 void <I></I>
3621 <B>Cudd_RecursiveDeref</B>(
3622 DdManager * <b>table</b>, <i></i>
3623 DdNode * <b>n</b> <i></i>
3625 </pre>
3626 <dd> Decreases the reference count of node n. If n dies,
3627 recursively decreases the reference counts of its children. It is
3628 used to dispose of a DD that is no longer needed.
3631 <dd> <b>Side Effects</b> None
3634 <dd> <b>See Also</b> <code><a href="#Cudd_Deref">Cudd_Deref</a>
3635 <a href="#Cudd_Ref">Cudd_Ref</a>
3636 <a href="#Cudd_RecursiveDerefZdd">Cudd_RecursiveDerefZdd</a>
3637 </code>
3639 <dt><pre>
3640 <A NAME="Cudd_ReduceHeap"></A>
3641 int <I></I>
3642 <B>Cudd_ReduceHeap</B>(
3643 DdManager * <b>table</b>, <i>DD manager</i>
3644 Cudd_ReorderingType <b>heuristic</b>, <i>method used for reordering</i>
3645 int <b>minsize</b> <i>bound below which no reordering occurs</i>
3647 </pre>
3648 <dd> Main dynamic reordering routine.
3649 Calls one of the possible reordering procedures:
3650 <ul>
3651 <li>Swapping
3652 <li>Sifting
3653 <li>Symmetric Sifting
3654 <li>Group Sifting
3655 <li>Window Permutation
3656 <li>Simulated Annealing
3657 <li>Genetic Algorithm
3658 <li>Dynamic Programming (exact)
3659 </ul>
3661 For sifting, symmetric sifting, group sifting, and window
3662 permutation it is possible to request reordering to convergence.<p>
3664 The core of all methods is the reordering procedure
3665 cuddSwapInPlace() which swaps two adjacent variables and is based
3666 on Rudell's paper.
3667 Returns 1 in case of success; 0 otherwise. In the case of symmetric
3668 sifting (with and without convergence) returns 1 plus the number of
3669 symmetric variables, in case of success.
3672 <dd> <b>Side Effects</b> Changes the variable order for all diagrams and clears
3673 the cache.
3676 <dt><pre>
3677 <A NAME="Cudd_Ref"></A>
3678 void <I></I>
3679 <B>Cudd_Ref</B>(
3680 DdNode * <b>n</b> <i></i>
3682 </pre>
3683 <dd> Increases the reference count of a node, if it is not
3684 saturated.
3687 <dd> <b>Side Effects</b> None
3690 <dd> <b>See Also</b> <code><a href="#Cudd_RecursiveDeref">Cudd_RecursiveDeref</a>
3691 <a href="#Cudd_Deref">Cudd_Deref</a>
3692 </code>
3694 <dt><pre>
3695 <A NAME="Cudd_RemapOverApprox"></A>
3696 DdNode * <I></I>
3697 <B>Cudd_RemapOverApprox</B>(
3698 DdManager * <b>dd</b>, <i>manager</i>
3699 DdNode * <b>f</b>, <i>function to be superset</i>
3700 int <b>numVars</b>, <i>number of variables in the support of f</i>
3701 int <b>threshold</b>, <i>when to stop approximation</i>
3702 double <b>quality</b> <i>minimum improvement for accepted changes</i>
3704 </pre>
3705 <dd> Extracts a dense superset from a BDD. The procedure is
3706 identical to the underapproximation procedure except for the fact that it
3707 works on the complement of the given function. Extracting the subset
3708 of the complement function is equivalent to extracting the superset
3709 of the function.
3710 Returns a pointer to the BDD of the superset if successful. NULL if
3711 intermediate result causes the procedure to run out of memory. The
3712 parameter numVars is the maximum number of variables to be used in
3713 minterm calculation. The optimal number
3714 should be as close as possible to the size of the support of f.
3715 However, it is safe to pass the value returned by Cudd_ReadSize for
3716 numVars when the number of variables is under 1023. If numVars is
3717 larger than 1023, it will overflow. If a 0 parameter is passed then
3718 the procedure will compute a value which will avoid overflow but
3719 will cause underflow with 2046 variables or more.
3722 <dd> <b>Side Effects</b> None
3725 <dd> <b>See Also</b> <code><a href="#Cudd_SupersetHeavyBranch">Cudd_SupersetHeavyBranch</a>
3726 <a href="#Cudd_SupersetShortPaths">Cudd_SupersetShortPaths</a>
3727 <a href="#Cudd_ReadSize">Cudd_ReadSize</a>
3728 </code>
3730 <dt><pre>
3731 <A NAME="Cudd_RemapUnderApprox"></A>
3732 DdNode * <I></I>
3733 <B>Cudd_RemapUnderApprox</B>(
3734 DdManager * <b>dd</b>, <i>manager</i>
3735 DdNode * <b>f</b>, <i>function to be subset</i>
3736 int <b>numVars</b>, <i>number of variables in the support of f</i>
3737 int <b>threshold</b>, <i>when to stop approximation</i>
3738 double <b>quality</b> <i>minimum improvement for accepted changes</i>
3740 </pre>
3741 <dd> Extracts a dense subset from a BDD. This procedure uses
3742 a remapping technique and density as the cost function.
3743 Returns a pointer to the BDD of the subset if
3744 successful. NULL if the procedure runs out of memory. The parameter
3745 numVars is the maximum number of variables to be used in minterm
3746 calculation. The optimal number should be as close as possible to
3747 the size of the support of f. However, it is safe to pass the value
3748 returned by Cudd_ReadSize for numVars when the number of variables
3749 is under 1023. If numVars is larger than 1023, it will cause
3750 overflow. If a 0 parameter is passed then the procedure will compute
3751 a value which will avoid overflow but will cause underflow with 2046
3752 variables or more.
3755 <dd> <b>Side Effects</b> None
3758 <dd> <b>See Also</b> <code><a href="#Cudd_SubsetShortPaths">Cudd_SubsetShortPaths</a>
3759 <a href="#Cudd_SubsetHeavyBranch">Cudd_SubsetHeavyBranch</a>
3760 <a href="#Cudd_UnderApprox">Cudd_UnderApprox</a>
3761 <a href="#Cudd_ReadSize">Cudd_ReadSize</a>
3762 </code>
3764 <dt><pre>
3765 <A NAME="Cudd_RemoveHook"></A>
3766 int <I></I>
3767 <B>Cudd_RemoveHook</B>(
3768 DdManager * <b>dd</b>, <i></i>
3769 DD_HFP <b>f</b>, <i></i>
3770 Cudd_HookType <b>where</b> <i></i>
3772 </pre>
3773 <dd> Removes a function from a hook. A hook is a list of
3774 application-provided functions called on certain occasions by the
3775 package. Returns 1 if successful; 0 the function was not in the list.
3778 <dd> <b>Side Effects</b> None
3781 <dd> <b>See Also</b> <code><a href="#Cudd_AddHook">Cudd_AddHook</a>
3782 </code>
3784 <dt><pre>
3785 <A NAME="Cudd_ReorderingReporting"></A>
3786 int <I></I>
3787 <B>Cudd_ReorderingReporting</B>(
3788 DdManager * <b>dd</b> <i></i>
3790 </pre>
3791 <dd> Returns 1 if reporting of reordering stats is enabled;
3792 0 otherwise.
3795 <dd> <b>Side Effects</b> none
3798 <dd> <b>See Also</b> <code><a href="#Cudd_EnableReorderingReporting">Cudd_EnableReorderingReporting</a>
3799 <a href="#Cudd_DisableReorderingReporting">Cudd_DisableReorderingReporting</a>
3800 </code>
3802 <dt><pre>
3803 <A NAME="Cudd_ReorderingStatusZdd"></A>
3804 int <I></I>
3805 <B>Cudd_ReorderingStatusZdd</B>(
3806 DdManager * <b>unique</b>, <i></i>
3807 Cudd_ReorderingType * <b>method</b> <i></i>
3809 </pre>
3810 <dd> Reports the status of automatic dynamic reordering of
3811 ZDDs. Parameter method is set to the ZDD reordering method currently
3812 selected. Returns 1 if automatic reordering is enabled; 0
3813 otherwise.
3816 <dd> <b>Side Effects</b> Parameter method is set to the ZDD reordering method currently
3817 selected.
3820 <dd> <b>See Also</b> <code><a href="#Cudd_AutodynEnableZdd">Cudd_AutodynEnableZdd</a>
3821 <a href="#Cudd_AutodynDisableZdd">Cudd_AutodynDisableZdd</a>
3822 <a href="#Cudd_ReorderingStatus">Cudd_ReorderingStatus</a>
3823 </code>
3825 <dt><pre>
3826 <A NAME="Cudd_ReorderingStatus"></A>
3827 int <I></I>
3828 <B>Cudd_ReorderingStatus</B>(
3829 DdManager * <b>unique</b>, <i></i>
3830 Cudd_ReorderingType * <b>method</b> <i></i>
3832 </pre>
3833 <dd> Reports the status of automatic dynamic reordering of
3834 BDDs and ADDs. Parameter method is set to the reordering method
3835 currently selected. Returns 1 if automatic reordering is enabled; 0
3836 otherwise.
3839 <dd> <b>Side Effects</b> Parameter method is set to the reordering method currently
3840 selected.
3843 <dd> <b>See Also</b> <code><a href="#Cudd_AutodynEnable">Cudd_AutodynEnable</a>
3844 <a href="#Cudd_AutodynDisable">Cudd_AutodynDisable</a>
3845 <a href="#Cudd_ReorderingStatusZdd">Cudd_ReorderingStatusZdd</a>
3846 </code>
3848 <dt><pre>
3849 <A NAME="Cudd_SetArcviolation"></A>
3850 void <I></I>
3851 <B>Cudd_SetArcviolation</B>(
3852 DdManager * <b>dd</b>, <i></i>
3853 int <b>arcviolation</b> <i></i>
3855 </pre>
3856 <dd> Sets the value of the arcviolation
3857 parameter. This parameter is used in group sifting to decide how
3858 many arcs into <code>y</code> not coming from <code>x</code> are
3859 tolerable when checking for aggregation due to extended
3860 symmetry. The value should be between 0 and 100. A small value
3861 causes fewer variables to be aggregated. The default value is 0.
3864 <dd> <b>Side Effects</b> None
3867 <dd> <b>See Also</b> <code><a href="#Cudd_ReadArcviolation">Cudd_ReadArcviolation</a>
3868 </code>
3870 <dt><pre>
3871 <A NAME="Cudd_SetBackground"></A>
3872 void <I></I>
3873 <B>Cudd_SetBackground</B>(
3874 DdManager * <b>dd</b>, <i></i>
3875 DdNode * <b>bck</b> <i></i>
3877 </pre>
3878 <dd> Sets the background constant of the manager. It assumes
3879 that the DdNode pointer bck is already referenced.
3882 <dd> <b>Side Effects</b> None
3885 <dt><pre>
3886 <A NAME="Cudd_SetEpsilon"></A>
3887 void <I></I>
3888 <B>Cudd_SetEpsilon</B>(
3889 DdManager * <b>dd</b>, <i></i>
3890 CUDD_VALUE_TYPE <b>ep</b> <i></i>
3892 </pre>
3893 <dd> Sets the epsilon parameter of the manager to ep. The epsilon
3894 parameter control the comparison between floating point numbers.
3897 <dd> <b>Side Effects</b> None
3900 <dd> <b>See Also</b> <code><a href="#Cudd_ReadEpsilon">Cudd_ReadEpsilon</a>
3901 </code>
3903 <dt><pre>
3904 <A NAME="Cudd_SetGroupcheck"></A>
3905 void <I></I>
3906 <B>Cudd_SetGroupcheck</B>(
3907 DdManager * <b>dd</b>, <i></i>
3908 Cudd_AggregationType <b>gc</b> <i></i>
3910 </pre>
3911 <dd> Sets the parameter groupcheck of the manager to gc. The
3912 groupcheck parameter determines the aggregation criterion in group
3913 sifting.
3916 <dd> <b>Side Effects</b> None
3919 <dd> <b>See Also</b> <code><a href="#Cudd_ReadGroupCheck">Cudd_ReadGroupCheck</a>
3920 </code>
3922 <dt><pre>
3923 <A NAME="Cudd_SetLooseUpTo"></A>
3924 void <I></I>
3925 <B>Cudd_SetLooseUpTo</B>(
3926 DdManager * <b>dd</b>, <i></i>
3927 unsigned int <b>lut</b> <i></i>
3929 </pre>
3930 <dd> Sets the looseUpTo parameter of the manager. This
3931 parameter of the manager controls the threshold beyond which no fast
3932 growth of the unique table is allowed. The threshold is given as a
3933 number of slots. If the value passed to this function is 0, the
3934 function determines a suitable value based on the available memory.
3937 <dd> <b>Side Effects</b> None
3940 <dd> <b>See Also</b> <code><a href="#Cudd_ReadLooseUpTo">Cudd_ReadLooseUpTo</a>
3941 <a href="#Cudd_SetMinHit">Cudd_SetMinHit</a>
3942 </code>
3944 <dt><pre>
3945 <A NAME="Cudd_SetMaxCacheHard"></A>
3946 void <I></I>
3947 <B>Cudd_SetMaxCacheHard</B>(
3948 DdManager * <b>dd</b>, <i></i>
3949 unsigned int <b>mc</b> <i></i>
3951 </pre>
3952 <dd> Sets the maxCacheHard parameter of the manager. The
3953 cache cannot grow larger than maxCacheHard entries. This parameter
3954 allows an application to control the trade-off of memory versus
3955 speed. If the value passed to this function is 0, the function
3956 determines a suitable maximum cache size based on the available memory.
3959 <dd> <b>Side Effects</b> None
3962 <dd> <b>See Also</b> <code><a href="#Cudd_ReadMaxCacheHard">Cudd_ReadMaxCacheHard</a>
3963 <a href="#Cudd_SetMaxCache">Cudd_SetMaxCache</a>
3964 </code>
3966 <dt><pre>
3967 <A NAME="Cudd_SetMaxGrowthAlternate"></A>
3968 void <I></I>
3969 <B>Cudd_SetMaxGrowthAlternate</B>(
3970 DdManager * <b>dd</b>, <i></i>
3971 double <b>mg</b> <i></i>
3973 </pre>
3974 <dd> Sets the maxGrowthAlt parameter of the manager. This
3975 parameter is analogous to the maxGrowth paramter, and is used every
3976 given number of reorderings instead of maxGrowth. The number of
3977 reorderings is set with Cudd_SetReorderingCycle. If the number of
3978 reorderings is 0 (default) maxGrowthAlt is never used.
3981 <dd> <b>Side Effects</b> None
3984 <dd> <b>See Also</b> <code><a href="#Cudd_ReadMaxGrowthAlternate">Cudd_ReadMaxGrowthAlternate</a>
3985 <a href="#Cudd_SetMaxGrowth">Cudd_SetMaxGrowth</a>
3986 <a href="#Cudd_SetReorderingCycle">Cudd_SetReorderingCycle</a>
3987 <a href="#Cudd_ReadReorderingCycle">Cudd_ReadReorderingCycle</a>
3988 </code>
3990 <dt><pre>
3991 <A NAME="Cudd_SetMaxGrowth"></A>
3992 void <I></I>
3993 <B>Cudd_SetMaxGrowth</B>(
3994 DdManager * <b>dd</b>, <i></i>
3995 double <b>mg</b> <i></i>
3997 </pre>
3998 <dd> Sets the maxGrowth parameter of the manager. This
3999 parameter determines how much the number of nodes can grow during
4000 sifting of a variable. Overall, sifting never increases the size of
4001 the decision diagrams. This parameter only refers to intermediate
4002 results. A lower value will speed up sifting, possibly at the
4003 expense of quality.
4006 <dd> <b>Side Effects</b> None
4009 <dd> <b>See Also</b> <code><a href="#Cudd_ReadMaxGrowth">Cudd_ReadMaxGrowth</a>
4010 <a href="#Cudd_SetMaxGrowthAlternate">Cudd_SetMaxGrowthAlternate</a>
4011 </code>
4013 <dt><pre>
4014 <A NAME="Cudd_SetMaxLive"></A>
4015 void <I></I>
4016 <B>Cudd_SetMaxLive</B>(
4017 DdManager * <b>dd</b>, <i></i>
4018 unsigned int <b>maxLive</b> <i></i>
4020 </pre>
4021 <dd> Sets the maximum allowed number of live nodes. When this
4022 number is exceeded, the package returns NULL.
4025 <dd> <b>Side Effects</b> none
4028 <dd> <b>See Also</b> <code><a href="#Cudd_ReadMaxLive">Cudd_ReadMaxLive</a>
4029 </code>
4031 <dt><pre>
4032 <A NAME="Cudd_SetMaxMemory"></A>
4033 void <I></I>
4034 <B>Cudd_SetMaxMemory</B>(
4035 DdManager * <b>dd</b>, <i></i>
4036 unsigned long <b>maxMemory</b> <i></i>
4038 </pre>
4039 <dd> Sets the maximum allowed memory. When this
4040 number is exceeded, the package returns NULL.
4043 <dd> <b>Side Effects</b> none
4046 <dd> <b>See Also</b> <code><a href="#Cudd_ReadMaxMemory">Cudd_ReadMaxMemory</a>
4047 </code>
4049 <dt><pre>
4050 <A NAME="Cudd_SetMinHit"></A>
4051 void <I></I>
4052 <B>Cudd_SetMinHit</B>(
4053 DdManager * <b>dd</b>, <i></i>
4054 unsigned int <b>hr</b> <i></i>
4056 </pre>
4057 <dd> Sets the minHit parameter of the manager. This
4058 parameter controls the resizing of the computed table. If the hit
4059 rate is larger than the specified value, and the cache is not
4060 already too large, then its size is doubled.
4063 <dd> <b>Side Effects</b> None
4066 <dd> <b>See Also</b> <code><a href="#Cudd_ReadMinHit">Cudd_ReadMinHit</a>
4067 </code>
4069 <dt><pre>
4070 <A NAME="Cudd_SetNextReordering"></A>
4071 void <I></I>
4072 <B>Cudd_SetNextReordering</B>(
4073 DdManager * <b>dd</b>, <i></i>
4074 unsigned int <b>next</b> <i></i>
4076 </pre>
4077 <dd> Sets the threshold for the next dynamic reordering.
4078 The threshold is in terms of number of nodes and is in effect only
4079 if reordering is enabled. The count does not include the dead nodes,
4080 unless the countDead parameter of the manager has been changed from
4081 its default setting.
4084 <dd> <b>Side Effects</b> None
4087 <dd> <b>See Also</b> <code><a href="#Cudd_ReadNextReordering">Cudd_ReadNextReordering</a>
4088 </code>
4090 <dt><pre>
4091 <A NAME="Cudd_SetNumberXovers"></A>
4092 void <I></I>
4093 <B>Cudd_SetNumberXovers</B>(
4094 DdManager * <b>dd</b>, <i></i>
4095 int <b>numberXovers</b> <i></i>
4097 </pre>
4098 <dd> Sets the number of crossovers used by the genetic
4099 algorithm for variable reordering. A larger number of crossovers
4100 will cause the genetic algorithm to take more time, but will
4101 generally produce better results. The default value is 0, in which
4102 case the package uses three times the number of variables as number
4103 of crossovers, with a maximum of 60.
4106 <dd> <b>Side Effects</b> None
4109 <dd> <b>See Also</b> <code><a href="#Cudd_ReadNumberXovers">Cudd_ReadNumberXovers</a>
4110 </code>
4112 <dt><pre>
4113 <A NAME="Cudd_SetPopulationSize"></A>
4114 void <I></I>
4115 <B>Cudd_SetPopulationSize</B>(
4116 DdManager * <b>dd</b>, <i></i>
4117 int <b>populationSize</b> <i></i>
4119 </pre>
4120 <dd> Sets the size of the population used by the
4121 genetic algorithm for variable reordering. A larger population size will
4122 cause the genetic algorithm to take more time, but will generally
4123 produce better results. The default value is 0, in which case the
4124 package uses three times the number of variables as population size,
4125 with a maximum of 120.
4128 <dd> <b>Side Effects</b> Changes the manager.
4131 <dd> <b>See Also</b> <code><a href="#Cudd_ReadPopulationSize">Cudd_ReadPopulationSize</a>
4132 </code>
4134 <dt><pre>
4135 <A NAME="Cudd_SetRecomb"></A>
4136 void <I></I>
4137 <B>Cudd_SetRecomb</B>(
4138 DdManager * <b>dd</b>, <i></i>
4139 int <b>recomb</b> <i></i>
4141 </pre>
4142 <dd> Sets the value of the recombination parameter used in
4143 group sifting. A larger (positive) value makes the aggregation of
4144 variables due to the second difference criterion more likely. A
4145 smaller (negative) value makes aggregation less likely. The default
4146 value is 0.
4149 <dd> <b>Side Effects</b> Changes the manager.
4152 <dd> <b>See Also</b> <code><a href="#Cudd_ReadRecomb">Cudd_ReadRecomb</a>
4153 </code>
4155 <dt><pre>
4156 <A NAME="Cudd_SetReorderingCycle"></A>
4157 void <I></I>
4158 <B>Cudd_SetReorderingCycle</B>(
4159 DdManager * <b>dd</b>, <i></i>
4160 int <b>cycle</b> <i></i>
4162 </pre>
4163 <dd> Sets the reordCycle parameter of the manager. This
4164 parameter determines how often the alternate threshold on maximum
4165 growth is used in reordering.
4168 <dd> <b>Side Effects</b> None
4171 <dd> <b>See Also</b> <code><a href="#Cudd_ReadMaxGrowthAlternate">Cudd_ReadMaxGrowthAlternate</a>
4172 <a href="#Cudd_SetMaxGrowthAlternate">Cudd_SetMaxGrowthAlternate</a>
4173 <a href="#Cudd_ReadReorderingCycle">Cudd_ReadReorderingCycle</a>
4174 </code>
4176 <dt><pre>
4177 <A NAME="Cudd_SetSiftMaxSwap"></A>
4178 void <I></I>
4179 <B>Cudd_SetSiftMaxSwap</B>(
4180 DdManager * <b>dd</b>, <i></i>
4181 int <b>sms</b> <i></i>
4183 </pre>
4184 <dd> Sets the siftMaxSwap parameter of the manager. This
4185 parameter gives the maximum number of swaps that will be attempted
4186 for each invocation of sifting. The real number of swaps may exceed
4187 the set limit because the package will always complete the sifting
4188 of the variable that causes the limit to be reached.
4191 <dd> <b>Side Effects</b> None
4194 <dd> <b>See Also</b> <code><a href="#Cudd_SetSiftMaxVar">Cudd_SetSiftMaxVar</a>
4195 <a href="#Cudd_ReadSiftMaxSwap">Cudd_ReadSiftMaxSwap</a>
4196 </code>
4198 <dt><pre>
4199 <A NAME="Cudd_SetSiftMaxVar"></A>
4200 void <I></I>
4201 <B>Cudd_SetSiftMaxVar</B>(
4202 DdManager * <b>dd</b>, <i></i>
4203 int <b>smv</b> <i></i>
4205 </pre>
4206 <dd> Sets the siftMaxVar parameter of the manager. This
4207 parameter gives the maximum number of variables that will be sifted
4208 for each invocation of sifting.
4211 <dd> <b>Side Effects</b> None
4214 <dd> <b>See Also</b> <code><a href="#Cudd_SetSiftMaxSwap">Cudd_SetSiftMaxSwap</a>
4215 <a href="#Cudd_ReadSiftMaxVar">Cudd_ReadSiftMaxVar</a>
4216 </code>
4218 <dt><pre>
4219 <A NAME="Cudd_SetStderr"></A>
4220 void <I></I>
4221 <B>Cudd_SetStderr</B>(
4222 DdManager * <b>dd</b>, <i></i>
4223 FILE * <b>fp</b> <i></i>
4225 </pre>
4226 <dd> Sets the stderr of a manager.
4229 <dd> <b>Side Effects</b> None
4232 <dd> <b>See Also</b> <code><a href="#Cudd_ReadStderr">Cudd_ReadStderr</a>
4233 <a href="#Cudd_SetStdout">Cudd_SetStdout</a>
4234 </code>
4236 <dt><pre>
4237 <A NAME="Cudd_SetStdout"></A>
4238 void <I></I>
4239 <B>Cudd_SetStdout</B>(
4240 DdManager * <b>dd</b>, <i></i>
4241 FILE * <b>fp</b> <i></i>
4243 </pre>
4244 <dd> Sets the stdout of a manager.
4247 <dd> <b>Side Effects</b> None
4250 <dd> <b>See Also</b> <code><a href="#Cudd_ReadStdout">Cudd_ReadStdout</a>
4251 <a href="#Cudd_SetStderr">Cudd_SetStderr</a>
4252 </code>
4254 <dt><pre>
4255 <A NAME="Cudd_SetSymmviolation"></A>
4256 void <I></I>
4257 <B>Cudd_SetSymmviolation</B>(
4258 DdManager * <b>dd</b>, <i></i>
4259 int <b>symmviolation</b> <i></i>
4261 </pre>
4262 <dd> Sets the value of the symmviolation
4263 parameter. This parameter is used in group sifting to decide how
4264 many violations to the symmetry conditions <code>f10 = f01</code> or
4265 <code>f11 = f00</code> are tolerable when checking for aggregation
4266 due to extended symmetry. The value should be between 0 and 100. A
4267 small value causes fewer variables to be aggregated. The default
4268 value is 0.
4271 <dd> <b>Side Effects</b> Changes the manager.
4274 <dd> <b>See Also</b> <code><a href="#Cudd_ReadSymmviolation">Cudd_ReadSymmviolation</a>
4275 </code>
4277 <dt><pre>
4278 <A NAME="Cudd_SetTree"></A>
4279 void <I></I>
4280 <B>Cudd_SetTree</B>(
4281 DdManager * <b>dd</b>, <i></i>
4282 MtrNode * <b>tree</b> <i></i>
4284 </pre>
4285 <dd> Sets the variable group tree of the manager.
4288 <dd> <b>Side Effects</b> None
4291 <dd> <b>See Also</b> <code><a href="#Cudd_FreeTree">Cudd_FreeTree</a>
4292 <a href="#Cudd_ReadTree">Cudd_ReadTree</a>
4293 <a href="#Cudd_SetZddTree">Cudd_SetZddTree</a>
4294 </code>
4296 <dt><pre>
4297 <A NAME="Cudd_SetVarMap"></A>
4298 int <I></I>
4299 <B>Cudd_SetVarMap</B>(
4300 DdManager * <b>manager</b>, <i>DD manager</i>
4301 DdNode ** <b>x</b>, <i>first array of variables</i>
4302 DdNode ** <b>y</b>, <i>second array of variables</i>
4303 int <b>n</b> <i>length of both arrays</i>
4305 </pre>
4306 <dd> Registers with the manager a variable mapping described
4307 by two sets of variables. This variable mapping is then used by
4308 functions like Cudd_bddVarMap. This function is convenient for
4309 those applications that perform the same mapping several times.
4310 However, if several different permutations are used, it may be more
4311 efficient not to rely on the registered mapping, because changing
4312 mapping causes the cache to be cleared. (The initial setting,
4313 however, does not clear the cache.) The two sets of variables (x and
4314 y) must have the same size (x and y). The size is given by n. The
4315 two sets of variables are normally disjoint, but this restriction is
4316 not imposeded by the function. When new variables are created, the
4317 map is automatically extended (each new variable maps to
4318 itself). The typical use, however, is to wait until all variables
4319 are created, and then create the map. Returns 1 if the mapping is
4320 successfully registered with the manager; 0 otherwise.
4323 <dd> <b>Side Effects</b> Modifies the manager. May clear the cache.
4326 <dd> <b>See Also</b> <code><a href="#Cudd_bddVarMap">Cudd_bddVarMap</a>
4327 <a href="#Cudd_bddPermute">Cudd_bddPermute</a>
4328 <a href="#Cudd_bddSwapVariables">Cudd_bddSwapVariables</a>
4329 </code>
4331 <dt><pre>
4332 <A NAME="Cudd_SetZddTree"></A>
4333 void <I></I>
4334 <B>Cudd_SetZddTree</B>(
4335 DdManager * <b>dd</b>, <i></i>
4336 MtrNode * <b>tree</b> <i></i>
4338 </pre>
4339 <dd> Sets the ZDD variable group tree of the manager.
4342 <dd> <b>Side Effects</b> None
4345 <dd> <b>See Also</b> <code><a href="#Cudd_FreeZddTree">Cudd_FreeZddTree</a>
4346 <a href="#Cudd_ReadZddTree">Cudd_ReadZddTree</a>
4347 <a href="#Cudd_SetTree">Cudd_SetTree</a>
4348 </code>
4350 <dt><pre>
4351 <A NAME="Cudd_SharingSize"></A>
4352 int <I></I>
4353 <B>Cudd_SharingSize</B>(
4354 DdNode ** <b>nodeArray</b>, <i></i>
4355 int <b>n</b> <i></i>
4357 </pre>
4358 <dd> Counts the number of nodes in an array of DDs. Shared
4359 nodes are counted only once. Returns the total number of nodes.
4362 <dd> <b>Side Effects</b> None
4365 <dd> <b>See Also</b> <code><a href="#Cudd_DagSize">Cudd_DagSize</a>
4366 </code>
4368 <dt><pre>
4369 <A NAME="Cudd_ShortestLength"></A>
4370 int <I></I>
4371 <B>Cudd_ShortestLength</B>(
4372 DdManager * <b>manager</b>, <i></i>
4373 DdNode * <b>f</b>, <i></i>
4374 int * <b>weight</b> <i></i>
4376 </pre>
4377 <dd> Find the length of the shortest path(s) in a DD. f is
4378 the DD we want to get the shortest path for; weight[i] is the
4379 weight of the THEN edge coming from the node whose index is i. All
4380 ELSE edges have 0 weight. Returns the length of the shortest
4381 path(s) if such a path is found; a large number if the function is
4382 identically 0, and CUDD_OUT_OF_MEM in case of failure.
4385 <dd> <b>Side Effects</b> None
4388 <dd> <b>See Also</b> <code><a href="#Cudd_ShortestPath">Cudd_ShortestPath</a>
4389 </code>
4391 <dt><pre>
4392 <A NAME="Cudd_ShortestPath"></A>
4393 DdNode * <I></I>
4394 <B>Cudd_ShortestPath</B>(
4395 DdManager * <b>manager</b>, <i></i>
4396 DdNode * <b>f</b>, <i></i>
4397 int * <b>weight</b>, <i></i>
4398 int * <b>support</b>, <i></i>
4399 int * <b>length</b> <i></i>
4401 </pre>
4402 <dd> Finds a shortest path in a DD. f is the DD we want to
4403 get the shortest path for; weight[i] is the weight of the THEN arc
4404 coming from the node whose index is i. If weight is NULL, then unit
4405 weights are assumed for all THEN arcs. All ELSE arcs have 0 weight.
4406 If non-NULL, both weight and support should point to arrays with at
4407 least as many entries as there are variables in the manager.
4408 Returns the shortest path as the BDD of a cube.
4411 <dd> <b>Side Effects</b> support contains on return the true support of f.
4412 If support is NULL on entry, then Cudd_ShortestPath does not compute
4413 the true support info. length contains the length of the path.
4416 <dd> <b>See Also</b> <code><a href="#Cudd_ShortestLength">Cudd_ShortestLength</a>
4417 <a href="#Cudd_LargestCube">Cudd_LargestCube</a>
4418 </code>
4420 <dt><pre>
4421 <A NAME="Cudd_ShuffleHeap"></A>
4422 int <I></I>
4423 <B>Cudd_ShuffleHeap</B>(
4424 DdManager * <b>table</b>, <i>DD manager</i>
4425 int * <b>permutation</b> <i>required variable permutation</i>
4427 </pre>
4428 <dd> Reorders variables according to given permutation.
4429 The i-th entry of the permutation array contains the index of the variable
4430 that should be brought to the i-th level. The size of the array should be
4431 equal or greater to the number of variables currently in use.
4432 Returns 1 in case of success; 0 otherwise.
4435 <dd> <b>Side Effects</b> Changes the variable order for all diagrams and clears
4436 the cache.
4439 <dd> <b>See Also</b> <code><a href="#Cudd_ReduceHeap">Cudd_ReduceHeap</a>
4440 </code>
4442 <dt><pre>
4443 <A NAME="Cudd_SolveEqn"></A>
4444 DdNode * <I></I>
4445 <B>Cudd_SolveEqn</B>(
4446 DdManager * <b>bdd</b>, <i></i>
4447 DdNode * <b>F</b>, <i>the left-hand side of the equation</i>
4448 DdNode * <b>Y</b>, <i>the cube of the y variables</i>
4449 DdNode ** <b>G</b>, <i>the array of solutions (return parameter)</i>
4450 int ** <b>yIndex</b>, <i>index of y variables</i>
4451 int <b>n</b> <i>numbers of unknowns</i>
4453 </pre>
4454 <dd> Implements the solution for F(x,y) = 0. The return
4455 value is the consistency condition. The y variables are the unknowns
4456 and the remaining variables are the parameters. Returns the
4457 consistency condition if successful; NULL otherwise. Cudd_SolveEqn
4458 allocates an array and fills it with the indices of the
4459 unknowns. This array is used by Cudd_VerifySol.
4462 <dd> <b>Side Effects</b> The solution is returned in G; the indices of the y
4463 variables are returned in yIndex.
4466 <dd> <b>See Also</b> <code><a href="#Cudd_VerifySol">Cudd_VerifySol</a>
4467 </code>
4469 <dt><pre>
4470 <A NAME="Cudd_SplitSet"></A>
4471 DdNode * <I></I>
4472 <B>Cudd_SplitSet</B>(
4473 DdManager * <b>manager</b>, <i></i>
4474 DdNode * <b>S</b>, <i></i>
4475 DdNode ** <b>xVars</b>, <i></i>
4476 int <b>n</b>, <i></i>
4477 double <b>m</b> <i></i>
4479 </pre>
4480 <dd> Returns <code>m</code> minterms from a BDD whose
4481 support has <code>n</code> variables at most. The procedure tries
4482 to create as few extra nodes as possible. The function represented
4483 by <code>S</code> depends on at most <code>n</code> of the variables
4484 in <code>xVars</code>. Returns a BDD with <code>m</code> minterms
4485 of the on-set of S if successful; NULL otherwise.
4488 <dd> <b>Side Effects</b> None
4491 <dt><pre>
4492 <A NAME="Cudd_Srandom"></A>
4493 void <I></I>
4494 <B>Cudd_Srandom</B>(
4495 long <b>seed</b> <i></i>
4497 </pre>
4498 <dd> Initializer for the portable number generator based on
4499 ran2 in "Numerical Recipes in C." The input is the seed for the
4500 generator. If it is negative, its absolute value is taken as seed.
4501 If it is 0, then 1 is taken as seed. The initialized sets up the two
4502 recurrences used to generate a long-period stream, and sets up the
4503 shuffle table.
4506 <dd> <b>Side Effects</b> None
4509 <dd> <b>See Also</b> <code><a href="#Cudd_Random">Cudd_Random</a>
4510 </code>
4512 <dt><pre>
4513 <A NAME="Cudd_StdPostReordHook"></A>
4514 int <I></I>
4515 <B>Cudd_StdPostReordHook</B>(
4516 DdManager * <b>dd</b>, <i></i>
4517 const char * <b>str</b>, <i></i>
4518 void * <b>data</b> <i></i>
4520 </pre>
4521 <dd> Sample hook function to call after reordering.
4522 Prints on the manager's stdout final size and reordering time.
4523 Returns 1 if successful; 0 otherwise.
4526 <dd> <b>Side Effects</b> None
4529 <dd> <b>See Also</b> <code><a href="#Cudd_StdPreReordHook">Cudd_StdPreReordHook</a>
4530 </code>
4532 <dt><pre>
4533 <A NAME="Cudd_StdPreReordHook"></A>
4534 int <I></I>
4535 <B>Cudd_StdPreReordHook</B>(
4536 DdManager * <b>dd</b>, <i></i>
4537 const char * <b>str</b>, <i></i>
4538 void * <b>data</b> <i></i>
4540 </pre>
4541 <dd> Sample hook function to call before reordering.
4542 Prints on the manager's stdout reordering method and initial size.
4543 Returns 1 if successful; 0 otherwise.
4546 <dd> <b>Side Effects</b> None
4549 <dd> <b>See Also</b> <code><a href="#Cudd_StdPostReordHook">Cudd_StdPostReordHook</a>
4550 </code>
4552 <dt><pre>
4553 <A NAME="Cudd_SubsetCompress"></A>
4554 DdNode * <I></I>
4555 <B>Cudd_SubsetCompress</B>(
4556 DdManager * <b>dd</b>, <i>manager</i>
4557 DdNode * <b>f</b>, <i>BDD whose subset is sought</i>
4558 int <b>nvars</b>, <i>number of variables in the support of f</i>
4559 int <b>threshold</b> <i>maximum number of nodes in the subset</i>
4561 </pre>
4562 <dd> Finds a dense subset of BDD <code>f</code>. Density is
4563 the ratio of number of minterms to number of nodes. Uses several
4564 techniques in series. It is more expensive than other subsetting
4565 procedures, but often produces better results. See
4566 Cudd_SubsetShortPaths for a description of the threshold and nvars
4567 parameters. Returns a pointer to the result if successful; NULL
4568 otherwise.
4571 <dd> <b>Side Effects</b> None
4574 <dd> <b>See Also</b> <code><a href="#Cudd_SubsetRemap">Cudd_SubsetRemap</a>
4575 <a href="#Cudd_SubsetShortPaths">Cudd_SubsetShortPaths</a>
4576 <a href="#Cudd_SubsetHeavyBranch">Cudd_SubsetHeavyBranch</a>
4577 <a href="#Cudd_bddSqueeze">Cudd_bddSqueeze</a>
4578 </code>
4580 <dt><pre>
4581 <A NAME="Cudd_SubsetHeavyBranch"></A>
4582 DdNode * <I></I>
4583 <B>Cudd_SubsetHeavyBranch</B>(
4584 DdManager * <b>dd</b>, <i>manager</i>
4585 DdNode * <b>f</b>, <i>function to be subset</i>
4586 int <b>numVars</b>, <i>number of variables in the support of f</i>
4587 int <b>threshold</b> <i>maximum number of nodes in the subset</i>
4589 </pre>
4590 <dd> Extracts a dense subset from a BDD. This procedure
4591 builds a subset by throwing away one of the children of each node,
4592 starting from the root, until the result is small enough. The child
4593 that is eliminated from the result is the one that contributes the
4594 fewer minterms. Returns a pointer to the BDD of the subset if
4595 successful. NULL if the procedure runs out of memory. The parameter
4596 numVars is the maximum number of variables to be used in minterm
4597 calculation and node count calculation. The optimal number should
4598 be as close as possible to the size of the support of f. However,
4599 it is safe to pass the value returned by Cudd_ReadSize for numVars
4600 when the number of variables is under 1023. If numVars is larger
4601 than 1023, it will overflow. If a 0 parameter is passed then the
4602 procedure will compute a value which will avoid overflow but will
4603 cause underflow with 2046 variables or more.
4606 <dd> <b>Side Effects</b> None
4609 <dd> <b>See Also</b> <code><a href="#Cudd_SubsetShortPaths">Cudd_SubsetShortPaths</a>
4610 <a href="#Cudd_SupersetHeavyBranch">Cudd_SupersetHeavyBranch</a>
4611 <a href="#Cudd_ReadSize">Cudd_ReadSize</a>
4612 </code>
4614 <dt><pre>
4615 <A NAME="Cudd_SubsetShortPaths"></A>
4616 DdNode * <I></I>
4617 <B>Cudd_SubsetShortPaths</B>(
4618 DdManager * <b>dd</b>, <i>manager</i>
4619 DdNode * <b>f</b>, <i>function to be subset</i>
4620 int <b>numVars</b>, <i>number of variables in the support of f</i>
4621 int <b>threshold</b>, <i>maximum number of nodes in the subset</i>
4622 int <b>hardlimit</b> <i>flag: 1 if threshold is a hard limit</i>
4624 </pre>
4625 <dd> Extracts a dense subset from a BDD. This procedure
4626 tries to preserve the shortest paths of the input BDD, because they
4627 give many minterms and contribute few nodes. This procedure may
4628 increase the number of nodes in trying to create the subset or
4629 reduce the number of nodes due to recombination as compared to the
4630 original BDD. Hence the threshold may not be strictly adhered to. In
4631 practice, recombination overshadows the increase in the number of
4632 nodes and results in small BDDs as compared to the threshold. The
4633 hardlimit specifies whether threshold needs to be strictly adhered
4634 to. If it is set to 1, the procedure ensures that result is never
4635 larger than the specified limit but may be considerably less than
4636 the threshold. Returns a pointer to the BDD for the subset if
4637 successful; NULL otherwise. The value for numVars should be as
4638 close as possible to the size of the support of f for better
4639 efficiency. However, it is safe to pass the value returned by
4640 Cudd_ReadSize for numVars. If 0 is passed, then the value returned
4641 by Cudd_ReadSize is used.
4644 <dd> <b>Side Effects</b> None
4647 <dd> <b>See Also</b> <code><a href="#Cudd_SupersetShortPaths">Cudd_SupersetShortPaths</a>
4648 <a href="#Cudd_SubsetHeavyBranch">Cudd_SubsetHeavyBranch</a>
4649 <a href="#Cudd_ReadSize">Cudd_ReadSize</a>
4650 </code>
4652 <dt><pre>
4653 <A NAME="Cudd_SubsetWithMaskVars"></A>
4654 DdNode * <I></I>
4655 <B>Cudd_SubsetWithMaskVars</B>(
4656 DdManager * <b>dd</b>, <i>manager</i>
4657 DdNode * <b>f</b>, <i>function from which to pick a cube</i>
4658 DdNode ** <b>vars</b>, <i>array of variables</i>
4659 int <b>nvars</b>, <i>size of <code>vars</code></i>
4660 DdNode ** <b>maskVars</b>, <i>array of variables</i>
4661 int <b>mvars</b> <i>size of <code>maskVars</code></i>
4663 </pre>
4664 <dd> Extracts a subset from a BDD in the following procedure.
4665 1. Compute the weight for each mask variable by counting the number of
4666 minterms for both positive and negative cofactors of the BDD with
4667 respect to each mask variable. (weight = #positive - #negative)
4668 2. Find a representative cube of the BDD by using the weight. From the
4669 top variable of the BDD, for each variable, if the weight is greater
4670 than 0.0, choose THEN branch, othereise ELSE branch, until meeting
4671 the constant 1.
4672 3. Quantify out the variables not in maskVars from the representative
4673 cube and if a variable in maskVars is don't care, replace the
4674 variable with a constant(1 or 0) depending on the weight.
4675 4. Make a subset of the BDD by multiplying with the modified cube.
4678 <dd> <b>Side Effects</b> None
4681 <dt><pre>
4682 <A NAME="Cudd_SupersetCompress"></A>
4683 DdNode * <I></I>
4684 <B>Cudd_SupersetCompress</B>(
4685 DdManager * <b>dd</b>, <i>manager</i>
4686 DdNode * <b>f</b>, <i>BDD whose superset is sought</i>
4687 int <b>nvars</b>, <i>number of variables in the support of f</i>
4688 int <b>threshold</b> <i>maximum number of nodes in the superset</i>
4690 </pre>
4691 <dd> Finds a dense superset of BDD <code>f</code>. Density is
4692 the ratio of number of minterms to number of nodes. Uses several
4693 techniques in series. It is more expensive than other supersetting
4694 procedures, but often produces better results. See
4695 Cudd_SupersetShortPaths for a description of the threshold and nvars
4696 parameters. Returns a pointer to the result if successful; NULL
4697 otherwise.
4700 <dd> <b>Side Effects</b> None
4703 <dd> <b>See Also</b> <code><a href="#Cudd_SubsetCompress">Cudd_SubsetCompress</a>
4704 <a href="#Cudd_SupersetRemap">Cudd_SupersetRemap</a>
4705 <a href="#Cudd_SupersetShortPaths">Cudd_SupersetShortPaths</a>
4706 <a href="#Cudd_SupersetHeavyBranch">Cudd_SupersetHeavyBranch</a>
4707 <a href="#Cudd_bddSqueeze">Cudd_bddSqueeze</a>
4708 </code>
4710 <dt><pre>
4711 <A NAME="Cudd_SupersetHeavyBranch"></A>
4712 DdNode * <I></I>
4713 <B>Cudd_SupersetHeavyBranch</B>(
4714 DdManager * <b>dd</b>, <i>manager</i>
4715 DdNode * <b>f</b>, <i>function to be superset</i>
4716 int <b>numVars</b>, <i>number of variables in the support of f</i>
4717 int <b>threshold</b> <i>maximum number of nodes in the superset</i>
4719 </pre>
4720 <dd> Extracts a dense superset from a BDD. The procedure is
4721 identical to the subset procedure except for the fact that it
4722 receives the complement of the given function. Extracting the subset
4723 of the complement function is equivalent to extracting the superset
4724 of the function. This procedure builds a superset by throwing away
4725 one of the children of each node starting from the root of the
4726 complement function, until the result is small enough. The child
4727 that is eliminated from the result is the one that contributes the
4728 fewer minterms.
4729 Returns a pointer to the BDD of the superset if successful. NULL if
4730 intermediate result causes the procedure to run out of memory. The
4731 parameter numVars is the maximum number of variables to be used in
4732 minterm calculation and node count calculation. The optimal number
4733 should be as close as possible to the size of the support of f.
4734 However, it is safe to pass the value returned by Cudd_ReadSize for
4735 numVars when the number of variables is under 1023. If numVars is
4736 larger than 1023, it will overflow. If a 0 parameter is passed then
4737 the procedure will compute a value which will avoid overflow but
4738 will cause underflow with 2046 variables or more.
4741 <dd> <b>Side Effects</b> None
4744 <dd> <b>See Also</b> <code><a href="#Cudd_SubsetHeavyBranch">Cudd_SubsetHeavyBranch</a>
4745 <a href="#Cudd_SupersetShortPaths">Cudd_SupersetShortPaths</a>
4746 <a href="#Cudd_ReadSize">Cudd_ReadSize</a>
4747 </code>
4749 <dt><pre>
4750 <A NAME="Cudd_SupersetShortPaths"></A>
4751 DdNode * <I></I>
4752 <B>Cudd_SupersetShortPaths</B>(
4753 DdManager * <b>dd</b>, <i>manager</i>
4754 DdNode * <b>f</b>, <i>function to be superset</i>
4755 int <b>numVars</b>, <i>number of variables in the support of f</i>
4756 int <b>threshold</b>, <i>maximum number of nodes in the subset</i>
4757 int <b>hardlimit</b> <i>flag: 1 if threshold is a hard limit</i>
4759 </pre>
4760 <dd> Extracts a dense superset from a BDD. The procedure is
4761 identical to the subset procedure except for the fact that it
4762 receives the complement of the given function. Extracting the subset
4763 of the complement function is equivalent to extracting the superset
4764 of the function. This procedure tries to preserve the shortest
4765 paths of the complement BDD, because they give many minterms and
4766 contribute few nodes. This procedure may increase the number of
4767 nodes in trying to create the superset or reduce the number of nodes
4768 due to recombination as compared to the original BDD. Hence the
4769 threshold may not be strictly adhered to. In practice, recombination
4770 overshadows the increase in the number of nodes and results in small
4771 BDDs as compared to the threshold. The hardlimit specifies whether
4772 threshold needs to be strictly adhered to. If it is set to 1, the
4773 procedure ensures that result is never larger than the specified
4774 limit but may be considerably less than the threshold. Returns a
4775 pointer to the BDD for the superset if successful; NULL
4776 otherwise. The value for numVars should be as close as possible to
4777 the size of the support of f for better efficiency. However, it is
4778 safe to pass the value returned by Cudd_ReadSize for numVar. If 0
4779 is passed, then the value returned by Cudd_ReadSize is used.
4782 <dd> <b>Side Effects</b> None
4785 <dd> <b>See Also</b> <code><a href="#Cudd_SubsetShortPaths">Cudd_SubsetShortPaths</a>
4786 <a href="#Cudd_SupersetHeavyBranch">Cudd_SupersetHeavyBranch</a>
4787 <a href="#Cudd_ReadSize">Cudd_ReadSize</a>
4788 </code>
4790 <dt><pre>
4791 <A NAME="Cudd_SupportIndex"></A>
4792 int * <I></I>
4793 <B>Cudd_SupportIndex</B>(
4794 DdManager * <b>dd</b>, <i>manager</i>
4795 DdNode * <b>f</b> <i>DD whose support is sought</i>
4797 </pre>
4798 <dd> Finds the variables on which a DD depends. Returns an
4799 index array of the variables if successful; NULL otherwise. The
4800 size of the array equals the number of variables in the manager.
4801 Each entry of the array is 1 if the corresponding variable is in the
4802 support of the DD and 0 otherwise.
4805 <dd> <b>Side Effects</b> None
4808 <dd> <b>See Also</b> <code><a href="#Cudd_Support">Cudd_Support</a>
4809 <a href="#Cudd_VectorSupport">Cudd_VectorSupport</a>
4810 <a href="#Cudd_ClassifySupport">Cudd_ClassifySupport</a>
4811 </code>
4813 <dt><pre>
4814 <A NAME="Cudd_SupportSize"></A>
4815 int <I></I>
4816 <B>Cudd_SupportSize</B>(
4817 DdManager * <b>dd</b>, <i>manager</i>
4818 DdNode * <b>f</b> <i>DD whose support size is sought</i>
4820 </pre>
4821 <dd> Counts the variables on which a DD depends.
4822 Returns the number of the variables if successful; CUDD_OUT_OF_MEM
4823 otherwise.
4826 <dd> <b>Side Effects</b> None
4829 <dd> <b>See Also</b> <code><a href="#Cudd_Support">Cudd_Support</a>
4830 </code>
4832 <dt><pre>
4833 <A NAME="Cudd_Support"></A>
4834 DdNode * <I></I>
4835 <B>Cudd_Support</B>(
4836 DdManager * <b>dd</b>, <i>manager</i>
4837 DdNode * <b>f</b> <i>DD whose support is sought</i>
4839 </pre>
4840 <dd> Finds the variables on which a DD depends.
4841 Returns a BDD consisting of the product of the variables if
4842 successful; NULL otherwise.
4845 <dd> <b>Side Effects</b> None
4848 <dd> <b>See Also</b> <code><a href="#Cudd_VectorSupport">Cudd_VectorSupport</a>
4849 <a href="#Cudd_ClassifySupport">Cudd_ClassifySupport</a>
4850 </code>
4852 <dt><pre>
4853 <A NAME="Cudd_SymmProfile"></A>
4854 void <I></I>
4855 <B>Cudd_SymmProfile</B>(
4856 DdManager * <b>table</b>, <i></i>
4857 int <b>lower</b>, <i></i>
4858 int <b>upper</b> <i></i>
4860 </pre>
4861 <dd> Prints statistics on symmetric variables.
4864 <dd> <b>Side Effects</b> None
4867 <dt><pre>
4868 <A NAME="Cudd_TurnOffCountDead"></A>
4869 void <I></I>
4870 <B>Cudd_TurnOffCountDead</B>(
4871 DdManager * <b>dd</b> <i></i>
4873 </pre>
4874 <dd> Causes the dead nodes not to be counted towards
4875 triggering reordering. This causes less frequent reorderings. By
4876 default dead nodes are not counted. Therefore there is no need to
4877 call this function unless Cudd_TurnOnCountDead has been previously
4878 called.
4881 <dd> <b>Side Effects</b> Changes the manager.
4884 <dd> <b>See Also</b> <code><a href="#Cudd_TurnOnCountDead">Cudd_TurnOnCountDead</a>
4885 <a href="#Cudd_DeadAreCounted">Cudd_DeadAreCounted</a>
4886 </code>
4888 <dt><pre>
4889 <A NAME="Cudd_TurnOnCountDead"></A>
4890 void <I></I>
4891 <B>Cudd_TurnOnCountDead</B>(
4892 DdManager * <b>dd</b> <i></i>
4894 </pre>
4895 <dd> Causes the dead nodes to be counted towards triggering
4896 reordering. This causes more frequent reorderings. By default dead
4897 nodes are not counted.
4900 <dd> <b>Side Effects</b> Changes the manager.
4903 <dd> <b>See Also</b> <code><a href="#Cudd_TurnOffCountDead">Cudd_TurnOffCountDead</a>
4904 <a href="#Cudd_DeadAreCounted">Cudd_DeadAreCounted</a>
4905 </code>
4907 <dt><pre>
4908 <A NAME="Cudd_UnderApprox"></A>
4909 DdNode * <I></I>
4910 <B>Cudd_UnderApprox</B>(
4911 DdManager * <b>dd</b>, <i>manager</i>
4912 DdNode * <b>f</b>, <i>function to be subset</i>
4913 int <b>numVars</b>, <i>number of variables in the support of f</i>
4914 int <b>threshold</b>, <i>when to stop approximation</i>
4915 int <b>safe</b>, <i>enforce safe approximation</i>
4916 double <b>quality</b> <i>minimum improvement for accepted changes</i>
4918 </pre>
4919 <dd> Extracts a dense subset from a BDD. This procedure uses
4920 a variant of Tom Shiple's underapproximation method. The main
4921 difference from the original method is that density is used as cost
4922 function. Returns a pointer to the BDD of the subset if
4923 successful. NULL if the procedure runs out of memory. The parameter
4924 numVars is the maximum number of variables to be used in minterm
4925 calculation. The optimal number should be as close as possible to
4926 the size of the support of f. However, it is safe to pass the value
4927 returned by Cudd_ReadSize for numVars when the number of variables
4928 is under 1023. If numVars is larger than 1023, it will cause
4929 overflow. If a 0 parameter is passed then the procedure will compute
4930 a value which will avoid overflow but will cause underflow with 2046
4931 variables or more.
4934 <dd> <b>Side Effects</b> None
4937 <dd> <b>See Also</b> <code><a href="#Cudd_SubsetShortPaths">Cudd_SubsetShortPaths</a>
4938 <a href="#Cudd_SubsetHeavyBranch">Cudd_SubsetHeavyBranch</a>
4939 <a href="#Cudd_ReadSize">Cudd_ReadSize</a>
4940 </code>
4942 <dt><pre>
4943 <A NAME="Cudd_VectorSupportIndex"></A>
4944 int * <I></I>
4945 <B>Cudd_VectorSupportIndex</B>(
4946 DdManager * <b>dd</b>, <i>manager</i>
4947 DdNode ** <b>F</b>, <i>array of DDs whose support is sought</i>
4948 int <b>n</b> <i>size of the array</i>
4950 </pre>
4951 <dd> Finds the variables on which a set of DDs depends.
4952 The set must contain either BDDs and ADDs, or ZDDs.
4953 Returns an index array of the variables if successful; NULL otherwise.
4956 <dd> <b>Side Effects</b> None
4959 <dd> <b>See Also</b> <code><a href="#Cudd_SupportIndex">Cudd_SupportIndex</a>
4960 <a href="#Cudd_VectorSupport">Cudd_VectorSupport</a>
4961 <a href="#Cudd_ClassifySupport">Cudd_ClassifySupport</a>
4962 </code>
4964 <dt><pre>
4965 <A NAME="Cudd_VectorSupportSize"></A>
4966 int <I></I>
4967 <B>Cudd_VectorSupportSize</B>(
4968 DdManager * <b>dd</b>, <i>manager</i>
4969 DdNode ** <b>F</b>, <i>array of DDs whose support is sought</i>
4970 int <b>n</b> <i>size of the array</i>
4972 </pre>
4973 <dd> Counts the variables on which a set of DDs depends.
4974 The set must contain either BDDs and ADDs, or ZDDs.
4975 Returns the number of the variables if successful; CUDD_OUT_OF_MEM
4976 otherwise.
4979 <dd> <b>Side Effects</b> None
4982 <dd> <b>See Also</b> <code><a href="#Cudd_VectorSupport">Cudd_VectorSupport</a>
4983 <a href="#Cudd_SupportSize">Cudd_SupportSize</a>
4984 </code>
4986 <dt><pre>
4987 <A NAME="Cudd_VectorSupport"></A>
4988 DdNode * <I></I>
4989 <B>Cudd_VectorSupport</B>(
4990 DdManager * <b>dd</b>, <i>manager</i>
4991 DdNode ** <b>F</b>, <i>array of DDs whose support is sought</i>
4992 int <b>n</b> <i>size of the array</i>
4994 </pre>
4995 <dd> Finds the variables on which a set of DDs depends.
4996 The set must contain either BDDs and ADDs, or ZDDs.
4997 Returns a BDD consisting of the product of the variables if
4998 successful; NULL otherwise.
5001 <dd> <b>Side Effects</b> None
5004 <dd> <b>See Also</b> <code><a href="#Cudd_Support">Cudd_Support</a>
5005 <a href="#Cudd_ClassifySupport">Cudd_ClassifySupport</a>
5006 </code>
5008 <dt><pre>
5009 <A NAME="Cudd_VerifySol"></A>
5010 DdNode * <I></I>
5011 <B>Cudd_VerifySol</B>(
5012 DdManager * <b>bdd</b>, <i></i>
5013 DdNode * <b>F</b>, <i>the left-hand side of the equation</i>
5014 DdNode ** <b>G</b>, <i>the array of solutions</i>
5015 int * <b>yIndex</b>, <i>index of y variables</i>
5016 int <b>n</b> <i>numbers of unknowns</i>
5018 </pre>
5019 <dd> Checks the solution of F(x,y) = 0. This procedure
5020 substitutes the solution components for the unknowns of F and returns
5021 the resulting BDD for F.
5024 <dd> <b>Side Effects</b> Frees the memory pointed by yIndex.
5027 <dd> <b>See Also</b> <code><a href="#Cudd_SolveEqn">Cudd_SolveEqn</a>
5028 </code>
5030 <dt><pre>
5031 <A NAME="Cudd_Xeqy"></A>
5032 DdNode * <I></I>
5033 <B>Cudd_Xeqy</B>(
5034 DdManager * <b>dd</b>, <i>DD manager</i>
5035 int <b>N</b>, <i>number of x and y variables</i>
5036 DdNode ** <b>x</b>, <i>array of x variables</i>
5037 DdNode ** <b>y</b> <i>array of y variables</i>
5039 </pre>
5040 <dd> This function generates a BDD for the function x==y.
5041 Both x and y are N-bit numbers, x[0] x[1] ... x[N-1] and
5042 y[0] y[1] ... y[N-1], with 0 the most significant bit.
5043 The BDD is built bottom-up.
5044 It has 3*N-1 internal nodes, if the variables are ordered as follows:
5045 x[0] y[0] x[1] y[1] ... x[N-1] y[N-1].
5048 <dd> <b>Side Effects</b> None
5051 <dd> <b>See Also</b> <code><a href="#Cudd_addXeqy">Cudd_addXeqy</a>
5052 </code>
5054 <dt><pre>
5055 <A NAME="Cudd_Xgty"></A>
5056 DdNode * <I></I>
5057 <B>Cudd_Xgty</B>(
5058 DdManager * <b>dd</b>, <i>DD manager</i>
5059 int <b>N</b>, <i>number of x and y variables</i>
5060 DdNode ** <b>z</b>, <i>array of z variables: unused</i>
5061 DdNode ** <b>x</b>, <i>array of x variables</i>
5062 DdNode ** <b>y</b> <i>array of y variables</i>
5064 </pre>
5065 <dd> This function generates a BDD for the function x &gt; y.
5066 Both x and y are N-bit numbers, x[0] x[1] ... x[N-1] and
5067 y[0] y[1] ... y[N-1], with 0 the most significant bit.
5068 The BDD is built bottom-up.
5069 It has 3*N-1 internal nodes, if the variables are ordered as follows:
5070 x[0] y[0] x[1] y[1] ... x[N-1] y[N-1].
5071 Argument z is not used by Cudd_Xgty: it is included to make it
5072 call-compatible to Cudd_Dxygtdxz and Cudd_Dxygtdyz.
5075 <dd> <b>Side Effects</b> None
5078 <dd> <b>See Also</b> <code><a href="#Cudd_PrioritySelect">Cudd_PrioritySelect</a>
5079 <a href="#Cudd_Dxygtdxz">Cudd_Dxygtdxz</a>
5080 <a href="#Cudd_Dxygtdyz">Cudd_Dxygtdyz</a>
5081 </code>
5083 <dt><pre>
5084 <A NAME="Cudd_addAgreement"></A>
5085 DdNode * <I></I>
5086 <B>Cudd_addAgreement</B>(
5087 DdManager * <b>dd</b>, <i></i>
5088 DdNode ** <b>f</b>, <i></i>
5089 DdNode ** <b>g</b> <i></i>
5091 </pre>
5092 <dd> Returns NULL if not a terminal case; f op g otherwise,
5093 where f op g is f if f==g; background if f!=g.
5096 <dd> <b>Side Effects</b> None
5099 <dd> <b>See Also</b> <code><a href="#Cudd_addApply">Cudd_addApply</a>
5100 </code>
5102 <dt><pre>
5103 <A NAME="Cudd_addApply"></A>
5104 DdNode * <I></I>
5105 <B>Cudd_addApply</B>(
5106 DdManager * <b>dd</b>, <i></i>
5107 DD_AOP <b>op</b>, <i></i>
5108 DdNode * <b>f</b>, <i></i>
5109 DdNode * <b>g</b> <i></i>
5111 </pre>
5112 <dd> Applies op to the corresponding discriminants of f and g.
5113 Returns a pointer to the result if succssful; NULL otherwise.
5116 <dd> <b>Side Effects</b> None
5119 <dd> <b>See Also</b> <code><a href="#Cudd_addMonadicApply">Cudd_addMonadicApply</a>
5120 <a href="#Cudd_addPlus">Cudd_addPlus</a>
5121 <a href="#Cudd_addTimes">Cudd_addTimes</a>
5122 <a href="#Cudd_addThreshold">Cudd_addThreshold</a>
5123 <a href="#Cudd_addSetNZ">Cudd_addSetNZ</a>
5124 <a href="#Cudd_addDivide">Cudd_addDivide</a>
5125 <a href="#Cudd_addMinus">Cudd_addMinus</a>
5126 <a href="#Cudd_addMinimum">Cudd_addMinimum</a>
5127 <a href="#Cudd_addMaximum">Cudd_addMaximum</a>
5128 <a href="#Cudd_addOneZeroMaximum">Cudd_addOneZeroMaximum</a>
5129 <a href="#Cudd_addDiff">Cudd_addDiff</a>
5130 <a href="#Cudd_addAgreement">Cudd_addAgreement</a>
5131 <a href="#Cudd_addOr">Cudd_addOr</a>
5132 <a href="#Cudd_addNand">Cudd_addNand</a>
5133 <a href="#Cudd_addNor">Cudd_addNor</a>
5134 <a href="#Cudd_addXor">Cudd_addXor</a>
5135 <a href="#Cudd_addXnor">Cudd_addXnor</a>
5136 </code>
5138 <dt><pre>
5139 <A NAME="Cudd_addBddInterval"></A>
5140 DdNode * <I></I>
5141 <B>Cudd_addBddInterval</B>(
5142 DdManager * <b>dd</b>, <i></i>
5143 DdNode * <b>f</b>, <i></i>
5144 CUDD_VALUE_TYPE <b>lower</b>, <i></i>
5145 CUDD_VALUE_TYPE <b>upper</b> <i></i>
5147 </pre>
5148 <dd> Converts an ADD to a BDD by replacing all
5149 discriminants greater than or equal to lower and less than or equal to
5150 upper with 1, and all other discriminants with 0. Returns a pointer to
5151 the resulting BDD if successful; NULL otherwise.
5154 <dd> <b>Side Effects</b> None
5157 <dd> <b>See Also</b> <code><a href="#Cudd_addBddThreshold">Cudd_addBddThreshold</a>
5158 <a href="#Cudd_addBddStrictThreshold">Cudd_addBddStrictThreshold</a>
5159 <a href="#Cudd_addBddPattern">Cudd_addBddPattern</a>
5160 <a href="#Cudd_BddToAdd">Cudd_BddToAdd</a>
5161 </code>
5163 <dt><pre>
5164 <A NAME="Cudd_addBddIthBit"></A>
5165 DdNode * <I></I>
5166 <B>Cudd_addBddIthBit</B>(
5167 DdManager * <b>dd</b>, <i></i>
5168 DdNode * <b>f</b>, <i></i>
5169 int <b>bit</b> <i></i>
5171 </pre>
5172 <dd> Converts an ADD to a BDD by replacing all
5173 discriminants whose i-th bit is equal to 1 with 1, and all other
5174 discriminants with 0. The i-th bit refers to the integer
5175 representation of the leaf value. If the value is has a fractional
5176 part, it is ignored. Repeated calls to this procedure allow one to
5177 transform an integer-valued ADD into an array of BDDs, one for each
5178 bit of the leaf values. Returns a pointer to the resulting BDD if
5179 successful; NULL otherwise.
5182 <dd> <b>Side Effects</b> None
5185 <dd> <b>See Also</b> <code><a href="#Cudd_addBddInterval">Cudd_addBddInterval</a>
5186 <a href="#Cudd_addBddPattern">Cudd_addBddPattern</a>
5187 <a href="#Cudd_BddToAdd">Cudd_BddToAdd</a>
5188 </code>
5190 <dt><pre>
5191 <A NAME="Cudd_addBddPattern"></A>
5192 DdNode * <I></I>
5193 <B>Cudd_addBddPattern</B>(
5194 DdManager * <b>dd</b>, <i></i>
5195 DdNode * <b>f</b> <i></i>
5197 </pre>
5198 <dd> Converts an ADD to a BDD by replacing all
5199 discriminants different from 0 with 1. Returns a pointer to the
5200 resulting BDD if successful; NULL otherwise.
5203 <dd> <b>Side Effects</b> None
5206 <dd> <b>See Also</b> <code><a href="#Cudd_BddToAdd">Cudd_BddToAdd</a>
5207 <a href="#Cudd_addBddThreshold">Cudd_addBddThreshold</a>
5208 <a href="#Cudd_addBddInterval">Cudd_addBddInterval</a>
5209 <a href="#Cudd_addBddStrictThreshold">Cudd_addBddStrictThreshold</a>
5210 </code>
5212 <dt><pre>
5213 <A NAME="Cudd_addBddStrictThreshold"></A>
5214 DdNode * <I></I>
5215 <B>Cudd_addBddStrictThreshold</B>(
5216 DdManager * <b>dd</b>, <i></i>
5217 DdNode * <b>f</b>, <i></i>
5218 CUDD_VALUE_TYPE <b>value</b> <i></i>
5220 </pre>
5221 <dd> Converts an ADD to a BDD by replacing all
5222 discriminants STRICTLY greater than value with 1, and all other
5223 discriminants with 0. Returns a pointer to the resulting BDD if
5224 successful; NULL otherwise.
5227 <dd> <b>Side Effects</b> None
5230 <dd> <b>See Also</b> <code><a href="#Cudd_addBddInterval">Cudd_addBddInterval</a>
5231 <a href="#Cudd_addBddPattern">Cudd_addBddPattern</a>
5232 <a href="#Cudd_BddToAdd">Cudd_BddToAdd</a>
5233 <a href="#Cudd_addBddThreshold">Cudd_addBddThreshold</a>
5234 </code>
5236 <dt><pre>
5237 <A NAME="Cudd_addBddThreshold"></A>
5238 DdNode * <I></I>
5239 <B>Cudd_addBddThreshold</B>(
5240 DdManager * <b>dd</b>, <i></i>
5241 DdNode * <b>f</b>, <i></i>
5242 CUDD_VALUE_TYPE <b>value</b> <i></i>
5244 </pre>
5245 <dd> Converts an ADD to a BDD by replacing all
5246 discriminants greater than or equal to value with 1, and all other
5247 discriminants with 0. Returns a pointer to the resulting BDD if
5248 successful; NULL otherwise.
5251 <dd> <b>Side Effects</b> None
5254 <dd> <b>See Also</b> <code><a href="#Cudd_addBddInterval">Cudd_addBddInterval</a>
5255 <a href="#Cudd_addBddPattern">Cudd_addBddPattern</a>
5256 <a href="#Cudd_BddToAdd">Cudd_BddToAdd</a>
5257 <a href="#Cudd_addBddStrictThreshold">Cudd_addBddStrictThreshold</a>
5258 </code>
5260 <dt><pre>
5261 <A NAME="Cudd_addCmpl"></A>
5262 DdNode * <I></I>
5263 <B>Cudd_addCmpl</B>(
5264 DdManager * <b>dd</b>, <i></i>
5265 DdNode * <b>f</b> <i></i>
5267 </pre>
5268 <dd> Computes the complement of an ADD a la C language: The
5269 complement of 0 is 1 and the complement of everything else is 0.
5270 Returns a pointer to the resulting ADD if successful; NULL otherwise.
5273 <dd> <b>Side Effects</b> None
5276 <dd> <b>See Also</b> <code><a href="#Cudd_addNegate">Cudd_addNegate</a>
5277 </code>
5279 <dt><pre>
5280 <A NAME="Cudd_addCompose"></A>
5281 DdNode * <I></I>
5282 <B>Cudd_addCompose</B>(
5283 DdManager * <b>dd</b>, <i></i>
5284 DdNode * <b>f</b>, <i></i>
5285 DdNode * <b>g</b>, <i></i>
5286 int <b>v</b> <i></i>
5288 </pre>
5289 <dd> Substitutes g for x_v in the ADD for f. v is the index of the
5290 variable to be substituted. g must be a 0-1 ADD. Cudd_bddCompose passes
5291 the corresponding projection function to the recursive procedure, so
5292 that the cache may be used. Returns the composed ADD if successful;
5293 NULL otherwise.
5296 <dd> <b>Side Effects</b> None
5299 <dd> <b>See Also</b> <code><a href="#Cudd_bddCompose">Cudd_bddCompose</a>
5300 </code>
5302 <dt><pre>
5303 <A NAME="Cudd_addComputeCube"></A>
5304 DdNode * <I></I>
5305 <B>Cudd_addComputeCube</B>(
5306 DdManager * <b>dd</b>, <i></i>
5307 DdNode ** <b>vars</b>, <i></i>
5308 int * <b>phase</b>, <i></i>
5309 int <b>n</b> <i></i>
5311 </pre>
5312 <dd> Computes the cube of an array of ADD variables. If
5313 non-null, the phase argument indicates which literal of each
5314 variable should appear in the cube. If phase[i] is nonzero, then the
5315 positive literal is used. If phase is NULL, the cube is positive unate.
5316 Returns a pointer to the result if successful; NULL otherwise.
5319 <dd> <b>Side Effects</b> none
5322 <dd> <b>See Also</b> <code><a href="#Cudd_bddComputeCube">Cudd_bddComputeCube</a>
5323 </code>
5325 <dt><pre>
5326 <A NAME="Cudd_addConstrain"></A>
5327 DdNode * <I></I>
5328 <B>Cudd_addConstrain</B>(
5329 DdManager * <b>dd</b>, <i></i>
5330 DdNode * <b>f</b>, <i></i>
5331 DdNode * <b>c</b> <i></i>
5333 </pre>
5334 <dd> Computes f constrain c (f @ c), for f an ADD and c a 0-1
5335 ADD. List of special cases:
5336 <ul>
5337 <li> F @ 0 = 0
5338 <li> F @ 1 = F
5339 <li> 0 @ c = 0
5340 <li> 1 @ c = 1
5341 <li> F @ F = 1
5342 </ul>
5343 Returns a pointer to the result if successful; NULL otherwise.
5346 <dd> <b>Side Effects</b> None
5349 <dd> <b>See Also</b> <code><a href="#Cudd_bddConstrain">Cudd_bddConstrain</a>
5350 </code>
5352 <dt><pre>
5353 <A NAME="Cudd_addConst"></A>
5354 DdNode * <I></I>
5355 <B>Cudd_addConst</B>(
5356 DdManager * <b>dd</b>, <i></i>
5357 CUDD_VALUE_TYPE <b>c</b> <i></i>
5359 </pre>
5360 <dd> Retrieves the ADD for constant c if it already
5361 exists, or creates a new ADD. Returns a pointer to the
5362 ADD if successful; NULL otherwise.
5365 <dd> <b>Side Effects</b> None
5368 <dd> <b>See Also</b> <code><a href="#Cudd_addNewVar">Cudd_addNewVar</a>
5369 <a href="#Cudd_addIthVar">Cudd_addIthVar</a>
5370 </code>
5372 <dt><pre>
5373 <A NAME="Cudd_addDiff"></A>
5374 DdNode * <I></I>
5375 <B>Cudd_addDiff</B>(
5376 DdManager * <b>dd</b>, <i></i>
5377 DdNode ** <b>f</b>, <i></i>
5378 DdNode ** <b>g</b> <i></i>
5380 </pre>
5381 <dd> Returns NULL if not a terminal case; f op g otherwise,
5382 where f op g is plusinfinity if f=g; min(f,g) if f!=g.
5385 <dd> <b>Side Effects</b> None
5388 <dd> <b>See Also</b> <code><a href="#Cudd_addApply">Cudd_addApply</a>
5389 </code>
5391 <dt><pre>
5392 <A NAME="Cudd_addDivide"></A>
5393 DdNode * <I></I>
5394 <B>Cudd_addDivide</B>(
5395 DdManager * <b>dd</b>, <i></i>
5396 DdNode ** <b>f</b>, <i></i>
5397 DdNode ** <b>g</b> <i></i>
5399 </pre>
5400 <dd> Integer and floating point division. Returns NULL if not
5401 a terminal case; f / g otherwise.
5404 <dd> <b>Side Effects</b> None
5407 <dd> <b>See Also</b> <code><a href="#Cudd_addApply">Cudd_addApply</a>
5408 </code>
5410 <dt><pre>
5411 <A NAME="Cudd_addEvalConst"></A>
5412 DdNode * <I></I>
5413 <B>Cudd_addEvalConst</B>(
5414 DdManager * <b>dd</b>, <i></i>
5415 DdNode * <b>f</b>, <i></i>
5416 DdNode * <b>g</b> <i></i>
5418 </pre>
5419 <dd> Checks whether ADD g is constant whenever ADD f is 1. f
5420 must be a 0-1 ADD. Returns a pointer to the resulting ADD (which may
5421 or may not be constant) or DD_NON_CONSTANT. If f is identically 0,
5422 the check is assumed to be successful, and the background value is
5423 returned. No new nodes are created.
5426 <dd> <b>Side Effects</b> None
5429 <dd> <b>See Also</b> <code><a href="#Cudd_addIteConstant">Cudd_addIteConstant</a>
5430 <a href="#Cudd_addLeq">Cudd_addLeq</a>
5431 </code>
5433 <dt><pre>
5434 <A NAME="Cudd_addExistAbstract"></A>
5435 DdNode * <I></I>
5436 <B>Cudd_addExistAbstract</B>(
5437 DdManager * <b>manager</b>, <i></i>
5438 DdNode * <b>f</b>, <i></i>
5439 DdNode * <b>cube</b> <i></i>
5441 </pre>
5442 <dd> Abstracts all the variables in cube from f by summing
5443 over all possible values taken by the variables. Returns the
5444 abstracted ADD.
5447 <dd> <b>Side Effects</b> None
5450 <dd> <b>See Also</b> <code><a href="#Cudd_addUnivAbstract">Cudd_addUnivAbstract</a>
5451 <a href="#Cudd_bddExistAbstract">Cudd_bddExistAbstract</a>
5452 <a href="#Cudd_addOrAbstract">Cudd_addOrAbstract</a>
5453 </code>
5455 <dt><pre>
5456 <A NAME="Cudd_addFindMax"></A>
5457 DdNode * <I></I>
5458 <B>Cudd_addFindMax</B>(
5459 DdManager * <b>dd</b>, <i></i>
5460 DdNode * <b>f</b> <i></i>
5462 </pre>
5463 <dd> Returns a pointer to a constant ADD.
5466 <dd> <b>Side Effects</b> None
5469 <dt><pre>
5470 <A NAME="Cudd_addFindMin"></A>
5471 DdNode * <I></I>
5472 <B>Cudd_addFindMin</B>(
5473 DdManager * <b>dd</b>, <i></i>
5474 DdNode * <b>f</b> <i></i>
5476 </pre>
5477 <dd> Returns a pointer to a constant ADD.
5480 <dd> <b>Side Effects</b> None
5483 <dt><pre>
5484 <A NAME="Cudd_addGeneralVectorCompose"></A>
5485 DdNode * <I></I>
5486 <B>Cudd_addGeneralVectorCompose</B>(
5487 DdManager * <b>dd</b>, <i></i>
5488 DdNode * <b>f</b>, <i></i>
5489 DdNode ** <b>vectorOn</b>, <i></i>
5490 DdNode ** <b>vectorOff</b> <i></i>
5492 </pre>
5493 <dd> Given a vector of ADDs, creates a new ADD by substituting the
5494 ADDs for the variables of the ADD f. vectorOn contains ADDs to be substituted
5495 for the x_v and vectorOff the ADDs to be substituted for x_v'. There should
5496 be an entry in vector for each variable in the manager. If no substitution
5497 is sought for a given variable, the corresponding projection function should
5498 be specified in the vector. This function implements simultaneous
5499 composition. Returns a pointer to the resulting ADD if successful; NULL
5500 otherwise.
5503 <dd> <b>Side Effects</b> None
5506 <dd> <b>See Also</b> <code><a href="#Cudd_addVectorCompose">Cudd_addVectorCompose</a>
5507 <a href="#Cudd_addNonSimCompose">Cudd_addNonSimCompose</a>
5508 <a href="#Cudd_addPermute">Cudd_addPermute</a>
5509 <a href="#Cudd_addCompose">Cudd_addCompose</a>
5510 <a href="#Cudd_bddVectorCompose">Cudd_bddVectorCompose</a>
5511 </code>
5513 <dt><pre>
5514 <A NAME="Cudd_addHamming"></A>
5515 DdNode * <I></I>
5516 <B>Cudd_addHamming</B>(
5517 DdManager * <b>dd</b>, <i></i>
5518 DdNode ** <b>xVars</b>, <i></i>
5519 DdNode ** <b>yVars</b>, <i></i>
5520 int <b>nVars</b> <i></i>
5522 </pre>
5523 <dd> Computes the Hamming distance ADD. Returns an ADD that
5524 gives the Hamming distance between its two arguments if successful;
5525 NULL otherwise. The two vectors xVars and yVars identify the variables
5526 that form the two arguments.
5529 <dd> <b>Side Effects</b> None
5532 <dt><pre>
5533 <A NAME="Cudd_addHarwell"></A>
5534 int <I></I>
5535 <B>Cudd_addHarwell</B>(
5536 FILE * <b>fp</b>, <i>pointer to the input file</i>
5537 DdManager * <b>dd</b>, <i>DD manager</i>
5538 DdNode ** <b>E</b>, <i>characteristic function of the graph</i>
5539 DdNode *** <b>x</b>, <i>array of row variables</i>
5540 DdNode *** <b>y</b>, <i>array of column variables</i>
5541 DdNode *** <b>xn</b>, <i>array of complemented row variables</i>
5542 DdNode *** <b>yn_</b>, <i>array of complemented column variables</i>
5543 int * <b>nx</b>, <i>number or row variables</i>
5544 int * <b>ny</b>, <i>number or column variables</i>
5545 int * <b>m</b>, <i>number of rows</i>
5546 int * <b>n</b>, <i>number of columns</i>
5547 int <b>bx</b>, <i>first index of row variables</i>
5548 int <b>sx</b>, <i>step of row variables</i>
5549 int <b>by</b>, <i>first index of column variables</i>
5550 int <b>sy</b>, <i>step of column variables</i>
5551 int <b>pr</b> <i>verbosity level</i>
5553 </pre>
5554 <dd> Reads in a matrix in the format of the Harwell-Boeing
5555 benchmark suite. The variables are ordered as follows:
5556 <blockquote>
5557 x[0] y[0] x[1] y[1] ...
5558 </blockquote>
5559 0 is the most significant bit. On input, nx and ny hold the numbers
5560 of row and column variables already in existence. On output, they
5561 hold the numbers of row and column variables actually used by the
5562 matrix. m and n are set to the numbers of rows and columns of the
5563 matrix. Their values on input are immaterial. Returns 1 on
5564 success; 0 otherwise. The ADD for the sparse matrix is returned in
5565 E, and its reference count is > 0.
5568 <dd> <b>Side Effects</b> None
5571 <dd> <b>See Also</b> <code><a href="#Cudd_addRead">Cudd_addRead</a>
5572 <a href="#Cudd_bddRead">Cudd_bddRead</a>
5573 </code>
5575 <dt><pre>
5576 <A NAME="Cudd_addIteConstant"></A>
5577 DdNode * <I></I>
5578 <B>Cudd_addIteConstant</B>(
5579 DdManager * <b>dd</b>, <i></i>
5580 DdNode * <b>f</b>, <i></i>
5581 DdNode * <b>g</b>, <i></i>
5582 DdNode * <b>h</b> <i></i>
5584 </pre>
5585 <dd> Implements ITEconstant for ADDs. f must be a 0-1 ADD.
5586 Returns a pointer to the resulting ADD (which may or may not be
5587 constant) or DD_NON_CONSTANT. No new nodes are created. This function
5588 can be used, for instance, to check that g has a constant value
5589 (specified by h) whenever f is 1. If the constant value is unknown,
5590 then one should use Cudd_addEvalConst.
5593 <dd> <b>Side Effects</b> None
5596 <dd> <b>See Also</b> <code><a href="#Cudd_addIte">Cudd_addIte</a>
5597 <a href="#Cudd_addEvalConst">Cudd_addEvalConst</a>
5598 <a href="#Cudd_bddIteConstant">Cudd_bddIteConstant</a>
5599 </code>
5601 <dt><pre>
5602 <A NAME="Cudd_addIte"></A>
5603 DdNode * <I></I>
5604 <B>Cudd_addIte</B>(
5605 DdManager * <b>dd</b>, <i></i>
5606 DdNode * <b>f</b>, <i></i>
5607 DdNode * <b>g</b>, <i></i>
5608 DdNode * <b>h</b> <i></i>
5610 </pre>
5611 <dd> Implements ITE(f,g,h). This procedure assumes that f is
5612 a 0-1 ADD. Returns a pointer to the resulting ADD if successful; NULL
5613 otherwise.
5616 <dd> <b>Side Effects</b> None
5619 <dd> <b>See Also</b> <code><a href="#Cudd_bddIte">Cudd_bddIte</a>
5620 <a href="#Cudd_addIteConstant">Cudd_addIteConstant</a>
5621 <a href="#Cudd_addApply">Cudd_addApply</a>
5622 </code>
5624 <dt><pre>
5625 <A NAME="Cudd_addIthBit"></A>
5626 DdNode * <I></I>
5627 <B>Cudd_addIthBit</B>(
5628 DdManager * <b>dd</b>, <i></i>
5629 DdNode * <b>f</b>, <i></i>
5630 int <b>bit</b> <i></i>
5632 </pre>
5633 <dd> Produces an ADD from another ADD by replacing all
5634 discriminants whose i-th bit is equal to 1 with 1, and all other
5635 discriminants with 0. The i-th bit refers to the integer
5636 representation of the leaf value. If the value is has a fractional
5637 part, it is ignored. Repeated calls to this procedure allow one to
5638 transform an integer-valued ADD into an array of ADDs, one for each
5639 bit of the leaf values. Returns a pointer to the resulting ADD if
5640 successful; NULL otherwise.
5643 <dd> <b>Side Effects</b> None
5646 <dd> <b>See Also</b> <code><a href="#Cudd_addBddIthBit">Cudd_addBddIthBit</a>
5647 </code>
5649 <dt><pre>
5650 <A NAME="Cudd_addIthVar"></A>
5651 DdNode * <I></I>
5652 <B>Cudd_addIthVar</B>(
5653 DdManager * <b>dd</b>, <i></i>
5654 int <b>i</b> <i></i>
5656 </pre>
5657 <dd> Retrieves the ADD variable with index i if it already
5658 exists, or creates a new ADD variable. Returns a pointer to the
5659 variable if successful; NULL otherwise. An ADD variable differs from
5660 a BDD variable because it points to the arithmetic zero, instead of
5661 having a complement pointer to 1.
5664 <dd> <b>Side Effects</b> None
5667 <dd> <b>See Also</b> <code><a href="#Cudd_addNewVar">Cudd_addNewVar</a>
5668 <a href="#Cudd_bddIthVar">Cudd_bddIthVar</a>
5669 <a href="#Cudd_addConst">Cudd_addConst</a>
5670 <a href="#Cudd_addNewVarAtLevel">Cudd_addNewVarAtLevel</a>
5671 </code>
5673 <dt><pre>
5674 <A NAME="Cudd_addLeq"></A>
5675 int <I></I>
5676 <B>Cudd_addLeq</B>(
5677 DdManager * <b>dd</b>, <i></i>
5678 DdNode * <b>f</b>, <i></i>
5679 DdNode * <b>g</b> <i></i>
5681 </pre>
5682 <dd> Returns 1 if f is less than or equal to g; 0 otherwise.
5683 No new nodes are created. This procedure works for arbitrary ADDs.
5684 For 0-1 ADDs Cudd_addEvalConst is more efficient.
5687 <dd> <b>Side Effects</b> None
5690 <dd> <b>See Also</b> <code><a href="#Cudd_addIteConstant">Cudd_addIteConstant</a>
5691 <a href="#Cudd_addEvalConst">Cudd_addEvalConst</a>
5692 <a href="#Cudd_bddLeq">Cudd_bddLeq</a>
5693 </code>
5695 <dt><pre>
5696 <A NAME="Cudd_addLog"></A>
5697 DdNode * <I></I>
5698 <B>Cudd_addLog</B>(
5699 DdManager * <b>dd</b>, <i></i>
5700 DdNode * <b>f</b> <i></i>
5702 </pre>
5703 <dd> Natural logarithm of an ADDs. Returns NULL
5704 if not a terminal case; log(f) otherwise. The discriminants of f must
5705 be positive double's.
5708 <dd> <b>Side Effects</b> None
5711 <dd> <b>See Also</b> <code><a href="#Cudd_addMonadicApply">Cudd_addMonadicApply</a>
5712 </code>
5714 <dt><pre>
5715 <A NAME="Cudd_addMatrixMultiply"></A>
5716 DdNode * <I></I>
5717 <B>Cudd_addMatrixMultiply</B>(
5718 DdManager * <b>dd</b>, <i></i>
5719 DdNode * <b>A</b>, <i></i>
5720 DdNode * <b>B</b>, <i></i>
5721 DdNode ** <b>z</b>, <i></i>
5722 int <b>nz</b> <i></i>
5724 </pre>
5725 <dd> Calculates the product of two matrices, A and B,
5726 represented as ADDs. This procedure implements the quasiring multiplication
5727 algorithm. A is assumed to depend on variables x (rows) and z
5728 (columns). B is assumed to depend on variables z (rows) and y
5729 (columns). The product of A and B then depends on x (rows) and y
5730 (columns). Only the z variables have to be explicitly identified;
5731 they are the "summation" variables. Returns a pointer to the
5732 result if successful; NULL otherwise.
5735 <dd> <b>Side Effects</b> None
5738 <dd> <b>See Also</b> <code><a href="#Cudd_addTimesPlus">Cudd_addTimesPlus</a>
5739 <a href="#Cudd_addTriangle">Cudd_addTriangle</a>
5740 <a href="#Cudd_bddAndAbstract">Cudd_bddAndAbstract</a>
5741 </code>
5743 <dt><pre>
5744 <A NAME="Cudd_addMaximum"></A>
5745 DdNode * <I></I>
5746 <B>Cudd_addMaximum</B>(
5747 DdManager * <b>dd</b>, <i></i>
5748 DdNode ** <b>f</b>, <i></i>
5749 DdNode ** <b>g</b> <i></i>
5751 </pre>
5752 <dd> Integer and floating point max for Cudd_addApply.
5753 Returns NULL if not a terminal case; max(f,g) otherwise.
5756 <dd> <b>Side Effects</b> None
5759 <dd> <b>See Also</b> <code><a href="#Cudd_addApply">Cudd_addApply</a>
5760 </code>
5762 <dt><pre>
5763 <A NAME="Cudd_addMinimum"></A>
5764 DdNode * <I></I>
5765 <B>Cudd_addMinimum</B>(
5766 DdManager * <b>dd</b>, <i></i>
5767 DdNode ** <b>f</b>, <i></i>
5768 DdNode ** <b>g</b> <i></i>
5770 </pre>
5771 <dd> Integer and floating point min for Cudd_addApply.
5772 Returns NULL if not a terminal case; min(f,g) otherwise.
5775 <dd> <b>Side Effects</b> None
5778 <dd> <b>See Also</b> <code><a href="#Cudd_addApply">Cudd_addApply</a>
5779 </code>
5781 <dt><pre>
5782 <A NAME="Cudd_addMinus"></A>
5783 DdNode * <I></I>
5784 <B>Cudd_addMinus</B>(
5785 DdManager * <b>dd</b>, <i></i>
5786 DdNode ** <b>f</b>, <i></i>
5787 DdNode ** <b>g</b> <i></i>
5789 </pre>
5790 <dd> Integer and floating point subtraction. Returns NULL if
5791 not a terminal case; f - g otherwise.
5794 <dd> <b>Side Effects</b> None
5797 <dd> <b>See Also</b> <code><a href="#Cudd_addApply">Cudd_addApply</a>
5798 </code>
5800 <dt><pre>
5801 <A NAME="Cudd_addMonadicApply"></A>
5802 DdNode * <I></I>
5803 <B>Cudd_addMonadicApply</B>(
5804 DdManager * <b>dd</b>, <i></i>
5805 DD_MAOP <b>op</b>, <i></i>
5806 DdNode * <b>f</b> <i></i>
5808 </pre>
5809 <dd> Applies op to the discriminants of f.
5810 Returns a pointer to the result if succssful; NULL otherwise.
5813 <dd> <b>Side Effects</b> None
5816 <dd> <b>See Also</b> <code><a href="#Cudd_addApply">Cudd_addApply</a>
5817 <a href="#Cudd_addLog">Cudd_addLog</a>
5818 </code>
5820 <dt><pre>
5821 <A NAME="Cudd_addNand"></A>
5822 DdNode * <I></I>
5823 <B>Cudd_addNand</B>(
5824 DdManager * <b>dd</b>, <i></i>
5825 DdNode ** <b>f</b>, <i></i>
5826 DdNode ** <b>g</b> <i></i>
5828 </pre>
5829 <dd> NAND of two 0-1 ADDs. Returns NULL
5830 if not a terminal case; f NAND g otherwise.
5833 <dd> <b>Side Effects</b> None
5836 <dd> <b>See Also</b> <code><a href="#Cudd_addApply">Cudd_addApply</a>
5837 </code>
5839 <dt><pre>
5840 <A NAME="Cudd_addNegate"></A>
5841 DdNode * <I></I>
5842 <B>Cudd_addNegate</B>(
5843 DdManager * <b>dd</b>, <i></i>
5844 DdNode * <b>f</b> <i></i>
5846 </pre>
5847 <dd> Computes the additive inverse of an ADD. Returns a pointer
5848 to the result if successful; NULL otherwise.
5851 <dd> <b>Side Effects</b> None
5854 <dd> <b>See Also</b> <code><a href="#Cudd_addCmpl">Cudd_addCmpl</a>
5855 </code>
5857 <dt><pre>
5858 <A NAME="Cudd_addNewVarAtLevel"></A>
5859 DdNode * <I></I>
5860 <B>Cudd_addNewVarAtLevel</B>(
5861 DdManager * <b>dd</b>, <i></i>
5862 int <b>level</b> <i></i>
5864 </pre>
5865 <dd> Creates a new ADD variable. The new variable has an
5866 index equal to the largest previous index plus 1 and is positioned at
5867 the specified level in the order. Returns a pointer to the new
5868 variable if successful; NULL otherwise.
5871 <dd> <b>Side Effects</b> None
5874 <dd> <b>See Also</b> <code><a href="#Cudd_addNewVar">Cudd_addNewVar</a>
5875 <a href="#Cudd_addIthVar">Cudd_addIthVar</a>
5876 <a href="#Cudd_bddNewVarAtLevel">Cudd_bddNewVarAtLevel</a>
5877 </code>
5879 <dt><pre>
5880 <A NAME="Cudd_addNewVar"></A>
5881 DdNode * <I></I>
5882 <B>Cudd_addNewVar</B>(
5883 DdManager * <b>dd</b> <i></i>
5885 </pre>
5886 <dd> Creates a new ADD variable. The new variable has an
5887 index equal to the largest previous index plus 1. Returns a
5888 pointer to the new variable if successful; NULL otherwise.
5889 An ADD variable differs from a BDD variable because it points to the
5890 arithmetic zero, instead of having a complement pointer to 1.
5893 <dd> <b>Side Effects</b> None
5896 <dd> <b>See Also</b> <code><a href="#Cudd_bddNewVar">Cudd_bddNewVar</a>
5897 <a href="#Cudd_addIthVar">Cudd_addIthVar</a>
5898 <a href="#Cudd_addConst">Cudd_addConst</a>
5899 <a href="#Cudd_addNewVarAtLevel">Cudd_addNewVarAtLevel</a>
5900 </code>
5902 <dt><pre>
5903 <A NAME="Cudd_addNonSimCompose"></A>
5904 DdNode * <I></I>
5905 <B>Cudd_addNonSimCompose</B>(
5906 DdManager * <b>dd</b>, <i></i>
5907 DdNode * <b>f</b>, <i></i>
5908 DdNode ** <b>vector</b> <i></i>
5910 </pre>
5911 <dd> Given a vector of 0-1 ADDs, creates a new ADD by
5912 substituting the 0-1 ADDs for the variables of the ADD f. There
5913 should be an entry in vector for each variable in the manager.
5914 This function implements non-simultaneous composition. If any of the
5915 functions being composed depends on any of the variables being
5916 substituted, then the result depends on the order of composition,
5917 which in turn depends on the variable order: The variables farther from
5918 the roots in the order are substituted first.
5919 Returns a pointer to the resulting ADD if successful; NULL
5920 otherwise.
5923 <dd> <b>Side Effects</b> None
5926 <dd> <b>See Also</b> <code><a href="#Cudd_addVectorCompose">Cudd_addVectorCompose</a>
5927 <a href="#Cudd_addPermute">Cudd_addPermute</a>
5928 <a href="#Cudd_addCompose">Cudd_addCompose</a>
5929 </code>
5931 <dt><pre>
5932 <A NAME="Cudd_addNor"></A>
5933 DdNode * <I></I>
5934 <B>Cudd_addNor</B>(
5935 DdManager * <b>dd</b>, <i></i>
5936 DdNode ** <b>f</b>, <i></i>
5937 DdNode ** <b>g</b> <i></i>
5939 </pre>
5940 <dd> NOR of two 0-1 ADDs. Returns NULL
5941 if not a terminal case; f NOR g otherwise.
5944 <dd> <b>Side Effects</b> None
5947 <dd> <b>See Also</b> <code><a href="#Cudd_addApply">Cudd_addApply</a>
5948 </code>
5950 <dt><pre>
5951 <A NAME="Cudd_addOneZeroMaximum"></A>
5952 DdNode * <I></I>
5953 <B>Cudd_addOneZeroMaximum</B>(
5954 DdManager * <b>dd</b>, <i></i>
5955 DdNode ** <b>f</b>, <i></i>
5956 DdNode ** <b>g</b> <i></i>
5958 </pre>
5959 <dd> Returns 1 if f &gt; g and 0 otherwise. Used in
5960 conjunction with Cudd_addApply. Returns NULL if not a terminal
5961 case.
5964 <dd> <b>Side Effects</b> None
5967 <dd> <b>See Also</b> <code><a href="#Cudd_addApply">Cudd_addApply</a>
5968 </code>
5970 <dt><pre>
5971 <A NAME="Cudd_addOrAbstract"></A>
5972 DdNode * <I></I>
5973 <B>Cudd_addOrAbstract</B>(
5974 DdManager * <b>manager</b>, <i></i>
5975 DdNode * <b>f</b>, <i></i>
5976 DdNode * <b>cube</b> <i></i>
5978 </pre>
5979 <dd> Abstracts all the variables in cube from the 0-1 ADD f
5980 by taking the disjunction over all possible values taken by the
5981 variables. Returns the abstracted ADD if successful; NULL
5982 otherwise.
5985 <dd> <b>Side Effects</b> None
5988 <dd> <b>See Also</b> <code><a href="#Cudd_addUnivAbstract">Cudd_addUnivAbstract</a>
5989 <a href="#Cudd_addExistAbstract">Cudd_addExistAbstract</a>
5990 </code>
5992 <dt><pre>
5993 <A NAME="Cudd_addOr"></A>
5994 DdNode * <I></I>
5995 <B>Cudd_addOr</B>(
5996 DdManager * <b>dd</b>, <i></i>
5997 DdNode ** <b>f</b>, <i></i>
5998 DdNode ** <b>g</b> <i></i>
6000 </pre>
6001 <dd> Disjunction of two 0-1 ADDs. Returns NULL
6002 if not a terminal case; f OR g otherwise.
6005 <dd> <b>Side Effects</b> None
6008 <dd> <b>See Also</b> <code><a href="#Cudd_addApply">Cudd_addApply</a>
6009 </code>
6011 <dt><pre>
6012 <A NAME="Cudd_addOuterSum"></A>
6013 DdNode * <I></I>
6014 <B>Cudd_addOuterSum</B>(
6015 DdManager * <b>dd</b>, <i></i>
6016 DdNode * <b>M</b>, <i></i>
6017 DdNode * <b>r</b>, <i></i>
6018 DdNode * <b>c</b> <i></i>
6020 </pre>
6021 <dd> Takes the pointwise minimum of a matrix and the outer
6022 sum of two vectors. This procedure is used in the Floyd-Warshall
6023 all-pair shortest path algorithm. Returns a pointer to the result if
6024 successful; NULL otherwise.
6027 <dd> <b>Side Effects</b> None
6030 <dt><pre>
6031 <A NAME="Cudd_addPermute"></A>
6032 DdNode * <I></I>
6033 <B>Cudd_addPermute</B>(
6034 DdManager * <b>manager</b>, <i></i>
6035 DdNode * <b>node</b>, <i></i>
6036 int * <b>permut</b> <i></i>
6038 </pre>
6039 <dd> Given a permutation in array permut, creates a new ADD
6040 with permuted variables. There should be an entry in array permut
6041 for each variable in the manager. The i-th entry of permut holds the
6042 index of the variable that is to substitute the i-th
6043 variable. Returns a pointer to the resulting ADD if successful; NULL
6044 otherwise.
6047 <dd> <b>Side Effects</b> None
6050 <dd> <b>See Also</b> <code><a href="#Cudd_bddPermute">Cudd_bddPermute</a>
6051 <a href="#Cudd_addSwapVariables">Cudd_addSwapVariables</a>
6052 </code>
6054 <dt><pre>
6055 <A NAME="Cudd_addPlus"></A>
6056 DdNode * <I></I>
6057 <B>Cudd_addPlus</B>(
6058 DdManager * <b>dd</b>, <i></i>
6059 DdNode ** <b>f</b>, <i></i>
6060 DdNode ** <b>g</b> <i></i>
6062 </pre>
6063 <dd> Integer and floating point addition. Returns NULL if not
6064 a terminal case; f+g otherwise.
6067 <dd> <b>Side Effects</b> None
6070 <dd> <b>See Also</b> <code><a href="#Cudd_addApply">Cudd_addApply</a>
6071 </code>
6073 <dt><pre>
6074 <A NAME="Cudd_addRead"></A>
6075 int <I></I>
6076 <B>Cudd_addRead</B>(
6077 FILE * <b>fp</b>, <i>input file pointer</i>
6078 DdManager * <b>dd</b>, <i>DD manager</i>
6079 DdNode ** <b>E</b>, <i>characteristic function of the graph</i>
6080 DdNode *** <b>x</b>, <i>array of row variables</i>
6081 DdNode *** <b>y</b>, <i>array of column variables</i>
6082 DdNode *** <b>xn</b>, <i>array of complemented row variables</i>
6083 DdNode *** <b>yn_</b>, <i>array of complemented column variables</i>
6084 int * <b>nx</b>, <i>number or row variables</i>
6085 int * <b>ny</b>, <i>number or column variables</i>
6086 int * <b>m</b>, <i>number of rows</i>
6087 int * <b>n</b>, <i>number of columns</i>
6088 int <b>bx</b>, <i>first index of row variables</i>
6089 int <b>sx</b>, <i>step of row variables</i>
6090 int <b>by</b>, <i>first index of column variables</i>
6091 int <b>sy</b> <i>step of column variables</i>
6093 </pre>
6094 <dd> Reads in a sparse matrix specified in a simple format.
6095 The first line of the input contains the numbers of rows and columns.
6096 The remaining lines contain the elements of the matrix, one per line.
6097 Given a background value
6098 (specified by the background field of the manager), only the values
6099 different from it are explicitly listed. Each foreground element is
6100 described by two integers, i.e., the row and column number, and a
6101 real number, i.e., the value.<p>
6102 Cudd_addRead produces an ADD that depends on two sets of variables: x
6103 and y. The x variables (x[0] ... x[nx-1]) encode the row index and
6104 the y variables (y[0] ... y[ny-1]) encode the column index.
6105 x[0] and y[0] are the most significant bits in the indices.
6106 The variables may already exist or may be created by the function.
6107 The index of x[i] is bx+i*sx, and the index of y[i] is by+i*sy.<p>
6108 On input, nx and ny hold the numbers
6109 of row and column variables already in existence. On output, they
6110 hold the numbers of row and column variables actually used by the
6111 matrix. When Cudd_addRead creates the variable arrays,
6112 the index of x[i] is bx+i*sx, and the index of y[i] is by+i*sy.
6113 When some variables already exist Cudd_addRead expects the indices
6114 of the existing x variables to be bx+i*sx, and the indices of the
6115 existing y variables to be by+i*sy.<p>
6116 m and n are set to the numbers of rows and columns of the
6117 matrix. Their values on input are immaterial.
6118 The ADD for the
6119 sparse matrix is returned in E, and its reference count is > 0.
6120 Cudd_addRead returns 1 in case of success; 0 otherwise.
6123 <dd> <b>Side Effects</b> nx and ny are set to the numbers of row and column
6124 variables. m and n are set to the numbers of rows and columns. x and y
6125 are possibly extended to represent the array of row and column
6126 variables. Similarly for xn and yn_, which hold on return from
6127 Cudd_addRead the complements of the row and column variables.
6130 <dd> <b>See Also</b> <code><a href="#Cudd_addHarwell">Cudd_addHarwell</a>
6131 <a href="#Cudd_bddRead">Cudd_bddRead</a>
6132 </code>
6134 <dt><pre>
6135 <A NAME="Cudd_addResidue"></A>
6136 DdNode * <I></I>
6137 <B>Cudd_addResidue</B>(
6138 DdManager * <b>dd</b>, <i>manager</i>
6139 int <b>n</b>, <i>number of bits</i>
6140 int <b>m</b>, <i>modulus</i>
6141 int <b>options</b>, <i>options</i>
6142 int <b>top</b> <i>index of top variable</i>
6144 </pre>
6145 <dd> Builds an ADD for the residue modulo m of an n-bit
6146 number. The modulus must be at least 2, and the number of bits at
6147 least 1. Parameter options specifies whether the MSB should be on top
6148 or the LSB; and whther the number whose residue is computed is in
6149 two's complement notation or not. The macro CUDD_RESIDUE_DEFAULT
6150 specifies LSB on top and unsigned number. The macro CUDD_RESIDUE_MSB
6151 specifies MSB on top, and the macro CUDD_RESIDUE_TC specifies two's
6152 complement residue. To request MSB on top and two's complement residue
6153 simultaneously, one can OR the two macros:
6154 CUDD_RESIDUE_MSB | CUDD_RESIDUE_TC.
6155 Cudd_addResidue returns a pointer to the resulting ADD if successful;
6156 NULL otherwise.
6159 <dd> <b>Side Effects</b> None
6162 <dt><pre>
6163 <A NAME="Cudd_addRestrict"></A>
6164 DdNode * <I></I>
6165 <B>Cudd_addRestrict</B>(
6166 DdManager * <b>dd</b>, <i></i>
6167 DdNode * <b>f</b>, <i></i>
6168 DdNode * <b>c</b> <i></i>
6170 </pre>
6171 <dd> ADD restrict according to Coudert and Madre's algorithm
6172 (ICCAD90). Returns the restricted ADD if successful; otherwise NULL.
6173 If application of restrict results in an ADD larger than the input
6174 ADD, the input ADD is returned.
6177 <dd> <b>Side Effects</b> None
6180 <dd> <b>See Also</b> <code><a href="#Cudd_addConstrain">Cudd_addConstrain</a>
6181 <a href="#Cudd_bddRestrict">Cudd_bddRestrict</a>
6182 </code>
6184 <dt><pre>
6185 <A NAME="Cudd_addRoundOff"></A>
6186 DdNode * <I></I>
6187 <B>Cudd_addRoundOff</B>(
6188 DdManager * <b>dd</b>, <i></i>
6189 DdNode * <b>f</b>, <i></i>
6190 int <b>N</b> <i></i>
6192 </pre>
6193 <dd> Rounds off the discriminants of an ADD. The discriminants are
6194 rounded off to N digits after the decimal. Returns a pointer to the result
6195 ADD if successful; NULL otherwise.
6198 <dd> <b>Side Effects</b> None
6201 <dt><pre>
6202 <A NAME="Cudd_addScalarInverse"></A>
6203 DdNode * <I></I>
6204 <B>Cudd_addScalarInverse</B>(
6205 DdManager * <b>dd</b>, <i></i>
6206 DdNode * <b>f</b>, <i></i>
6207 DdNode * <b>epsilon</b> <i></i>
6209 </pre>
6210 <dd> Computes an n ADD where the discriminants are the
6211 multiplicative inverses of the corresponding discriminants of the
6212 argument ADD. Returns a pointer to the resulting ADD in case of
6213 success. Returns NULL if any discriminants smaller than epsilon is
6214 encountered.
6217 <dd> <b>Side Effects</b> None
6220 <dt><pre>
6221 <A NAME="Cudd_addSetNZ"></A>
6222 DdNode * <I></I>
6223 <B>Cudd_addSetNZ</B>(
6224 DdManager * <b>dd</b>, <i></i>
6225 DdNode ** <b>f</b>, <i></i>
6226 DdNode ** <b>g</b> <i></i>
6228 </pre>
6229 <dd> This operator sets f to the value of g wherever g != 0.
6230 Returns NULL if not a terminal case; f op g otherwise.
6233 <dd> <b>Side Effects</b> None
6236 <dd> <b>See Also</b> <code><a href="#Cudd_addApply">Cudd_addApply</a>
6237 </code>
6239 <dt><pre>
6240 <A NAME="Cudd_addSwapVariables"></A>
6241 DdNode * <I></I>
6242 <B>Cudd_addSwapVariables</B>(
6243 DdManager * <b>dd</b>, <i></i>
6244 DdNode * <b>f</b>, <i></i>
6245 DdNode ** <b>x</b>, <i></i>
6246 DdNode ** <b>y</b>, <i></i>
6247 int <b>n</b> <i></i>
6249 </pre>
6250 <dd> Swaps two sets of variables of the same size (x and y) in
6251 the ADD f. The size is given by n. The two sets of variables are
6252 assumed to be disjoint. Returns a pointer to the resulting ADD if
6253 successful; NULL otherwise.
6256 <dd> <b>Side Effects</b> None
6259 <dd> <b>See Also</b> <code><a href="#Cudd_addPermute">Cudd_addPermute</a>
6260 <a href="#Cudd_bddSwapVariables">Cudd_bddSwapVariables</a>
6261 </code>
6263 <dt><pre>
6264 <A NAME="Cudd_addThreshold"></A>
6265 DdNode * <I></I>
6266 <B>Cudd_addThreshold</B>(
6267 DdManager * <b>dd</b>, <i></i>
6268 DdNode ** <b>f</b>, <i></i>
6269 DdNode ** <b>g</b> <i></i>
6271 </pre>
6272 <dd> Threshold operator for Apply (f if f &gt;=g; 0 if f&lt;g).
6273 Returns NULL if not a terminal case; f op g otherwise.
6276 <dd> <b>Side Effects</b> None
6279 <dd> <b>See Also</b> <code><a href="#Cudd_addApply">Cudd_addApply</a>
6280 </code>
6282 <dt><pre>
6283 <A NAME="Cudd_addTimesPlus"></A>
6284 DdNode * <I></I>
6285 <B>Cudd_addTimesPlus</B>(
6286 DdManager * <b>dd</b>, <i></i>
6287 DdNode * <b>A</b>, <i></i>
6288 DdNode * <b>B</b>, <i></i>
6289 DdNode ** <b>z</b>, <i></i>
6290 int <b>nz</b> <i></i>
6292 </pre>
6293 <dd> Calculates the product of two matrices, A and B,
6294 represented as ADDs, using the CMU matrix by matrix multiplication
6295 procedure by Clarke et al.. Matrix A has x's as row variables and z's
6296 as column variables, while matrix B has z's as row variables and y's
6297 as column variables. Returns the pointer to the result if successful;
6298 NULL otherwise. The resulting matrix has x's as row variables and y's
6299 as column variables.
6302 <dd> <b>Side Effects</b> None
6305 <dd> <b>See Also</b> <code><a href="#Cudd_addMatrixMultiply">Cudd_addMatrixMultiply</a>
6306 </code>
6308 <dt><pre>
6309 <A NAME="Cudd_addTimes"></A>
6310 DdNode * <I></I>
6311 <B>Cudd_addTimes</B>(
6312 DdManager * <b>dd</b>, <i></i>
6313 DdNode ** <b>f</b>, <i></i>
6314 DdNode ** <b>g</b> <i></i>
6316 </pre>
6317 <dd> Integer and floating point multiplication. Returns NULL
6318 if not a terminal case; f * g otherwise. This function can be used also
6319 to take the AND of two 0-1 ADDs.
6322 <dd> <b>Side Effects</b> None
6325 <dd> <b>See Also</b> <code><a href="#Cudd_addApply">Cudd_addApply</a>
6326 </code>
6328 <dt><pre>
6329 <A NAME="Cudd_addTriangle"></A>
6330 DdNode * <I></I>
6331 <B>Cudd_addTriangle</B>(
6332 DdManager * <b>dd</b>, <i></i>
6333 DdNode * <b>f</b>, <i></i>
6334 DdNode * <b>g</b>, <i></i>
6335 DdNode ** <b>z</b>, <i></i>
6336 int <b>nz</b> <i></i>
6338 </pre>
6339 <dd> Implements the semiring multiplication algorithm used in
6340 the triangulation step for the shortest path computation. f
6341 is assumed to depend on variables x (rows) and z (columns). g is
6342 assumed to depend on variables z (rows) and y (columns). The product
6343 of f and g then depends on x (rows) and y (columns). Only the z
6344 variables have to be explicitly identified; they are the
6345 "abstraction" variables. Returns a pointer to the result if
6346 successful; NULL otherwise.
6349 <dd> <b>Side Effects</b> None
6352 <dd> <b>See Also</b> <code><a href="#Cudd_addMatrixMultiply">Cudd_addMatrixMultiply</a>
6353 <a href="#Cudd_bddAndAbstract">Cudd_bddAndAbstract</a>
6354 </code>
6356 <dt><pre>
6357 <A NAME="Cudd_addUnivAbstract"></A>
6358 DdNode * <I></I>
6359 <B>Cudd_addUnivAbstract</B>(
6360 DdManager * <b>manager</b>, <i></i>
6361 DdNode * <b>f</b>, <i></i>
6362 DdNode * <b>cube</b> <i></i>
6364 </pre>
6365 <dd> Abstracts all the variables in cube from f by taking
6366 the product over all possible values taken by the variable. Returns
6367 the abstracted ADD if successful; NULL otherwise.
6370 <dd> <b>Side Effects</b> None
6373 <dd> <b>See Also</b> <code><a href="#Cudd_addExistAbstract">Cudd_addExistAbstract</a>
6374 <a href="#Cudd_bddUnivAbstract">Cudd_bddUnivAbstract</a>
6375 <a href="#Cudd_addOrAbstract">Cudd_addOrAbstract</a>
6376 </code>
6378 <dt><pre>
6379 <A NAME="Cudd_addVectorCompose"></A>
6380 DdNode * <I></I>
6381 <B>Cudd_addVectorCompose</B>(
6382 DdManager * <b>dd</b>, <i></i>
6383 DdNode * <b>f</b>, <i></i>
6384 DdNode ** <b>vector</b> <i></i>
6386 </pre>
6387 <dd> Given a vector of 0-1 ADDs, creates a new ADD by
6388 substituting the 0-1 ADDs for the variables of the ADD f. There
6389 should be an entry in vector for each variable in the manager.
6390 If no substitution is sought for a given variable, the corresponding
6391 projection function should be specified in the vector.
6392 This function implements simultaneous composition.
6393 Returns a pointer to the resulting ADD if successful; NULL
6394 otherwise.
6397 <dd> <b>Side Effects</b> None
6400 <dd> <b>See Also</b> <code><a href="#Cudd_addNonSimCompose">Cudd_addNonSimCompose</a>
6401 <a href="#Cudd_addPermute">Cudd_addPermute</a>
6402 <a href="#Cudd_addCompose">Cudd_addCompose</a>
6403 <a href="#Cudd_bddVectorCompose">Cudd_bddVectorCompose</a>
6404 </code>
6406 <dt><pre>
6407 <A NAME="Cudd_addWalsh"></A>
6408 DdNode * <I></I>
6409 <B>Cudd_addWalsh</B>(
6410 DdManager * <b>dd</b>, <i></i>
6411 DdNode ** <b>x</b>, <i></i>
6412 DdNode ** <b>y</b>, <i></i>
6413 int <b>n</b> <i></i>
6415 </pre>
6416 <dd> Generates a Walsh matrix in ADD form. Returns a pointer
6417 to the matrixi if successful; NULL otherwise.
6420 <dd> <b>Side Effects</b> None
6423 <dt><pre>
6424 <A NAME="Cudd_addXeqy"></A>
6425 DdNode * <I></I>
6426 <B>Cudd_addXeqy</B>(
6427 DdManager * <b>dd</b>, <i>DD manager</i>
6428 int <b>N</b>, <i>number of x and y variables</i>
6429 DdNode ** <b>x</b>, <i>array of x variables</i>
6430 DdNode ** <b>y</b> <i>array of y variables</i>
6432 </pre>
6433 <dd> This function generates an ADD for the function x==y.
6434 Both x and y are N-bit numbers, x[0] x[1] ... x[N-1] and
6435 y[0] y[1] ... y[N-1], with 0 the most significant bit.
6436 The ADD is built bottom-up.
6437 It has 3*N-1 internal nodes, if the variables are ordered as follows:
6438 x[0] y[0] x[1] y[1] ... x[N-1] y[N-1].
6441 <dd> <b>Side Effects</b> None
6444 <dd> <b>See Also</b> <code><a href="#Cudd_Xeqy">Cudd_Xeqy</a>
6445 </code>
6447 <dt><pre>
6448 <A NAME="Cudd_addXnor"></A>
6449 DdNode * <I></I>
6450 <B>Cudd_addXnor</B>(
6451 DdManager * <b>dd</b>, <i></i>
6452 DdNode ** <b>f</b>, <i></i>
6453 DdNode ** <b>g</b> <i></i>
6455 </pre>
6456 <dd> XNOR of two 0-1 ADDs. Returns NULL
6457 if not a terminal case; f XNOR g otherwise.
6460 <dd> <b>Side Effects</b> None
6463 <dd> <b>See Also</b> <code><a href="#Cudd_addApply">Cudd_addApply</a>
6464 </code>
6466 <dt><pre>
6467 <A NAME="Cudd_addXor"></A>
6468 DdNode * <I></I>
6469 <B>Cudd_addXor</B>(
6470 DdManager * <b>dd</b>, <i></i>
6471 DdNode ** <b>f</b>, <i></i>
6472 DdNode ** <b>g</b> <i></i>
6474 </pre>
6475 <dd> XOR of two 0-1 ADDs. Returns NULL
6476 if not a terminal case; f XOR g otherwise.
6479 <dd> <b>Side Effects</b> None
6482 <dd> <b>See Also</b> <code><a href="#Cudd_addApply">Cudd_addApply</a>
6483 </code>
6485 <dt><pre>
6486 <A NAME="Cudd_bddAdjPermuteX"></A>
6487 DdNode * <I></I>
6488 <B>Cudd_bddAdjPermuteX</B>(
6489 DdManager * <b>dd</b>, <i></i>
6490 DdNode * <b>B</b>, <i></i>
6491 DdNode ** <b>x</b>, <i></i>
6492 int <b>n</b> <i></i>
6494 </pre>
6495 <dd> Rearranges a set of variables in the BDD B. The size of
6496 the set is given by n. This procedure is intended for the
6497 `randomization' of the priority functions. Returns a pointer to the
6498 BDD if successful; NULL otherwise.
6501 <dd> <b>Side Effects</b> None
6504 <dd> <b>See Also</b> <code><a href="#Cudd_bddPermute">Cudd_bddPermute</a>
6505 <a href="#Cudd_bddSwapVariables">Cudd_bddSwapVariables</a>
6506 <a href="#Cudd_Dxygtdxz">Cudd_Dxygtdxz</a>
6507 <a href="#Cudd_Dxygtdyz">Cudd_Dxygtdyz</a>
6508 <a href="#Cudd_PrioritySelect">Cudd_PrioritySelect</a>
6509 </code>
6511 <dt><pre>
6512 <A NAME="Cudd_bddAndAbstractLimit"></A>
6513 DdNode * <I></I>
6514 <B>Cudd_bddAndAbstractLimit</B>(
6515 DdManager * <b>manager</b>, <i></i>
6516 DdNode * <b>f</b>, <i></i>
6517 DdNode * <b>g</b>, <i></i>
6518 DdNode * <b>cube</b>, <i></i>
6519 unsigned int <b>limit</b> <i></i>
6521 </pre>
6522 <dd> Takes the AND of two BDDs and simultaneously abstracts
6523 the variables in cube. The variables are existentially abstracted.
6524 Returns a pointer to the result is successful; NULL otherwise.
6525 In particular, if the number of new nodes created exceeds
6526 <code>limit</code>, this function returns NULL.
6529 <dd> <b>Side Effects</b> None
6532 <dd> <b>See Also</b> <code><a href="#Cudd_bddAndAbstract">Cudd_bddAndAbstract</a>
6533 </code>
6535 <dt><pre>
6536 <A NAME="Cudd_bddAndAbstract"></A>
6537 DdNode * <I></I>
6538 <B>Cudd_bddAndAbstract</B>(
6539 DdManager * <b>manager</b>, <i></i>
6540 DdNode * <b>f</b>, <i></i>
6541 DdNode * <b>g</b>, <i></i>
6542 DdNode * <b>cube</b> <i></i>
6544 </pre>
6545 <dd> Takes the AND of two BDDs and simultaneously abstracts
6546 the variables in cube. The variables are existentially abstracted.
6547 Returns a pointer to the result is successful; NULL otherwise.
6548 Cudd_bddAndAbstract implements the semiring matrix multiplication
6549 algorithm for the boolean semiring.
6552 <dd> <b>Side Effects</b> None
6555 <dd> <b>See Also</b> <code><a href="#Cudd_addMatrixMultiply">Cudd_addMatrixMultiply</a>
6556 <a href="#Cudd_addTriangle">Cudd_addTriangle</a>
6557 <a href="#Cudd_bddAnd">Cudd_bddAnd</a>
6558 </code>
6560 <dt><pre>
6561 <A NAME="Cudd_bddAndLimit"></A>
6562 DdNode * <I></I>
6563 <B>Cudd_bddAndLimit</B>(
6564 DdManager * <b>dd</b>, <i></i>
6565 DdNode * <b>f</b>, <i></i>
6566 DdNode * <b>g</b>, <i></i>
6567 unsigned int <b>limit</b> <i></i>
6569 </pre>
6570 <dd> Computes the conjunction of two BDDs f and g. Returns a
6571 pointer to the resulting BDD if successful; NULL if the intermediate
6572 result blows up or more new nodes than <code>limit</code> are
6573 required.
6576 <dd> <b>Side Effects</b> None
6579 <dd> <b>See Also</b> <code><a href="#Cudd_bddAnd">Cudd_bddAnd</a>
6580 </code>
6582 <dt><pre>
6583 <A NAME="Cudd_bddAnd"></A>
6584 DdNode * <I></I>
6585 <B>Cudd_bddAnd</B>(
6586 DdManager * <b>dd</b>, <i></i>
6587 DdNode * <b>f</b>, <i></i>
6588 DdNode * <b>g</b> <i></i>
6590 </pre>
6591 <dd> Computes the conjunction of two BDDs f and g. Returns a
6592 pointer to the resulting BDD if successful; NULL if the intermediate
6593 result blows up.
6596 <dd> <b>Side Effects</b> None
6599 <dd> <b>See Also</b> <code><a href="#Cudd_bddIte">Cudd_bddIte</a>
6600 <a href="#Cudd_addApply">Cudd_addApply</a>
6601 <a href="#Cudd_bddAndAbstract">Cudd_bddAndAbstract</a>
6602 <a href="#Cudd_bddIntersect">Cudd_bddIntersect</a>
6603 <a href="#Cudd_bddOr">Cudd_bddOr</a>
6604 <a href="#Cudd_bddNand">Cudd_bddNand</a>
6605 <a href="#Cudd_bddNor">Cudd_bddNor</a>
6606 <a href="#Cudd_bddXor">Cudd_bddXor</a>
6607 <a href="#Cudd_bddXnor">Cudd_bddXnor</a>
6608 </code>
6610 <dt><pre>
6611 <A NAME="Cudd_bddApproxConjDecomp"></A>
6612 int <I></I>
6613 <B>Cudd_bddApproxConjDecomp</B>(
6614 DdManager * <b>dd</b>, <i>manager</i>
6615 DdNode * <b>f</b>, <i>function to be decomposed</i>
6616 DdNode *** <b>conjuncts</b> <i>address of the first factor</i>
6618 </pre>
6619 <dd> Performs two-way conjunctive decomposition of a
6620 BDD. This procedure owes its name to the use of supersetting to
6621 obtain an initial factor of the given function. Returns the number
6622 of conjuncts produced, that is, 2 if successful; 1 if no meaningful
6623 decomposition was found; 0 otherwise. The conjuncts produced by this
6624 procedure tend to be imbalanced.
6627 <dd> <b>Side Effects</b> The factors are returned in an array as side effects.
6628 The array is allocated by this function. It is the caller's responsibility
6629 to free it. On successful completion, the conjuncts are already
6630 referenced. If the function returns 0, the array for the conjuncts is
6631 not allocated. If the function returns 1, the only factor equals the
6632 function to be decomposed.
6635 <dd> <b>See Also</b> <code><a href="#Cudd_bddApproxDisjDecomp">Cudd_bddApproxDisjDecomp</a>
6636 <a href="#Cudd_bddIterConjDecomp">Cudd_bddIterConjDecomp</a>
6637 <a href="#Cudd_bddGenConjDecomp">Cudd_bddGenConjDecomp</a>
6638 <a href="#Cudd_bddVarConjDecomp">Cudd_bddVarConjDecomp</a>
6639 <a href="#Cudd_RemapOverApprox">Cudd_RemapOverApprox</a>
6640 <a href="#Cudd_bddSqueeze">Cudd_bddSqueeze</a>
6641 <a href="#Cudd_bddLICompaction">Cudd_bddLICompaction</a>
6642 </code>
6644 <dt><pre>
6645 <A NAME="Cudd_bddApproxDisjDecomp"></A>
6646 int <I></I>
6647 <B>Cudd_bddApproxDisjDecomp</B>(
6648 DdManager * <b>dd</b>, <i>manager</i>
6649 DdNode * <b>f</b>, <i>function to be decomposed</i>
6650 DdNode *** <b>disjuncts</b> <i>address of the array of the disjuncts</i>
6652 </pre>
6653 <dd> Performs two-way disjunctive decomposition of a BDD.
6654 Returns the number of disjuncts produced, that is, 2 if successful;
6655 1 if no meaningful decomposition was found; 0 otherwise. The
6656 disjuncts produced by this procedure tend to be imbalanced.
6659 <dd> <b>Side Effects</b> The two disjuncts are returned in an array as side effects.
6660 The array is allocated by this function. It is the caller's responsibility
6661 to free it. On successful completion, the disjuncts are already
6662 referenced. If the function returns 0, the array for the disjuncts is
6663 not allocated. If the function returns 1, the only factor equals the
6664 function to be decomposed.
6667 <dd> <b>See Also</b> <code><a href="#Cudd_bddApproxConjDecomp">Cudd_bddApproxConjDecomp</a>
6668 <a href="#Cudd_bddIterDisjDecomp">Cudd_bddIterDisjDecomp</a>
6669 <a href="#Cudd_bddGenDisjDecomp">Cudd_bddGenDisjDecomp</a>
6670 <a href="#Cudd_bddVarDisjDecomp">Cudd_bddVarDisjDecomp</a>
6671 </code>
6673 <dt><pre>
6674 <A NAME="Cudd_bddBindVar"></A>
6675 int <I></I>
6676 <B>Cudd_bddBindVar</B>(
6677 DdManager * <b>dd</b>, <i>manager</i>
6678 int <b>index</b> <i>variable index</i>
6680 </pre>
6681 <dd> This function sets a flag to prevent sifting of a
6682 variable. Returns 1 if successful; 0 otherwise (i.e., invalid
6683 variable index).
6686 <dd> <b>Side Effects</b> Changes the "bindVar" flag in DdSubtable.
6689 <dd> <b>See Also</b> <code><a href="#Cudd_bddUnbindVar">Cudd_bddUnbindVar</a>
6690 </code>
6692 <dt><pre>
6693 <A NAME="Cudd_bddBooleanDiff"></A>
6694 DdNode * <I></I>
6695 <B>Cudd_bddBooleanDiff</B>(
6696 DdManager * <b>manager</b>, <i></i>
6697 DdNode * <b>f</b>, <i></i>
6698 int <b>x</b> <i></i>
6700 </pre>
6701 <dd> Computes the boolean difference of f with respect to the
6702 variable with index x. Returns the BDD of the boolean difference if
6703 successful; NULL otherwise.
6706 <dd> <b>Side Effects</b> None
6709 <dt><pre>
6710 <A NAME="Cudd_bddCharToVect"></A>
6711 DdNode ** <I></I>
6712 <B>Cudd_bddCharToVect</B>(
6713 DdManager * <b>dd</b>, <i></i>
6714 DdNode * <b>f</b> <i></i>
6716 </pre>
6717 <dd> Computes a vector of BDDs whose image equals a non-zero
6718 function.
6719 The result depends on the variable order. The i-th component of the vector
6720 depends only on the first i variables in the order. Each BDD in the vector
6721 is not larger than the BDD of the given characteristic function. This
6722 function is based on the description of char-to-vect in "Verification of
6723 Sequential Machines Using Boolean Functional Vectors" by O. Coudert, C.
6724 Berthet and J. C. Madre.
6725 Returns a pointer to an array containing the result if successful; NULL
6726 otherwise. The size of the array equals the number of variables in the
6727 manager. The components of the solution have their reference counts
6728 already incremented (unlike the results of most other functions in
6729 the package).
6732 <dd> <b>Side Effects</b> None
6735 <dd> <b>See Also</b> <code><a href="#Cudd_bddConstrain">Cudd_bddConstrain</a>
6736 </code>
6738 <dt><pre>
6739 <A NAME="Cudd_bddClippingAndAbstract"></A>
6740 DdNode * <I></I>
6741 <B>Cudd_bddClippingAndAbstract</B>(
6742 DdManager * <b>dd</b>, <i>manager</i>
6743 DdNode * <b>f</b>, <i>first conjunct</i>
6744 DdNode * <b>g</b>, <i>second conjunct</i>
6745 DdNode * <b>cube</b>, <i>cube of variables to be abstracted</i>
6746 int <b>maxDepth</b>, <i>maximum recursion depth</i>
6747 int <b>direction</b> <i>under (0) or over (1) approximation</i>
6749 </pre>
6750 <dd> Approximates the conjunction of two BDDs f and g and
6751 simultaneously abstracts the variables in cube. The variables are
6752 existentially abstracted. Returns a pointer to the resulting BDD if
6753 successful; NULL if the intermediate result blows up.
6756 <dd> <b>Side Effects</b> None
6759 <dd> <b>See Also</b> <code><a href="#Cudd_bddAndAbstract">Cudd_bddAndAbstract</a>
6760 <a href="#Cudd_bddClippingAnd">Cudd_bddClippingAnd</a>
6761 </code>
6763 <dt><pre>
6764 <A NAME="Cudd_bddClippingAnd"></A>
6765 DdNode * <I></I>
6766 <B>Cudd_bddClippingAnd</B>(
6767 DdManager * <b>dd</b>, <i>manager</i>
6768 DdNode * <b>f</b>, <i>first conjunct</i>
6769 DdNode * <b>g</b>, <i>second conjunct</i>
6770 int <b>maxDepth</b>, <i>maximum recursion depth</i>
6771 int <b>direction</b> <i>under (0) or over (1) approximation</i>
6773 </pre>
6774 <dd> Approximates the conjunction of two BDDs f and g. Returns a
6775 pointer to the resulting BDD if successful; NULL if the intermediate
6776 result blows up.
6779 <dd> <b>Side Effects</b> None
6782 <dd> <b>See Also</b> <code><a href="#Cudd_bddAnd">Cudd_bddAnd</a>
6783 </code>
6785 <dt><pre>
6786 <A NAME="Cudd_bddClosestCube"></A>
6787 DdNode * <I></I>
6788 <B>Cudd_bddClosestCube</B>(
6789 DdManager * <b>dd</b>, <i></i>
6790 DdNode * <b>f</b>, <i></i>
6791 DdNode * <b>g</b>, <i></i>
6792 int * <b>distance</b> <i></i>
6794 </pre>
6795 <dd> Finds a cube of f at minimum Hamming distance from the
6796 minterms of g. All the minterms of the cube are at the minimum
6797 distance. If the distance is 0, the cube belongs to the
6798 intersection of f and g. Returns the cube if successful; NULL
6799 otherwise.
6802 <dd> <b>Side Effects</b> The distance is returned as a side effect.
6805 <dd> <b>See Also</b> <code><a href="#Cudd_MinHammingDist">Cudd_MinHammingDist</a>
6806 </code>
6808 <dt><pre>
6809 <A NAME="Cudd_bddCompose"></A>
6810 DdNode * <I></I>
6811 <B>Cudd_bddCompose</B>(
6812 DdManager * <b>dd</b>, <i></i>
6813 DdNode * <b>f</b>, <i></i>
6814 DdNode * <b>g</b>, <i></i>
6815 int <b>v</b> <i></i>
6817 </pre>
6818 <dd> Substitutes g for x_v in the BDD for f. v is the index of the
6819 variable to be substituted. Cudd_bddCompose passes the corresponding
6820 projection function to the recursive procedure, so that the cache may
6821 be used. Returns the composed BDD if successful; NULL otherwise.
6824 <dd> <b>Side Effects</b> None
6827 <dd> <b>See Also</b> <code><a href="#Cudd_addCompose">Cudd_addCompose</a>
6828 </code>
6830 <dt><pre>
6831 <A NAME="Cudd_bddComputeCube"></A>
6832 DdNode * <I></I>
6833 <B>Cudd_bddComputeCube</B>(
6834 DdManager * <b>dd</b>, <i></i>
6835 DdNode ** <b>vars</b>, <i></i>
6836 int * <b>phase</b>, <i></i>
6837 int <b>n</b> <i></i>
6839 </pre>
6840 <dd> Computes the cube of an array of BDD variables. If
6841 non-null, the phase argument indicates which literal of each
6842 variable should appear in the cube. If phase[i] is nonzero, then the
6843 positive literal is used. If phase is NULL, the cube is positive unate.
6844 Returns a pointer to the result if successful; NULL otherwise.
6847 <dd> <b>Side Effects</b> None
6850 <dd> <b>See Also</b> <code><a href="#Cudd_addComputeCube">Cudd_addComputeCube</a>
6851 <a href="#Cudd_IndicesToCube">Cudd_IndicesToCube</a>
6852 <a href="#Cudd_CubeArrayToBdd">Cudd_CubeArrayToBdd</a>
6853 </code>
6855 <dt><pre>
6856 <A NAME="Cudd_bddConstrainDecomp"></A>
6857 DdNode ** <I></I>
6858 <B>Cudd_bddConstrainDecomp</B>(
6859 DdManager * <b>dd</b>, <i></i>
6860 DdNode * <b>f</b> <i></i>
6862 </pre>
6863 <dd> BDD conjunctive decomposition as in McMillan's CAV96
6864 paper. The decomposition is canonical only for a given variable
6865 order. If canonicity is required, variable ordering must be disabled
6866 after the decomposition has been computed. Returns an array with one
6867 entry for each BDD variable in the manager if successful; otherwise
6868 NULL. The components of the solution have their reference counts
6869 already incremented (unlike the results of most other functions in
6870 the package.
6873 <dd> <b>Side Effects</b> None
6876 <dd> <b>See Also</b> <code><a href="#Cudd_bddConstrain">Cudd_bddConstrain</a>
6877 <a href="#Cudd_bddExistAbstract">Cudd_bddExistAbstract</a>
6878 </code>
6880 <dt><pre>
6881 <A NAME="Cudd_bddConstrain"></A>
6882 DdNode * <I></I>
6883 <B>Cudd_bddConstrain</B>(
6884 DdManager * <b>dd</b>, <i></i>
6885 DdNode * <b>f</b>, <i></i>
6886 DdNode * <b>c</b> <i></i>
6888 </pre>
6889 <dd> Computes f constrain c (f @ c).
6890 Uses a canonical form: (f' @ c) = ( f @ c)'. (Note: this is not true
6891 for c.) List of special cases:
6892 <ul>
6893 <li> f @ 0 = 0
6894 <li> f @ 1 = f
6895 <li> 0 @ c = 0
6896 <li> 1 @ c = 1
6897 <li> f @ f = 1
6898 <li> f @ f'= 0
6899 </ul>
6900 Returns a pointer to the result if successful; NULL otherwise. Note that if
6901 F=(f1,...,fn) and reordering takes place while computing F @ c, then the
6902 image restriction property (Img(F,c) = Img(F @ c)) is lost.
6905 <dd> <b>Side Effects</b> None
6908 <dd> <b>See Also</b> <code><a href="#Cudd_bddRestrict">Cudd_bddRestrict</a>
6909 <a href="#Cudd_addConstrain">Cudd_addConstrain</a>
6910 </code>
6912 <dt><pre>
6913 <A NAME="Cudd_bddCorrelationWeights"></A>
6914 double <I></I>
6915 <B>Cudd_bddCorrelationWeights</B>(
6916 DdManager * <b>manager</b>, <i></i>
6917 DdNode * <b>f</b>, <i></i>
6918 DdNode * <b>g</b>, <i></i>
6919 double * <b>prob</b> <i></i>
6921 </pre>
6922 <dd> Computes the correlation of f and g for given input
6923 probabilities. On input, prob[i] is supposed to contain the
6924 probability of the i-th input variable to be 1.
6925 If f == g, their correlation is 1. If f == g', their
6926 correlation is 0. Returns the probability that f and g have the same
6927 value. If it runs out of memory, returns (double)CUDD_OUT_OF_MEM. The
6928 correlation of f and the constant one gives the probability of f.
6931 <dd> <b>Side Effects</b> None
6934 <dd> <b>See Also</b> <code><a href="#Cudd_bddCorrelation">Cudd_bddCorrelation</a>
6935 </code>
6937 <dt><pre>
6938 <A NAME="Cudd_bddCorrelation"></A>
6939 double <I></I>
6940 <B>Cudd_bddCorrelation</B>(
6941 DdManager * <b>manager</b>, <i></i>
6942 DdNode * <b>f</b>, <i></i>
6943 DdNode * <b>g</b> <i></i>
6945 </pre>
6946 <dd> Computes the correlation of f and g. If f == g, their
6947 correlation is 1. If f == g', their correlation is 0. Returns the
6948 fraction of minterms in the ON-set of the EXNOR of f and g. If it
6949 runs out of memory, returns (double)CUDD_OUT_OF_MEM.
6952 <dd> <b>Side Effects</b> None
6955 <dd> <b>See Also</b> <code><a href="#Cudd_bddCorrelationWeights">Cudd_bddCorrelationWeights</a>
6956 </code>
6958 <dt><pre>
6959 <A NAME="Cudd_bddExistAbstract"></A>
6960 DdNode * <I></I>
6961 <B>Cudd_bddExistAbstract</B>(
6962 DdManager * <b>manager</b>, <i></i>
6963 DdNode * <b>f</b>, <i></i>
6964 DdNode * <b>cube</b> <i></i>
6966 </pre>
6967 <dd> Existentially abstracts all the variables in cube from f.
6968 Returns the abstracted BDD if successful; NULL otherwise.
6971 <dd> <b>Side Effects</b> None
6974 <dd> <b>See Also</b> <code><a href="#Cudd_bddUnivAbstract">Cudd_bddUnivAbstract</a>
6975 <a href="#Cudd_addExistAbstract">Cudd_addExistAbstract</a>
6976 </code>
6978 <dt><pre>
6979 <A NAME="Cudd_bddGenConjDecomp"></A>
6980 int <I></I>
6981 <B>Cudd_bddGenConjDecomp</B>(
6982 DdManager * <b>dd</b>, <i>manager</i>
6983 DdNode * <b>f</b>, <i>function to be decomposed</i>
6984 DdNode *** <b>conjuncts</b> <i>address of the array of conjuncts</i>
6986 </pre>
6987 <dd> Performs two-way conjunctive decomposition of a
6988 BDD. This procedure owes its name to the fact tht it generalizes the
6989 decomposition based on the cofactors with respect to one
6990 variable. Returns the number of conjuncts produced, that is, 2 if
6991 successful; 1 if no meaningful decomposition was found; 0
6992 otherwise. The conjuncts produced by this procedure tend to be
6993 balanced.
6996 <dd> <b>Side Effects</b> The two factors are returned in an array as side effects.
6997 The array is allocated by this function. It is the caller's responsibility
6998 to free it. On successful completion, the conjuncts are already
6999 referenced. If the function returns 0, the array for the conjuncts is
7000 not allocated. If the function returns 1, the only factor equals the
7001 function to be decomposed.
7004 <dd> <b>See Also</b> <code><a href="#Cudd_bddGenDisjDecomp">Cudd_bddGenDisjDecomp</a>
7005 <a href="#Cudd_bddApproxConjDecomp">Cudd_bddApproxConjDecomp</a>
7006 <a href="#Cudd_bddIterConjDecomp">Cudd_bddIterConjDecomp</a>
7007 <a href="#Cudd_bddVarConjDecomp">Cudd_bddVarConjDecomp</a>
7008 </code>
7010 <dt><pre>
7011 <A NAME="Cudd_bddGenDisjDecomp"></A>
7012 int <I></I>
7013 <B>Cudd_bddGenDisjDecomp</B>(
7014 DdManager * <b>dd</b>, <i>manager</i>
7015 DdNode * <b>f</b>, <i>function to be decomposed</i>
7016 DdNode *** <b>disjuncts</b> <i>address of the array of the disjuncts</i>
7018 </pre>
7019 <dd> Performs two-way disjunctive decomposition of a BDD.
7020 Returns the number of disjuncts produced, that is, 2 if successful;
7021 1 if no meaningful decomposition was found; 0 otherwise. The
7022 disjuncts produced by this procedure tend to be balanced.
7025 <dd> <b>Side Effects</b> The two disjuncts are returned in an array as side effects.
7026 The array is allocated by this function. It is the caller's responsibility
7027 to free it. On successful completion, the disjuncts are already
7028 referenced. If the function returns 0, the array for the disjuncts is
7029 not allocated. If the function returns 1, the only factor equals the
7030 function to be decomposed.
7033 <dd> <b>See Also</b> <code><a href="#Cudd_bddGenConjDecomp">Cudd_bddGenConjDecomp</a>
7034 <a href="#Cudd_bddApproxDisjDecomp">Cudd_bddApproxDisjDecomp</a>
7035 <a href="#Cudd_bddIterDisjDecomp">Cudd_bddIterDisjDecomp</a>
7036 <a href="#Cudd_bddVarDisjDecomp">Cudd_bddVarDisjDecomp</a>
7037 </code>
7039 <dt><pre>
7040 <A NAME="Cudd_bddIntersect"></A>
7041 DdNode * <I></I>
7042 <B>Cudd_bddIntersect</B>(
7043 DdManager * <b>dd</b>, <i>manager</i>
7044 DdNode * <b>f</b>, <i>first operand</i>
7045 DdNode * <b>g</b> <i>second operand</i>
7047 </pre>
7048 <dd> Computes a function included in the intersection of f and
7049 g. (That is, a witness that the intersection is not empty.)
7050 Cudd_bddIntersect tries to build as few new nodes as possible. If the
7051 only result of interest is whether f and g intersect,
7052 Cudd_bddLeq should be used instead.
7055 <dd> <b>Side Effects</b> None
7058 <dd> <b>See Also</b> <code><a href="#Cudd_bddLeq">Cudd_bddLeq</a>
7059 <a href="#Cudd_bddIteConstant">Cudd_bddIteConstant</a>
7060 </code>
7062 <dt><pre>
7063 <A NAME="Cudd_bddInterval"></A>
7064 DdNode * <I></I>
7065 <B>Cudd_bddInterval</B>(
7066 DdManager * <b>dd</b>, <i>DD manager</i>
7067 int <b>N</b>, <i>number of x variables</i>
7068 DdNode ** <b>x</b>, <i>array of x variables</i>
7069 unsigned int <b>lowerB</b>, <i>lower bound</i>
7070 unsigned int <b>upperB</b> <i>upper bound</i>
7072 </pre>
7073 <dd> This function generates a BDD for the function
7074 lowerB &le; x &le; upperB, where x is an N-bit number,
7075 x[0] x[1] ... x[N-1], with 0 the most significant bit (important!).
7076 The number of variables N should be sufficient to represent the bounds;
7077 otherwise, the bounds are truncated to their N least significant bits.
7078 Two BDDs are built bottom-up for lowerB &le; x and x &le; upperB, and they
7079 are finally conjoined.
7082 <dd> <b>Side Effects</b> None
7085 <dd> <b>See Also</b> <code><a href="#Cudd_Xgty">Cudd_Xgty</a>
7086 </code>
7088 <dt><pre>
7089 <A NAME="Cudd_bddIsNsVar"></A>
7090 int <I></I>
7091 <B>Cudd_bddIsNsVar</B>(
7092 DdManager * <b>dd</b>, <i></i>
7093 int <b>index</b> <i></i>
7095 </pre>
7096 <dd> Checks whether a variable is next state. Returns 1 if
7097 the variable's type is present state; 0 if the variable exists but is
7098 not a present state; -1 if the variable does not exist.
7101 <dd> <b>Side Effects</b> none
7104 <dd> <b>See Also</b> <code><a href="#Cudd_bddSetNsVar">Cudd_bddSetNsVar</a>
7105 <a href="#Cudd_bddIsPiVar">Cudd_bddIsPiVar</a>
7106 <a href="#Cudd_bddIsPsVar">Cudd_bddIsPsVar</a>
7107 </code>
7109 <dt><pre>
7110 <A NAME="Cudd_bddIsPiVar"></A>
7111 int <I></I>
7112 <B>Cudd_bddIsPiVar</B>(
7113 DdManager * <b>dd</b>, <i>manager</i>
7114 int <b>index</b> <i>variable index</i>
7116 </pre>
7117 <dd> Checks whether a variable is primary input. Returns 1 if
7118 the variable's type is primary input; 0 if the variable exists but is
7119 not a primary input; -1 if the variable does not exist.
7122 <dd> <b>Side Effects</b> none
7125 <dd> <b>See Also</b> <code><a href="#Cudd_bddSetPiVar">Cudd_bddSetPiVar</a>
7126 <a href="#Cudd_bddIsPsVar">Cudd_bddIsPsVar</a>
7127 <a href="#Cudd_bddIsNsVar">Cudd_bddIsNsVar</a>
7128 </code>
7130 <dt><pre>
7131 <A NAME="Cudd_bddIsPsVar"></A>
7132 int <I></I>
7133 <B>Cudd_bddIsPsVar</B>(
7134 DdManager * <b>dd</b>, <i></i>
7135 int <b>index</b> <i></i>
7137 </pre>
7138 <dd> Checks whether a variable is present state. Returns 1 if
7139 the variable's type is present state; 0 if the variable exists but is
7140 not a present state; -1 if the variable does not exist.
7143 <dd> <b>Side Effects</b> none
7146 <dd> <b>See Also</b> <code><a href="#Cudd_bddSetPsVar">Cudd_bddSetPsVar</a>
7147 <a href="#Cudd_bddIsPiVar">Cudd_bddIsPiVar</a>
7148 <a href="#Cudd_bddIsNsVar">Cudd_bddIsNsVar</a>
7149 </code>
7151 <dt><pre>
7152 <A NAME="Cudd_bddIsVarEssential"></A>
7153 int <I></I>
7154 <B>Cudd_bddIsVarEssential</B>(
7155 DdManager * <b>manager</b>, <i></i>
7156 DdNode * <b>f</b>, <i></i>
7157 int <b>id</b>, <i></i>
7158 int <b>phase</b> <i></i>
7160 </pre>
7161 <dd> Determines whether a given variable is essential with a
7162 given phase in a BDD. Uses Cudd_bddIteConstant. Returns 1 if phase == 1
7163 and f-->x_id, or if phase == 0 and f-->x_id'.
7166 <dd> <b>Side Effects</b> None
7169 <dd> <b>See Also</b> <code><a href="#Cudd_FindEssential">Cudd_FindEssential</a>
7170 </code>
7172 <dt><pre>
7173 <A NAME="Cudd_bddIsVarHardGroup"></A>
7174 int <I></I>
7175 <B>Cudd_bddIsVarHardGroup</B>(
7176 DdManager * <b>dd</b>, <i></i>
7177 int <b>index</b> <i></i>
7179 </pre>
7180 <dd> Checks whether a variable is set to be in a hard group. This
7181 function is used for lazy sifting. Returns 1 if the variable is marked
7182 to be in a hard group; 0 if the variable exists, but it is not marked to be
7183 in a hard group; -1 if the variable does not exist.
7186 <dd> <b>Side Effects</b> none
7189 <dd> <b>See Also</b> <code><a href="#Cudd_bddSetVarHardGroup">Cudd_bddSetVarHardGroup</a>
7190 </code>
7192 <dt><pre>
7193 <A NAME="Cudd_bddIsVarToBeGrouped"></A>
7194 int <I></I>
7195 <B>Cudd_bddIsVarToBeGrouped</B>(
7196 DdManager * <b>dd</b>, <i></i>
7197 int <b>index</b> <i></i>
7199 </pre>
7200 <dd> Checks whether a variable is set to be grouped. This
7201 function is used for lazy sifting.
7204 <dd> <b>Side Effects</b> none
7207 <dt><pre>
7208 <A NAME="Cudd_bddIsVarToBeUngrouped"></A>
7209 int <I></I>
7210 <B>Cudd_bddIsVarToBeUngrouped</B>(
7211 DdManager * <b>dd</b>, <i></i>
7212 int <b>index</b> <i></i>
7214 </pre>
7215 <dd> Checks whether a variable is set to be ungrouped. This
7216 function is used for lazy sifting. Returns 1 if the variable is marked
7217 to be ungrouped; 0 if the variable exists, but it is not marked to be
7218 ungrouped; -1 if the variable does not exist.
7221 <dd> <b>Side Effects</b> none
7224 <dd> <b>See Also</b> <code><a href="#Cudd_bddSetVarToBeUngrouped">Cudd_bddSetVarToBeUngrouped</a>
7225 </code>
7227 <dt><pre>
7228 <A NAME="Cudd_bddIsop"></A>
7229 DdNode * <I></I>
7230 <B>Cudd_bddIsop</B>(
7231 DdManager * <b>dd</b>, <i></i>
7232 DdNode * <b>L</b>, <i></i>
7233 DdNode * <b>U</b> <i></i>
7235 </pre>
7236 <dd> Computes a BDD in the interval between L and U with a
7237 simple sum-of-produuct cover. This procedure is similar to
7238 Cudd_zddIsop, but it does not return the ZDD for the cover. Returns
7239 a pointer to the BDD if successful; NULL otherwise.
7242 <dd> <b>Side Effects</b> None
7245 <dd> <b>See Also</b> <code><a href="#Cudd_zddIsop">Cudd_zddIsop</a>
7246 </code>
7248 <dt><pre>
7249 <A NAME="Cudd_bddIteConstant"></A>
7250 DdNode * <I></I>
7251 <B>Cudd_bddIteConstant</B>(
7252 DdManager * <b>dd</b>, <i></i>
7253 DdNode * <b>f</b>, <i></i>
7254 DdNode * <b>g</b>, <i></i>
7255 DdNode * <b>h</b> <i></i>
7257 </pre>
7258 <dd> Implements ITEconstant(f,g,h). Returns a pointer to the
7259 resulting BDD (which may or may not be constant) or DD_NON_CONSTANT.
7260 No new nodes are created.
7263 <dd> <b>Side Effects</b> None
7266 <dd> <b>See Also</b> <code><a href="#Cudd_bddIte">Cudd_bddIte</a>
7267 <a href="#Cudd_bddIntersect">Cudd_bddIntersect</a>
7268 <a href="#Cudd_bddLeq">Cudd_bddLeq</a>
7269 <a href="#Cudd_addIteConstant">Cudd_addIteConstant</a>
7270 </code>
7272 <dt><pre>
7273 <A NAME="Cudd_bddIterConjDecomp"></A>
7274 int <I></I>
7275 <B>Cudd_bddIterConjDecomp</B>(
7276 DdManager * <b>dd</b>, <i>manager</i>
7277 DdNode * <b>f</b>, <i>function to be decomposed</i>
7278 DdNode *** <b>conjuncts</b> <i>address of the array of conjuncts</i>
7280 </pre>
7281 <dd> Performs two-way conjunctive decomposition of a
7282 BDD. This procedure owes its name to the iterated use of
7283 supersetting to obtain a factor of the given function. Returns the
7284 number of conjuncts produced, that is, 2 if successful; 1 if no
7285 meaningful decomposition was found; 0 otherwise. The conjuncts
7286 produced by this procedure tend to be imbalanced.
7289 <dd> <b>Side Effects</b> The factors are returned in an array as side effects.
7290 The array is allocated by this function. It is the caller's responsibility
7291 to free it. On successful completion, the conjuncts are already
7292 referenced. If the function returns 0, the array for the conjuncts is
7293 not allocated. If the function returns 1, the only factor equals the
7294 function to be decomposed.
7297 <dd> <b>See Also</b> <code><a href="#Cudd_bddIterDisjDecomp">Cudd_bddIterDisjDecomp</a>
7298 <a href="#Cudd_bddApproxConjDecomp">Cudd_bddApproxConjDecomp</a>
7299 <a href="#Cudd_bddGenConjDecomp">Cudd_bddGenConjDecomp</a>
7300 <a href="#Cudd_bddVarConjDecomp">Cudd_bddVarConjDecomp</a>
7301 <a href="#Cudd_RemapOverApprox">Cudd_RemapOverApprox</a>
7302 <a href="#Cudd_bddSqueeze">Cudd_bddSqueeze</a>
7303 <a href="#Cudd_bddLICompaction">Cudd_bddLICompaction</a>
7304 </code>
7306 <dt><pre>
7307 <A NAME="Cudd_bddIterDisjDecomp"></A>
7308 int <I></I>
7309 <B>Cudd_bddIterDisjDecomp</B>(
7310 DdManager * <b>dd</b>, <i>manager</i>
7311 DdNode * <b>f</b>, <i>function to be decomposed</i>
7312 DdNode *** <b>disjuncts</b> <i>address of the array of the disjuncts</i>
7314 </pre>
7315 <dd> Performs two-way disjunctive decomposition of a BDD.
7316 Returns the number of disjuncts produced, that is, 2 if successful;
7317 1 if no meaningful decomposition was found; 0 otherwise. The
7318 disjuncts produced by this procedure tend to be imbalanced.
7321 <dd> <b>Side Effects</b> The two disjuncts are returned in an array as side effects.
7322 The array is allocated by this function. It is the caller's responsibility
7323 to free it. On successful completion, the disjuncts are already
7324 referenced. If the function returns 0, the array for the disjuncts is
7325 not allocated. If the function returns 1, the only factor equals the
7326 function to be decomposed.
7329 <dd> <b>See Also</b> <code><a href="#Cudd_bddIterConjDecomp">Cudd_bddIterConjDecomp</a>
7330 <a href="#Cudd_bddApproxDisjDecomp">Cudd_bddApproxDisjDecomp</a>
7331 <a href="#Cudd_bddGenDisjDecomp">Cudd_bddGenDisjDecomp</a>
7332 <a href="#Cudd_bddVarDisjDecomp">Cudd_bddVarDisjDecomp</a>
7333 </code>
7335 <dt><pre>
7336 <A NAME="Cudd_bddIte"></A>
7337 DdNode * <I></I>
7338 <B>Cudd_bddIte</B>(
7339 DdManager * <b>dd</b>, <i></i>
7340 DdNode * <b>f</b>, <i></i>
7341 DdNode * <b>g</b>, <i></i>
7342 DdNode * <b>h</b> <i></i>
7344 </pre>
7345 <dd> Implements ITE(f,g,h). Returns a pointer to the
7346 resulting BDD if successful; NULL if the intermediate result blows
7350 <dd> <b>Side Effects</b> None
7353 <dd> <b>See Also</b> <code><a href="#Cudd_addIte">Cudd_addIte</a>
7354 <a href="#Cudd_bddIteConstant">Cudd_bddIteConstant</a>
7355 <a href="#Cudd_bddIntersect">Cudd_bddIntersect</a>
7356 </code>
7358 <dt><pre>
7359 <A NAME="Cudd_bddIthVar"></A>
7360 DdNode * <I></I>
7361 <B>Cudd_bddIthVar</B>(
7362 DdManager * <b>dd</b>, <i></i>
7363 int <b>i</b> <i></i>
7365 </pre>
7366 <dd> Retrieves the BDD variable with index i if it already
7367 exists, or creates a new BDD variable. Returns a pointer to the
7368 variable if successful; NULL otherwise.
7371 <dd> <b>Side Effects</b> None
7374 <dd> <b>See Also</b> <code><a href="#Cudd_bddNewVar">Cudd_bddNewVar</a>
7375 <a href="#Cudd_addIthVar">Cudd_addIthVar</a>
7376 <a href="#Cudd_bddNewVarAtLevel">Cudd_bddNewVarAtLevel</a>
7377 <a href="#Cudd_ReadVars">Cudd_ReadVars</a>
7378 </code>
7380 <dt><pre>
7381 <A NAME="Cudd_bddLICompaction"></A>
7382 DdNode * <I></I>
7383 <B>Cudd_bddLICompaction</B>(
7384 DdManager * <b>dd</b>, <i>manager</i>
7385 DdNode * <b>f</b>, <i>function to be minimized</i>
7386 DdNode * <b>c</b> <i>constraint (care set)</i>
7388 </pre>
7389 <dd> Performs safe minimization of a BDD. Given the BDD
7390 <code>f</code> of a function to be minimized and a BDD
7391 <code>c</code> representing the care set, Cudd_bddLICompaction
7392 produces the BDD of a function that agrees with <code>f</code>
7393 wherever <code>c</code> is 1. Safe minimization means that the size
7394 of the result is guaranteed not to exceed the size of
7395 <code>f</code>. This function is based on the DAC97 paper by Hong et
7396 al.. Returns a pointer to the result if successful; NULL
7397 otherwise.
7400 <dd> <b>Side Effects</b> None
7403 <dd> <b>See Also</b> <code><a href="#Cudd_bddRestrict">Cudd_bddRestrict</a>
7404 </code>
7406 <dt><pre>
7407 <A NAME="Cudd_bddLeqUnless"></A>
7408 int <I></I>
7409 <B>Cudd_bddLeqUnless</B>(
7410 DdManager * <b>dd</b>, <i></i>
7411 DdNode * <b>f</b>, <i></i>
7412 DdNode * <b>g</b>, <i></i>
7413 DdNode * <b>D</b> <i></i>
7415 </pre>
7416 <dd> Tells whether f is less than of equal to G unless D is
7417 1. f, g, and D are BDDs. The function returns 1 if f is less than
7418 of equal to G, and 0 otherwise. No new nodes are created.
7421 <dd> <b>Side Effects</b> None
7424 <dd> <b>See Also</b> <code><a href="#Cudd_EquivDC">Cudd_EquivDC</a>
7425 <a href="#Cudd_bddLeq">Cudd_bddLeq</a>
7426 <a href="#Cudd_bddIteConstant">Cudd_bddIteConstant</a>
7427 </code>
7429 <dt><pre>
7430 <A NAME="Cudd_bddLeq"></A>
7431 int <I></I>
7432 <B>Cudd_bddLeq</B>(
7433 DdManager * <b>dd</b>, <i></i>
7434 DdNode * <b>f</b>, <i></i>
7435 DdNode * <b>g</b> <i></i>
7437 </pre>
7438 <dd> Returns 1 if f is less than or equal to g; 0 otherwise.
7439 No new nodes are created.
7442 <dd> <b>Side Effects</b> None
7445 <dd> <b>See Also</b> <code><a href="#Cudd_bddIteConstant">Cudd_bddIteConstant</a>
7446 <a href="#Cudd_addEvalConst">Cudd_addEvalConst</a>
7447 </code>
7449 <dt><pre>
7450 <A NAME="Cudd_bddLiteralSetIntersection"></A>
7451 DdNode * <I></I>
7452 <B>Cudd_bddLiteralSetIntersection</B>(
7453 DdManager * <b>dd</b>, <i></i>
7454 DdNode * <b>f</b>, <i></i>
7455 DdNode * <b>g</b> <i></i>
7457 </pre>
7458 <dd> Computes the intesection of two sets of literals
7459 represented as BDDs. Each set is represented as a cube of the
7460 literals in the set. The empty set is represented by the constant 1.
7461 No variable can be simultaneously present in both phases in a set.
7462 Returns a pointer to the BDD representing the intersected sets, if
7463 successful; NULL otherwise.
7466 <dd> <b>Side Effects</b> None
7469 <dt><pre>
7470 <A NAME="Cudd_bddMakePrime"></A>
7471 DdNode * <I></I>
7472 <B>Cudd_bddMakePrime</B>(
7473 DdManager * <b>dd</b>, <i>manager</i>
7474 DdNode * <b>cube</b>, <i>cube to be expanded</i>
7475 DdNode * <b>f</b> <i>function of which the cube is to be made a prime</i>
7477 </pre>
7478 <dd> Expands cube to a prime implicant of f. Returns the prime
7479 if successful; NULL otherwise. In particular, NULL is returned if cube
7480 is not a real cube or is not an implicant of f.
7483 <dd> <b>Side Effects</b> None
7486 <dt><pre>
7487 <A NAME="Cudd_bddMinimize"></A>
7488 DdNode * <I></I>
7489 <B>Cudd_bddMinimize</B>(
7490 DdManager * <b>dd</b>, <i></i>
7491 DdNode * <b>f</b>, <i></i>
7492 DdNode * <b>c</b> <i></i>
7494 </pre>
7495 <dd> Finds a small BDD that agrees with <code>f</code> over
7496 <code>c</code>. Returns a pointer to the result if successful; NULL
7497 otherwise.
7500 <dd> <b>Side Effects</b> None
7503 <dd> <b>See Also</b> <code><a href="#Cudd_bddRestrict">Cudd_bddRestrict</a>
7504 <a href="#Cudd_bddLICompaction">Cudd_bddLICompaction</a>
7505 <a href="#Cudd_bddSqueeze">Cudd_bddSqueeze</a>
7506 </code>
7508 <dt><pre>
7509 <A NAME="Cudd_bddNPAnd"></A>
7510 DdNode * <I></I>
7511 <B>Cudd_bddNPAnd</B>(
7512 DdManager * <b>dd</b>, <i></i>
7513 DdNode * <b>f</b>, <i></i>
7514 DdNode * <b>g</b> <i></i>
7516 </pre>
7517 <dd> Computes f non-polluting-and g. The non-polluting AND
7518 of f and g is a hybrid of AND and Restrict. From Restrict, this
7519 operation takes the idea of existentially quantifying the top
7520 variable of the second operand if it does not appear in the first.
7521 Therefore, the variables that appear in the result also appear in f.
7522 For the rest, the function behaves like AND. Since the two operands
7523 play different roles, non-polluting AND is not commutative.
7525 Returns a pointer to the result if successful; NULL otherwise.
7528 <dd> <b>Side Effects</b> None
7531 <dd> <b>See Also</b> <code><a href="#Cudd_bddConstrain">Cudd_bddConstrain</a>
7532 <a href="#Cudd_bddRestrict">Cudd_bddRestrict</a>
7533 </code>
7535 <dt><pre>
7536 <A NAME="Cudd_bddNand"></A>
7537 DdNode * <I></I>
7538 <B>Cudd_bddNand</B>(
7539 DdManager * <b>dd</b>, <i></i>
7540 DdNode * <b>f</b>, <i></i>
7541 DdNode * <b>g</b> <i></i>
7543 </pre>
7544 <dd> Computes the NAND of two BDDs f and g. Returns a
7545 pointer to the resulting BDD if successful; NULL if the intermediate
7546 result blows up.
7549 <dd> <b>Side Effects</b> None
7552 <dd> <b>See Also</b> <code><a href="#Cudd_bddIte">Cudd_bddIte</a>
7553 <a href="#Cudd_addApply">Cudd_addApply</a>
7554 <a href="#Cudd_bddAnd">Cudd_bddAnd</a>
7555 <a href="#Cudd_bddOr">Cudd_bddOr</a>
7556 <a href="#Cudd_bddNor">Cudd_bddNor</a>
7557 <a href="#Cudd_bddXor">Cudd_bddXor</a>
7558 <a href="#Cudd_bddXnor">Cudd_bddXnor</a>
7559 </code>
7561 <dt><pre>
7562 <A NAME="Cudd_bddNewVarAtLevel"></A>
7563 DdNode * <I></I>
7564 <B>Cudd_bddNewVarAtLevel</B>(
7565 DdManager * <b>dd</b>, <i></i>
7566 int <b>level</b> <i></i>
7568 </pre>
7569 <dd> Creates a new BDD variable. The new variable has an
7570 index equal to the largest previous index plus 1 and is positioned at
7571 the specified level in the order. Returns a pointer to the new
7572 variable if successful; NULL otherwise.
7575 <dd> <b>Side Effects</b> None
7578 <dd> <b>See Also</b> <code><a href="#Cudd_bddNewVar">Cudd_bddNewVar</a>
7579 <a href="#Cudd_bddIthVar">Cudd_bddIthVar</a>
7580 <a href="#Cudd_addNewVarAtLevel">Cudd_addNewVarAtLevel</a>
7581 </code>
7583 <dt><pre>
7584 <A NAME="Cudd_bddNewVar"></A>
7585 DdNode * <I></I>
7586 <B>Cudd_bddNewVar</B>(
7587 DdManager * <b>dd</b> <i></i>
7589 </pre>
7590 <dd> Creates a new BDD variable. The new variable has an
7591 index equal to the largest previous index plus 1. Returns a
7592 pointer to the new variable if successful; NULL otherwise.
7595 <dd> <b>Side Effects</b> None
7598 <dd> <b>See Also</b> <code><a href="#Cudd_addNewVar">Cudd_addNewVar</a>
7599 <a href="#Cudd_bddIthVar">Cudd_bddIthVar</a>
7600 <a href="#Cudd_bddNewVarAtLevel">Cudd_bddNewVarAtLevel</a>
7601 </code>
7603 <dt><pre>
7604 <A NAME="Cudd_bddNor"></A>
7605 DdNode * <I></I>
7606 <B>Cudd_bddNor</B>(
7607 DdManager * <b>dd</b>, <i></i>
7608 DdNode * <b>f</b>, <i></i>
7609 DdNode * <b>g</b> <i></i>
7611 </pre>
7612 <dd> Computes the NOR of two BDDs f and g. Returns a
7613 pointer to the resulting BDD if successful; NULL if the intermediate
7614 result blows up.
7617 <dd> <b>Side Effects</b> None
7620 <dd> <b>See Also</b> <code><a href="#Cudd_bddIte">Cudd_bddIte</a>
7621 <a href="#Cudd_addApply">Cudd_addApply</a>
7622 <a href="#Cudd_bddAnd">Cudd_bddAnd</a>
7623 <a href="#Cudd_bddOr">Cudd_bddOr</a>
7624 <a href="#Cudd_bddNand">Cudd_bddNand</a>
7625 <a href="#Cudd_bddXor">Cudd_bddXor</a>
7626 <a href="#Cudd_bddXnor">Cudd_bddXnor</a>
7627 </code>
7629 <dt><pre>
7630 <A NAME="Cudd_bddOr"></A>
7631 DdNode * <I></I>
7632 <B>Cudd_bddOr</B>(
7633 DdManager * <b>dd</b>, <i></i>
7634 DdNode * <b>f</b>, <i></i>
7635 DdNode * <b>g</b> <i></i>
7637 </pre>
7638 <dd> Computes the disjunction of two BDDs f and g. Returns a
7639 pointer to the resulting BDD if successful; NULL if the intermediate
7640 result blows up.
7643 <dd> <b>Side Effects</b> None
7646 <dd> <b>See Also</b> <code><a href="#Cudd_bddIte">Cudd_bddIte</a>
7647 <a href="#Cudd_addApply">Cudd_addApply</a>
7648 <a href="#Cudd_bddAnd">Cudd_bddAnd</a>
7649 <a href="#Cudd_bddNand">Cudd_bddNand</a>
7650 <a href="#Cudd_bddNor">Cudd_bddNor</a>
7651 <a href="#Cudd_bddXor">Cudd_bddXor</a>
7652 <a href="#Cudd_bddXnor">Cudd_bddXnor</a>
7653 </code>
7655 <dt><pre>
7656 <A NAME="Cudd_bddPermute"></A>
7657 DdNode * <I></I>
7658 <B>Cudd_bddPermute</B>(
7659 DdManager * <b>manager</b>, <i></i>
7660 DdNode * <b>node</b>, <i></i>
7661 int * <b>permut</b> <i></i>
7663 </pre>
7664 <dd> Given a permutation in array permut, creates a new BDD
7665 with permuted variables. There should be an entry in array permut
7666 for each variable in the manager. The i-th entry of permut holds the
7667 index of the variable that is to substitute the i-th variable.
7668 Returns a pointer to the resulting BDD if successful; NULL
7669 otherwise.
7672 <dd> <b>Side Effects</b> None
7675 <dd> <b>See Also</b> <code><a href="#Cudd_addPermute">Cudd_addPermute</a>
7676 <a href="#Cudd_bddSwapVariables">Cudd_bddSwapVariables</a>
7677 </code>
7679 <dt><pre>
7680 <A NAME="Cudd_bddPickArbitraryMinterms"></A>
7681 DdNode ** <I></I>
7682 <B>Cudd_bddPickArbitraryMinterms</B>(
7683 DdManager * <b>dd</b>, <i>manager</i>
7684 DdNode * <b>f</b>, <i>function from which to pick k minterms</i>
7685 DdNode ** <b>vars</b>, <i>array of variables</i>
7686 int <b>n</b>, <i>size of <code>vars</code></i>
7687 int <b>k</b> <i>number of minterms to find</i>
7689 </pre>
7690 <dd> Picks k on-set minterms evenly distributed from given DD.
7691 The minterms are in terms of <code>vars</code>. The array
7692 <code>vars</code> should contain at least all variables in the
7693 support of <code>f</code>; if this condition is not met the minterms
7694 built by this procedure may not be contained in
7695 <code>f</code>. Builds an array of BDDs for the minterms and returns a
7696 pointer to it if successful; NULL otherwise. There are three reasons
7697 why the procedure may fail:
7698 <ul>
7699 <li> It may run out of memory;
7700 <li> the function <code>f</code> may be the constant 0;
7701 <li> the minterms may not be contained in <code>f</code>.
7702 </ul>
7705 <dd> <b>Side Effects</b> None
7708 <dd> <b>See Also</b> <code><a href="#Cudd_bddPickOneMinterm">Cudd_bddPickOneMinterm</a>
7709 <a href="#Cudd_bddPickOneCube">Cudd_bddPickOneCube</a>
7710 </code>
7712 <dt><pre>
7713 <A NAME="Cudd_bddPickOneCube"></A>
7714 int <I></I>
7715 <B>Cudd_bddPickOneCube</B>(
7716 DdManager * <b>ddm</b>, <i></i>
7717 DdNode * <b>node</b>, <i></i>
7718 char * <b>string</b> <i></i>
7720 </pre>
7721 <dd> Picks one on-set cube randomly from the given DD. The
7722 cube is written into an array of characters. The array must have at
7723 least as many entries as there are variables. Returns 1 if
7724 successful; 0 otherwise.
7727 <dd> <b>Side Effects</b> None
7730 <dd> <b>See Also</b> <code><a href="#Cudd_bddPickOneMinterm">Cudd_bddPickOneMinterm</a>
7731 </code>
7733 <dt><pre>
7734 <A NAME="Cudd_bddPickOneMinterm"></A>
7735 DdNode * <I></I>
7736 <B>Cudd_bddPickOneMinterm</B>(
7737 DdManager * <b>dd</b>, <i>manager</i>
7738 DdNode * <b>f</b>, <i>function from which to pick one minterm</i>
7739 DdNode ** <b>vars</b>, <i>array of variables</i>
7740 int <b>n</b> <i>size of <code>vars</code></i>
7742 </pre>
7743 <dd> Picks one on-set minterm randomly from the given
7744 DD. The minterm is in terms of <code>vars</code>. The array
7745 <code>vars</code> should contain at least all variables in the
7746 support of <code>f</code>; if this condition is not met the minterm
7747 built by this procedure may not be contained in
7748 <code>f</code>. Builds a BDD for the minterm and returns a pointer
7749 to it if successful; NULL otherwise. There are three reasons why the
7750 procedure may fail:
7751 <ul>
7752 <li> It may run out of memory;
7753 <li> the function <code>f</code> may be the constant 0;
7754 <li> the minterm may not be contained in <code>f</code>.
7755 </ul>
7758 <dd> <b>Side Effects</b> None
7761 <dd> <b>See Also</b> <code><a href="#Cudd_bddPickOneCube">Cudd_bddPickOneCube</a>
7762 </code>
7764 <dt><pre>
7765 <A NAME="Cudd_bddPrintCover"></A>
7766 int <I></I>
7767 <B>Cudd_bddPrintCover</B>(
7768 DdManager * <b>dd</b>, <i></i>
7769 DdNode * <b>l</b>, <i></i>
7770 DdNode * <b>u</b> <i></i>
7772 </pre>
7773 <dd> Prints a sum of product cover for an incompletely
7774 specified function given by a lower bound and an upper bound. Each
7775 product is a prime implicant obtained by expanding the product
7776 corresponding to a path from node to the constant one. Uses the
7777 package default output file. Returns 1 if successful; 0 otherwise.
7780 <dd> <b>Side Effects</b> None
7783 <dd> <b>See Also</b> <code><a href="#Cudd_PrintMinterm">Cudd_PrintMinterm</a>
7784 </code>
7786 <dt><pre>
7787 <A NAME="Cudd_bddReadPairIndex"></A>
7788 int <I></I>
7789 <B>Cudd_bddReadPairIndex</B>(
7790 DdManager * <b>dd</b>, <i></i>
7791 int <b>index</b> <i></i>
7793 </pre>
7794 <dd> Reads a corresponding pair index for a given index.
7795 These pair indices are present and next state variable. Returns the
7796 corresponding variable index if the variable exists; -1 otherwise.
7799 <dd> <b>Side Effects</b> modifies the manager
7802 <dd> <b>See Also</b> <code><a href="#Cudd_bddSetPairIndex">Cudd_bddSetPairIndex</a>
7803 </code>
7805 <dt><pre>
7806 <A NAME="Cudd_bddRead"></A>
7807 int <I></I>
7808 <B>Cudd_bddRead</B>(
7809 FILE * <b>fp</b>, <i>input file pointer</i>
7810 DdManager * <b>dd</b>, <i>DD manager</i>
7811 DdNode ** <b>E</b>, <i>characteristic function of the graph</i>
7812 DdNode *** <b>x</b>, <i>array of row variables</i>
7813 DdNode *** <b>y</b>, <i>array of column variables</i>
7814 int * <b>nx</b>, <i>number or row variables</i>
7815 int * <b>ny</b>, <i>number or column variables</i>
7816 int * <b>m</b>, <i>number of rows</i>
7817 int * <b>n</b>, <i>number of columns</i>
7818 int <b>bx</b>, <i>first index of row variables</i>
7819 int <b>sx</b>, <i>step of row variables</i>
7820 int <b>by</b>, <i>first index of column variables</i>
7821 int <b>sy</b> <i>step of column variables</i>
7823 </pre>
7824 <dd> Reads in a graph (without labels) given as an adjacency
7825 matrix. The first line of the input contains the numbers of rows and
7826 columns of the adjacency matrix. The remaining lines contain the arcs
7827 of the graph, one per line. Each arc is described by two integers,
7828 i.e., the row and column number, or the indices of the two endpoints.
7829 Cudd_bddRead produces a BDD that depends on two sets of variables: x
7830 and y. The x variables (x[0] ... x[nx-1]) encode
7831 the row index and the y variables (y[0] ... y[ny-1]) encode the
7832 column index. x[0] and y[0] are the most significant bits in the
7833 indices.
7834 The variables may already exist or may be created by the function.
7835 The index of x[i] is bx+i*sx, and the index of y[i] is by+i*sy.<p>
7836 On input, nx and ny hold the numbers of row and column variables already
7837 in existence. On output, they hold the numbers of row and column
7838 variables actually used by the matrix. When Cudd_bddRead creates the
7839 variable arrays, the index of x[i] is bx+i*sx, and the index of
7840 y[i] is by+i*sy. When some variables already exist, Cudd_bddRead
7841 expects the indices of the existing x variables to be bx+i*sx, and the
7842 indices of the existing y variables to be by+i*sy.<p>
7843 m and n are set to the numbers of rows and columns of the
7844 matrix. Their values on input are immaterial. The BDD for the graph
7845 is returned in E, and its reference count is > 0. Cudd_bddRead returns
7846 1 in case of success; 0 otherwise.
7849 <dd> <b>Side Effects</b> nx and ny are set to the numbers of row and column
7850 variables. m and n are set to the numbers of rows and columns. x and y
7851 are possibly extended to represent the array of row and column
7852 variables.
7855 <dd> <b>See Also</b> <code><a href="#Cudd_addHarwell">Cudd_addHarwell</a>
7856 <a href="#Cudd_addRead">Cudd_addRead</a>
7857 </code>
7859 <dt><pre>
7860 <A NAME="Cudd_bddRealignDisable"></A>
7861 void <I></I>
7862 <B>Cudd_bddRealignDisable</B>(
7863 DdManager * <b>unique</b> <i></i>
7865 </pre>
7866 <dd> Disables realignment of ZDD order to BDD order.
7869 <dd> <b>Side Effects</b> None
7872 <dd> <b>See Also</b> <code><a href="#Cudd_bddRealignEnable">Cudd_bddRealignEnable</a>
7873 <a href="#Cudd_bddRealignmentEnabled">Cudd_bddRealignmentEnabled</a>
7874 <a href="#Cudd_zddRealignEnable">Cudd_zddRealignEnable</a>
7875 <a href="#Cudd_zddRealignmentEnabled">Cudd_zddRealignmentEnabled</a>
7876 </code>
7878 <dt><pre>
7879 <A NAME="Cudd_bddRealignEnable"></A>
7880 void <I></I>
7881 <B>Cudd_bddRealignEnable</B>(
7882 DdManager * <b>unique</b> <i></i>
7884 </pre>
7885 <dd> Enables realignment of the BDD variable order to the
7886 ZDD variable order after the ZDDs have been reordered. The
7887 number of ZDD variables must be a multiple of the number of BDD
7888 variables for realignment to make sense. If this condition is not met,
7889 Cudd_zddReduceHeap will return 0. Let <code>M</code> be the
7890 ratio of the two numbers. For the purpose of realignment, the ZDD
7891 variables from <code>M*i</code> to <code>(M+1)*i-1</code> are
7892 reagarded as corresponding to BDD variable <code>i</code>. Realignment
7893 is initially disabled.
7896 <dd> <b>Side Effects</b> None
7899 <dd> <b>See Also</b> <code><a href="#Cudd_zddReduceHeap">Cudd_zddReduceHeap</a>
7900 <a href="#Cudd_bddRealignDisable">Cudd_bddRealignDisable</a>
7901 <a href="#Cudd_bddRealignmentEnabled">Cudd_bddRealignmentEnabled</a>
7902 <a href="#Cudd_zddRealignDisable">Cudd_zddRealignDisable</a>
7903 <a href="#Cudd_zddRealignmentEnabled">Cudd_zddRealignmentEnabled</a>
7904 </code>
7906 <dt><pre>
7907 <A NAME="Cudd_bddRealignmentEnabled"></A>
7908 int <I></I>
7909 <B>Cudd_bddRealignmentEnabled</B>(
7910 DdManager * <b>unique</b> <i></i>
7912 </pre>
7913 <dd> Returns 1 if the realignment of BDD order to ZDD order is
7914 enabled; 0 otherwise.
7917 <dd> <b>Side Effects</b> None
7920 <dd> <b>See Also</b> <code><a href="#Cudd_bddRealignEnable">Cudd_bddRealignEnable</a>
7921 <a href="#Cudd_bddRealignDisable">Cudd_bddRealignDisable</a>
7922 <a href="#Cudd_zddRealignEnable">Cudd_zddRealignEnable</a>
7923 <a href="#Cudd_zddRealignDisable">Cudd_zddRealignDisable</a>
7924 </code>
7926 <dt><pre>
7927 <A NAME="Cudd_bddResetVarToBeGrouped"></A>
7928 int <I></I>
7929 <B>Cudd_bddResetVarToBeGrouped</B>(
7930 DdManager * <b>dd</b>, <i></i>
7931 int <b>index</b> <i></i>
7933 </pre>
7934 <dd> Resets a variable not to be grouped. This function is
7935 used for lazy sifting. Returns 1 if successful; 0 otherwise.
7938 <dd> <b>Side Effects</b> modifies the manager
7941 <dd> <b>See Also</b> <code><a href="#Cudd_bddSetVarToBeGrouped">Cudd_bddSetVarToBeGrouped</a>
7942 <a href="#Cudd_bddSetVarHardGroup">Cudd_bddSetVarHardGroup</a>
7943 </code>
7945 <dt><pre>
7946 <A NAME="Cudd_bddRestrict"></A>
7947 DdNode * <I></I>
7948 <B>Cudd_bddRestrict</B>(
7949 DdManager * <b>dd</b>, <i></i>
7950 DdNode * <b>f</b>, <i></i>
7951 DdNode * <b>c</b> <i></i>
7953 </pre>
7954 <dd> BDD restrict according to Coudert and Madre's algorithm
7955 (ICCAD90). Returns the restricted BDD if successful; otherwise NULL.
7956 If application of restrict results in a BDD larger than the input
7957 BDD, the input BDD is returned.
7960 <dd> <b>Side Effects</b> None
7963 <dd> <b>See Also</b> <code><a href="#Cudd_bddConstrain">Cudd_bddConstrain</a>
7964 <a href="#Cudd_addRestrict">Cudd_addRestrict</a>
7965 </code>
7967 <dt><pre>
7968 <A NAME="Cudd_bddSetNsVar"></A>
7969 int <I></I>
7970 <B>Cudd_bddSetNsVar</B>(
7971 DdManager * <b>dd</b>, <i>manager</i>
7972 int <b>index</b> <i>variable index</i>
7974 </pre>
7975 <dd> Sets a variable type to next state. The variable type is
7976 used by lazy sifting. Returns 1 if successful; 0 otherwise.
7979 <dd> <b>Side Effects</b> modifies the manager
7982 <dd> <b>See Also</b> <code><a href="#Cudd_bddSetPiVar">Cudd_bddSetPiVar</a>
7983 <a href="#Cudd_bddSetPsVar">Cudd_bddSetPsVar</a>
7984 <a href="#Cudd_bddIsNsVar">Cudd_bddIsNsVar</a>
7985 </code>
7987 <dt><pre>
7988 <A NAME="Cudd_bddSetPairIndex"></A>
7989 int <I></I>
7990 <B>Cudd_bddSetPairIndex</B>(
7991 DdManager * <b>dd</b>, <i>manager</i>
7992 int <b>index</b>, <i>variable index</i>
7993 int <b>pairIndex</b> <i>corresponding variable index</i>
7995 </pre>
7996 <dd> Sets a corresponding pair index for a given index.
7997 These pair indices are present and next state variable. Returns 1 if
7998 successful; 0 otherwise.
8001 <dd> <b>Side Effects</b> modifies the manager
8004 <dd> <b>See Also</b> <code><a href="#Cudd_bddReadPairIndex">Cudd_bddReadPairIndex</a>
8005 </code>
8007 <dt><pre>
8008 <A NAME="Cudd_bddSetPiVar"></A>
8009 int <I></I>
8010 <B>Cudd_bddSetPiVar</B>(
8011 DdManager * <b>dd</b>, <i>manager</i>
8012 int <b>index</b> <i>variable index</i>
8014 </pre>
8015 <dd> Sets a variable type to primary input. The variable type is
8016 used by lazy sifting. Returns 1 if successful; 0 otherwise.
8019 <dd> <b>Side Effects</b> modifies the manager
8022 <dd> <b>See Also</b> <code><a href="#Cudd_bddSetPsVar">Cudd_bddSetPsVar</a>
8023 <a href="#Cudd_bddSetNsVar">Cudd_bddSetNsVar</a>
8024 <a href="#Cudd_bddIsPiVar">Cudd_bddIsPiVar</a>
8025 </code>
8027 <dt><pre>
8028 <A NAME="Cudd_bddSetPsVar"></A>
8029 int <I></I>
8030 <B>Cudd_bddSetPsVar</B>(
8031 DdManager * <b>dd</b>, <i>manager</i>
8032 int <b>index</b> <i>variable index</i>
8034 </pre>
8035 <dd> Sets a variable type to present state. The variable type is
8036 used by lazy sifting. Returns 1 if successful; 0 otherwise.
8039 <dd> <b>Side Effects</b> modifies the manager
8042 <dd> <b>See Also</b> <code><a href="#Cudd_bddSetPiVar">Cudd_bddSetPiVar</a>
8043 <a href="#Cudd_bddSetNsVar">Cudd_bddSetNsVar</a>
8044 <a href="#Cudd_bddIsPsVar">Cudd_bddIsPsVar</a>
8045 </code>
8047 <dt><pre>
8048 <A NAME="Cudd_bddSetVarHardGroup"></A>
8049 int <I></I>
8050 <B>Cudd_bddSetVarHardGroup</B>(
8051 DdManager * <b>dd</b>, <i></i>
8052 int <b>index</b> <i></i>
8054 </pre>
8055 <dd> Sets a variable to be a hard group. This function is used
8056 for lazy sifting. Returns 1 if successful; 0 otherwise.
8059 <dd> <b>Side Effects</b> modifies the manager
8062 <dd> <b>See Also</b> <code><a href="#Cudd_bddSetVarToBeGrouped">Cudd_bddSetVarToBeGrouped</a>
8063 <a href="#Cudd_bddResetVarToBeGrouped">Cudd_bddResetVarToBeGrouped</a>
8064 <a href="#Cudd_bddIsVarHardGroup">Cudd_bddIsVarHardGroup</a>
8065 </code>
8067 <dt><pre>
8068 <A NAME="Cudd_bddSetVarToBeGrouped"></A>
8069 int <I></I>
8070 <B>Cudd_bddSetVarToBeGrouped</B>(
8071 DdManager * <b>dd</b>, <i></i>
8072 int <b>index</b> <i></i>
8074 </pre>
8075 <dd> Sets a variable to be grouped. This function is used for
8076 lazy sifting. Returns 1 if successful; 0 otherwise.
8079 <dd> <b>Side Effects</b> modifies the manager
8082 <dd> <b>See Also</b> <code><a href="#Cudd_bddSetVarHardGroup">Cudd_bddSetVarHardGroup</a>
8083 <a href="#Cudd_bddResetVarToBeGrouped">Cudd_bddResetVarToBeGrouped</a>
8084 </code>
8086 <dt><pre>
8087 <A NAME="Cudd_bddSetVarToBeUngrouped"></A>
8088 int <I></I>
8089 <B>Cudd_bddSetVarToBeUngrouped</B>(
8090 DdManager * <b>dd</b>, <i></i>
8091 int <b>index</b> <i></i>
8093 </pre>
8094 <dd> Sets a variable to be ungrouped. This function is used
8095 for lazy sifting. Returns 1 if successful; 0 otherwise.
8098 <dd> <b>Side Effects</b> modifies the manager
8101 <dd> <b>See Also</b> <code><a href="#Cudd_bddIsVarToBeUngrouped">Cudd_bddIsVarToBeUngrouped</a>
8102 </code>
8104 <dt><pre>
8105 <A NAME="Cudd_bddSqueeze"></A>
8106 DdNode * <I></I>
8107 <B>Cudd_bddSqueeze</B>(
8108 DdManager * <b>dd</b>, <i>manager</i>
8109 DdNode * <b>l</b>, <i>lower bound</i>
8110 DdNode * <b>u</b> <i>upper bound</i>
8112 </pre>
8113 <dd> Finds a small BDD in a function interval. Given BDDs
8114 <code>l</code> and <code>u</code>, representing the lower bound and
8115 upper bound of a function interval, Cudd_bddSqueeze produces the BDD
8116 of a function within the interval with a small BDD. Returns a
8117 pointer to the result if successful; NULL otherwise.
8120 <dd> <b>Side Effects</b> None
8123 <dd> <b>See Also</b> <code><a href="#Cudd_bddRestrict">Cudd_bddRestrict</a>
8124 <a href="#Cudd_bddLICompaction">Cudd_bddLICompaction</a>
8125 </code>
8127 <dt><pre>
8128 <A NAME="Cudd_bddSwapVariables"></A>
8129 DdNode * <I></I>
8130 <B>Cudd_bddSwapVariables</B>(
8131 DdManager * <b>dd</b>, <i></i>
8132 DdNode * <b>f</b>, <i></i>
8133 DdNode ** <b>x</b>, <i></i>
8134 DdNode ** <b>y</b>, <i></i>
8135 int <b>n</b> <i></i>
8137 </pre>
8138 <dd> Swaps two sets of variables of the same size (x and y)
8139 in the BDD f. The size is given by n. The two sets of variables are
8140 assumed to be disjoint. Returns a pointer to the resulting BDD if
8141 successful; NULL otherwise.
8144 <dd> <b>Side Effects</b> None
8147 <dd> <b>See Also</b> <code><a href="#Cudd_bddPermute">Cudd_bddPermute</a>
8148 <a href="#Cudd_addSwapVariables">Cudd_addSwapVariables</a>
8149 </code>
8151 <dt><pre>
8152 <A NAME="Cudd_bddTransfer"></A>
8153 DdNode * <I></I>
8154 <B>Cudd_bddTransfer</B>(
8155 DdManager * <b>ddSource</b>, <i></i>
8156 DdManager * <b>ddDestination</b>, <i></i>
8157 DdNode * <b>f</b> <i></i>
8159 </pre>
8160 <dd> Convert a BDD from a manager to another one. The orders of the
8161 variables in the two managers may be different. Returns a
8162 pointer to the BDD in the destination manager if successful; NULL
8163 otherwise.
8166 <dd> <b>Side Effects</b> None
8169 <dt><pre>
8170 <A NAME="Cudd_bddUnbindVar"></A>
8171 int <I></I>
8172 <B>Cudd_bddUnbindVar</B>(
8173 DdManager * <b>dd</b>, <i>manager</i>
8174 int <b>index</b> <i>variable index</i>
8176 </pre>
8177 <dd> This function resets the flag that prevents the sifting
8178 of a variable. In successive variable reorderings, the variable will
8179 NOT be skipped, that is, sifted. Initially all variables can be
8180 sifted. It is necessary to call this function only to re-enable
8181 sifting after a call to Cudd_bddBindVar. Returns 1 if successful; 0
8182 otherwise (i.e., invalid variable index).
8185 <dd> <b>Side Effects</b> Changes the "bindVar" flag in DdSubtable.
8188 <dd> <b>See Also</b> <code><a href="#Cudd_bddBindVar">Cudd_bddBindVar</a>
8189 </code>
8191 <dt><pre>
8192 <A NAME="Cudd_bddUnivAbstract"></A>
8193 DdNode * <I></I>
8194 <B>Cudd_bddUnivAbstract</B>(
8195 DdManager * <b>manager</b>, <i></i>
8196 DdNode * <b>f</b>, <i></i>
8197 DdNode * <b>cube</b> <i></i>
8199 </pre>
8200 <dd> Universally abstracts all the variables in cube from f.
8201 Returns the abstracted BDD if successful; NULL otherwise.
8204 <dd> <b>Side Effects</b> None
8207 <dd> <b>See Also</b> <code><a href="#Cudd_bddExistAbstract">Cudd_bddExistAbstract</a>
8208 <a href="#Cudd_addUnivAbstract">Cudd_addUnivAbstract</a>
8209 </code>
8211 <dt><pre>
8212 <A NAME="Cudd_bddVarConjDecomp"></A>
8213 int <I></I>
8214 <B>Cudd_bddVarConjDecomp</B>(
8215 DdManager * <b>dd</b>, <i>manager</i>
8216 DdNode * <b>f</b>, <i>function to be decomposed</i>
8217 DdNode *** <b>conjuncts</b> <i>address of the array of conjuncts</i>
8219 </pre>
8220 <dd> Conjunctively decomposes one BDD according to a
8221 variable. If <code>f</code> is the function of the BDD and
8222 <code>x</code> is the variable, the decomposition is
8223 <code>(f+x)(f+x')</code>. The variable is chosen so as to balance
8224 the sizes of the two conjuncts and to keep them small. Returns the
8225 number of conjuncts produced, that is, 2 if successful; 1 if no
8226 meaningful decomposition was found; 0 otherwise.
8229 <dd> <b>Side Effects</b> The two factors are returned in an array as side effects.
8230 The array is allocated by this function. It is the caller's responsibility
8231 to free it. On successful completion, the conjuncts are already
8232 referenced. If the function returns 0, the array for the conjuncts is
8233 not allocated. If the function returns 1, the only factor equals the
8234 function to be decomposed.
8237 <dd> <b>See Also</b> <code><a href="#Cudd_bddVarDisjDecomp">Cudd_bddVarDisjDecomp</a>
8238 <a href="#Cudd_bddGenConjDecomp">Cudd_bddGenConjDecomp</a>
8239 <a href="#Cudd_bddApproxConjDecomp">Cudd_bddApproxConjDecomp</a>
8240 <a href="#Cudd_bddIterConjDecomp">Cudd_bddIterConjDecomp</a>
8241 </code>
8243 <dt><pre>
8244 <A NAME="Cudd_bddVarDisjDecomp"></A>
8245 int <I></I>
8246 <B>Cudd_bddVarDisjDecomp</B>(
8247 DdManager * <b>dd</b>, <i>manager</i>
8248 DdNode * <b>f</b>, <i>function to be decomposed</i>
8249 DdNode *** <b>disjuncts</b> <i>address of the array of the disjuncts</i>
8251 </pre>
8252 <dd> Performs two-way disjunctive decomposition of a BDD
8253 according to a variable. If <code>f</code> is the function of the
8254 BDD and <code>x</code> is the variable, the decomposition is
8255 <code>f*x + f*x'</code>. The variable is chosen so as to balance
8256 the sizes of the two disjuncts and to keep them small. Returns the
8257 number of disjuncts produced, that is, 2 if successful; 1 if no
8258 meaningful decomposition was found; 0 otherwise.
8261 <dd> <b>Side Effects</b> The two disjuncts are returned in an array as side effects.
8262 The array is allocated by this function. It is the caller's responsibility
8263 to free it. On successful completion, the disjuncts are already
8264 referenced. If the function returns 0, the array for the disjuncts is
8265 not allocated. If the function returns 1, the only factor equals the
8266 function to be decomposed.
8269 <dd> <b>See Also</b> <code><a href="#Cudd_bddVarConjDecomp">Cudd_bddVarConjDecomp</a>
8270 <a href="#Cudd_bddApproxDisjDecomp">Cudd_bddApproxDisjDecomp</a>
8271 <a href="#Cudd_bddIterDisjDecomp">Cudd_bddIterDisjDecomp</a>
8272 <a href="#Cudd_bddGenDisjDecomp">Cudd_bddGenDisjDecomp</a>
8273 </code>
8275 <dt><pre>
8276 <A NAME="Cudd_bddVarIsBound"></A>
8277 int <I></I>
8278 <B>Cudd_bddVarIsBound</B>(
8279 DdManager * <b>dd</b>, <i>manager</i>
8280 int <b>index</b> <i>variable index</i>
8282 </pre>
8283 <dd> This function returns 1 if a variable is enabled for
8284 sifting. Initially all variables can be sifted. This function returns
8285 0 only if there has been a previous call to Cudd_bddBindVar for that
8286 variable not followed by a call to Cudd_bddUnbindVar. The function returns
8287 0 also in the case in which the index of the variable is out of bounds.
8290 <dd> <b>Side Effects</b> none
8293 <dd> <b>See Also</b> <code><a href="#Cudd_bddBindVar">Cudd_bddBindVar</a>
8294 <a href="#Cudd_bddUnbindVar">Cudd_bddUnbindVar</a>
8295 </code>
8297 <dt><pre>
8298 <A NAME="Cudd_bddVarIsDependent"></A>
8299 int <I></I>
8300 <B>Cudd_bddVarIsDependent</B>(
8301 DdManager * <b>dd</b>, <i></i>
8302 DdNode * <b>f</b>, <i></i>
8303 DdNode * <b>var</b> <i>variable</i>
8305 </pre>
8306 <dd> Checks whether a variable is dependent on others in a
8307 function. Returns 1 if the variable is dependent; 0 otherwise. No
8308 new nodes are created.
8311 <dd> <b>Side Effects</b> None
8314 <dt><pre>
8315 <A NAME="Cudd_bddVarMap"></A>
8316 DdNode * <I></I>
8317 <B>Cudd_bddVarMap</B>(
8318 DdManager * <b>manager</b>, <i>DD manager</i>
8319 DdNode * <b>f</b> <i>function in which to remap variables</i>
8321 </pre>
8322 <dd> Remaps the variables of a BDD using the default
8323 variable map. A typical use of this function is to swap two sets of
8324 variables. The variable map must be registered with Cudd_SetVarMap.
8325 Returns a pointer to the resulting BDD if successful; NULL
8326 otherwise.
8329 <dd> <b>Side Effects</b> None
8332 <dd> <b>See Also</b> <code><a href="#Cudd_bddPermute">Cudd_bddPermute</a>
8333 <a href="#Cudd_bddSwapVariables">Cudd_bddSwapVariables</a>
8334 <a href="#Cudd_SetVarMap">Cudd_SetVarMap</a>
8335 </code>
8337 <dt><pre>
8338 <A NAME="Cudd_bddVectorCompose"></A>
8339 DdNode * <I></I>
8340 <B>Cudd_bddVectorCompose</B>(
8341 DdManager * <b>dd</b>, <i></i>
8342 DdNode * <b>f</b>, <i></i>
8343 DdNode ** <b>vector</b> <i></i>
8345 </pre>
8346 <dd> Given a vector of BDDs, creates a new BDD by
8347 substituting the BDDs for the variables of the BDD f. There
8348 should be an entry in vector for each variable in the manager.
8349 If no substitution is sought for a given variable, the corresponding
8350 projection function should be specified in the vector.
8351 This function implements simultaneous composition.
8352 Returns a pointer to the resulting BDD if successful; NULL
8353 otherwise.
8356 <dd> <b>Side Effects</b> None
8359 <dd> <b>See Also</b> <code><a href="#Cudd_bddPermute">Cudd_bddPermute</a>
8360 <a href="#Cudd_bddCompose">Cudd_bddCompose</a>
8361 <a href="#Cudd_addVectorCompose">Cudd_addVectorCompose</a>
8362 </code>
8364 <dt><pre>
8365 <A NAME="Cudd_bddXnor"></A>
8366 DdNode * <I></I>
8367 <B>Cudd_bddXnor</B>(
8368 DdManager * <b>dd</b>, <i></i>
8369 DdNode * <b>f</b>, <i></i>
8370 DdNode * <b>g</b> <i></i>
8372 </pre>
8373 <dd> Computes the exclusive NOR of two BDDs f and g. Returns a
8374 pointer to the resulting BDD if successful; NULL if the intermediate
8375 result blows up.
8378 <dd> <b>Side Effects</b> None
8381 <dd> <b>See Also</b> <code><a href="#Cudd_bddIte">Cudd_bddIte</a>
8382 <a href="#Cudd_addApply">Cudd_addApply</a>
8383 <a href="#Cudd_bddAnd">Cudd_bddAnd</a>
8384 <a href="#Cudd_bddOr">Cudd_bddOr</a>
8385 <a href="#Cudd_bddNand">Cudd_bddNand</a>
8386 <a href="#Cudd_bddNor">Cudd_bddNor</a>
8387 <a href="#Cudd_bddXor">Cudd_bddXor</a>
8388 </code>
8390 <dt><pre>
8391 <A NAME="Cudd_bddXorExistAbstract"></A>
8392 DdNode * <I></I>
8393 <B>Cudd_bddXorExistAbstract</B>(
8394 DdManager * <b>manager</b>, <i></i>
8395 DdNode * <b>f</b>, <i></i>
8396 DdNode * <b>g</b>, <i></i>
8397 DdNode * <b>cube</b> <i></i>
8399 </pre>
8400 <dd> Takes the exclusive OR of two BDDs and simultaneously abstracts
8401 the variables in cube. The variables are existentially abstracted. Returns a
8402 pointer to the result is successful; NULL otherwise.
8405 <dd> <b>Side Effects</b> None
8408 <dd> <b>See Also</b> <code><a href="#Cudd_bddUnivAbstract">Cudd_bddUnivAbstract</a>
8409 <a href="#Cudd_bddExistAbstract">Cudd_bddExistAbstract</a>
8410 <a href="#Cudd_bddAndAbstract">Cudd_bddAndAbstract</a>
8411 </code>
8413 <dt><pre>
8414 <A NAME="Cudd_bddXor"></A>
8415 DdNode * <I></I>
8416 <B>Cudd_bddXor</B>(
8417 DdManager * <b>dd</b>, <i></i>
8418 DdNode * <b>f</b>, <i></i>
8419 DdNode * <b>g</b> <i></i>
8421 </pre>
8422 <dd> Computes the exclusive OR of two BDDs f and g. Returns a
8423 pointer to the resulting BDD if successful; NULL if the intermediate
8424 result blows up.
8427 <dd> <b>Side Effects</b> None
8430 <dd> <b>See Also</b> <code><a href="#Cudd_bddIte">Cudd_bddIte</a>
8431 <a href="#Cudd_addApply">Cudd_addApply</a>
8432 <a href="#Cudd_bddAnd">Cudd_bddAnd</a>
8433 <a href="#Cudd_bddOr">Cudd_bddOr</a>
8434 <a href="#Cudd_bddNand">Cudd_bddNand</a>
8435 <a href="#Cudd_bddNor">Cudd_bddNor</a>
8436 <a href="#Cudd_bddXnor">Cudd_bddXnor</a>
8437 </code>
8439 <dt><pre>
8440 <A NAME="Cudd_tlcInfoFree"></A>
8441 void <I></I>
8442 <B>Cudd_tlcInfoFree</B>(
8443 DdTlcInfo * <b>t</b> <i></i>
8445 </pre>
8446 <dd> Frees a DdTlcInfo Structure as well as the memory pointed
8447 by it.
8450 <dd> <b>Side Effects</b> None
8453 <dt><pre>
8454 <A NAME="Cudd_zddChange"></A>
8455 DdNode * <I></I>
8456 <B>Cudd_zddChange</B>(
8457 DdManager * <b>dd</b>, <i></i>
8458 DdNode * <b>P</b>, <i></i>
8459 int <b>var</b> <i></i>
8461 </pre>
8462 <dd> Substitutes a variable with its complement in a ZDD.
8463 returns a pointer to the result if successful; NULL otherwise.
8466 <dd> <b>Side Effects</b> None
8469 <dt><pre>
8470 <A NAME="Cudd_zddComplement"></A>
8471 DdNode * <I></I>
8472 <B>Cudd_zddComplement</B>(
8473 DdManager * <b>dd</b>, <i></i>
8474 DdNode * <b>node</b> <i></i>
8476 </pre>
8477 <dd> Computes a complement cover for a ZDD node. For lack of a
8478 better method, we first extract the function BDD from the ZDD cover,
8479 then make the complement of the ZDD cover from the complement of the
8480 BDD node by using ISOP. Returns a pointer to the resulting cover if
8481 successful; NULL otherwise. The result depends on current variable
8482 order.
8485 <dd> <b>Side Effects</b> The result depends on current variable order.
8488 <dt><pre>
8489 <A NAME="Cudd_zddCountDouble"></A>
8490 double <I></I>
8491 <B>Cudd_zddCountDouble</B>(
8492 DdManager * <b>zdd</b>, <i></i>
8493 DdNode * <b>P</b> <i></i>
8495 </pre>
8496 <dd> Counts the number of minterms of a ZDD. The result is
8497 returned as a double. If the procedure runs out of memory, it
8498 returns (double) CUDD_OUT_OF_MEM. This procedure is used in
8499 Cudd_zddCountMinterm.
8502 <dd> <b>Side Effects</b> None
8505 <dd> <b>See Also</b> <code><a href="#Cudd_zddCountMinterm">Cudd_zddCountMinterm</a>
8506 <a href="#Cudd_zddCount">Cudd_zddCount</a>
8507 </code>
8509 <dt><pre>
8510 <A NAME="Cudd_zddCountMinterm"></A>
8511 double <I></I>
8512 <B>Cudd_zddCountMinterm</B>(
8513 DdManager * <b>zdd</b>, <i></i>
8514 DdNode * <b>node</b>, <i></i>
8515 int <b>path</b> <i></i>
8517 </pre>
8518 <dd> Counts the number of minterms of the ZDD rooted at
8519 <code>node</code>. This procedure takes a parameter
8520 <code>path</code> that specifies how many variables are in the
8521 support of the function. If the procedure runs out of memory, it
8522 returns (double) CUDD_OUT_OF_MEM.
8525 <dd> <b>Side Effects</b> None
8528 <dd> <b>See Also</b> <code><a href="#Cudd_zddCountDouble">Cudd_zddCountDouble</a>
8529 </code>
8531 <dt><pre>
8532 <A NAME="Cudd_zddCount"></A>
8533 int <I></I>
8534 <B>Cudd_zddCount</B>(
8535 DdManager * <b>zdd</b>, <i></i>
8536 DdNode * <b>P</b> <i></i>
8538 </pre>
8539 <dd> Returns an integer representing the number of minterms
8540 in a ZDD.
8543 <dd> <b>Side Effects</b> None
8546 <dd> <b>See Also</b> <code><a href="#Cudd_zddCountDouble">Cudd_zddCountDouble</a>
8547 </code>
8549 <dt><pre>
8550 <A NAME="Cudd_zddCoverPathToString"></A>
8551 char * <I></I>
8552 <B>Cudd_zddCoverPathToString</B>(
8553 DdManager * <b>zdd</b>, <i>DD manager</i>
8554 int * <b>path</b>, <i>path of ZDD representing a cover</i>
8555 char * <b>str</b> <i>pointer to string to use if != NULL</i>
8557 </pre>
8558 <dd> Converts a path of a ZDD representing a cover to a
8559 string. The string represents an implicant of the cover. The path
8560 is typically produced by Cudd_zddForeachPath. Returns a pointer to
8561 the string if successful; NULL otherwise. If the str input is NULL,
8562 it allocates a new string. The string passed to this function must
8563 have enough room for all variables and for the terminator.
8566 <dd> <b>Side Effects</b> None
8569 <dd> <b>See Also</b> <code><a href="#Cudd_zddForeachPath">Cudd_zddForeachPath</a>
8570 </code>
8572 <dt><pre>
8573 <A NAME="Cudd_zddDagSize"></A>
8574 int <I></I>
8575 <B>Cudd_zddDagSize</B>(
8576 DdNode * <b>p_node</b> <i></i>
8578 </pre>
8579 <dd> Counts the number of nodes in a ZDD. This function
8580 duplicates Cudd_DagSize and is only retained for compatibility.
8583 <dd> <b>Side Effects</b> None
8586 <dd> <b>See Also</b> <code><a href="#Cudd_DagSize">Cudd_DagSize</a>
8587 </code>
8589 <dt><pre>
8590 <A NAME="Cudd_zddDiffConst"></A>
8591 DdNode * <I></I>
8592 <B>Cudd_zddDiffConst</B>(
8593 DdManager * <b>zdd</b>, <i></i>
8594 DdNode * <b>P</b>, <i></i>
8595 DdNode * <b>Q</b> <i></i>
8597 </pre>
8598 <dd> Inclusion test for ZDDs (P implies Q). No new nodes are
8599 generated by this procedure. Returns empty if true;
8600 a valid pointer different from empty or DD_NON_CONSTANT otherwise.
8603 <dd> <b>Side Effects</b> None
8606 <dd> <b>See Also</b> <code><a href="#Cudd_zddDiff">Cudd_zddDiff</a>
8607 </code>
8609 <dt><pre>
8610 <A NAME="Cudd_zddDiff"></A>
8611 DdNode * <I></I>
8612 <B>Cudd_zddDiff</B>(
8613 DdManager * <b>dd</b>, <i></i>
8614 DdNode * <b>P</b>, <i></i>
8615 DdNode * <b>Q</b> <i></i>
8617 </pre>
8618 <dd> Computes the difference of two ZDDs. Returns a pointer to the
8619 result if successful; NULL otherwise.
8622 <dd> <b>Side Effects</b> None
8625 <dd> <b>See Also</b> <code><a href="#Cudd_zddDiffConst">Cudd_zddDiffConst</a>
8626 </code>
8628 <dt><pre>
8629 <A NAME="Cudd_zddDivideF"></A>
8630 DdNode * <I></I>
8631 <B>Cudd_zddDivideF</B>(
8632 DdManager * <b>dd</b>, <i></i>
8633 DdNode * <b>f</b>, <i></i>
8634 DdNode * <b>g</b> <i></i>
8636 </pre>
8637 <dd> Modified version of Cudd_zddDivide. This function may
8638 disappear in future releases.
8641 <dd> <b>Side Effects</b> None
8644 <dt><pre>
8645 <A NAME="Cudd_zddDivide"></A>
8646 DdNode * <I></I>
8647 <B>Cudd_zddDivide</B>(
8648 DdManager * <b>dd</b>, <i></i>
8649 DdNode * <b>f</b>, <i></i>
8650 DdNode * <b>g</b> <i></i>
8652 </pre>
8653 <dd> Computes the quotient of two unate covers represented
8654 by ZDDs. Unate covers use one ZDD variable for each BDD
8655 variable. Returns a pointer to the resulting ZDD if successful; NULL
8656 otherwise.
8659 <dd> <b>Side Effects</b> None
8662 <dd> <b>See Also</b> <code><a href="#Cudd_zddWeakDiv">Cudd_zddWeakDiv</a>
8663 </code>
8665 <dt><pre>
8666 <A NAME="Cudd_zddDumpDot"></A>
8667 int <I></I>
8668 <B>Cudd_zddDumpDot</B>(
8669 DdManager * <b>dd</b>, <i>manager</i>
8670 int <b>n</b>, <i>number of output nodes to be dumped</i>
8671 DdNode ** <b>f</b>, <i>array of output nodes to be dumped</i>
8672 char ** <b>inames</b>, <i>array of input names (or NULL)</i>
8673 char ** <b>onames</b>, <i>array of output names (or NULL)</i>
8674 FILE * <b>fp</b> <i>pointer to the dump file</i>
8676 </pre>
8677 <dd> Writes a file representing the argument ZDDs in a format
8678 suitable for the graph drawing program dot.
8679 It returns 1 in case of success; 0 otherwise (e.g., out-of-memory,
8680 file system full).
8681 Cudd_zddDumpDot does not close the file: This is the caller
8682 responsibility. Cudd_zddDumpDot uses a minimal unique subset of the
8683 hexadecimal address of a node as name for it.
8684 If the argument inames is non-null, it is assumed to hold the pointers
8685 to the names of the inputs. Similarly for onames.
8686 Cudd_zddDumpDot uses the following convention to draw arcs:
8687 <ul>
8688 <li> solid line: THEN arcs;
8689 <li> dashed line: ELSE arcs.
8690 </ul>
8691 The dot options are chosen so that the drawing fits on a letter-size
8692 sheet.
8695 <dd> <b>Side Effects</b> None
8698 <dd> <b>See Also</b> <code><a href="#Cudd_DumpDot">Cudd_DumpDot</a>
8699 <a href="#Cudd_zddPrintDebug">Cudd_zddPrintDebug</a>
8700 </code>
8702 <dt><pre>
8703 <A NAME="Cudd_zddFirstPath"></A>
8704 DdGen * <I></I>
8705 <B>Cudd_zddFirstPath</B>(
8706 DdManager * <b>zdd</b>, <i></i>
8707 DdNode * <b>f</b>, <i></i>
8708 int ** <b>path</b> <i></i>
8710 </pre>
8711 <dd> Defines an iterator on the paths of a ZDD
8712 and finds its first path. Returns a generator that contains the
8713 information necessary to continue the enumeration if successful; NULL
8714 otherwise.<p>
8715 A path is represented as an array of literals, which are integers in
8716 {0, 1, 2}; 0 represents an else arc out of a node, 1 represents a then arc
8717 out of a node, and 2 stands for the absence of a node.
8718 The size of the array equals the number of variables in the manager at
8719 the time Cudd_zddFirstCube is called.<p>
8720 The paths that end in the empty terminal are not enumerated.
8723 <dd> <b>Side Effects</b> The first path is returned as a side effect.
8726 <dd> <b>See Also</b> <code><a href="#Cudd_zddForeachPath">Cudd_zddForeachPath</a>
8727 <a href="#Cudd_zddNextPath">Cudd_zddNextPath</a>
8728 <a href="#Cudd_GenFree">Cudd_GenFree</a>
8729 <a href="#Cudd_IsGenEmpty">Cudd_IsGenEmpty</a>
8730 </code>
8732 <dt><pre>
8733 <A NAME="Cudd_zddIntersect"></A>
8734 DdNode * <I></I>
8735 <B>Cudd_zddIntersect</B>(
8736 DdManager * <b>dd</b>, <i></i>
8737 DdNode * <b>P</b>, <i></i>
8738 DdNode * <b>Q</b> <i></i>
8740 </pre>
8741 <dd> Computes the intersection of two ZDDs. Returns a pointer to
8742 the result if successful; NULL otherwise.
8745 <dd> <b>Side Effects</b> None
8748 <dt><pre>
8749 <A NAME="Cudd_zddIsop"></A>
8750 DdNode * <I></I>
8751 <B>Cudd_zddIsop</B>(
8752 DdManager * <b>dd</b>, <i></i>
8753 DdNode * <b>L</b>, <i></i>
8754 DdNode * <b>U</b>, <i></i>
8755 DdNode ** <b>zdd_I</b> <i></i>
8757 </pre>
8758 <dd> Computes an irredundant sum of products (ISOP) in ZDD
8759 form from BDDs. The two BDDs L and U represent the lower bound and
8760 the upper bound, respectively, of the function. The ISOP uses two
8761 ZDD variables for each BDD variable: One for the positive literal,
8762 and one for the negative literal. These two variables should be
8763 adjacent in the ZDD order. The two ZDD variables corresponding to
8764 BDD variable <code>i</code> should have indices <code>2i</code> and
8765 <code>2i+1</code>. The result of this procedure depends on the
8766 variable order. If successful, Cudd_zddIsop returns the BDD for
8767 the function chosen from the interval. The ZDD representing the
8768 irredundant cover is returned as a side effect in zdd_I. In case of
8769 failure, NULL is returned.
8772 <dd> <b>Side Effects</b> zdd_I holds the pointer to the ZDD for the ISOP on
8773 successful return.
8776 <dd> <b>See Also</b> <code><a href="#Cudd_bddIsop">Cudd_bddIsop</a>
8777 <a href="#Cudd_zddVarsFromBddVars">Cudd_zddVarsFromBddVars</a>
8778 </code>
8780 <dt><pre>
8781 <A NAME="Cudd_zddIte"></A>
8782 DdNode * <I></I>
8783 <B>Cudd_zddIte</B>(
8784 DdManager * <b>dd</b>, <i></i>
8785 DdNode * <b>f</b>, <i></i>
8786 DdNode * <b>g</b>, <i></i>
8787 DdNode * <b>h</b> <i></i>
8789 </pre>
8790 <dd> Computes the ITE of three ZDDs. Returns a pointer to the
8791 result if successful; NULL otherwise.
8794 <dd> <b>Side Effects</b> None
8797 <dt><pre>
8798 <A NAME="Cudd_zddIthVar"></A>
8799 DdNode * <I></I>
8800 <B>Cudd_zddIthVar</B>(
8801 DdManager * <b>dd</b>, <i></i>
8802 int <b>i</b> <i></i>
8804 </pre>
8805 <dd> Retrieves the ZDD variable with index i if it already
8806 exists, or creates a new ZDD variable. Returns a pointer to the
8807 variable if successful; NULL otherwise.
8810 <dd> <b>Side Effects</b> None
8813 <dd> <b>See Also</b> <code><a href="#Cudd_bddIthVar">Cudd_bddIthVar</a>
8814 <a href="#Cudd_addIthVar">Cudd_addIthVar</a>
8815 </code>
8817 <dt><pre>
8818 <A NAME="Cudd_zddNextPath"></A>
8819 int <I></I>
8820 <B>Cudd_zddNextPath</B>(
8821 DdGen * <b>gen</b>, <i></i>
8822 int ** <b>path</b> <i></i>
8824 </pre>
8825 <dd> Generates the next path of a ZDD onset,
8826 using generator gen. Returns 0 if the enumeration is completed; 1
8827 otherwise.
8830 <dd> <b>Side Effects</b> The path is returned as a side effect. The
8831 generator is modified.
8834 <dd> <b>See Also</b> <code><a href="#Cudd_zddForeachPath">Cudd_zddForeachPath</a>
8835 <a href="#Cudd_zddFirstPath">Cudd_zddFirstPath</a>
8836 <a href="#Cudd_GenFree">Cudd_GenFree</a>
8837 <a href="#Cudd_IsGenEmpty">Cudd_IsGenEmpty</a>
8838 </code>
8840 <dt><pre>
8841 <A NAME="Cudd_zddPortFromBdd"></A>
8842 DdNode * <I></I>
8843 <B>Cudd_zddPortFromBdd</B>(
8844 DdManager * <b>dd</b>, <i></i>
8845 DdNode * <b>B</b> <i></i>
8847 </pre>
8848 <dd> Converts a BDD into a ZDD. This function assumes that
8849 there is a one-to-one correspondence between the BDD variables and the
8850 ZDD variables, and that the variable order is the same for both types
8851 of variables. These conditions are established if the ZDD variables
8852 are created by one call to Cudd_zddVarsFromBddVars with multiplicity =
8853 1. Returns a pointer to the resulting ZDD if successful; NULL otherwise.
8856 <dd> <b>Side Effects</b> None
8859 <dd> <b>See Also</b> <code><a href="#Cudd_zddVarsFromBddVars">Cudd_zddVarsFromBddVars</a>
8860 </code>
8862 <dt><pre>
8863 <A NAME="Cudd_zddPortToBdd"></A>
8864 DdNode * <I></I>
8865 <B>Cudd_zddPortToBdd</B>(
8866 DdManager * <b>dd</b>, <i></i>
8867 DdNode * <b>f</b> <i></i>
8869 </pre>
8870 <dd> Converts a ZDD into a BDD. Returns a pointer to the resulting
8871 ZDD if successful; NULL otherwise.
8874 <dd> <b>Side Effects</b> None
8877 <dd> <b>See Also</b> <code><a href="#Cudd_zddPortFromBdd">Cudd_zddPortFromBdd</a>
8878 </code>
8880 <dt><pre>
8881 <A NAME="Cudd_zddPrintCover"></A>
8882 int <I></I>
8883 <B>Cudd_zddPrintCover</B>(
8884 DdManager * <b>zdd</b>, <i></i>
8885 DdNode * <b>node</b> <i></i>
8887 </pre>
8888 <dd> Prints a sum of products from a ZDD representing a cover.
8889 Returns 1 if successful; 0 otherwise.
8892 <dd> <b>Side Effects</b> None
8895 <dd> <b>See Also</b> <code><a href="#Cudd_zddPrintMinterm">Cudd_zddPrintMinterm</a>
8896 </code>
8898 <dt><pre>
8899 <A NAME="Cudd_zddPrintDebug"></A>
8900 int <I></I>
8901 <B>Cudd_zddPrintDebug</B>(
8902 DdManager * <b>zdd</b>, <i></i>
8903 DdNode * <b>f</b>, <i></i>
8904 int <b>n</b>, <i></i>
8905 int <b>pr</b> <i></i>
8907 </pre>
8908 <dd> Prints to the standard output a DD and its statistics.
8909 The statistics include the number of nodes and the number of minterms.
8910 (The number of minterms is also the number of combinations in the set.)
8911 The statistics are printed if pr &gt; 0. Specifically:
8912 <ul>
8913 <li> pr = 0 : prints nothing
8914 <li> pr = 1 : prints counts of nodes and minterms
8915 <li> pr = 2 : prints counts + disjoint sum of products
8916 <li> pr = 3 : prints counts + list of nodes
8917 <li> pr &gt; 3 : prints counts + disjoint sum of products + list of nodes
8918 </ul>
8919 Returns 1 if successful; 0 otherwise.
8922 <dd> <b>Side Effects</b> None
8925 <dt><pre>
8926 <A NAME="Cudd_zddPrintMinterm"></A>
8927 int <I></I>
8928 <B>Cudd_zddPrintMinterm</B>(
8929 DdManager * <b>zdd</b>, <i></i>
8930 DdNode * <b>node</b> <i></i>
8932 </pre>
8933 <dd> Prints a disjoint sum of product form for a ZDD. Returns 1
8934 if successful; 0 otherwise.
8937 <dd> <b>Side Effects</b> None
8940 <dd> <b>See Also</b> <code><a href="#Cudd_zddPrintDebug">Cudd_zddPrintDebug</a>
8941 <a href="#Cudd_zddPrintCover">Cudd_zddPrintCover</a>
8942 </code>
8944 <dt><pre>
8945 <A NAME="Cudd_zddPrintSubtable"></A>
8946 void <I></I>
8947 <B>Cudd_zddPrintSubtable</B>(
8948 DdManager * <b>table</b> <i></i>
8950 </pre>
8951 <dd> Prints the ZDD table for debugging purposes.
8954 <dd> <b>Side Effects</b> None
8957 <dt><pre>
8958 <A NAME="Cudd_zddProduct"></A>
8959 DdNode * <I></I>
8960 <B>Cudd_zddProduct</B>(
8961 DdManager * <b>dd</b>, <i></i>
8962 DdNode * <b>f</b>, <i></i>
8963 DdNode * <b>g</b> <i></i>
8965 </pre>
8966 <dd> Computes the product of two covers represented by
8967 ZDDs. The result is also a ZDD. Returns a pointer to the result if
8968 successful; NULL otherwise. The covers on which Cudd_zddProduct
8969 operates use two ZDD variables for each function variable (one ZDD
8970 variable for each literal of the variable). Those two ZDD variables
8971 should be adjacent in the order.
8974 <dd> <b>Side Effects</b> None
8977 <dd> <b>See Also</b> <code><a href="#Cudd_zddUnateProduct">Cudd_zddUnateProduct</a>
8978 </code>
8980 <dt><pre>
8981 <A NAME="Cudd_zddReadNodeCount"></A>
8982 long <I></I>
8983 <B>Cudd_zddReadNodeCount</B>(
8984 DdManager * <b>dd</b> <i></i>
8986 </pre>
8987 <dd> Reports the number of nodes in ZDDs. This
8988 number always includes the two constants 1 and 0.
8991 <dd> <b>Side Effects</b> None
8994 <dd> <b>See Also</b> <code><a href="#Cudd_ReadPeakNodeCount">Cudd_ReadPeakNodeCount</a>
8995 <a href="#Cudd_ReadNodeCount">Cudd_ReadNodeCount</a>
8996 </code>
8998 <dt><pre>
8999 <A NAME="Cudd_zddRealignDisable"></A>
9000 void <I></I>
9001 <B>Cudd_zddRealignDisable</B>(
9002 DdManager * <b>unique</b> <i></i>
9004 </pre>
9005 <dd> Disables realignment of ZDD order to BDD order.
9008 <dd> <b>Side Effects</b> None
9011 <dd> <b>See Also</b> <code><a href="#Cudd_zddRealignEnable">Cudd_zddRealignEnable</a>
9012 <a href="#Cudd_zddRealignmentEnabled">Cudd_zddRealignmentEnabled</a>
9013 <a href="#Cudd_bddRealignEnable">Cudd_bddRealignEnable</a>
9014 <a href="#Cudd_bddRealignmentEnabled">Cudd_bddRealignmentEnabled</a>
9015 </code>
9017 <dt><pre>
9018 <A NAME="Cudd_zddRealignEnable"></A>
9019 void <I></I>
9020 <B>Cudd_zddRealignEnable</B>(
9021 DdManager * <b>unique</b> <i></i>
9023 </pre>
9024 <dd> Enables realignment of the ZDD variable order to the
9025 BDD variable order after the BDDs and ADDs have been reordered. The
9026 number of ZDD variables must be a multiple of the number of BDD
9027 variables for realignment to make sense. If this condition is not met,
9028 Cudd_ReduceHeap will return 0. Let <code>M</code> be the
9029 ratio of the two numbers. For the purpose of realignment, the ZDD
9030 variables from <code>M*i</code> to <code>(M+1)*i-1</code> are
9031 reagarded as corresponding to BDD variable <code>i</code>. Realignment
9032 is initially disabled.
9035 <dd> <b>Side Effects</b> None
9038 <dd> <b>See Also</b> <code><a href="#Cudd_ReduceHeap">Cudd_ReduceHeap</a>
9039 <a href="#Cudd_zddRealignDisable">Cudd_zddRealignDisable</a>
9040 <a href="#Cudd_zddRealignmentEnabled">Cudd_zddRealignmentEnabled</a>
9041 <a href="#Cudd_bddRealignDisable">Cudd_bddRealignDisable</a>
9042 <a href="#Cudd_bddRealignmentEnabled">Cudd_bddRealignmentEnabled</a>
9043 </code>
9045 <dt><pre>
9046 <A NAME="Cudd_zddRealignmentEnabled"></A>
9047 int <I></I>
9048 <B>Cudd_zddRealignmentEnabled</B>(
9049 DdManager * <b>unique</b> <i></i>
9051 </pre>
9052 <dd> Returns 1 if the realignment of ZDD order to BDD order is
9053 enabled; 0 otherwise.
9056 <dd> <b>Side Effects</b> None
9059 <dd> <b>See Also</b> <code><a href="#Cudd_zddRealignEnable">Cudd_zddRealignEnable</a>
9060 <a href="#Cudd_zddRealignDisable">Cudd_zddRealignDisable</a>
9061 <a href="#Cudd_bddRealignEnable">Cudd_bddRealignEnable</a>
9062 <a href="#Cudd_bddRealignDisable">Cudd_bddRealignDisable</a>
9063 </code>
9065 <dt><pre>
9066 <A NAME="Cudd_zddReduceHeap"></A>
9067 int <I></I>
9068 <B>Cudd_zddReduceHeap</B>(
9069 DdManager * <b>table</b>, <i>DD manager</i>
9070 Cudd_ReorderingType <b>heuristic</b>, <i>method used for reordering</i>
9071 int <b>minsize</b> <i>bound below which no reordering occurs</i>
9073 </pre>
9074 <dd> Main dynamic reordering routine for ZDDs.
9075 Calls one of the possible reordering procedures:
9076 <ul>
9077 <li>Swapping
9078 <li>Sifting
9079 <li>Symmetric Sifting
9080 </ul>
9082 For sifting and symmetric sifting it is possible to request reordering
9083 to convergence.<p>
9085 The core of all methods is the reordering procedure
9086 cuddZddSwapInPlace() which swaps two adjacent variables.
9087 Returns 1 in case of success; 0 otherwise. In the case of symmetric
9088 sifting (with and without convergence) returns 1 plus the number of
9089 symmetric variables, in case of success.
9092 <dd> <b>Side Effects</b> Changes the variable order for all ZDDs and clears
9093 the cache.
9096 <dt><pre>
9097 <A NAME="Cudd_zddShuffleHeap"></A>
9098 int <I></I>
9099 <B>Cudd_zddShuffleHeap</B>(
9100 DdManager * <b>table</b>, <i>DD manager</i>
9101 int * <b>permutation</b> <i>required variable permutation</i>
9103 </pre>
9104 <dd> Reorders ZDD variables according to given permutation.
9105 The i-th entry of the permutation array contains the index of the variable
9106 that should be brought to the i-th level. The size of the array should be
9107 equal or greater to the number of variables currently in use.
9108 Returns 1 in case of success; 0 otherwise.
9111 <dd> <b>Side Effects</b> Changes the ZDD variable order for all diagrams and clears
9112 the cache.
9115 <dd> <b>See Also</b> <code><a href="#Cudd_zddReduceHeap">Cudd_zddReduceHeap</a>
9116 </code>
9118 <dt><pre>
9119 <A NAME="Cudd_zddSubset0"></A>
9120 DdNode * <I></I>
9121 <B>Cudd_zddSubset0</B>(
9122 DdManager * <b>dd</b>, <i></i>
9123 DdNode * <b>P</b>, <i></i>
9124 int <b>var</b> <i></i>
9126 </pre>
9127 <dd> Computes the negative cofactor of a ZDD w.r.t. a
9128 variable. In terms of combinations, the result is the set of all
9129 combinations in which the variable is negated. Returns a pointer to
9130 the result if successful; NULL otherwise.
9133 <dd> <b>Side Effects</b> None
9136 <dd> <b>See Also</b> <code><a href="#Cudd_zddSubset1">Cudd_zddSubset1</a>
9137 </code>
9139 <dt><pre>
9140 <A NAME="Cudd_zddSubset1"></A>
9141 DdNode * <I></I>
9142 <B>Cudd_zddSubset1</B>(
9143 DdManager * <b>dd</b>, <i></i>
9144 DdNode * <b>P</b>, <i></i>
9145 int <b>var</b> <i></i>
9147 </pre>
9148 <dd> Computes the positive cofactor of a ZDD w.r.t. a
9149 variable. In terms of combinations, the result is the set of all
9150 combinations in which the variable is asserted. Returns a pointer to
9151 the result if successful; NULL otherwise.
9154 <dd> <b>Side Effects</b> None
9157 <dd> <b>See Also</b> <code><a href="#Cudd_zddSubset0">Cudd_zddSubset0</a>
9158 </code>
9160 <dt><pre>
9161 <A NAME="Cudd_zddSymmProfile"></A>
9162 void <I></I>
9163 <B>Cudd_zddSymmProfile</B>(
9164 DdManager * <b>table</b>, <i></i>
9165 int <b>lower</b>, <i></i>
9166 int <b>upper</b> <i></i>
9168 </pre>
9169 <dd> Prints statistics on symmetric ZDD variables.
9172 <dd> <b>Side Effects</b> None
9175 <dt><pre>
9176 <A NAME="Cudd_zddUnateProduct"></A>
9177 DdNode * <I></I>
9178 <B>Cudd_zddUnateProduct</B>(
9179 DdManager * <b>dd</b>, <i></i>
9180 DdNode * <b>f</b>, <i></i>
9181 DdNode * <b>g</b> <i></i>
9183 </pre>
9184 <dd> Computes the product of two unate covers represented as
9185 ZDDs. Unate covers use one ZDD variable for each BDD
9186 variable. Returns a pointer to the result if successful; NULL
9187 otherwise.
9190 <dd> <b>Side Effects</b> None
9193 <dd> <b>See Also</b> <code><a href="#Cudd_zddProduct">Cudd_zddProduct</a>
9194 </code>
9196 <dt><pre>
9197 <A NAME="Cudd_zddUnion"></A>
9198 DdNode * <I></I>
9199 <B>Cudd_zddUnion</B>(
9200 DdManager * <b>dd</b>, <i></i>
9201 DdNode * <b>P</b>, <i></i>
9202 DdNode * <b>Q</b> <i></i>
9204 </pre>
9205 <dd> Computes the union of two ZDDs. Returns a pointer to the
9206 result if successful; NULL otherwise.
9209 <dd> <b>Side Effects</b> None
9212 <dt><pre>
9213 <A NAME="Cudd_zddVarsFromBddVars"></A>
9214 int <I></I>
9215 <B>Cudd_zddVarsFromBddVars</B>(
9216 DdManager * <b>dd</b>, <i>DD manager</i>
9217 int <b>multiplicity</b> <i>how many ZDD variables are created for each BDD variable</i>
9219 </pre>
9220 <dd> Creates one or more ZDD variables for each BDD
9221 variable. If some ZDD variables already exist, only the missing
9222 variables are created. Parameter multiplicity allows the caller to
9223 control how many variables are created for each BDD variable in
9224 existence. For instance, if ZDDs are used to represent covers, two
9225 ZDD variables are required for each BDD variable. The order of the
9226 BDD variables is transferred to the ZDD variables. If a variable
9227 group tree exists for the BDD variables, a corresponding ZDD
9228 variable group tree is created by expanding the BDD variable
9229 tree. In any case, the ZDD variables derived from the same BDD
9230 variable are merged in a ZDD variable group. If a ZDD variable group
9231 tree exists, it is freed. Returns 1 if successful; 0 otherwise.
9234 <dd> <b>Side Effects</b> None
9237 <dd> <b>See Also</b> <code><a href="#Cudd_bddNewVar">Cudd_bddNewVar</a>
9238 <a href="#Cudd_bddIthVar">Cudd_bddIthVar</a>
9239 <a href="#Cudd_bddNewVarAtLevel">Cudd_bddNewVarAtLevel</a>
9240 </code>
9242 <dt><pre>
9243 <A NAME="Cudd_zddWeakDivF"></A>
9244 DdNode * <I></I>
9245 <B>Cudd_zddWeakDivF</B>(
9246 DdManager * <b>dd</b>, <i></i>
9247 DdNode * <b>f</b>, <i></i>
9248 DdNode * <b>g</b> <i></i>
9250 </pre>
9251 <dd> Modified version of Cudd_zddWeakDiv. This function may
9252 disappear in future releases.
9255 <dd> <b>Side Effects</b> None
9258 <dd> <b>See Also</b> <code><a href="#Cudd_zddWeakDiv">Cudd_zddWeakDiv</a>
9259 </code>
9261 <dt><pre>
9262 <A NAME="Cudd_zddWeakDiv"></A>
9263 DdNode * <I></I>
9264 <B>Cudd_zddWeakDiv</B>(
9265 DdManager * <b>dd</b>, <i></i>
9266 DdNode * <b>f</b>, <i></i>
9267 DdNode * <b>g</b> <i></i>
9269 </pre>
9270 <dd> Applies weak division to two ZDDs representing two
9271 covers. Returns a pointer to the ZDD representing the result if
9272 successful; NULL otherwise. The result of weak division depends on
9273 the variable order. The covers on which Cudd_zddWeakDiv operates use
9274 two ZDD variables for each function variable (one ZDD variable for
9275 each literal of the variable). Those two ZDD variables should be
9276 adjacent in the order.
9279 <dd> <b>Side Effects</b> None
9282 <dd> <b>See Also</b> <code><a href="#Cudd_zddDivide">Cudd_zddDivide</a>
9283 </code>
9286 </DL>
9287 <HR>
9288 Last updated on 20090220 23h06
9289 </BODY></HTML>