abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cuddInt.h
Go to the documentation of this file.
1 /**CHeaderFile*****************************************************************
2 
3  FileName [cuddInt.h]
4 
5  PackageName [cudd]
6 
7  Synopsis [Internal data structures of the CUDD package.]
8 
9  Description []
10 
11  SeeAlso []
12 
13  Author [Fabio Somenzi]
14 
15  Copyright [Copyright (c) 1995-2004, Regents of the University of Colorado
16 
17  All rights reserved.
18 
19  Redistribution and use in source and binary forms, with or without
20  modification, are permitted provided that the following conditions
21  are met:
22 
23  Redistributions of source code must retain the above copyright
24  notice, this list of conditions and the following disclaimer.
25 
26  Redistributions in binary form must reproduce the above copyright
27  notice, this list of conditions and the following disclaimer in the
28  documentation and/or other materials provided with the distribution.
29 
30  Neither the name of the University of Colorado nor the names of its
31  contributors may be used to endorse or promote products derived from
32  this software without specific prior written permission.
33 
34  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
35  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
36  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
37  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
38  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
39  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
40  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
41  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
42  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
43  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
44  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
45  POSSIBILITY OF SUCH DAMAGE.]
46 
47  Revision [$Id: cuddInt.h,v 1.139 2009/03/08 02:49:02 fabio Exp $]
48 
49 ******************************************************************************/
50 
51 #ifndef ABC__bdd__cudd__cuddInt_h
52 #define ABC__bdd__cudd__cuddInt_h
53 
54 
55 /*---------------------------------------------------------------------------*/
56 /* Nested includes */
57 /*---------------------------------------------------------------------------*/
58 
59 #ifdef DD_MIS
60 #include "array.h"
61 #include "list.h"
62 #include "misc/st/st.h"
63 #include "misc/espresso/espresso.h"
64 #include "node.h"
65 #ifdef SIS
66 #include "graph.h"
67 #include "astg.h"
68 #endif
69 #include "network.h"
70 #endif
71 
72 #include <math.h>
73 #include "cudd.h"
74 #include "misc/st/st.h"
75 
77 
78 
79 #if defined(__GNUC__)
80 # define DD_INLINE __inline__
81 # if (__GNUC__ >2 || __GNUC_MINOR__ >=7)
82 # define DD_UNUSED __attribute__ ((__unused__))
83 # else
84 # define DD_UNUSED
85 # endif
86 #else
87 # if defined(__cplusplus)
88 # define DD_INLINE inline
89 # else
90 # define DD_INLINE
91 # endif
92 # define DD_UNUSED
93 #endif
94 
95 
96 /*---------------------------------------------------------------------------*/
97 /* Constant declarations */
98 /*---------------------------------------------------------------------------*/
99 
100 #define DD_MAXREF ((DdHalfWord) ~0)
101 
102 #define DD_DEFAULT_RESIZE 10 /* how many extra variables */
103  /* should be added when resizing */
104 #define DD_MEM_CHUNK 1022
105 
106 /* These definitions work for CUDD_VALUE_TYPE == double */
107 #define DD_ONE_VAL (1.0)
108 #define DD_ZERO_VAL (0.0)
109 #define DD_EPSILON (1.0e-12)
110 
111 /* The definitions of +/- infinity in terms of HUGE_VAL work on
112 ** the DECstations and on many other combinations of OS/compiler.
113 */
114 #ifdef HAVE_IEEE_754
115 # define DD_PLUS_INF_VAL (HUGE_VAL)
116 #else
117 # define DD_PLUS_INF_VAL (10e301)
118 # define DD_CRI_HI_MARK (10e150)
119 # define DD_CRI_LO_MARK (-(DD_CRI_HI_MARK))
120 #endif
121 #define DD_MINUS_INF_VAL (-(DD_PLUS_INF_VAL))
122 
123 #define DD_NON_CONSTANT ((DdNode *) 1) /* for Cudd_bddIteConstant */
124 
125 /* Unique table and cache management constants. */
126 #define DD_MAX_SUBTABLE_DENSITY 4 /* tells when to resize a subtable */
127 /* gc when this percent are dead (measured w.r.t. slots, not keys)
128 ** The first limit (LO) applies normally. The second limit applies when
129 ** the package believes more space for the unique table (i.e., more dead
130 ** nodes) would improve performance, and the unique table is not already
131 ** too large. The third limit applies when memory is low.
132 */
133 #define DD_GC_FRAC_LO DD_MAX_SUBTABLE_DENSITY * 0.25
134 #define DD_GC_FRAC_HI DD_MAX_SUBTABLE_DENSITY * 1.0
135 #define DD_GC_FRAC_MIN 0.2
136 #define DD_MIN_HIT 30 /* resize cache when hit ratio
137  above this percentage (default) */
138 #define DD_MAX_LOOSE_FRACTION 5 /* 1 / (max fraction of memory used for
139  unique table in fast growth mode) */
140 #define DD_MAX_CACHE_FRACTION 3 /* 1 / (max fraction of memory used for
141  computed table if resizing enabled) */
142 #define DD_STASH_FRACTION 64 /* 1 / (fraction of memory set
143  aside for emergencies) */
144 #define DD_MAX_CACHE_TO_SLOTS_RATIO 4 /* used to limit the cache size */
145 
146 /* Variable ordering default parameter values. */
147 #define DD_SIFT_MAX_VAR 1000
148 #define DD_SIFT_MAX_SWAPS 2000000
149 #define DD_DEFAULT_RECOMB 0
150 #define DD_MAX_REORDER_GROWTH 1.1
151 #define DD_FIRST_REORDER 4004 /* 4 for the constants */
152 #define DD_DYN_RATIO 2 /* when to dynamically reorder */
153 
154 /* Primes for cache hash functions. */
155 #define DD_P1 12582917
156 #define DD_P2 4256249
157 #define DD_P3 741457
158 #define DD_P4 1618033999
159 
160 /* Cache tags for 3-operand operators. These tags are stored in the
161 ** least significant bits of the cache operand pointers according to
162 ** the following scheme. The tag consists of two hex digits. Both digits
163 ** must be even, so that they do not interfere with complementation bits.
164 ** The least significant one is stored in Bits 3:1 of the f operand in the
165 ** cache entry. Bit 1 is always 1, so that we can differentiate
166 ** three-operand operations from one- and two-operand operations.
167 ** Therefore, the least significant digit is one of {2,6,a,e}. The most
168 ** significant digit occupies Bits 3:1 of the g operand in the cache
169 ** entry. It can by any even digit between 0 and e. This gives a total
170 ** of 5 bits for the tag proper, which means a maximum of 32 three-operand
171 ** operations. */
172 #define DD_ADD_ITE_TAG 0x02
173 #define DD_BDD_AND_ABSTRACT_TAG 0x06
174 #define DD_BDD_XOR_EXIST_ABSTRACT_TAG 0x0a
175 #define DD_BDD_ITE_TAG 0x0e
176 #define DD_ADD_BDD_DO_INTERVAL_TAG 0x22
177 #define DD_BDD_CLIPPING_AND_ABSTRACT_UP_TAG 0x26
178 #define DD_BDD_CLIPPING_AND_ABSTRACT_DOWN_TAG 0x2a
179 #define DD_BDD_COMPOSE_RECUR_TAG 0x2e
180 #define DD_ADD_COMPOSE_RECUR_TAG 0x42
181 #define DD_ADD_NON_SIM_COMPOSE_TAG 0x46
182 #define DD_EQUIV_DC_TAG 0x4a
183 #define DD_ZDD_ITE_TAG 0x4e
184 #define DD_ADD_ITE_CONSTANT_TAG 0x62
185 #define DD_ADD_EVAL_CONST_TAG 0x66
186 #define DD_BDD_ITE_CONSTANT_TAG 0x6a
187 #define DD_ADD_OUT_SUM_TAG 0x6e
188 #define DD_BDD_LEQ_UNLESS_TAG 0x82
189 #define DD_ADD_TRIANGLE_TAG 0x86
190 
191 /* Generator constants. */
192 #define CUDD_GEN_CUBES 0
193 #define CUDD_GEN_PRIMES 1
194 #define CUDD_GEN_NODES 2
195 #define CUDD_GEN_ZDD_PATHS 3
196 #define CUDD_GEN_EMPTY 0
197 #define CUDD_GEN_NONEMPTY 1
198 
199 
200 /*---------------------------------------------------------------------------*/
201 /* Stucture declarations */
202 /*---------------------------------------------------------------------------*/
203 
204 struct DdGen {
206  int type;
207  int status;
208  union {
209  struct {
210  int *cube;
212  } cubes;
213  struct {
214  int *cube;
216  } primes;
217  struct {
218  int size;
219  } nodes;
220  } gen;
221  struct {
222  int sp;
223 #ifdef __osf__
224 #pragma pointer_size save
225 #pragma pointer_size short
226 #endif
228 #ifdef __osf__
229 #pragma pointer_size restore
230 #endif
231  } stack;
233 };
234 
235 
236 /*---------------------------------------------------------------------------*/
237 /* Type declarations */
238 /*---------------------------------------------------------------------------*/
239 
240 /* Hooks in CUDD are functions that the application registers with the
241 ** manager so that they are called at appropriate times. The functions
242 ** are passed the manager as argument; they should return 1 if
243 ** successful and 0 otherwise.
244 */
245 typedef struct DdHook { /* hook list element */
246  DD_HFP f; /* function to be called */
247  struct DdHook *next; /* next element in the list */
248 } DdHook;
249 
250 /*
251 #if SIZEOF_VOID_P == 8 && SIZEOF_INT == 4
252 typedef long ptrint;
253 typedef unsigned long ptruint;
254 #else
255 typedef int ptrint;
256 typedef unsigned int ptruint;
257 #endif
258 */
259 
260 typedef ABC_PTRINT_T ptrint;
261 typedef ABC_PTRUINT_T ptruint;
262 
263 #ifdef __osf__
264 #pragma pointer_size save
265 #pragma pointer_size short
266 #endif
267 
268 typedef DdNode *DdNodePtr;
269 
270 /* Generic local cache item. */
271 typedef struct DdLocalCacheItem {
273 #ifdef DD_CACHE_PROFILE
274  ptrint count;
275 #endif
276  DdNode *key[1];
278 
279 /* Local cache. */
280 typedef struct DdLocalCache {
282  unsigned int itemsize;
283  unsigned int keysize;
284  unsigned int slots;
285  int shift;
286  double lookUps;
287  double minHit;
288  double hits;
289  unsigned int maxslots;
292 } DdLocalCache;
293 
294 /* Generic hash item. */
295 typedef struct DdHashItem {
296  struct DdHashItem *next;
299  DdNode *key[1];
300 } DdHashItem;
301 
302 /* Local hash table */
303 typedef struct DdHashTable {
304  unsigned int keysize;
305  unsigned int itemsize;
309  unsigned int numBuckets;
310  int shift;
311  unsigned int size;
312  unsigned int maxsize;
314 } DdHashTable;
315 
316 typedef struct DdCache {
317  DdNode *f,*g; /* DDs */
318  ptruint h; /* either operator or DD */
319  DdNode *data; /* already constructed DD */
320 #ifdef DD_CACHE_PROFILE
321  ptrint count;
322 #endif
323  unsigned hash;
324 } DdCache;
325 
326 typedef struct DdSubtable { /* subtable for one index */
327  DdNode **nodelist; /* hash table */
328  int shift; /* shift for hash function */
329  unsigned int slots; /* size of the hash table */
330  unsigned int keys; /* number of nodes stored in this table */
331  unsigned int maxKeys; /* slots * DD_MAX_SUBTABLE_DENSITY */
332  unsigned int dead; /* number of dead nodes in this table */
333  unsigned int next; /* index of next variable in group */
334  int bindVar; /* flag to bind this variable to its level */
335  /* Fields for lazy sifting. */
336  Cudd_VariableType varType; /* variable type (ps, ns, pi) */
337  int pairIndex; /* corresponding variable index (ps <-> ns) */
338  int varHandled; /* flag: 1 means variable is already handled */
339  Cudd_LazyGroupType varToBeGrouped; /* tells what grouping to apply */
340 } DdSubtable;
341 
342 struct DdManager { /* specialized DD symbol table */
343  /* Constants */
344  DdNode sentinel; /* for collision lists */
345  DdNode *one; /* constant 1 */
346  DdNode *zero; /* constant 0 */
347  DdNode *plusinfinity; /* plus infinity */
348  DdNode *minusinfinity; /* minus infinity */
349  DdNode *background; /* background value */
350  /* Computed Table */
351  DdCache *acache; /* address of allocated memory for cache */
352  DdCache *cache; /* the cache-based computed table */
353  unsigned int cacheSlots; /* total number of cache entries */
354  int cacheShift; /* shift value for cache hash function */
355  double cacheMisses; /* number of cache misses (since resizing) */
356  double cacheHits; /* number of cache hits (since resizing) */
357  double minHit; /* hit percentage above which to resize */
358  int cacheSlack; /* slots still available for resizing */
359  unsigned int maxCacheHard; /* hard limit for cache size */
360  /* Unique Table */
361  int size; /* number of unique subtables */
362  int sizeZ; /* for ZDD */
363  int maxSize; /* max number of subtables before resizing */
364  int maxSizeZ; /* for ZDD */
365  DdSubtable *subtables; /* array of unique subtables */
366  DdSubtable *subtableZ; /* for ZDD */
367  DdSubtable constants; /* unique subtable for the constants */
368  unsigned int slots; /* total number of hash buckets */
369  unsigned int keys; /* total number of BDD and ADD nodes */
370  unsigned int keysZ; /* total number of ZDD nodes */
371  unsigned int dead; /* total number of dead BDD and ADD nodes */
372  unsigned int deadZ; /* total number of dead ZDD nodes */
373  unsigned int maxLive; /* maximum number of live nodes */
374  unsigned int minDead; /* do not GC if fewer than these dead */
375  double gcFrac; /* gc when this fraction is dead */
376  int gcEnabled; /* gc is enabled */
377  unsigned int looseUpTo; /* slow growth beyond this limit */
378  /* (measured w.r.t. slots, not keys) */
379  unsigned int initSlots; /* initial size of a subtable */
380  DdNode **stack; /* stack for iterative procedures */
381 // double allocated; /* number of nodes allocated */
382  ABC_INT64_T allocated; /* number of nodes allocated */
383  /* (not during reordering) */
384  double reclaimed; /* number of nodes brought back from the dead */
385  int isolated; /* isolated projection functions */
386  int *perm; /* current variable perm. (index to level) */
387  int *permZ; /* for ZDD */
388  int *invperm; /* current inv. var. perm. (level to index) */
389  int *invpermZ; /* for ZDD */
390  DdNode **vars; /* projection functions */
391  int *map; /* variable map for fast swap */
392  DdNode **univ; /* ZDD 1 for each variable */
393  int linearSize; /* number of rows and columns of linear */
394  long *interact; /* interacting variable matrix */
395  long *linear; /* linear transform matrix */
396  /* Memory Management */
397  DdNode **memoryList; /* memory manager for symbol table */
398  DdNode *nextFree; /* list of free nodes */
399  char *stash; /* memory reserve */
400 #ifndef DD_NO_DEATH_ROW
401  DdNode **deathRow; /* queue for dereferencing */
402  int deathRowDepth; /* number of slots in the queue */
403  int nextDead; /* index in the queue */
404  unsigned deadMask; /* mask for circular index update */
405 #endif
406  /* General Parameters */
407  CUDD_VALUE_TYPE epsilon; /* tolerance on comparisons */
408  /* Dynamic Reordering Parameters */
409  int reordered; /* flag set at the end of reordering */
410  int reorderings; /* number of calls to Cudd_ReduceHeap */
411  int siftMaxVar; /* maximum number of vars sifted */
412  int siftMaxSwap; /* maximum number of swaps per sifting */
413  double maxGrowth; /* maximum growth during reordering */
414  double maxGrowthAlt; /* alternate maximum growth for reordering */
415  int reordCycle; /* how often to apply alternate threshold */
416  int autoDyn; /* automatic dynamic reordering flag (BDD) */
417  int autoDynZ; /* automatic dynamic reordering flag (ZDD) */
418  Cudd_ReorderingType autoMethod; /* default reordering method */
419  Cudd_ReorderingType autoMethodZ; /* default reordering method (ZDD) */
420  int realign; /* realign ZDD order after BDD reordering */
421  int realignZ; /* realign BDD order after ZDD reordering */
422  unsigned int nextDyn; /* reorder if this size is reached */
423  unsigned int countDead; /* if 0, count deads to trigger reordering */
424  MtrNode *tree; /* Variable group tree (BDD) */
425  MtrNode *treeZ; /* Variable group tree (ZDD) */
426  Cudd_AggregationType groupcheck; /* Used during group sifting */
427  int recomb; /* Used during group sifting */
428  int symmviolation; /* Used during group sifting */
429  int arcviolation; /* Used during group sifting */
430  int populationSize; /* population size for GA */
431  int numberXovers; /* number of crossovers for GA */
432  DdLocalCache *localCaches; /* local caches currently in existence */
433 #ifdef __osf__
434 #pragma pointer_size restore
435 #endif
436  char *hooks; /* application-specific field (used by vis) */
437  DdHook *preGCHook; /* hooks to be called before GC */
438  DdHook *postGCHook; /* hooks to be called after GC */
439  DdHook *preReorderingHook; /* hooks to be called before reordering */
440  DdHook *postReorderingHook; /* hooks to be called after reordering */
441  FILE *out; /* stdout for this manager */
442  FILE *err; /* stderr for this manager */
443 #ifdef __osf__
444 #pragma pointer_size save
445 #pragma pointer_size short
446 #endif
447  Cudd_ErrorType errorCode; /* info on last error */
448  /* Statistical counters. */
449  unsigned long memused; /* total memory allocated for the manager */
450  unsigned long maxmem; /* target maximum memory */
451  unsigned long maxmemhard; /* hard limit for maximum memory */
452  int garbageCollections; /* number of garbage collections */
453  long GCTime; /* total time spent in garbage collection */
454  long reordTime; /* total time spent in reordering */
455  double totCachehits; /* total number of cache hits */
456  double totCacheMisses; /* total number of cache misses */
457  double cachecollisions; /* number of cache collisions */
458  double cacheinserts; /* number of cache insertions */
459  double cacheLastInserts; /* insertions at the last cache resizing */
460  double cachedeletions; /* number of deletions during garbage coll. */
461 #ifdef DD_STATS
462  double nodesFreed; /* number of nodes returned to the free list */
463  double nodesDropped; /* number of nodes killed by dereferencing */
464 #endif
465  unsigned int peakLiveNodes; /* maximum number of live nodes */
466 #ifdef DD_UNIQUE_PROFILE
467  double uniqueLookUps; /* number of unique table lookups */
468  double uniqueLinks; /* total distance traveled in coll. chains */
469 #endif
470 #ifdef DD_COUNT
471  double recursiveCalls; /* number of recursive calls */
472 #ifdef DD_STATS
473  double nextSample; /* when to write next line of stats */
474 #endif
475  double swapSteps; /* number of elementary reordering steps */
476 #endif
477 #ifdef DD_MIS
478  /* mis/verif compatibility fields */
479  array_t *iton; /* maps ids in ddNode to node_t */
480  array_t *order; /* copy of order_list */
481  lsHandle handle; /* where it is in network BDD list */
482  network_t *network;
483  st__table *local_order; /* for local BDDs */
484  int nvars; /* variables used so far */
485  int threshold; /* for pseudo var threshold value*/
486 #endif
489  abctime TimeStop; /* timeout for reordering */
490 };
491 
492 typedef struct Move {
495  unsigned int flags;
496  int size;
497  struct Move *next;
498 } Move;
499 
500 /* Generic level queue item. */
501 typedef struct DdQueueItem {
502  struct DdQueueItem *next;
504  void *key;
505 } DdQueueItem;
506 
507 /* Level queue. */
508 typedef struct DdLevelQueue {
509  void *first;
513  int levels;
514  int itemsize;
515  int size;
516  int maxsize;
518  int shift;
519 } DdLevelQueue;
520 
521 #ifdef __osf__
522 #pragma pointer_size restore
523 #endif
524 
525 /*---------------------------------------------------------------------------*/
526 /* Variable declarations */
527 /*---------------------------------------------------------------------------*/
528 
529 
530 /*---------------------------------------------------------------------------*/
531 /* Macro declarations */
532 /*---------------------------------------------------------------------------*/
533 
534 /**Macro***********************************************************************
535 
536  Synopsis [Adds node to the head of the free list.]
537 
538  Description [Adds node to the head of the free list. Does not
539  deallocate memory chunks that become free. This function is also
540  used by the dynamic reordering functions.]
541 
542  SideEffects [None]
543 
544  SeeAlso [cuddAllocNode cuddDynamicAllocNode cuddDeallocMove]
545 
546 ******************************************************************************/
547 #define cuddDeallocNode(unique,node) \
548  (node)->next = (unique)->nextFree; \
549  (unique)->nextFree = node;
550 
551 /**Macro***********************************************************************
552 
553  Synopsis [Adds node to the head of the free list.]
554 
555  Description [Adds node to the head of the free list. Does not
556  deallocate memory chunks that become free. This function is also
557  used by the dynamic reordering functions.]
558 
559  SideEffects [None]
560 
561  SeeAlso [cuddDeallocNode cuddDynamicAllocNode]
562 
563 ******************************************************************************/
564 #define cuddDeallocMove(unique,node) \
565  ((DdNode *)(node))->ref = 0; \
566  ((DdNode *)(node))->next = (unique)->nextFree; \
567  (unique)->nextFree = (DdNode *)(node);
568 
569 
570 /**Macro***********************************************************************
571 
572  Synopsis [Increases the reference count of a node, if it is not
573  saturated.]
574 
575  Description [Increases the reference count of a node, if it is not
576  saturated. This being a macro, it is faster than Cudd_Ref, but it
577  cannot be used in constructs like cuddRef(a = b()).]
578 
579  SideEffects [none]
580 
581  SeeAlso [Cudd_Ref]
582 
583 ******************************************************************************/
584 #define cuddRef(n) cuddSatInc(Cudd_Regular(n)->ref)
585 
586 
587 /**Macro***********************************************************************
588 
589  Synopsis [Decreases the reference count of a node, if it is not
590  saturated.]
591 
592  Description [Decreases the reference count of node. It is primarily
593  used in recursive procedures to decrease the ref count of a result
594  node before returning it. This accomplishes the goal of removing the
595  protection applied by a previous cuddRef. This being a macro, it is
596  faster than Cudd_Deref, but it cannot be used in constructs like
597  cuddDeref(a = b()).]
598 
599  SideEffects [none]
600 
601  SeeAlso [Cudd_Deref]
602 
603 ******************************************************************************/
604 #define cuddDeref(n) cuddSatDec(Cudd_Regular(n)->ref)
605 
606 
607 /**Macro***********************************************************************
608 
609  Synopsis [Returns 1 if the node is a constant node.]
610 
611  Description [Returns 1 if the node is a constant node (rather than an
612  internal node). All constant nodes have the same index
613  (CUDD_CONST_INDEX). The pointer passed to cuddIsConstant must be regular.]
614 
615  SideEffects [none]
616 
617  SeeAlso [Cudd_IsConstant]
618 
619 ******************************************************************************/
620 #define cuddIsConstant(node) ((node)->index == CUDD_CONST_INDEX)
621 
622 
623 /**Macro***********************************************************************
624 
625  Synopsis [Returns the then child of an internal node.]
626 
627  Description [Returns the then child of an internal node. If
628  <code>node</code> is a constant node, the result is unpredictable.
629  The pointer passed to cuddT must be regular.]
630 
631  SideEffects [none]
632 
633  SeeAlso [Cudd_T]
634 
635 ******************************************************************************/
636 #define cuddT(node) ((node)->type.kids.T)
637 
638 
639 /**Macro***********************************************************************
640 
641  Synopsis [Returns the else child of an internal node.]
642 
643  Description [Returns the else child of an internal node. If
644  <code>node</code> is a constant node, the result is unpredictable.
645  The pointer passed to cuddE must be regular.]
646 
647  SideEffects [none]
648 
649  SeeAlso [Cudd_E]
650 
651 ******************************************************************************/
652 #define cuddE(node) ((node)->type.kids.E)
653 
654 
655 /**Macro***********************************************************************
656 
657  Synopsis [Returns the value of a constant node.]
658 
659  Description [Returns the value of a constant node. If
660  <code>node</code> is an internal node, the result is unpredictable.
661  The pointer passed to cuddV must be regular.]
662 
663  SideEffects [none]
664 
665  SeeAlso [Cudd_V]
666 
667 ******************************************************************************/
668 #define cuddV(node) ((node)->type.value)
669 
670 
671 /**Macro***********************************************************************
672 
673  Synopsis [Finds the current position of variable index in the
674  order.]
675 
676  Description [Finds the current position of variable index in the
677  order. This macro duplicates the functionality of Cudd_ReadPerm,
678  but it does not check for out-of-bounds indices and it is more
679  efficient.]
680 
681  SideEffects [none]
682 
683  SeeAlso [Cudd_ReadPerm]
684 
685 ******************************************************************************/
686 #define cuddI(dd,index) (((index)==CUDD_CONST_INDEX)?(int)(index):(dd)->perm[(index)])
687 
688 
689 /**Macro***********************************************************************
690 
691  Synopsis [Finds the current position of ZDD variable index in the
692  order.]
693 
694  Description [Finds the current position of ZDD variable index in the
695  order. This macro duplicates the functionality of Cudd_ReadPermZdd,
696  but it does not check for out-of-bounds indices and it is more
697  efficient.]
698 
699  SideEffects [none]
700 
701  SeeAlso [Cudd_ReadPermZdd]
702 
703 ******************************************************************************/
704 #define cuddIZ(dd,index) (((index)==CUDD_CONST_INDEX)?(int)(index):(dd)->permZ[(index)])
705 
706 
707 /**Macro***********************************************************************
708 
709  Synopsis [Converts pointer into a literal.]
710 
711  Description []
712 
713  SideEffects []
714 
715  SeeAlso []
716 
717 ******************************************************************************/
718 #define cuddF2L(f) ((Cudd_Regular(f)->Id << 1) | Cudd_IsComplement(f))
719 
720 
721 /**Macro***********************************************************************
722 
723  Synopsis [Hash function for the unique table.]
724 
725  Description []
726 
727  SideEffects [none]
728 
729  SeeAlso [ddCHash ddCHash2]
730 
731 ******************************************************************************/
732 #if SIZEOF_VOID_P == 8 && SIZEOF_INT == 4
733 #define ddHash(f,g,s) \
734 ((((unsigned)(ptruint)(f) * DD_P1 + \
735  (unsigned)(ptruint)(g)) * DD_P2) >> (s))
736 #else
737 #define ddHash(f,g,s) \
738 ((((unsigned)(f) * DD_P1 + (unsigned)(g)) * DD_P2) >> (s))
739 #endif
740 
741 
742 /**Macro***********************************************************************
743 
744  Synopsis [Hash function for the cache.]
745 
746  Description []
747 
748  SideEffects [none]
749 
750  SeeAlso [ddHash ddCHash2]
751 
752 ******************************************************************************/
753 /*
754 #if SIZEOF_VOID_P == 8 && SIZEOF_INT == 4
755 #define ddCHash(o,f,g,h,s) \
756 ((((((unsigned)(ptruint)(f) + (unsigned)(ptruint)(o)) * DD_P1 + \
757  (unsigned)(ptruint)(g)) * DD_P2 + \
758  (unsigned)(ptruint)(h)) * DD_P3) >> (s))
759 #else
760 #define ddCHash(o,f,g,h,s) \
761 ((((((unsigned)(f) + (unsigned)(o)) * DD_P1 + (unsigned)(g)) * DD_P2 + \
762  (unsigned)(h)) * DD_P3) >> (s))
763 #endif
764 */
765 
766 /**Macro***********************************************************************
767 
768  Synopsis [Hash function for the cache for functions with two
769  operands.]
770 
771  Description []
772 
773  SideEffects [none]
774 
775  SeeAlso [ddHash ddCHash]
776 
777 ******************************************************************************/
778 #if SIZEOF_VOID_P == 8 && SIZEOF_INT == 4
779 #define ddCHash2(o,f,g,s) \
780 (((((unsigned)(ptruint)(f) + (unsigned)(ptruint)(o)) * DD_P1 + \
781  (unsigned)(ptruint)(g)) * DD_P2) >> (s))
782 #define ddCHash2_(o,f,g) \
783 (((((unsigned)(ptruint)(f) + (unsigned)(ptruint)(o)) * DD_P1 + \
784  (unsigned)(ptruint)(g)) * DD_P2))
785 #else
786 #define ddCHash2(o,f,g,s) \
787 (((((unsigned)(f) + (unsigned)(o)) * DD_P1 + (unsigned)(g)) * DD_P2) >> (s))
788 #define ddCHash2_(o,f,g) \
789 (((((unsigned)(f) + (unsigned)(o)) * DD_P1 + (unsigned)(g)) * DD_P2))
790 #endif
791 
792 
793 /**Macro***********************************************************************
794 
795  Synopsis [Clears the 4 least significant bits of a pointer.]
796 
797  Description []
798 
799  SideEffects [none]
800 
801  SeeAlso []
802 
803 ******************************************************************************/
804 #define cuddClean(p) ((DdNode *)((ptruint)(p) & ~0xf))
805 
806 
807 /**Macro***********************************************************************
808 
809  Synopsis [Computes the minimum of two numbers.]
810 
811  Description []
812 
813  SideEffects [none]
814 
815  SeeAlso [ddMax]
816 
817 ******************************************************************************/
818 #define ddMin(x,y) (((y) < (x)) ? (y) : (x))
819 
820 
821 /**Macro***********************************************************************
822 
823  Synopsis [Computes the maximum of two numbers.]
824 
825  Description []
826 
827  SideEffects [none]
828 
829  SeeAlso [ddMin]
830 
831 ******************************************************************************/
832 #define ddMax(x,y) (((y) > (x)) ? (y) : (x))
833 
834 
835 /**Macro***********************************************************************
836 
837  Synopsis [Computes the absolute value of a number.]
838 
839  Description []
840 
841  SideEffects [none]
842 
843  SeeAlso []
844 
845 ******************************************************************************/
846 #define ddAbs(x) (((x)<0) ? -(x) : (x))
847 
848 
849 /**Macro***********************************************************************
850 
851  Synopsis [Returns 1 if the absolute value of the difference of the two
852  arguments x and y is less than e.]
853 
854  Description []
855 
856  SideEffects [none]
857 
858  SeeAlso []
859 
860 ******************************************************************************/
861 #define ddEqualVal(x,y,e) (ddAbs((x)-(y))<(e))
862 
863 
864 /**Macro***********************************************************************
865 
866  Synopsis [Saturating increment operator.]
867 
868  Description []
869 
870  SideEffects [none]
871 
872  SeeAlso [cuddSatDec]
873 
874 ******************************************************************************/
875 #if SIZEOF_VOID_P == 8 && SIZEOF_INT == 4
876 #define cuddSatInc(x) ((x)++)
877 #else
878 #define cuddSatInc(x) ((x) += (x) != (DdHalfWord)DD_MAXREF)
879 #endif
880 
881 
882 /**Macro***********************************************************************
883 
884  Synopsis [Saturating decrement operator.]
885 
886  Description []
887 
888  SideEffects [none]
889 
890  SeeAlso [cuddSatInc]
891 
892 ******************************************************************************/
893 #if SIZEOF_VOID_P == 8 && SIZEOF_INT == 4
894 #define cuddSatDec(x) ((x)--)
895 #else
896 #define cuddSatDec(x) ((x) -= (x) != (DdHalfWord)DD_MAXREF)
897 #endif
898 
899 
900 /**Macro***********************************************************************
901 
902  Synopsis [Returns the constant 1 node.]
903 
904  Description []
905 
906  SideEffects [none]
907 
908  SeeAlso [DD_ZERO DD_PLUS_INFINITY DD_MINUS_INFINITY]
909 
910 ******************************************************************************/
911 #define DD_ONE(dd) ((dd)->one)
912 
913 
914 /**Macro***********************************************************************
915 
916  Synopsis [Returns the arithmetic 0 constant node.]
917 
918  Description [Returns the arithmetic 0 constant node. This is different
919  from the logical zero. The latter is obtained by
920  Cudd_Not(DD_ONE(dd)).]
921 
922  SideEffects [none]
923 
924  SeeAlso [DD_ONE Cudd_Not DD_PLUS_INFINITY DD_MINUS_INFINITY]
925 
926 ******************************************************************************/
927 #define DD_ZERO(dd) ((dd)->zero)
928 
929 
930 /**Macro***********************************************************************
931 
932  Synopsis [Returns the plus infinity constant node.]
933 
934  Description []
935 
936  SideEffects [none]
937 
938  SeeAlso [DD_ONE DD_ZERO DD_MINUS_INFINITY]
939 
940 ******************************************************************************/
941 #define DD_PLUS_INFINITY(dd) ((dd)->plusinfinity)
942 
943 
944 /**Macro***********************************************************************
945 
946  Synopsis [Returns the minus infinity constant node.]
947 
948  Description []
949 
950  SideEffects [none]
951 
952  SeeAlso [DD_ONE DD_ZERO DD_PLUS_INFINITY]
953 
954 ******************************************************************************/
955 #define DD_MINUS_INFINITY(dd) ((dd)->minusinfinity)
956 
957 
958 /**Macro***********************************************************************
959 
960  Synopsis [Enforces DD_MINUS_INF_VAL <= x <= DD_PLUS_INF_VAL.]
961 
962  Description [Enforces DD_MINUS_INF_VAL <= x <= DD_PLUS_INF_VAL.
963  Furthermore, if x <= DD_MINUS_INF_VAL/2, x is set to
964  DD_MINUS_INF_VAL. Similarly, if DD_PLUS_INF_VAL/2 <= x, x is set to
965  DD_PLUS_INF_VAL. Normally this macro is a NOOP. However, if
966  HAVE_IEEE_754 is not defined, it makes sure that a value does not
967  get larger than infinity in absolute value, and once it gets to
968  infinity, stays there. If the value overflows before this macro is
969  applied, no recovery is possible.]
970 
971  SideEffects [none]
972 
973  SeeAlso []
974 
975 ******************************************************************************/
976 #ifdef HAVE_IEEE_754
977 #define cuddAdjust(x)
978 #else
979 #define cuddAdjust(x) ((x) = ((x) >= DD_CRI_HI_MARK) ? DD_PLUS_INF_VAL : (((x) <= DD_CRI_LO_MARK) ? DD_MINUS_INF_VAL : (x)))
980 #endif
981 
982 
983 /**Macro***********************************************************************
984 
985  Synopsis [Extract the least significant digit of a double digit.]
986 
987  Description [Extract the least significant digit of a double digit. Used
988  in the manipulation of arbitrary precision integers.]
989 
990  SideEffects [None]
991 
992  SeeAlso [DD_MSDIGIT]
993 
994 ******************************************************************************/
995 #define DD_LSDIGIT(x) ((x) & DD_APA_MASK)
996 
997 
998 /**Macro***********************************************************************
999 
1000  Synopsis [Extract the most significant digit of a double digit.]
1001 
1002  Description [Extract the most significant digit of a double digit. Used
1003  in the manipulation of arbitrary precision integers.]
1004 
1005  SideEffects [None]
1006 
1007  SeeAlso [DD_LSDIGIT]
1008 
1009 ******************************************************************************/
1010 #define DD_MSDIGIT(x) ((x) >> DD_APA_BITS)
1011 
1012 
1013 /**Macro***********************************************************************
1014 
1015  Synopsis [Outputs a line of stats.]
1016 
1017  Description [Outputs a line of stats if DD_COUNT and DD_STATS are
1018  defined. Increments the number of recursive calls if DD_COUNT is
1019  defined.]
1020 
1021  SideEffects [None]
1022 
1023  SeeAlso []
1024 
1025 ******************************************************************************/
1026 #ifdef DD_COUNT
1027 #ifdef DD_STATS
1028 #define statLine(dd) dd->recursiveCalls++; \
1029 if (dd->recursiveCalls == dd->nextSample) {(void) fprintf(dd->err, \
1030 "@%.0f: %u nodes %u live %.0f dropped %.0f reclaimed\n", dd->recursiveCalls, \
1031 dd->keys, dd->keys - dd->dead, dd->nodesDropped, dd->reclaimed); \
1032 dd->nextSample += 250000;}
1033 #else
1034 #define statLine(dd) dd->recursiveCalls++;
1035 #endif
1036 #else
1037 #define statLine(dd)
1038 #endif
1039 
1040 
1041 /**AutomaticStart*************************************************************/
1042 
1043 /*---------------------------------------------------------------------------*/
1044 /* Function prototypes */
1045 /*---------------------------------------------------------------------------*/
1046 
1047 extern DdNode * cuddAddExistAbstractRecur( DdManager * manager, DdNode * f, DdNode * cube );
1048 extern DdNode * cuddAddUnivAbstractRecur( DdManager * manager, DdNode * f, DdNode * cube );
1049 extern DdNode * cuddAddOrAbstractRecur( DdManager * manager, DdNode * f, DdNode * cube );
1050 extern DdNode * cuddAddApplyRecur( DdManager * dd, DdNode * (*)(DdManager * , DdNode ** , DdNode **), DdNode * f, DdNode * g );
1051 extern DdNode * cuddAddMonadicApplyRecur( DdManager * dd, DdNode * (*)(DdManager * , DdNode *), DdNode * f );
1052 extern DdNode * cuddAddScalarInverseRecur( DdManager * dd, DdNode * f, DdNode * epsilon );
1053 extern DdNode * cuddAddIteRecur( DdManager * dd, DdNode * f, DdNode * g, DdNode * h );
1054 extern DdNode * cuddAddCmplRecur( DdManager * dd, DdNode * f );
1055 extern DdNode * cuddAddNegateRecur( DdManager * dd, DdNode * f );
1056 extern DdNode * cuddAddRoundOffRecur( DdManager * dd, DdNode * f, double trunc );
1057 extern DdNode * cuddUnderApprox( DdManager * dd, DdNode * f, int numVars, int threshold, int safe, double quality );
1058 extern DdNode * cuddRemapUnderApprox( DdManager * dd, DdNode * f, int numVars, int threshold, double quality );
1059 extern DdNode * cuddBiasedUnderApprox( DdManager * dd, DdNode * f, DdNode * b, int numVars, int threshold, double quality1, double quality0 );
1060 extern DdNode * cuddBddAndAbstractRecur( DdManager * manager, DdNode * f, DdNode * g, DdNode * cube );
1061 extern int cuddAnnealing( DdManager * table, int lower, int upper );
1062 extern DdNode * cuddBddExistAbstractRecur( DdManager * manager, DdNode * f, DdNode * cube );
1063 extern DdNode * cuddBddXorExistAbstractRecur( DdManager * manager, DdNode * f, DdNode * g, DdNode * cube );
1064 extern DdNode * cuddBddBooleanDiffRecur( DdManager * manager, DdNode * f, DdNode * var );
1065 extern DdNode * cuddBddIteRecur( DdManager * dd, DdNode * f, DdNode * g, DdNode * h );
1066 extern DdNode * cuddBddIntersectRecur( DdManager * dd, DdNode * f, DdNode * g );
1067 extern DdNode * cuddBddAndRecur( DdManager * manager, DdNode * f, DdNode * g );
1068 extern DdNode * cuddBddXorRecur( DdManager * manager, DdNode * f, DdNode * g );
1069 extern DdNode * cuddBddTransfer( DdManager * ddS, DdManager * ddD, DdNode * f );
1070 extern DdNode * cuddAddBddDoPattern( DdManager * dd, DdNode * f );
1071 extern int cuddInitCache( DdManager * unique, unsigned int cacheSize, unsigned int maxCacheSize );
1072 extern void cuddCacheInsert( DdManager * table, ptruint op, DdNode * f, DdNode * g, DdNode * h, DdNode * data );
1073 extern void cuddCacheInsert2( DdManager * table, DdNode * (*)(DdManager * , DdNode * , DdNode *), DdNode * f, DdNode * g, DdNode * data );
1074 extern void cuddCacheInsert1( DdManager * table, DdNode * (*)(DdManager * , DdNode *), DdNode * f, DdNode * data );
1075 extern DdNode * cuddCacheLookup( DdManager * table, ptruint op, DdNode * f, DdNode * g, DdNode * h );
1076 extern DdNode * cuddCacheLookupZdd( DdManager * table, ptruint op, DdNode * f, DdNode * g, DdNode * h );
1077 extern DdNode * cuddCacheLookup2( DdManager * table, DdNode * (*)(DdManager * , DdNode * , DdNode *), DdNode * f, DdNode * g );
1078 extern DdNode * cuddCacheLookup1( DdManager * table, DdNode * (*)(DdManager * , DdNode *), DdNode * f );
1079 extern DdNode * cuddCacheLookup2Zdd( DdManager * table, DdNode * (*)(DdManager * , DdNode * , DdNode *), DdNode * f, DdNode * g );
1080 extern DdNode * cuddCacheLookup1Zdd( DdManager * table, DdNode * (*)(DdManager * , DdNode *), DdNode * f );
1081 extern DdNode * cuddConstantLookup( DdManager * table, ptruint op, DdNode * f, DdNode * g, DdNode * h );
1082 extern int cuddCacheProfile( DdManager * table, FILE * fp );
1083 extern void cuddCacheResize( DdManager * table );
1084 extern void cuddCacheFlush( DdManager * table );
1085 extern int cuddComputeFloorLog2( unsigned int value );
1086 extern int cuddHeapProfile( DdManager * dd );
1087 extern void cuddPrintNode( DdNode * f, FILE * fp );
1088 extern void cuddPrintVarGroups( DdManager * dd, MtrNode * root, int zdd, int silent );
1089 extern DdNode * cuddBddClippingAnd( DdManager * dd, DdNode * f, DdNode * g, int maxDepth, int direction );
1090 extern DdNode * cuddBddClippingAndAbstract( DdManager * dd, DdNode * f, DdNode * g, DdNode * cube, int maxDepth, int direction );
1091 extern void cuddGetBranches( DdNode * g, DdNode ** g1, DdNode ** g0 );
1092 extern int cuddCheckCube( DdManager * dd, DdNode * g );
1093 extern DdNode * cuddCofactorRecur( DdManager * dd, DdNode * f, DdNode * g );
1094 extern DdNode * cuddBddComposeRecur( DdManager * dd, DdNode * f, DdNode * g, DdNode * proj );
1095 extern DdNode * cuddAddComposeRecur( DdManager * dd, DdNode * f, DdNode * g, DdNode * proj );
1096 extern int cuddExact( DdManager * table, int lower, int upper );
1097 extern DdNode * cuddBddConstrainRecur( DdManager * dd, DdNode * f, DdNode * c );
1098 extern DdNode * cuddBddRestrictRecur( DdManager * dd, DdNode * f, DdNode * c );
1099 extern DdNode * cuddBddNPAndRecur( DdManager * dd, DdNode * f, DdNode * c );
1100 extern DdNode * cuddAddConstrainRecur( DdManager * dd, DdNode * f, DdNode * c );
1101 extern DdNode * cuddAddRestrictRecur( DdManager * dd, DdNode * f, DdNode * c );
1102 extern DdNode * cuddBddLICompaction( DdManager * dd, DdNode * f, DdNode * c );
1103 extern int cuddGa( DdManager * table, int lower, int upper );
1104 extern int cuddTreeSifting( DdManager * table, Cudd_ReorderingType method );
1105 extern int cuddZddInitUniv( DdManager * zdd );
1106 extern void cuddZddFreeUniv( DdManager * zdd );
1107 extern void cuddSetInteract( DdManager * table, int x, int y );
1108 extern int cuddTestInteract( DdManager * table, int x, int y );
1109 extern int cuddInitInteract( DdManager * table );
1110 extern DdLocalCache * cuddLocalCacheInit( DdManager * manager, unsigned int keySize, unsigned int cacheSize, unsigned int maxCacheSize );
1111 extern void cuddLocalCacheQuit( DdLocalCache * cache );
1112 extern void cuddLocalCacheInsert( DdLocalCache * cache, DdNodePtr * key, DdNode * value );
1113 extern DdNode * cuddLocalCacheLookup( DdLocalCache * cache, DdNodePtr * key );
1114 extern void cuddLocalCacheClearDead( DdManager * manager );
1115 extern int cuddIsInDeathRow( DdManager * dd, DdNode * f );
1116 extern int cuddTimesInDeathRow( DdManager * dd, DdNode * f );
1117 extern void cuddLocalCacheClearAll( DdManager * manager );
1118 #ifdef DD_CACHE_PROFILE
1119 extern int cuddLocalCacheProfile( DdLocalCache * cache );
1120 #endif
1121 extern DdHashTable * cuddHashTableInit( DdManager * manager, unsigned int keySize, unsigned int initSize );
1122 extern void cuddHashTableQuit( DdHashTable * hash );
1123 extern int cuddHashTableInsert( DdHashTable * hash, DdNodePtr * key, DdNode * value, ptrint count );
1125 extern int cuddHashTableInsert1( DdHashTable * hash, DdNode * f, DdNode * value, ptrint count );
1127 extern int cuddHashTableInsert2( DdHashTable * hash, DdNode * f, DdNode * g, DdNode * value, ptrint count );
1128 extern DdNode * cuddHashTableLookup2( DdHashTable * hash, DdNode * f, DdNode * g );
1129 extern int cuddHashTableInsert3( DdHashTable * hash, DdNode * f, DdNode * g, DdNode * h, DdNode * value, ptrint count );
1130 extern DdNode * cuddHashTableLookup3( DdHashTable * hash, DdNode * f, DdNode * g, DdNode * h );
1131 extern DdLevelQueue * cuddLevelQueueInit( int levels, int itemSize, int numBuckets );
1132 extern void cuddLevelQueueQuit( DdLevelQueue * queue );
1133 extern void * cuddLevelQueueEnqueue( DdLevelQueue * queue, void * key, int level );
1134 extern void cuddLevelQueueDequeue( DdLevelQueue * queue, int level );
1135 extern int cuddLinearAndSifting( DdManager * table, int lower, int upper );
1136 extern int cuddLinearInPlace( DdManager * table, int x, int y );
1137 extern void cuddUpdateInteractionMatrix( DdManager * table, int xindex, int yindex );
1138 extern int cuddInitLinear( DdManager * table );
1139 extern int cuddResizeLinear( DdManager * table );
1141 extern DdNode * cuddCProjectionRecur( DdManager * dd, DdNode * R, DdNode * Y, DdNode * Ysupp );
1142 extern DdNode * cuddBddClosestCube( DdManager * dd, DdNode * f, DdNode * g, CUDD_VALUE_TYPE bound );
1143 extern void cuddReclaim( DdManager * table, DdNode * n );
1144 extern void cuddReclaimZdd( DdManager * table, DdNode * n );
1145 extern void cuddClearDeathRow( DdManager * table );
1146 extern void cuddShrinkDeathRow( DdManager * table );
1147 extern DdNode * cuddDynamicAllocNode( DdManager * table );
1148 extern int cuddSifting( DdManager * table, int lower, int upper );
1149 extern int cuddSwapping( DdManager * table, int lower, int upper, Cudd_ReorderingType heuristic );
1150 extern int cuddNextHigh( DdManager * table, int x );
1151 extern int cuddNextLow( DdManager * table, int x );
1152 extern int cuddSwapInPlace( DdManager * table, int x, int y );
1153 extern int cuddBddAlignToZdd( DdManager * table );
1154 extern DdNode * cuddBddMakePrime( DdManager * dd, DdNode * cube, DdNode * f );
1155 extern DdNode * cuddSolveEqnRecur( DdManager * bdd, DdNode * F, DdNode * Y, DdNode ** G, int n, int * yIndex, int i );
1156 extern DdNode * cuddVerifySol( DdManager * bdd, DdNode * F, DdNode ** G, int * yIndex, int n );
1157 #ifdef st__INCLUDED
1158 extern DdNode * cuddSplitSetRecur( DdManager * manager, st__table * mtable, int * varSeen, DdNode * p, double n, double max, int index );
1159 #endif
1160 extern DdNode * cuddSubsetHeavyBranch( DdManager * dd, DdNode * f, int numVars, int threshold );
1161 extern DdNode * cuddSubsetShortPaths( DdManager * dd, DdNode * f, int numVars, int threshold, int hardlimit );
1162 extern int cuddSymmCheck( DdManager * table, int x, int y );
1163 extern int cuddSymmSifting( DdManager * table, int lower, int upper );
1164 extern int cuddSymmSiftingConv( DdManager * table, int lower, int upper );
1165 extern DdNode * cuddAllocNode( DdManager * unique );
1166 extern DdManager * cuddInitTable( unsigned int numVars, unsigned int numVarsZ, unsigned int numSlots, unsigned int looseUpTo );
1167 extern void cuddFreeTable( DdManager * unique );
1168 extern int cuddGarbageCollect( DdManager * unique, int clearCache );
1169 extern DdNode * cuddZddGetNode( DdManager * zdd, int id, DdNode * T, DdNode * E );
1170 extern DdNode * cuddZddGetNodeIVO( DdManager * dd, int index, DdNode * g, DdNode * h );
1171 extern DdNode * cuddUniqueInter( DdManager * unique, int index, DdNode * T, DdNode * E );
1172 extern DdNode * cuddUniqueInterIVO( DdManager * unique, int index, DdNode * T, DdNode * E );
1173 extern DdNode * cuddUniqueInterZdd( DdManager * unique, int index, DdNode * T, DdNode * E );
1174 extern DdNode * cuddUniqueConst( DdManager * unique, CUDD_VALUE_TYPE value );
1175 extern void cuddRehash( DdManager * unique, int i );
1176 extern void cuddShrinkSubtable( DdManager * unique, int i );
1177 extern int cuddInsertSubtables( DdManager * unique, int n, int level );
1178 extern int cuddDestroySubtables( DdManager * unique, int n );
1179 extern int cuddResizeTableZdd( DdManager * unique, int index );
1180 extern void cuddSlowTableGrowth( DdManager * unique );
1181 extern int cuddP( DdManager * dd, DdNode * f );
1182 #ifdef st__INCLUDED
1183 extern enum st__retval cuddStCountfree( char * key, char * value, char * arg );
1184 extern int cuddCollectNodes( DdNode * f, st__table * visited );
1185 #endif
1186 extern DdNodePtr * cuddNodeArray( DdNode * f, int * n );
1187 extern int cuddWindowReorder( DdManager * table, int low, int high, Cudd_ReorderingType submethod );
1188 extern DdNode * cuddZddProduct( DdManager * dd, DdNode * f, DdNode * g );
1189 extern DdNode * cuddZddUnateProduct( DdManager * dd, DdNode * f, DdNode * g );
1190 extern DdNode * cuddZddWeakDiv( DdManager * dd, DdNode * f, DdNode * g );
1191 extern DdNode * cuddZddWeakDivF( DdManager * dd, DdNode * f, DdNode * g );
1192 extern DdNode * cuddZddDivide( DdManager * dd, DdNode * f, DdNode * g );
1193 extern DdNode * cuddZddDivideF( DdManager * dd, DdNode * f, DdNode * g );
1194 extern int cuddZddGetCofactors3( DdManager * dd, DdNode * f, int v, DdNode ** f1, DdNode ** f0, DdNode ** fd );
1195 extern int cuddZddGetCofactors2( DdManager * dd, DdNode * f, int v, DdNode ** f1, DdNode ** f0 );
1196 extern DdNode * cuddZddComplement( DdManager * dd, DdNode * node );
1197 extern int cuddZddGetPosVarIndex(DdManager * dd, int index );
1198 extern int cuddZddGetNegVarIndex(DdManager * dd, int index );
1199 extern int cuddZddGetPosVarLevel(DdManager * dd, int index );
1200 extern int cuddZddGetNegVarLevel(DdManager * dd, int index );
1201 extern int cuddZddTreeSifting( DdManager * table, Cudd_ReorderingType method );
1202 extern DdNode * cuddZddIsop( DdManager * dd, DdNode * L, DdNode * U, DdNode ** zdd_I );
1203 extern DdNode * cuddBddIsop( DdManager * dd, DdNode * L, DdNode * U );
1204 extern DdNode * cuddMakeBddFromZddCover( DdManager * dd, DdNode * node );
1205 extern int cuddZddLinearSifting( DdManager * table, int lower, int upper );
1206 extern int cuddZddAlignToBdd( DdManager * table );
1207 extern int cuddZddNextHigh( DdManager * table, int x );
1208 extern int cuddZddNextLow( DdManager * table, int x );
1209 extern int cuddZddUniqueCompare( int * ptr_x, int * ptr_y );
1210 extern int cuddZddSwapInPlace( DdManager * table, int x, int y );
1211 extern int cuddZddSwapping( DdManager * table, int lower, int upper, Cudd_ReorderingType heuristic );
1212 extern int cuddZddSifting( DdManager * table, int lower, int upper );
1213 extern DdNode * cuddZddIte( DdManager * dd, DdNode * f, DdNode * g, DdNode * h );
1214 extern DdNode * cuddZddUnion( DdManager * zdd, DdNode * P, DdNode * Q );
1215 extern DdNode * cuddZddIntersect( DdManager * zdd, DdNode * P, DdNode * Q );
1216 extern DdNode * cuddZddDiff( DdManager * zdd, DdNode * P, DdNode * Q );
1217 extern DdNode * cuddZddChangeAux( DdManager * zdd, DdNode * P, DdNode * zvar );
1218 extern DdNode * cuddZddSubset1( DdManager * dd, DdNode * P, int var );
1219 extern DdNode * cuddZddSubset0( DdManager * dd, DdNode * P, int var );
1220 extern DdNode * cuddZddChange( DdManager * dd, DdNode * P, int var );
1221 extern int cuddZddSymmCheck( DdManager * table, int x, int y );
1222 extern int cuddZddSymmSifting( DdManager * table, int lower, int upper );
1223 extern int cuddZddSymmSiftingConv( DdManager * table, int lower, int upper );
1224 extern int cuddZddP( DdManager * zdd, DdNode * f );
1225 
1226 /**AutomaticEnd***************************************************************/
1227 
1228 
1229 
1231 
1232 #endif /* _CUDDINT */
DdNode * cuddZddGetNodeIVO(DdManager *dd, int index, DdNode *g, DdNode *h)
Definition: cuddTable.c:1074
int maxsize
Definition: cuddInt.h:516
unsigned int keysize
Definition: cuddInt.h:304
int levels
Definition: cuddInt.h:513
ABC_INT64_T allocated
Definition: cuddInt.h:382
void cuddShrinkSubtable(DdManager *unique, int i)
Definition: cuddTable.c:1702
Cudd_AggregationType groupcheck
Definition: cuddInt.h:426
DdNode * node
Definition: cuddInt.h:232
void cuddLevelQueueDequeue(DdLevelQueue *queue, int level)
Definition: cuddLevelQ.c:354
unsigned int keys
Definition: cuddInt.h:330
DdNode * cuddSubsetShortPaths(DdManager *dd, DdNode *f, int numVars, int threshold, int hardlimit)
Definition: cuddSubsetSP.c:316
DdHashItem ** bucket
Definition: cuddInt.h:306
DdNode * cuddAddCmplRecur(DdManager *dd, DdNode *f)
Definition: cuddAddIte.c:562
void cuddZddFreeUniv(DdManager *zdd)
Definition: cuddInit.c:301
unsigned short DdHalfWord
Definition: cudd.h:262
DdNode * cuddCacheLookup1Zdd(DdManager *table, DdNode *(*)(DdManager *, DdNode *), DdNode *f)
int type
Definition: cuddInt.h:206
DdNode * value
Definition: cuddInt.h:298
long reordTime
Definition: cuddInt.h:454
int(* DD_HFP)(DdManager *, const char *, void *)
Definition: cudd.h:312
unsigned int size
Definition: cuddInt.h:311
DdNode * cuddBddLICompaction(DdManager *dd, DdNode *f, DdNode *c)
Definition: cuddGenCof.c:1434
DdNode * cuddBddExistAbstractRecur(DdManager *manager, DdNode *f, DdNode *cube)
Definition: cuddBddAbs.c:352
Cudd_AggregationType
Definition: cudd.h:184
DdNode * cuddBddBooleanDiffRecur(DdManager *manager, DdNode *f, DdNode *var)
Definition: cuddBddAbs.c:636
Cudd_ReorderingType autoMethod
Definition: cuddInt.h:418
void cuddRehash(DdManager *unique, int i)
Definition: cuddTable.c:1530
unsigned int peakLiveNodes
Definition: cuddInt.h:465
int maxSizeZ
Definition: cuddInt.h:364
DdNode * cuddBddXorExistAbstractRecur(DdManager *manager, DdNode *f, DdNode *g, DdNode *cube)
Definition: cuddBddAbs.c:464
int cuddInitLinear(DdManager *table)
Definition: cuddLinear.c:759
DdNode * cuddAddMonadicApplyRecur(DdManager *dd, DdNode *(*)(DdManager *, DdNode *), DdNode *f)
DdNode * f
Definition: cuddInt.h:317
int * map
Definition: cuddInt.h:391
abctime TimeStop
Definition: cuddInt.h:489
Definition: cudd.h:278
DdNode * cuddZddGetNode(DdManager *zdd, int id, DdNode *T, DdNode *E)
Definition: cuddTable.c:1041
DdNode * cuddBddComposeRecur(DdManager *dd, DdNode *f, DdNode *g, DdNode *proj)
Definition: cuddCompose.c:850
unsigned int deadZ
Definition: cuddInt.h:372
DdNode * cuddVerifySol(DdManager *bdd, DdNode *F, DdNode **G, int *yIndex, int n)
Definition: cuddSolve.c:336
DdNode * data
Definition: cuddInt.h:319
DdNode * cuddSubsetHeavyBranch(DdManager *dd, DdNode *f, int numVars, int threshold)
Definition: cuddSubsetHB.c:305
int siftMaxSwap
Definition: cuddInt.h:412
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int cuddAnnealing(DdManager *table, int lower, int upper)
Definition: cuddAnneal.c:158
DdHook * preReorderingHook
Definition: cuddInt.h:439
unsigned deadMask
Definition: cuddInt.h:404
struct DdGen::@30::@32 cubes
int * invpermZ
Definition: cuddInt.h:389
int reordCycle
Definition: cuddInt.h:415
DdNode * cuddUniqueConst(DdManager *unique, CUDD_VALUE_TYPE value)
Definition: cuddTable.c:1450
DdNode * cuddCacheLookup1(DdManager *table, DdNode *(*)(DdManager *, DdNode *), DdNode *f)
static byte P[256]
Definition: kitPerm.c:76
DdManager * manager
Definition: cuddInt.h:313
int size
Definition: cuddInt.h:361
DdNode * cuddCacheLookup2(DdManager *table, DdNode *(*)(DdManager *, DdNode *, DdNode *), DdNode *f, DdNode *g)
double gcFrac
Definition: cuddInt.h:375
DdNode * cuddZddWeakDivF(DdManager *dd, DdNode *f, DdNode *g)
Definition: cuddZddFuncs.c:922
int var(Lit p)
Definition: SolverTypes.h:62
Definition: cuddInt.h:492
unsigned int maxCacheHard
Definition: cuddInt.h:359
int cuddZddGetNegVarLevel(DdManager *dd, int index)
int cuddResizeLinear(DdManager *table)
Definition: cuddLinear.c:804
CUDD_VALUE_TYPE value
Definition: cuddInt.h:211
Cudd_ErrorType
Definition: cudd.h:220
void cuddSetInteract(DdManager *table, int x, int y)
Definition: cuddInteract.c:156
unsigned int slots
Definition: cuddInt.h:368
ptruint h
Definition: cuddInt.h:318
DdNode * zero
Definition: cuddInt.h:346
int cuddInitInteract(DdManager *table)
Definition: cuddInteract.c:237
void cuddReclaim(DdManager *table, DdNode *n)
Definition: cuddRef.c:584
int cuddNextLow(DdManager *table, int x)
Definition: cuddReorder.c:738
double maxGrowthAlt
Definition: cuddInt.h:414
enum st__retval cuddStCountfree(char *key, char *value, char *arg)
Definition: cuddUtil.c:2895
ptrint count
Definition: cuddInt.h:297
int realign
Definition: cuddInt.h:420
int cuddZddGetNegVarIndex(DdManager *dd, int index)
int cuddSifting(DdManager *table, int lower, int upper)
Definition: cuddReorder.c:508
double maxGrowth
Definition: cuddInt.h:413
DdNode * cuddCProjectionRecur(DdManager *dd, DdNode *R, DdNode *Y, DdNode *Ysupp)
DdNode * cuddBddClippingAndAbstract(DdManager *dd, DdNode *f, DdNode *g, DdNode *cube, int maxDepth, int direction)
Definition: cuddClip.c:233
FILE * err
Definition: cuddInt.h:442
DdNode * g
Definition: cuddInt.h:317
int cuddTimesInDeathRow(DdManager *dd, DdNode *f)
Definition: cuddRef.c:793
DdNode * cuddLocalCacheLookup(DdLocalCache *cache, DdNodePtr *key)
Definition: cuddLCache.c:305
void cuddCacheInsert1(DdManager *table, DdNode *(*)(DdManager *, DdNode *), DdNode *f, DdNode *data)
int garbageCollections
Definition: cuddInt.h:452
int populationSize
Definition: cuddInt.h:430
struct DdLocalCacheItem DdLocalCacheItem
DdNode * cuddZddWeakDiv(DdManager *dd, DdNode *f, DdNode *g)
Definition: cuddZddFuncs.c:761
DdNode * cuddBddClippingAnd(DdManager *dd, DdNode *f, DdNode *g, int maxDepth, int direction)
Definition: cuddClip.c:201
struct DdHashItem * next
Definition: cuddInt.h:296
int * cube
Definition: cuddInt.h:210
int cuddCacheProfile(DdManager *table, FILE *fp)
Definition: cuddCache.c:785
int cuddZddSwapInPlace(DdManager *table, int x, int y)
Definition: cuddZddReord.c:484
int numBuckets
Definition: cuddInt.h:517
DdNode * cuddCofactorRecur(DdManager *dd, DdNode *f, DdNode *g)
Definition: cuddCof.c:230
DdNode * bFunc
Definition: cuddInt.h:487
Cudd_ReorderingType autoMethodZ
Definition: cuddInt.h:419
int bindVar
Definition: cuddInt.h:334
void cuddLevelQueueQuit(DdLevelQueue *queue)
Definition: cuddLevelQ.c:244
Definition: cuddInt.h:204
DdSubtable * subtables
Definition: cuddInt.h:365
DdNode * cuddAddNegateRecur(DdManager *dd, DdNode *f)
Definition: cuddAddNeg.c:180
int * permZ
Definition: cuddInt.h:387
double cachecollisions
Definition: cuddInt.h:457
DdNode * DdNodePtr
Definition: cuddInt.h:268
DdNode * cuddZddChange(DdManager *dd, DdNode *P, int var)
Definition: cuddZddSetop.c:971
DdNode * value
Definition: cuddInt.h:272
void cuddPrintVarGroups(DdManager *dd, MtrNode *root, int zdd, int silent)
Definition: cuddCheck.c:747
struct DdHashTable DdHashTable
int cuddCheckCube(DdManager *dd, DdNode *g)
Definition: cuddCof.c:193
MtrNode * tree
Definition: cuddInt.h:424
double minHit
Definition: cuddInt.h:287
unsigned int keysize
Definition: cuddInt.h:283
struct DdSubtable DdSubtable
int cuddTreeSifting(DdManager *table, Cudd_ReorderingType method)
Definition: cuddGroup.c:274
int cuddZddGetPosVarIndex(DdManager *dd, int index)
DdNode * cuddAddRoundOffRecur(DdManager *dd, DdNode *f, double trunc)
Definition: cuddAddNeg.c:240
DdLocalCacheItem * item
Definition: cuddInt.h:281
DdNode * cuddHashTableLookup1(DdHashTable *hash, DdNode *f)
Definition: cuddLCache.c:819
DD_HFP f
Definition: cuddInt.h:246
DdNode ** deathRow
Definition: cuddInt.h:401
double cacheinserts
Definition: cuddInt.h:458
int cuddSymmCheck(DdManager *table, int x, int y)
Definition: cuddSymmetry.c:192
DdNode ** stack
Definition: cuddInt.h:380
int cuddZddGetPosVarLevel(DdManager *dd, int index)
int cuddExact(DdManager *table, int lower, int upper)
Definition: cuddExact.c:153
struct DdQueueItem * next
Definition: cuddInt.h:502
Cudd_VariableType
Definition: cudd.h:252
struct DdLocalCache * next
Definition: cuddInt.h:291
void cuddCacheResize(DdManager *table)
Definition: cuddCache.c:925
unsigned int maxslots
Definition: cuddInt.h:289
int cuddSymmSiftingConv(DdManager *table, int lower, int upper)
Definition: cuddSymmetry.c:442
int cuddHeapProfile(DdManager *dd)
Definition: cuddCheck.c:639
DdNode * cuddHashTableLookup3(DdHashTable *hash, DdNode *f, DdNode *g, DdNode *h)
Definition: cuddLCache.c:1040
ABC_PTRUINT_T ptruint
Definition: cuddInt.h:261
DdNode * ub
Definition: cuddInt.h:215
int cuddGarbageCollect(DdManager *unique, int clearCache)
Definition: cuddTable.c:729
void cuddLocalCacheInsert(DdLocalCache *cache, DdNodePtr *key, DdNode *value)
Definition: cuddLCache.c:272
unsigned int countDead
Definition: cuddInt.h:423
st__retval
Definition: st.h:73
unsigned int initSlots
Definition: cuddInt.h:379
int cuddZddSymmSiftingConv(DdManager *table, int lower, int upper)
Definition: cuddZddSymm.c:423
void * cuddLevelQueueEnqueue(DdLevelQueue *queue, void *key, int level)
Definition: cuddLevelQ.c:282
Cudd_VariableType varType
Definition: cuddInt.h:336
DdLocalCache * cuddLocalCacheInit(DdManager *manager, unsigned int keySize, unsigned int cacheSize, unsigned int maxCacheSize)
Definition: cuddLCache.c:183
int reordered
Definition: cuddInt.h:409
int cuddZddLinearSifting(DdManager *table, int lower, int upper)
Definition: cuddZddLin.c:156
unsigned int nextDyn
Definition: cuddInt.h:422
struct DdQueueItem DdQueueItem
unsigned int dead
Definition: cuddInt.h:371
DdNode * cuddAddUnivAbstractRecur(DdManager *manager, DdNode *f, DdNode *cube)
Definition: cuddAddAbs.c:361
DdLevelQueue * cuddLevelQueueInit(int levels, int itemSize, int numBuckets)
Definition: cuddLevelQ.c:169
DdNode * cuddAddBddDoPattern(DdManager *dd, DdNode *f)
Definition: cuddBridge.c:493
DdNode * cuddBddIsop(DdManager *dd, DdNode *L, DdNode *U)
Definition: cuddZddIsop.c:575
unsigned int cacheSlots
Definition: cuddInt.h:353
DdNode * cuddBddRestrictRecur(DdManager *dd, DdNode *f, DdNode *c)
Definition: cuddGenCof.c:912
void cuddLocalCacheClearAll(DdManager *manager)
Definition: cuddLCache.c:404
DdNode * cuddZddProduct(DdManager *dd, DdNode *f, DdNode *g)
Definition: cuddZddFuncs.c:380
unsigned int maxLive
Definition: cuddInt.h:373
DdNode * cuddZddDiff(DdManager *zdd, DdNode *P, DdNode *Q)
Definition: cuddZddSetop.c:717
struct DdHook DdHook
int recomb
Definition: cuddInt.h:427
DdNode sentinel
Definition: cuddInt.h:344
DdNode * cuddBddTransfer(DdManager *ddS, DdManager *ddD, DdNode *f)
Definition: cuddBridge.c:443
DdNode * cuddAddComposeRecur(DdManager *dd, DdNode *f, DdNode *g, DdNode *proj)
Definition: cuddCompose.c:952
char * stash
Definition: cuddInt.h:399
DdNode * cuddBddLiteralSetIntersectionRecur(DdManager *dd, DdNode *f, DdNode *g)
Definition: cuddLiteral.c:153
DdNode ** stack
Definition: cuddInt.h:227
DdHook * postReorderingHook
Definition: cuddInt.h:440
unsigned int keys
Definition: cuddInt.h:369
unsigned int itemsize
Definition: cuddInt.h:282
unsigned int dead
Definition: cuddInt.h:332
FILE * out
Definition: cuddInt.h:441
int cuddResizeTableZdd(DdManager *unique, int index)
Definition: cuddTable.c:2241
unsigned int flags
Definition: cuddInt.h:495
ABC_PTRINT_T ptrint
Definition: cuddInt.h:260
int realignZ
Definition: cuddInt.h:421
Definition: st.h:52
DdCache * cache
Definition: cuddInt.h:352
DdNode * cuddZddIntersect(DdManager *zdd, DdNode *P, DdNode *Q)
Definition: cuddZddSetop.c:642
double hits
Definition: cuddInt.h:288
DdHalfWord x
Definition: cuddInt.h:493
double lookUps
Definition: cuddInt.h:286
unsigned int numBuckets
Definition: cuddInt.h:309
int cuddZddGetCofactors2(DdManager *dd, DdNode *f, int v, DdNode **f1, DdNode **f0)
DdNode * cuddAddExistAbstractRecur(DdManager *manager, DdNode *f, DdNode *cube)
Definition: cuddAddAbs.c:256
void cuddSlowTableGrowth(DdManager *unique)
Definition: cuddTable.c:2385
DdNode * cuddZddDivide(DdManager *dd, DdNode *f, DdNode *g)
DdManager * manager
Definition: cuddInt.h:205
DdNode * cuddUniqueInterIVO(DdManager *unique, int index, DdNode *T, DdNode *E)
Definition: cuddTable.c:1304
Cudd_LazyGroupType varToBeGrouped
Definition: cuddInt.h:339
DdNode * cuddCacheLookupZdd(DdManager *table, ptruint op, DdNode *f, DdNode *g, DdNode *h)
Definition: cuddCache.c:435
int cuddInsertSubtables(DdManager *unique, int n, int level)
Definition: cuddTable.c:1795
double totCacheMisses
Definition: cuddInt.h:456
unsigned int slots
Definition: cuddInt.h:284
int maxSize
Definition: cuddInt.h:363
long * interact
Definition: cuddInt.h:394
void cuddLocalCacheQuit(DdLocalCache *cache)
Definition: cuddLCache.c:246
DdNode * cuddZddIsop(DdManager *dd, DdNode *L, DdNode *U, DdNode **zdd_I)
Definition: cuddZddIsop.c:234
unsigned int maxKeys
Definition: cuddInt.h:331
DdNode * cuddZddIte(DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
Definition: cuddZddSetop.c:427
long * linear
Definition: cuddInt.h:395
DdNode * cuddAddApplyRecur(DdManager *dd, DdNode *(*)(DdManager *, DdNode **, DdNode **), DdNode *f, DdNode *g)
long GCTime
Definition: cuddInt.h:453
DdNode * cuddMakeBddFromZddCover(DdManager *dd, DdNode *node)
Definition: cuddZddIsop.c:800
struct DdHashItem DdHashItem
int gcEnabled
Definition: cuddInt.h:376
DdNode * cuddBiasedUnderApprox(DdManager *dd, DdNode *f, DdNode *b, int numVars, int threshold, double quality1, double quality0)
Definition: cuddApprox.c:691
int sp
Definition: cuddInt.h:222
int symmviolation
Definition: cuddInt.h:428
DdNode * cuddSolveEqnRecur(DdManager *bdd, DdNode *F, DdNode *Y, DdNode **G, int n, int *yIndex, int i)
Definition: cuddSolve.c:210
DdNode * cuddAddScalarInverseRecur(DdManager *dd, DdNode *f, DdNode *epsilon)
Definition: cuddAddInv.c:156
int numberXovers
Definition: cuddInt.h:431
static double max
Definition: cuddSubsetHB.c:134
DdNode * bFunc2
Definition: cuddInt.h:488
int cuddHashTableInsert(DdHashTable *hash, DdNodePtr *key, DdNode *value, ptrint count)
Definition: cuddLCache.c:648
static uint32_t hash(uint32_t x)
Definition: Map.h:38
double cacheLastInserts
Definition: cuddInt.h:459
DdNode ** nodelist
Definition: cuddInt.h:327
int linearSize
Definition: cuddInt.h:393
int cuddZddSifting(DdManager *table, int lower, int upper)
Definition: cuddZddReord.c:867
DdNode * cuddAddConstrainRecur(DdManager *dd, DdNode *f, DdNode *c)
Definition: cuddGenCof.c:1203
double cacheHits
Definition: cuddInt.h:356
DdNode * cuddUniqueInterZdd(DdManager *unique, int index, DdNode *T, DdNode *E)
Definition: cuddTable.c:1343
unsigned int maxsize
Definition: cuddInt.h:312
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Definition: abc_global.h:105
int cuddZddSymmCheck(DdManager *table, int x, int y)
Definition: cuddZddSymm.c:197
int cuddZddNextHigh(DdManager *table, int x)
Definition: cuddZddReord.c:413
DdNode * cuddAddRestrictRecur(DdManager *dd, DdNode *f, DdNode *c)
Definition: cuddGenCof.c:1307
DdLocalCache * localCaches
Definition: cuddInt.h:432
int reorderings
Definition: cuddInt.h:410
DdNode * cuddBddIteRecur(DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
Definition: cuddBddIte.c:633
void cuddHashTableQuit(DdHashTable *hash)
Definition: cuddLCache.c:595
int cacheSlack
Definition: cuddInt.h:358
DdNode * cuddAddOrAbstractRecur(DdManager *manager, DdNode *f, DdNode *cube)
Definition: cuddAddAbs.c:469
void * first
Definition: cuddInt.h:509
int cuddZddGetCofactors3(DdManager *dd, DdNode *f, int v, DdNode **f1, DdNode **f0, DdNode **fd)
int cuddWindowReorder(DdManager *table, int low, int high, Cudd_ReorderingType submethod)
Definition: cuddWindow.c:142
DdNode * cuddDynamicAllocNode(DdManager *table)
Definition: cuddReorder.c:406
int nextDead
Definition: cuddInt.h:403
Definition: mtr.h:131
int varHandled
Definition: cuddInt.h:338
void cuddLocalCacheClearDead(DdManager *manager)
Definition: cuddLCache.c:352
#define ABC_NAMESPACE_HEADER_END
Definition: abc_global.h:106
void cuddReclaimZdd(DdManager *table, DdNode *n)
Definition: cuddRef.c:638
DdManager * cuddInitTable(unsigned int numVars, unsigned int numVarsZ, unsigned int numSlots, unsigned int looseUpTo)
Definition: cuddTable.c:351
DdNode * cuddCacheLookup2Zdd(DdManager *table, DdNode *(*)(DdManager *, DdNode *, DdNode *), DdNode *f, DdNode *g)
int cuddHashTableInsert2(DdHashTable *hash, DdNode *f, DdNode *g, DdNode *value, ptrint count)
Definition: cuddLCache.c:874
int cuddSwapping(DdManager *table, int lower, int upper, Cudd_ReorderingType heuristic)
Definition: cuddReorder.c:605
int cuddIsInDeathRow(DdManager *dd, DdNode *f)
Definition: cuddRef.c:762
int cuddLinearInPlace(DdManager *table, int x, int y)
Definition: cuddLinear.c:364
DdNode * cuddBddConstrainRecur(DdManager *dd, DdNode *f, DdNode *c)
Definition: cuddGenCof.c:783
int cuddZddInitUniv(DdManager *zdd)
Definition: cuddInit.c:252
DdNode ** memoryList
Definition: cuddInt.h:397
int cuddNextHigh(DdManager *table, int x)
Definition: cuddReorder.c:716
DdNode * cuddZddUnateProduct(DdManager *dd, DdNode *f, DdNode *g)
Definition: cuddZddFuncs.c:617
DdNode * cuddRemapUnderApprox(DdManager *dd, DdNode *f, int numVars, int threshold, double quality)
Definition: cuddApprox.c:601
int cuddGa(DdManager *table, int lower, int upper)
Definition: cuddGenetic.c:192
unsigned int itemsize
Definition: cuddInt.h:305
DdNode * cuddBddAndRecur(DdManager *manager, DdNode *f, DdNode *g)
Definition: cuddBddIte.c:886
unsigned long memused
Definition: cuddInt.h:449
int siftMaxVar
Definition: cuddInt.h:411
DdNode * cuddZddSubset1(DdManager *dd, DdNode *P, int var)
Definition: cuddZddSetop.c:874
int cuddZddSymmSifting(DdManager *table, int lower, int upper)
Definition: cuddZddSymm.c:302
union DdGen::@30 gen
struct DdLevelQueue DdLevelQueue
DdNode * cuddZddUnion(DdManager *zdd, DdNode *P, DdNode *Q)
Definition: cuddZddSetop.c:553
DdNode * cuddCacheLookup(DdManager *table, ptruint op, DdNode *f, DdNode *g, DdNode *h)
Definition: cuddCache.c:369
int cuddSwapInPlace(DdManager *table, int x, int y)
Definition: cuddReorder.c:761
#define CUDD_VALUE_TYPE
Definition: cudd.h:94
int deathRowDepth
Definition: cuddInt.h:402
DdNode * nextFree
Definition: cuddInt.h:398
unsigned hash
Definition: cuddInt.h:323
DdNode * cuddBddClosestCube(DdManager *dd, DdNode *f, DdNode *g, CUDD_VALUE_TYPE bound)
void cuddCacheFlush(DdManager *table)
Definition: cuddCache.c:1047
struct DdHook * next
Definition: cuddInt.h:247
int cuddHashTableInsert1(DdHashTable *hash, DdNode *f, DdNode *value, ptrint count)
Definition: cuddLCache.c:767
DdNode * cuddBddNPAndRecur(DdManager *dd, DdNode *f, DdNode *c)
Definition: cuddGenCof.c:1062
DdNode * cuddBddMakePrime(DdManager *dd, DdNode *cube, DdNode *f)
Definition: cuddSat.c:900
DdNode * key[1]
Definition: cuddInt.h:276
void cuddGetBranches(DdNode *g, DdNode **g1, DdNode **g0)
Definition: cuddCof.c:162
DdNode * cuddUnderApprox(DdManager *dd, DdNode *f, int numVars, int threshold, int safe, double quality)
Definition: cuddApprox.c:511
void cuddClearDeathRow(DdManager *table)
Definition: cuddRef.c:726
DdNode * cuddAddIteRecur(DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
Definition: cuddAddIte.c:445
void cuddCacheInsert2(DdManager *table, DdNode *(*)(DdManager *, DdNode *, DdNode *), DdNode *f, DdNode *g, DdNode *data)
struct DdGen::@30::@33 primes
int sizeZ
Definition: cuddInt.h:362
DdHashItem * nextFree
Definition: cuddInt.h:307
unsigned int looseUpTo
Definition: cuddInt.h:377
unsigned int slots
Definition: cuddInt.h:329
DdHalfWord y
Definition: cuddInt.h:494
DdNode ** vars
Definition: cuddInt.h:390
double cacheMisses
Definition: cuddInt.h:355
DdNodePtr * cuddNodeArray(DdNode *f, int *n)
Definition: cuddUtil.c:2979
enum keys key
unsigned long maxmemhard
Definition: cuddInt.h:451
DdHook * postGCHook
Definition: cuddInt.h:438
int pairIndex
Definition: cuddInt.h:337
DdNode * cuddHashTableLookup2(DdHashTable *hash, DdNode *f, DdNode *g)
Definition: cuddLCache.c:928
double minHit
Definition: cuddInt.h:357
DdNode * cuddConstantLookup(DdManager *table, ptruint op, DdNode *f, DdNode *g, DdNode *h)
Definition: cuddCache.c:721
CUDD_VALUE_TYPE epsilon
Definition: cuddInt.h:407
DdNode * one
Definition: cuddInt.h:345
DdQueueItem * freelist
Definition: cuddInt.h:511
unsigned int next
Definition: cuddInt.h:333
DdNode * cuddZddChangeAux(DdManager *zdd, DdNode *P, DdNode *zvar)
Definition: cuddZddSetop.c:799
int cuddZddSwapping(DdManager *table, int lower, int upper, Cudd_ReorderingType heuristic)
Definition: cuddZddReord.c:746
int cuddZddTreeSifting(DdManager *table, Cudd_ReorderingType method)
Definition: cuddZddGroup.c:232
struct Move Move
MtrNode * treeZ
Definition: cuddInt.h:425
int autoDynZ
Definition: cuddInt.h:417
int cacheShift
Definition: cuddInt.h:354
int cuddP(DdManager *dd, DdNode *f)
Definition: cuddUtil.c:2866
DdNode * cuddHashTableLookup(DdHashTable *hash, DdNodePtr *key)
Definition: cuddLCache.c:703
DdNode * cuddBddXorRecur(DdManager *manager, DdNode *f, DdNode *g)
Definition: cuddBddIte.c:1017
void cuddPrintNode(DdNode *f, FILE *fp)
Definition: cuddCheck.c:710
DdNode * cuddAllocNode(DdManager *unique)
Definition: cuddTable.c:235
int cuddCollectNodes(DdNode *f, st__table *visited)
Definition: cuddUtil.c:2925
struct Move * next
Definition: cuddInt.h:497
DdNode * plusinfinity
Definition: cuddInt.h:347
int size
Definition: cuddInt.h:218
int value
int cuddZddAlignToBdd(DdManager *table)
Definition: cuddZddReord.c:352
struct DdGen::@30::@34 nodes
struct DdLocalCache DdLocalCache
DdNode * key[1]
Definition: cuddInt.h:299
DdHashTable * cuddHashTableInit(DdManager *manager, unsigned int keySize, unsigned int initSize)
Definition: cuddLCache.c:538
int arcviolation
Definition: cuddInt.h:429
void cuddUpdateInteractionMatrix(DdManager *table, int xindex, int yindex)
Definition: cuddLinear.c:718
DdQueueItem ** buckets
Definition: cuddInt.h:512
int shift
Definition: cuddInt.h:310
int * invperm
Definition: cuddInt.h:388
DdSubtable constants
Definition: cuddInt.h:367
double cachedeletions
Definition: cuddInt.h:460
DdNode * cuddZddSubset0(DdManager *dd, DdNode *P, int var)
Definition: cuddZddSetop.c:923
int isolated
Definition: cuddInt.h:385
DdNode * cuddZddDivideF(DdManager *dd, DdNode *f, DdNode *g)
unsigned long maxmem
Definition: cuddInt.h:450
DdNode * cuddBddIntersectRecur(DdManager *dd, DdNode *f, DdNode *g)
Definition: cuddBddIte.c:771
int cuddComputeFloorLog2(unsigned int value)
Definition: cuddCache.c:1079
void cuddCacheInsert(DdManager *table, ptruint op, DdNode *f, DdNode *g, DdNode *h, DdNode *data)
Definition: cuddCache.c:222
DdNode * minusinfinity
Definition: cuddInt.h:348
int cuddLinearAndSifting(DdManager *table, int lower, int upper)
Definition: cuddLinear.c:240
DdQueueItem ** last
Definition: cuddInt.h:510
void cuddFreeTable(DdManager *unique)
Definition: cuddTable.c:659
int cuddTestInteract(DdManager *table, int x, int y)
Definition: cuddInteract.c:191
int cuddBddAlignToZdd(DdManager *table)
Definition: cuddReorder.c:1251
DdHashItem ** memoryList
Definition: cuddInt.h:308
DdNode * cuddBddAndAbstractRecur(DdManager *manager, DdNode *f, DdNode *g, DdNode *cube)
Definition: cuddAndAbs.c:200
int autoDyn
Definition: cuddInt.h:416
int shift
Definition: cuddInt.h:328
DdCache * acache
Definition: cuddInt.h:351
void cuddShrinkDeathRow(DdManager *table)
Definition: cuddRef.c:688
DdManager * manager
Definition: cuddInt.h:290
unsigned int keysZ
Definition: cuddInt.h:370
int cuddInitCache(DdManager *unique, unsigned int cacheSize, unsigned int maxCacheSize)
Definition: cuddCache.c:136
struct DdQueueItem * cnext
Definition: cuddInt.h:503
ABC_INT64_T abctime
Definition: abc_global.h:278
DdHook * preGCHook
Definition: cuddInt.h:437
Cudd_ReorderingType
Definition: cudd.h:151
int cuddSymmSifting(DdManager *table, int lower, int upper)
Definition: cuddSymmetry.c:322
DdNode * cuddSplitSetRecur(DdManager *manager, st__table *mtable, int *varSeen, DdNode *p, double n, double max, int index)
Definition: cuddSplit.c:247
void * key
Definition: cuddInt.h:504
int itemsize
Definition: cuddInt.h:514
Cudd_LazyGroupType
Definition: cudd.h:237
int * perm
Definition: cuddInt.h:386
int cuddZddUniqueCompare(int *ptr_x, int *ptr_y)
Definition: cuddZddReord.c:459
int cuddZddNextLow(DdManager *table, int x)
Definition: cuddZddReord.c:435
struct DdCache DdCache
int size
Definition: cuddInt.h:496
Cudd_ErrorType errorCode
Definition: cuddInt.h:447
DdNode * cuddUniqueInter(DdManager *unique, int index, DdNode *T, DdNode *E)
Definition: cuddTable.c:1128
unsigned int minDead
Definition: cuddInt.h:374
int cuddDestroySubtables(DdManager *unique, int n)
Definition: cuddTable.c:2108
double reclaimed
Definition: cuddInt.h:384
int cuddZddP(DdManager *zdd, DdNode *f)
Definition: cuddZddUtil.c:822
DdNode * background
Definition: cuddInt.h:349
DdNode * cuddZddComplement(DdManager *dd, DdNode *node)
int cuddHashTableInsert3(DdHashTable *hash, DdNode *f, DdNode *g, DdNode *h, DdNode *value, ptrint count)
Definition: cuddLCache.c:984
int status
Definition: cuddInt.h:207
DdSubtable * subtableZ
Definition: cuddInt.h:366
char * hooks
Definition: cuddInt.h:436
double totCachehits
Definition: cuddInt.h:455
DdNode ** univ
Definition: cuddInt.h:392