source: vis_dev/glu-2.3/src/calBdd/calDoc.txt @ 21

Last change on this file since 21 was 13, checked in by cecile, 13 years ago

library glu 2.3

File size: 40.4 KB
Line 
1The cal package
2
3Header CAL file for exported data structures and functions.
4
5Rajeev K. Ranjan (rajeev@eecs.berkeley.edu)                Jagesh V. Sanghavi
6(sanghavi@eecs.berkeley.edu)
7
8**********************************************************************
9
10Cal_AssociationInit()          Creates or finds a variable association.
11
12Cal_AssociationQuit()          Deletes the variable association given by id
13
14Cal_AssociationSetCurrent()    Sets the current variable association to the
15                               one given by id and   returns the ID of the old
16                               association.
17
18Cal_BddAnd()                   Returns the BDD for logical AND of argument
19                               BDDs
20
21Cal_BddBetween()               Returns a minimal BDD whose function contains
22                               fMin and is   contained in fMax.
23
24Cal_BddCofactor()              Returns the generalized cofactor of BDD f with
25                               respect   to BDD c.
26
27Cal_BddCompose()               composition - substitute a BDD variable by a
28                               function
29
30Cal_BddDependsOn()             Returns 1 if f depends on var and returns 0
31                               otherwise.
32
33Cal_BddDumpBdd()               Write a BDD to a file
34
35Cal_BddDynamicReordering()     Specify dynamic reordering technique.
36
37Cal_BddElse()                  Returns the negative cofactor of the argument
38                               BDD with   respect to the top variable of the
39                               BDD.
40
41Cal_BddExists()                Returns the result of existentially quantifying
42                               some   variables from the given BDD.
43
44Cal_BddForAll()                Returns the result of universally quantifying
45                               some   variables from the given BDD.
46
47Cal_BddFree()                  Frees the argument BDD.
48
49Cal_BddFunctionPrint()         Prints the function implemented by the argument
50                               BDD
51
52Cal_BddFunctionProfileMultiple()
53                               Returns a "function profile" for fArray.
54
55Cal_BddFunctionProfile()       Returns a "function profile" for f.
56
57Cal_BddGetIfId()               Returns the id of the top variable of the
58                               argument BDD.
59
60Cal_BddGetIfIndex()            Returns the index of the top variable of the
61                               argument BDD.
62
63Cal_BddGetRegular()            Returns a BDD with positive from a given BDD
64                               with arbitrary phase
65
66Cal_BddITE()                   Returns the BDD for logical If-Then-Else
67                               Description [Returns the BDD for the logical
68                               operation IF f THEN g ELSE h   - f g + f' h
69
70Cal_BddIdentity()              Returns the duplicate BDD of the argument BDD.
71
72Cal_BddIf()                    Returns the BDD corresponding to the top
73                               variable of   the argument BDD.
74
75Cal_BddImplies()               Computes a BDD that implies conjunction of f
76                               and Cal_BddNot(g)
77
78Cal_BddIntersects()            Computes a BDD that implies conjunction of f
79                               and g.
80
81Cal_BddIsBddConst()            Returns 1 if the argument BDD is a constant, 0
82                               otherwise.
83
84Cal_BddIsBddNull()             Returns 1 if the argument BDD is NULL, 0
85                               otherwise.
86
87Cal_BddIsBddOne()              Returns 1 if the argument BDD is constant one,
88                               0 otherwise.
89
90Cal_BddIsBddZero()             Returns 1 if the argument BDD is constant zero,
91                               0 otherwise.
92
93Cal_BddIsCube()                Returns 1 if the argument BDD is a cube, 0
94                               otherwise
95
96Cal_BddIsEqual()               Returns 1 if argument BDDs are equal, 0
97                               otherwise.
98
99Cal_BddIsProvisional()         Returns 1, if the given user BDD contains
100                               provisional BDD node.
101
102Cal_BddManagerCreateNewVarAfter()
103                               Creates and returns a new variable after the
104                               specified one in   the variable  order.
105
106Cal_BddManagerCreateNewVarBefore()
107                               Creates and returns a new variable before the
108                               specified one in   the variable order.
109
110Cal_BddManagerCreateNewVarFirst()
111                               Creates and returns a new variable at the start
112                               of the variable   order.
113
114Cal_BddManagerCreateNewVarLast()
115                               Creates and returns a new variable at the end
116                               of the variable   order.
117
118Cal_BddManagerGC()             Invokes the garbage collection at the manager
119                               level.
120
121Cal_BddManagerGetHooks()       Returns the hooks field of the manager.
122
123Cal_BddManagerGetNumNodes()    Returns the number of BDD nodes
124
125Cal_BddManagerGetVarWithId()   Returns the variable with the specified id,
126                               null if no   such variable exists
127
128Cal_BddManagerGetVarWithIndex()
129                               Returns the variable with the specified index,
130                               null if no   such variable exists
131
132Cal_BddManagerInit()           Creates and initializes a new BDD manager.
133
134Cal_BddManagerQuit()           Frees the BDD manager and all the associated
135                               allocations
136
137Cal_BddManagerSetGCLimit()     Sets the limit of the garbage collection.
138
139Cal_BddManagerSetHooks()       Sets the hooks field of the manager.
140
141Cal_BddManagerSetParameters()  Sets appropriate fields of BDD Manager.
142
143Cal_BddMultiwayAnd()           Returns the BDD for logical AND of argument
144                               BDDs
145
146Cal_BddMultiwayOr()            Returns the BDD for logical OR of argument BDDs
147
148Cal_BddMultiwayXor()           Returns the BDD for logical XOR of argument
149                               BDDs
150
151Cal_BddNand()                  Returns the BDD for logical NAND of argument
152                               BDDs
153
154Cal_BddNewVarBlock()           Creates and returns a variable block used for
155                               controlling dynamic reordering.
156
157Cal_BddNodeLimit()             Sets the node limit to new_limit and returns
158                               the old limit.
159
160Cal_BddNor()                   Returns the BDD for logical NOR of argument
161                               BDDs
162
163Cal_BddNot()                   Returns the complement of the argument BDD.
164
165Cal_BddOne()                   Returns the BDD for the constant one
166
167Cal_BddOr()                    Returns the BDD for logical OR of argument BDDs
168
169Cal_BddOverflow()              Returns 1 if the node limit has been exceeded,
170                               0 otherwise. The   overflow flag is cleared.
171
172Cal_BddPairwiseAnd()           Returns an array of BDDs obtained by logical
173                               AND of BDD pairs   specified by an BDD array in
174                               which a BDD at an even location is paired with
175                               a BDD at an odd location of the array
176
177Cal_BddPairwiseOr()            Returns an array of BDDs obtained by logical OR
178                               of BDD pairs   specified by an BDD array in
179                               which a BDD at an even location is paired with
180                               a BDD at an odd location of the array
181
182Cal_BddPairwiseXor()           Returns an array of BDDs obtained by logical
183                               XOR of BDD pairs   specified by an BDD array in
184                               which a BDD at an even location is paired with
185                               a BDD at an odd location of the array
186
187Cal_BddPrintBdd()              Prints a BDD in the human readable form.
188
189Cal_BddPrintFunctionProfileMultiple()
190                               Cal_BddPrintFunctionProfileMultiple is like
191                               Cal_BddPrintFunctionProfile except for multiple
192                               BDDs
193
194Cal_BddPrintFunctionProfile()  Cal_BddPrintFunctionProfile is like
195                               Cal_BddPrintProfile except                it
196                               displays a function profile for f
197
198Cal_BddPrintProfileMultiple()  Cal_BddPrintProfileMultiple is like
199                               Cal_BddPrintProfile except                it
200                               displays the profile for a set of BDDs
201
202Cal_BddPrintProfile()          Displays the node profile for f on fp.
203                               lineLength specifies                 the
204                               maximum line length.  varNamingFn is as in
205                               Cal_BddPrintBdd.
206
207Cal_BddProfileMultiple()
208
209Cal_BddProfile()               Returns a "node profile" of f, i.e., the number
210                               of nodes at each   level in f.
211
212Cal_BddReduce()                Returns a BDD which agrees with f for all
213                               valuations   which satisfy c.
214
215Cal_BddRelProd()               Returns the result of taking the logical AND of
216                               the   argument BDDs and existentially
217                               quantifying some variables from the   product.
218
219Cal_BddReorder()               Invoke the current dynamic reodering method.
220
221Cal_BddSatisfySupport()        Returns a special cube contained in f.
222
223Cal_BddSatisfyingFraction()    Returns the fraction of valuations which make f
224                               true. (Note that   this fraction is independent
225                               of whatever set of variables f is supposed to
226                               be   a function of)
227
228Cal_BddSatisfy()               Returns a BDD which implies f, true for
229                               some valuation on which f is true, and which
230                               has at most                one node at each
231                               level
232
233Cal_BddSetGCMode()             Sets the garbage collection mode, 0 means the
234                               garbage   collection should be turned off, 1
235                               means garbage collection should   be on.
236
237Cal_BddSizeMultiple()          The routine is like Cal_BddSize, but takes a
238                               null-terminated                array of BDDs
239                               and accounts for sharing of nodes.
240
241Cal_BddSize()                  Returns the number of nodes in f when negout is
242                               nonzero. If   negout is zero, we pretend that
243                               the BDDs don't have negative-output pointers.
244
245Cal_BddStats()                 Prints miscellaneous BDD statistics
246
247Cal_BddSubstitute()            Substitute a set of variables by functions
248
249Cal_BddSupport()               returns the support of f as a null-terminated
250                               array of variables
251
252Cal_BddSwapVars()              Return a function obtained by swapping two
253                               variables
254
255Cal_BddThen()                  Returns the positive cofactor of the argument
256                               BDD with   respect to the top variable of the
257                               BDD.
258
259Cal_BddTotalSize()             Returns the number of nodes in the Unique table
260
261Cal_BddType()                  Returns type of a BDD ( 0, 1, +var, -var,
262                               ovrflow, nonterminal)
263
264Cal_BddUnFree()                Unfrees the argument BDD.
265
266Cal_BddUndumpBdd()             Reads a BDD from a file
267
268Cal_BddVarBlockReorderable()   Sets the reoderability of a particular block.
269
270Cal_BddVarSubstitute()         Substitute a set of variables by set of another
271                               variables.
272
273Cal_BddVars()                  Returns the number of BDD variables
274
275Cal_BddXnor()                  Returns the BDD for logical exclusive NOR of
276                               argument BDDs
277
278Cal_BddXor()                   Returns the BDD for logical exclusive OR of
279                               argument BDDs
280
281Cal_BddZero()                  Returns the BDD for the constant zero
282
283Cal_MemAllocation()            Returns the memory allocated.
284
285Cal_MemFatal()                 Prints an error message and exits.
286
287Cal_MemFreeBlock()             Frees the block.
288
289Cal_MemFreeRecMgr()            Frees all the storage associated with the
290                               specified record manager.
291
292Cal_MemFreeRec()               Frees a record managed by the indicated record
293                               manager.
294
295Cal_MemGetBlock()              Allocates a new block of the specified size.
296
297Cal_MemNewRecMgr()             Creates a new record manager with the given
298                               record size.
299
300Cal_MemNewRec()                Allocates a record from the specified record
301                               manager.
302
303Cal_MemResizeBlock()           Expands or contracts the block to a new size.
304                               We try to avoid moving the block if possible.
305
306Cal_PerformanceTest()          Main routine for testing performances of
307                               various routines.
308
309Cal_PipelineCreateProvisionalBdd()
310                               Create a provisional BDD in the pipeline.
311
312Cal_PipelineExecute()          Executes a pipeline.
313
314Cal_PipelineInit()             Initialize a BDD pipeline.
315
316Cal_PipelineQuit()             Resets the pipeline freeing all resources.
317
318Cal_PipelineSetDepth()         Set depth of a BDD pipeline.
319
320Cal_PipelineUpdateProvisionalBdd()
321                               Update a provisional Bdd obtained during
322                               pipelining.
323
324Cal_TempAssociationAugment()   Adds to the temporary variable association.
325
326Cal_TempAssociationInit()      Sets the temporary variable association.
327
328Cal_TempAssociationQuit()      Cleans up temporary association
329
330**********************************************************************
331
332
333
334int
335Cal_AssociationInit(
336  Cal_BddManager    bddManager,
337  Cal_Bdd *         associationInfoU
338  int               pairs
339)
340  Creates or finds a variable association. The association is specified by
341  associationInfo, which is a an array of BDD with Cal_BddNull(bddManager) as
342  the end marker. If pairs is 0, the array is assumed to be an array of
343  variables. In this case, each variable is paired with constant BDD one. Such
344  an association may viewed as specifying a set of variables for use with
345  routines such as Cal_BddExists. If pair is not 0, then the even numbered
346  array elements should be variables and the odd numbered elements should be
347  the BDDs which they are mapped to. In both cases, the return value is an
348  integer identifier for this association. If the given association is
349  equivalent to one which already exists, the same identifier is used for
350  both, and the reference count of the association is increased by one.
351
352  Side Effects: None
353
354void
355Cal_AssociationQuit(
356  Cal_BddManager    bddManager,
357  int               associationId
358)
359  Decrements the reference count of the variable association with identifier
360  id, and frees it if the reference count becomes zero.
361
362  Side Effects: None
363
364int
365Cal_AssociationSetCurrent(
366  Cal_BddManager    bddManager,
367  int               associationId
368)
369  Sets the current variable association to the one given by id and returns the
370  ID of the old association. An id of -1 indicates the temporary association
371
372  Side Effects: None
373
374Cal_Bdd
375Cal_BddAnd(
376  Cal_BddManager    bddManager,
377  Cal_Bdd           fUserBdd,
378  Cal_Bdd           gUserBdd
379)
380  Returns the BDD for logical AND of f and g
381
382  Side Effects: None
383
384Cal_Bdd
385Cal_BddBetween(
386  Cal_BddManager    bddManager,
387  Cal_Bdd           fMinUserBdd,
388  Cal_Bdd           fMaxUserBdd
389)
390  Returns a minimal BDD f which is contains fMin and is contained in fMax (
391  fMin <= f <= fMax). This operation is typically used in state space searches
392  to simplify the representation for the set of states wich will be expanded
393  at each step (Rk Rk-1' <= f <= Rk).
394
395  Side Effects: None
396
397Cal_Bdd
398Cal_BddCofactor(
399  Cal_BddManager    bddManager,
400  Cal_Bdd           fUserBdd,
401  Cal_Bdd           cUserBdd
402)
403  Returns the generalized cofactor of BDD f with respect to BDD c. The
404  constrain operator given by Coudert et al (ICCAD90) is used to find the
405  generalized cofactor.
406
407  Side Effects: None.
408
409Cal_Bdd
410Cal_BddCompose(
411  Cal_BddManager    bddManager,
412  Cal_Bdd           fUserBdd,
413  Cal_Bdd           gUserBdd,
414  Cal_Bdd           hUserBdd
415)
416  Returns the BDD obtained by substituting a variable by a function
417
418  Side Effects: None
419
420int
421Cal_BddDependsOn(
422  Cal_BddManager    bddManager,
423  Cal_Bdd           fUserBdd,
424  Cal_Bdd           varUserBdd
425)
426  Returns 1 if f depends on var and returns 0 otherwise.
427
428  Side Effects: None
429
430int
431Cal_BddDumpBdd(
432  Cal_BddManager    bddManager,
433  Cal_Bdd           fUserBdd,
434  Cal_Bdd *         userVars,
435  FILE *            fp
436)
437  Writes an encoded description of the BDD to the file given by fp. The
438  argument vars should be a null-terminated array of variables that include
439  the support of f . These variables need not be in order of increasing index.
440  The function returns a nonzero value if f was written to the file
441  successfully.
442
443  Side Effects: required
444
445void
446Cal_BddDynamicReordering(
447  Cal_BddManager    bddManager,
448  int               technique
449)
450  Selects the method for dynamic reordering.
451
452  Side Effects: None
453
454Cal_Bdd
455Cal_BddElse(
456  Cal_BddManager    bddManager,
457  Cal_Bdd           userBdd
458)
459  Returns the negative cofactor of the argument BDD with respect to the top
460  variable of the BDD.
461
462  Side Effects: The reference count of the returned BDD is increased by 1.
463
464Cal_Bdd
465Cal_BddExists(
466  Cal_BddManager    bddManager,
467  Cal_Bdd           fUserBdd
468)
469  Returns the BDD for f with all the variables that are paired with something
470  in the current variable association existentially quantified out.
471
472  Side Effects: None.
473
474Cal_Bdd
475Cal_BddForAll(
476  Cal_BddManager    bddManager,
477  Cal_Bdd           fUserBdd
478)
479  Returns the BDD for f with all the variables that are paired with something
480  in the current variable association universally quantified out.
481
482  Side Effects: None.
483
484void
485Cal_BddFree(
486  Cal_BddManager    bddManager,
487  Cal_Bdd           userBdd
488)
489  Frees the argument BDD. It is an error to free a BDD more than once.
490
491  Side Effects: The reference count of the argument BDD is decreased by 1.
492
493void
494Cal_BddFunctionPrint(
495  Cal_BddManager    bddManager,
496  Cal_Bdd           userBdd,
497  char *            name
498)
499  Prints the function implemented by the argument BDD
500
501  Side Effects: None
502
503void
504Cal_BddFunctionProfileMultiple(
505  Cal_BddManager    bddManager,
506  Cal_Bdd *         fUserBddArray,
507  long *            funcCounts
508)
509  optional
510
511  Side Effects: None
512
513void
514Cal_BddFunctionProfile(
515  Cal_BddManager    bddManager,
516  Cal_Bdd           fUserBdd,
517  long *            funcCounts
518)
519  The nth entry of the function profile array is the number of subfunctions of
520  f which may be obtained by restricting the variables whose index is less
521  than n. An entry of zero indicates that f is independent of the variable
522  with the corresponding index.
523
524
525Cal_BddId_t
526Cal_BddGetIfId(
527  Cal_BddManager    bddManager,
528  Cal_Bdd           userBdd
529)
530  Returns the id of the top variable of the argument BDD.
531
532  Side Effects: None
533
534Cal_BddId_t
535Cal_BddGetIfIndex(
536  Cal_BddManager    bddManager,
537  Cal_Bdd           userBdd
538)
539  Returns the index of the top variable of the argument BDD.
540
541  Side Effects: None
542
543Cal_Bdd
544Cal_BddGetRegular(
545  Cal_BddManager    bddManager,
546  Cal_Bdd           userBdd
547)
548  Returns a BDD with positive from a given BDD with arbitrary phase
549
550  Side Effects: None.
551
552Cal_Bdd
553Cal_BddITE(
554  Cal_BddManager    bddManager,
555  Cal_Bdd           fUserBdd,
556  Cal_Bdd           gUserBdd,
557  Cal_Bdd           hUserBdd
558)
559  Returns the BDD for logical If-Then-Else Description [Returns the BDD for
560  the logical operation IF f THEN g ELSE h - f g + f' h
561
562  Side Effects: None
563
564Cal_Bdd
565Cal_BddIdentity(
566  Cal_BddManager    bddManager,
567  Cal_Bdd           userBdd
568)
569  Returns the duplicate BDD of the argument BDD.
570
571  Side Effects: The reference count of the BDD is increased by 1.
572
573Cal_Bdd
574Cal_BddIf(
575  Cal_BddManager    bddManager,
576  Cal_Bdd           userBdd
577)
578  Returns the BDD corresponding to the top variable of the argument BDD.
579
580  Side Effects: None.
581
582Cal_Bdd
583Cal_BddImplies(
584  Cal_BddManager    bddManager,
585  Cal_Bdd           fUserBdd,
586  Cal_Bdd           gUserBdd
587)
588  Computes a BDD that implies conjunction of f and Cal_BddNot(g)
589
590  Side Effects: none
591
592Cal_Bdd
593Cal_BddIntersects(
594  Cal_BddManager    bddManager,
595  Cal_Bdd           fUserBdd,
596  Cal_Bdd           gUserBdd
597)
598  Computes a BDD that implies conjunction of f and g.
599
600  Side Effects: None
601
602int
603Cal_BddIsBddConst(
604  Cal_BddManager    bddManager,
605  Cal_Bdd           userBdd
606)
607  Returns 1 if the argument BDD is either constant one or constant zero,
608  otherwise returns 0.
609
610  Side Effects: None.
611
612int
613Cal_BddIsBddNull(
614  Cal_BddManager    bddManager,
615  Cal_Bdd           userBdd
616)
617  Returns 1 if the argument BDD is NULL, 0 otherwise.
618
619  Side Effects: None.
620
621int
622Cal_BddIsBddOne(
623  Cal_BddManager    bddManager,
624  Cal_Bdd           userBdd
625)
626  Returns 1 if the argument BDD is constant one, 0 otherwise.
627
628  Side Effects: None.
629
630int
631Cal_BddIsBddZero(
632  Cal_BddManager    bddManager,
633  Cal_Bdd           userBdd
634)
635  Returns 1 if the argument BDD is constant zero, 0 otherwise.
636
637  Side Effects: None.
638
639int
640Cal_BddIsCube(
641  Cal_BddManager    bddManager,
642  Cal_Bdd           fUserBdd
643)
644  Returns 1 if the argument BDD is a cube, 0 otherwise
645
646  Side Effects: None
647
648int
649Cal_BddIsEqual(
650  Cal_BddManager    bddManager,
651  Cal_Bdd           userBdd1,
652  Cal_Bdd           userBdd2
653)
654  Returns 1 if argument BDDs are equal, 0 otherwise.
655
656  Side Effects: None.
657
658int
659Cal_BddIsProvisional(
660  Cal_BddManager    bddManager,
661  Cal_Bdd           userBdd
662)
663  Returns 1, if the given user BDD contains provisional BDD node.
664
665  Side Effects: None.
666
667Cal_Bdd
668Cal_BddManagerCreateNewVarAfter(
669  Cal_BddManager    bddManager,
670  Cal_Bdd           userBdd
671)
672  Creates and returns a new variable after the specified one in the variable
673  order.
674
675  Side Effects: None
676
677Cal_Bdd
678Cal_BddManagerCreateNewVarBefore(
679  Cal_BddManager    bddManager,
680  Cal_Bdd           userBdd
681)
682  Creates and returns a new variable before the specified one in the variable
683  order.
684
685  Side Effects: None
686
687Cal_Bdd
688Cal_BddManagerCreateNewVarFirst(
689  Cal_BddManager    bddManager
690)
691  Creates and returns a new variable at the start of the variable order.
692
693  Side Effects: None
694
695Cal_Bdd
696Cal_BddManagerCreateNewVarLast(
697  Cal_BddManager    bddManager
698)
699  Creates and returns a new variable at the end of the variable order.
700
701  Side Effects: None
702
703int
704Cal_BddManagerGC(
705  Cal_BddManager    bddManager
706)
707  For each variable in the increasing id free nodes with reference count equal
708  to zero freeing a node results in decrementing reference count of then and
709  else nodes by one.
710
711  Side Effects: None.
712
713void *
714Cal_BddManagerGetHooks(
715  Cal_BddManager    bddManager
716)
717  Returns the hooks field of the manager.
718
719  Side Effects: None
720
721unsigned long
722Cal_BddManagerGetNumNodes(
723  Cal_BddManager    bddManager
724)
725  Returns the number of BDD nodes
726
727  Side Effects: None
728
729Cal_Bdd
730Cal_BddManagerGetVarWithId(
731  Cal_BddManager    bddManager,
732  Cal_BddId_t       id
733)
734  Returns the variable with the specified id, null if no such variable exists
735
736  Side Effects: None
737
738Cal_Bdd
739Cal_BddManagerGetVarWithIndex(
740  Cal_BddManager    bddManager,
741  Cal_BddIndex_t    index
742)
743  Returns the variable with the specified index, null if no such variable
744  exists
745
746  Side Effects: None
747
748Cal_BddManager
749Cal_BddManagerInit(
750
751)
752  Initializes and allocates fields of the BDD manager. Some of the fields are
753  initialized for maxNumVars+1 or numVars+1, whereas some of them are
754  initialized for maxNumVars or numVars. The first kind of fields are
755  associated with the id of a variable and the second ones are with the index
756  of the variable.
757
758  Side Effects: None
759
760int
761Cal_BddManagerQuit(
762  Cal_BddManager    bddManager
763)
764  Frees the BDD manager and all the associated allocations
765
766  Side Effects: None
767
768void
769Cal_BddManagerSetGCLimit(
770  Cal_BddManager    manager
771)
772  It tries to set the limit at twice the number of nodes in the manager at the
773  current point. However, the limit is not allowed to fall below the
774  MIN_GC_LIMIT or to exceed the value of node limit (if one exists).
775
776  Side Effects: None.
777
778void
779Cal_BddManagerSetHooks(
780  Cal_BddManager    bddManager,
781  void *            hooks
782)
783  Sets the hooks field of the manager.
784
785  Side Effects: Hooks field changes.
786
787void
788Cal_BddManagerSetParameters(
789  Cal_BddManager    bddManager,
790  long              reorderingThresh
791  long              maxForwardedNode
792  double            repackAfterGCThr
793  double            tableRepackThres
794)
795  This function is used to set the parameters which are used to control the
796  reordering process. "reorderingThreshold" determines the number of nodes
797  below which reordering will NOT be invoked, "maxForwardedNodes" determines
798  the maximum number of forwarded nodes which are allowed (at that point the
799  cleanup must be done), and "repackingThreshold" determines the fraction of
800  the page utilized below which repacking has to be invoked. These parameters
801  have different affect on the computational and memory usage aspects of
802  reordeing. For instance, higher value of "maxForwardedNodes" will result in
803  process consuming more memory, and a lower value on the other hand would
804  invoke the cleanup process repeatedly resulting in increased computation.
805
806  Side Effects: None
807
808Cal_Bdd
809Cal_BddMultiwayAnd(
810  Cal_BddManager    bddManager,
811  Cal_Bdd *         userBddArray
812)
813  Returns the BDD for logical AND of set of BDDs in the bddArray
814
815  Side Effects: None
816
817Cal_Bdd
818Cal_BddMultiwayOr(
819  Cal_BddManager    bddManager,
820  Cal_Bdd *         userBddArray
821)
822  Returns the BDD for logical OR of set of BDDs in the bddArray
823
824  Side Effects: None
825
826Cal_Bdd
827Cal_BddMultiwayXor(
828  Cal_BddManager    bddManager,
829  Cal_Bdd *         userBddArray
830)
831  Returns the BDD for logical XOR of set of BDDs in the bddArray
832
833  Side Effects: None
834
835Cal_Bdd
836Cal_BddNand(
837  Cal_BddManager    bddManager,
838  Cal_Bdd           fUserBdd,
839  Cal_Bdd           gUserBdd
840)
841  Returns the BDD for logical NAND of f and g
842
843  Side Effects: None
844
845Cal_Block
846Cal_BddNewVarBlock(
847  Cal_BddManager    bddManager,
848  Cal_Bdd           variable,
849  long              length
850)
851  The block is specified by passing the first variable and the length of the
852  block. The "length" number of consecutive variables starting from "variable"
853  are put in the block.
854
855  Side Effects: A new block is created.
856
857long
858Cal_BddNodeLimit(
859  Cal_BddManager    bddManager,
860  long              newLimit
861)
862  Sets the node limit to new_limit and returns the old limit.
863
864  Side Effects: Threshold for garbage collection may change
865
866Cal_Bdd
867Cal_BddNor(
868  Cal_BddManager    bddManager,
869  Cal_Bdd           fUserBdd,
870  Cal_Bdd           gUserBdd
871)
872  Returns the BDD for logical NOR of f and g
873
874  Side Effects: None
875
876Cal_Bdd
877Cal_BddNot(
878  Cal_BddManager    bddManager,
879  Cal_Bdd           userBdd
880)
881  Returns the complement of the argument BDD.
882
883  Side Effects: The reference count of the argument BDD is increased by 1.
884
885Cal_Bdd
886Cal_BddOne(
887  Cal_BddManager    bddManager
888)
889  Returns the BDD for the constant one
890
891  Side Effects: None
892
893Cal_Bdd
894Cal_BddOr(
895  Cal_BddManager    bddManager,
896  Cal_Bdd           fUserBdd,
897  Cal_Bdd           gUserBdd
898)
899  Returns the BDD for logical OR of f and g
900
901  Side Effects: None
902
903int
904Cal_BddOverflow(
905  Cal_BddManager    bddManager
906)
907  Returns 1 if the node limit has been exceeded, 0 otherwise. The overflow
908  flag is cleared.
909
910  Side Effects: None
911
912Cal_Bdd *
913Cal_BddPairwiseAnd(
914  Cal_BddManager    bddManager,
915  Cal_Bdd *         userBddArray
916)
917  Returns an array of BDDs obtained by logical AND of BDD pairs specified by
918  an BDD array in which a BDD at an even location is paired with a BDD at an
919  odd location of the array
920
921  Side Effects: None
922
923Cal_Bdd *
924Cal_BddPairwiseOr(
925  Cal_BddManager    bddManager,
926  Cal_Bdd *         userBddArray
927)
928  Returns an array of BDDs obtained by logical OR of BDD pairs specified by an
929  BDD array in which a BDD at an even location is paired with a BDD at an odd
930  location of the array
931
932  Side Effects: None
933
934Cal_Bdd *
935Cal_BddPairwiseXor(
936  Cal_BddManager    bddManager,
937  Cal_Bdd *         userBddArray
938)
939  Returns an array of BDDs obtained by logical XOR of BDD pairs specified by
940  an BDD array in which a BDD at an even location is paired with a BDD at an
941  odd location of the array
942
943  Side Effects: None
944
945void
946Cal_BddPrintBdd(
947  Cal_BddManager    bddManager,
948  Cal_Bdd           fUserBdd,
949  Cal_VarNamingFn_t VarNamingFn,
950  Cal_TerminalIdFn_ TerminalIdFn,
951  Cal_Pointer_t     env,
952  FILE *            fp
953)
954  Prints a human-readable representation of the BDD f to the file given by fp.
955  The namingFn should be a pointer to a function taking a bddManager, a BDD
956  and the pointer given by env. This function should return either a null
957  pointer or a srting that is the name of the supplied variable. If it returns
958  a null pointer, a default name is generated based on the index of the
959  variable. It is also legal for naminFN to e null; in this case, default
960  names are generated for all variables. The macro bddNamingFnNone is a null
961  pointer of suitable type. terminalIdFn should be apointer to a function
962  taking a bddManager and two longs. plus the pointer given by the env. It
963  should return either a null pointer. If it returns a null pointer, or if
964  terminalIdFn is null, then default names are generated for the terminals.
965  The macro bddTerminalIdFnNone is a null pointer of suitable type.
966
967  Side Effects: None.
968
969void
970Cal_BddPrintFunctionProfileMultiple(
971  Cal_BddManager    bddManager,
972  Cal_Bdd *         userBdds,
973  Cal_VarNamingFn_t varNamingProc,
974  char *            env,
975  int               lineLength,
976  FILE *            fp
977)
978  optional
979
980  Side Effects: None
981
982void
983Cal_BddPrintFunctionProfile(
984  Cal_BddManager    bddManager,
985  Cal_Bdd           f,
986  Cal_VarNamingFn_t varNamingProc,
987  char *            env,
988  int               lineLength,
989  FILE *            fp
990)
991  optional
992
993  Side Effects: None
994
995void
996Cal_BddPrintProfileMultiple(
997  Cal_BddManager    bddManager,
998  Cal_Bdd *         userBdds,
999  Cal_VarNamingFn_t varNamingProc,
1000  char *            env,
1001  int               lineLength,
1002  FILE *            fp
1003)
1004  optional
1005
1006  Side Effects: None
1007
1008void
1009Cal_BddPrintProfile(
1010  Cal_BddManager    bddManager,
1011  Cal_Bdd           fUserBdd,
1012  Cal_VarNamingFn_t varNamingProc,
1013  char *            env,
1014  int               lineLength,
1015  FILE *            fp
1016)
1017  optional
1018
1019  Side Effects: None
1020
1021void
1022Cal_BddProfileMultiple(
1023  Cal_BddManager    bddManager,
1024  Cal_Bdd *         fUserBddArray,
1025  long *            levelCounts,
1026  int               negout
1027)
1028  optional
1029
1030  Side Effects: None
1031
1032void
1033Cal_BddProfile(
1034  Cal_BddManager    bddManager,
1035  Cal_Bdd           fUserBdd,
1036  long *            levelCounts,
1037  int               negout
1038)
1039  negout is as in Cal_BddSize. levelCounts should be an array of size
1040  Cal_BddVars(bddManager)+1 to hold the profile.
1041
1042  Side Effects: None
1043
1044Cal_Bdd
1045Cal_BddReduce(
1046  Cal_BddManager    bddManager,
1047  Cal_Bdd           fUserBdd,
1048  Cal_Bdd           cUserBdd
1049)
1050  Returns a BDD which agrees with f for all valuations which satisfy c. The
1051  result is usually smaller in terms of number of BDD nodes than f. This
1052  operation is typically used in state space searches to simplify the
1053  representation for the set of states wich will be expanded at each step.
1054
1055  Side Effects: None
1056
1057Cal_Bdd
1058Cal_BddRelProd(
1059  Cal_BddManager    bddManager,
1060  Cal_Bdd           fUserBdd,
1061  Cal_Bdd           gUserBdd
1062)
1063  Returns the BDD for the logical AND of f and g with all the variables that
1064  are paired with something in the current variable association existentially
1065  quantified out.
1066
1067  Side Effects: None.
1068
1069void
1070Cal_BddReorder(
1071  Cal_BddManager    bddManager
1072)
1073  Invoke the current dynamic reodering method.
1074
1075  Side Effects: Index of a variable may change due to reodering
1076
1077Cal_Bdd
1078Cal_BddSatisfySupport(
1079  Cal_BddManager    bddManager,
1080  Cal_Bdd           fUserBdd
1081)
1082  The returned BDD which implies f, is true for some valuation on which f is
1083  true, which has at most one node at each level, and which has exactly one
1084  node corresponding to each variable which is associated with something in
1085  the current variable association.
1086
1087  Side Effects: required
1088
1089double
1090Cal_BddSatisfyingFraction(
1091  Cal_BddManager    bddManager,
1092  Cal_Bdd           fUserBdd
1093)
1094  optional
1095
1096  Side Effects: required
1097
1098Cal_Bdd
1099Cal_BddSatisfy(
1100  Cal_BddManager    bddManager,
1101  Cal_Bdd           fUserBdd
1102)
1103  optional
1104
1105  Side Effects: required
1106
1107void
1108Cal_BddSetGCMode(
1109  Cal_BddManager    bddManager,
1110  int               gcMode
1111)
1112  Sets the garbage collection mode, 0 means the garbage collection should be
1113  turned off, 1 means garbage collection should be on.
1114
1115  Side Effects: None.
1116
1117long
1118Cal_BddSizeMultiple(
1119  Cal_BddManager    bddManager,
1120  Cal_Bdd *         fUserBddArray,
1121  int               negout
1122)
1123  optional
1124
1125  Side Effects: None
1126
1127long
1128Cal_BddSize(
1129  Cal_BddManager    bddManager,
1130  Cal_Bdd           fUserBdd,
1131  int               negout
1132)
1133  optional
1134
1135  Side Effects: None
1136
1137void
1138Cal_BddStats(
1139  Cal_BddManager    bddManager,
1140  FILE *            fp
1141)
1142  Prints miscellaneous BDD statistics
1143
1144  Side Effects: None
1145
1146Cal_Bdd
1147Cal_BddSubstitute(
1148  Cal_BddManager    bddManager,
1149  Cal_Bdd           fUserBdd
1150)
1151  Returns a BDD for f using the substitution defined by current variable
1152  association. Each variable is replaced by its associated BDDs. The
1153  substitution is effective simultaneously
1154
1155  Side Effects: None
1156
1157void
1158Cal_BddSupport(
1159  Cal_BddManager    bddManager,
1160  Cal_Bdd           fUserBdd,
1161  Cal_Bdd *         support
1162)
1163  optional
1164
1165  Side Effects: None
1166
1167Cal_Bdd
1168Cal_BddSwapVars(
1169  Cal_BddManager    bddManager,
1170  Cal_Bdd           fUserBdd,
1171  Cal_Bdd           gUserBdd,
1172  Cal_Bdd           hUserBdd
1173)
1174  Returns the BDD obtained by simultaneously substituting variable g by
1175  variable h and variable h and variable g in the BDD f
1176
1177  Side Effects: None
1178
1179Cal_Bdd
1180Cal_BddThen(
1181  Cal_BddManager    bddManager,
1182  Cal_Bdd           userBdd
1183)
1184  Returns the positive cofactor of the argument BDD with respect to the top
1185  variable of the BDD.
1186
1187  Side Effects: The reference count of the returned BDD is increased by 1.
1188
1189unsigned long
1190Cal_BddTotalSize(
1191  Cal_BddManager    bddManager
1192)
1193  Returns the number of nodes in the Unique table
1194
1195  Side Effects: None
1196
1197int
1198Cal_BddType(
1199  Cal_BddManager    bddManager,
1200  Cal_Bdd           fUserBdd
1201)
1202  Returns BDD_TYPE_ZERO if f is false, BDD_TYPE_ONE if f is true,
1203  BDD_TYPE_POSVAR is f is an unnegated variable, BDD_TYPE_NEGVAR if f is a
1204  negated variable, BDD_TYPE_OVERFLOW if f is null, and BDD_TYPE_NONTERMINAL
1205  otherwise.
1206
1207  Side Effects: None
1208
1209void
1210Cal_BddUnFree(
1211  Cal_BddManager    bddManager,
1212  Cal_Bdd           userBdd
1213)
1214  Unfrees the argument BDD. It is an error to pass a BDD with reference count
1215  of zero to be unfreed.
1216
1217  Side Effects: The reference count of the argument BDD is increased by 1.
1218
1219Cal_Bdd
1220Cal_BddUndumpBdd(
1221  Cal_BddManager    bddManager,
1222  Cal_Bdd *         userVars,
1223  FILE *            fp,
1224  int *             error
1225)
1226  Loads an encoded description of a BDD from the file given by fp. The
1227  argument vars should be a null terminated array of variables that will
1228  become the support of the BDD. As in Cal_BddDumpBdd, these need not be in
1229  the order of increasing index. If the same array of variables in used in
1230  dumping and undumping, the BDD returned will be equal to the one that was
1231  dumped. More generally, if array v1 is used when dumping, and the array v2
1232  is used when undumping, the BDD returned will be equal to the original BDD
1233  with the ith variable in v2 substituted for the ith variable in v1 for all
1234  i. Null BDD is returned in the operation fails for reason (node limit
1235  reached, I/O error, invalid file format, etc.). In this case, an error code
1236  is stored in error. the code will be one of the following.
1237  CAL_BDD_UNDUMP_FORMAT Invalid file format CAL_BDD_UNDUMP_OVERFLOW Node limit
1238  exceeded CAL_BDD_UNDUMP_IOERROR File I/O error CAL_BDD_UNDUMP_EOF Unexpected
1239  EOF
1240
1241  Side Effects: required
1242
1243void
1244Cal_BddVarBlockReorderable(
1245  Cal_BddManager    bddManager,
1246  Cal_Block         block,
1247  int               reorderable
1248)
1249  If a block is reorderable, the child blocks are recursively involved in
1250  swapping.
1251
1252  Side Effects: None.
1253
1254Cal_Bdd
1255Cal_BddVarSubstitute(
1256  Cal_BddManager    bddManager,
1257  Cal_Bdd           fUserBdd
1258)
1259  Returns a BDD for f using the substitution defined by current variable
1260  association. It is assumed that each variable is replaced by another
1261  variable. For the substitution of a variable by a function, use
1262  Cal_BddSubstitute instead.
1263
1264  Side Effects: None
1265
1266long
1267Cal_BddVars(
1268  Cal_BddManager    bddManager
1269)
1270  Returns the number of BDD variables
1271
1272  Side Effects: None
1273
1274Cal_Bdd
1275Cal_BddXnor(
1276  Cal_BddManager    bddManager,
1277  Cal_Bdd           fUserBdd,
1278  Cal_Bdd           gUserBdd
1279)
1280  Returns the BDD for logical exclusive NOR of f and g
1281
1282  Side Effects: None
1283
1284Cal_Bdd
1285Cal_BddXor(
1286  Cal_BddManager    bddManager,
1287  Cal_Bdd           fUserBdd,
1288  Cal_Bdd           gUserBdd
1289)
1290  Returns the BDD for logical exclusive OR of f and g
1291
1292  Side Effects: None
1293
1294Cal_Bdd
1295Cal_BddZero(
1296  Cal_BddManager    bddManager
1297)
1298  Returns the BDD for the constant zero
1299
1300  Side Effects: None
1301
1302Cal_Address_t
1303Cal_MemAllocation(
1304
1305)
1306  Returns the memory allocated.
1307
1308  Side Effects: required
1309
1310void
1311Cal_MemFatal(
1312  char *            message
1313)
1314  Prints an error message and exits.
1315
1316  Side Effects: required
1317
1318void
1319Cal_MemFreeBlock(
1320  Cal_Pointer_t     p
1321)
1322  Frees the block.
1323
1324  Side Effects: required
1325
1326void
1327Cal_MemFreeRecMgr(
1328  Cal_RecMgr        mgr
1329)
1330  Frees all the storage associated with the specified record manager.
1331
1332  Side Effects: required
1333
1334void
1335Cal_MemFreeRec(
1336  Cal_RecMgr        mgr,
1337  Cal_Pointer_t     rec
1338)
1339  Frees a record managed by the indicated record manager.
1340
1341  Side Effects: required
1342
1343Cal_Pointer_t
1344Cal_MemGetBlock(
1345  Cal_Address_t     size
1346)
1347  Allocates a new block of the specified size.
1348
1349  Side Effects: required
1350
1351Cal_RecMgr
1352Cal_MemNewRecMgr(
1353  int               size
1354)
1355  Creates a new record manager with the given record size.
1356
1357  Side Effects: required
1358
1359Cal_Pointer_t
1360Cal_MemNewRec(
1361  Cal_RecMgr        mgr
1362)
1363  Allocates a record from the specified record manager.
1364
1365  Side Effects: required
1366
1367Cal_Pointer_t
1368Cal_MemResizeBlock(
1369  Cal_Pointer_t     p,
1370  Cal_Address_t     newSize
1371)
1372  Expands or contracts the block to a new size. We try to avoid moving the
1373  block if possible.
1374
1375  Side Effects: required
1376
1377int
1378Cal_PerformanceTest(
1379  Cal_BddManager    bddManager,
1380  Cal_Bdd *         outputBddArray,
1381  int               numFunctions,
1382  int               iteration,
1383  int               seed,
1384  int               andPerformanceFl
1385  int               multiwayPerforma
1386  int               onewayPerformanc
1387  int               quantifyPerforma
1388  int               composePerforman
1389  int               relprodPerforman
1390  int               swapPerformanceF
1391  int               substitutePerfor
1392  int               sanityCheckFlag,
1393  int               computeMemoryOve
1394  int               superscalarFlag
1395)
1396  optional
1397
1398  Side Effects: required
1399
1400Cal_Bdd
1401Cal_PipelineCreateProvisionalBdd(
1402  Cal_BddManager    bddManager,
1403  Cal_Bdd           fUserBdd,
1404  Cal_Bdd           gUserBdd
1405)
1406  The provisional BDD is automatically freed once the pipeline is quitted.
1407
1408
1409int
1410Cal_PipelineExecute(
1411  Cal_BddManager    bddManager
1412)
1413  All the results are computed. User should update the BDDs of interest.
1414  Eventually this feature would become transparent.
1415
1416  Side Effects: required
1417
1418int
1419Cal_PipelineInit(
1420  Cal_BddManager    bddManager,
1421  Cal_BddOp_t       bddOp
1422)
1423  All the operations for this pipeline must be of the same kind.
1424
1425  Side Effects: None.
1426
1427void
1428Cal_PipelineQuit(
1429  Cal_BddManager    bddManager
1430)
1431  The user must make sure to update all provisional BDDs of interest before
1432  calling this routine.
1433
1434
1435void
1436Cal_PipelineSetDepth(
1437  Cal_BddManager    bddManager,
1438  int               depth
1439)
1440  The "depth" determines the amount of dependency we would allow in pipelined
1441  computation.
1442
1443  Side Effects: None.
1444
1445Cal_Bdd
1446Cal_PipelineUpdateProvisionalBdd(
1447  Cal_BddManager    bddManager,
1448  Cal_Bdd           provisionalBdd
1449)
1450  The provisional BDD is automatically freed after quitting pipeline.
1451
1452
1453void
1454Cal_TempAssociationAugment(
1455  Cal_BddManager    bddManager,
1456  Cal_Bdd *         associationInfoU
1457  int               pairs
1458)
1459  Pairs is 0 if the information represents only a list of variables rather
1460  than a full association.
1461
1462  Side Effects: None
1463
1464void
1465Cal_TempAssociationInit(
1466  Cal_BddManager    bddManager,
1467  Cal_Bdd *         associationInfoU
1468  int               pairs
1469)
1470  Pairs is 0 if the information represents only a list of variables rather
1471  than a full association.
1472
1473  Side Effects: None
1474
1475void
1476Cal_TempAssociationQuit(
1477  Cal_BddManager    bddManager
1478)
1479  Cleans up temporary associationoptional
1480
1481  Side Effects: None
1482
Note: See TracBrowser for help on using the repository browser.