-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcalDoc.txt
1456 lines (1120 loc) · 39.6 KB
/
calDoc.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
The cal package
Header CAL file for exported data structures and functions.
Rajeev K. Ranjan (rajeev@eecs.berkeley.edu) Jagesh V. Sanghavi
(sanghavi@eecs.berkeley.edu)
**********************************************************************
Cal_AssociationInit() Creates or finds a variable association.
Cal_AssociationQuit() Deletes the variable association given by id
Cal_AssociationSetCurrent() Sets the current variable association to the
one given by id and returns the ID of the old
association.
Cal_BddAnd() Returns the BDD for logical AND of argument
BDDs
Cal_BddBetween() Returns a minimal BDD whose function contains
fMin and is contained in fMax.
Cal_BddCofactor() Returns the generalized cofactor of BDD f with
respect to BDD c.
Cal_BddCompose() composition - substitute a BDD variable by a
function
Cal_BddDependsOn() Returns 1 if f depends on var and returns 0
otherwise.
Cal_BddDumpBdd() Write a BDD to a file
Cal_BddDynamicReordering() Specify dynamic reordering technique.
Cal_BddElse() Returns the negative cofactor of the argument
BDD with respect to the top variable of the
BDD.
Cal_BddExists() Returns the result of existentially quantifying
some variables from the given BDD.
Cal_BddForAll() Returns the result of universally quantifying
some variables from the given BDD.
Cal_BddFree() Frees the argument BDD.
Cal_BddFunctionPrint() Prints the function implemented by the argument
BDD
Cal_BddFunctionProfileMultiple()
Returns a "function profile" for fArray.
Cal_BddFunctionProfile() Returns a "function profile" for f.
Cal_BddGetIfId() Returns the id of the top variable of the
argument BDD.
Cal_BddGetIfIndex() Returns the index of the top variable of the
argument BDD.
Cal_BddGetRegular() Returns a BDD with positive from a given BDD
with arbitrary phase
Cal_BddITE() Returns the BDD for logical If-Then-Else
Description [Returns the BDD for the logical
operation IF f THEN g ELSE h - f g + f' h
Cal_BddIdentity() Returns the duplicate BDD of the argument BDD.
Cal_BddIf() Returns the BDD corresponding to the top
variable of the argument BDD.
Cal_BddImplies() Computes a BDD that implies conjunction of f
and Cal_BddNot(g)
Cal_BddIntersects() Computes a BDD that implies conjunction of f
and g.
Cal_BddIsBddConst() Returns 1 if the argument BDD is a constant, 0
otherwise.
Cal_BddIsBddNull() Returns 1 if the argument BDD is NULL, 0
otherwise.
Cal_BddIsBddOne() Returns 1 if the argument BDD is constant one,
0 otherwise.
Cal_BddIsBddZero() Returns 1 if the argument BDD is constant zero,
0 otherwise.
Cal_BddIsCube() Returns 1 if the argument BDD is a cube, 0
otherwise
Cal_BddIsEqual() Returns 1 if argument BDDs are equal, 0
otherwise.
Cal_BddIsProvisional() Returns 1, if the given user BDD contains
provisional BDD node.
Cal_BddManagerCreateNewVarAfter()
Creates and returns a new variable after the
specified one in the variable order.
Cal_BddManagerCreateNewVarBefore()
Creates and returns a new variable before the
specified one in the variable order.
Cal_BddManagerCreateNewVarFirst()
Creates and returns a new variable at the start
of the variable order.
Cal_BddManagerCreateNewVarLast()
Creates and returns a new variable at the end
of the variable order.
Cal_BddManagerGC() Invokes the garbage collection at the manager
level.
Cal_BddManagerGetHooks() Returns the hooks field of the manager.
Cal_BddManagerGetNumNodes() Returns the number of BDD nodes
Cal_BddManagerGetVarWithId() Returns the variable with the specified id,
null if no such variable exists
Cal_BddManagerGetVarWithIndex()
Returns the variable with the specified index,
null if no such variable exists
Cal_BddManagerInit() Creates and initializes a new BDD manager.
Cal_BddManagerQuit() Frees the BDD manager and all the associated
allocations
Cal_BddManagerSetGCLimit() Sets the limit of the garbage collection.
Cal_BddManagerSetHooks() Sets the hooks field of the manager.
Cal_BddManagerSetParameters() Sets appropriate fields of BDD Manager.
Cal_BddMultiwayAnd() Returns the BDD for logical AND of argument
BDDs
Cal_BddMultiwayOr() Returns the BDD for logical OR of argument BDDs
Cal_BddMultiwayXor() Returns the BDD for logical XOR of argument
BDDs
Cal_BddNand() Returns the BDD for logical NAND of argument
BDDs
Cal_BddNewVarBlock() Creates and returns a variable block used for
controlling dynamic reordering.
Cal_BddNodeLimit() Sets the node limit to new_limit and returns
the old limit.
Cal_BddNor() Returns the BDD for logical NOR of argument
BDDs
Cal_BddNot() Returns the complement of the argument BDD.
Cal_BddOne() Returns the BDD for the constant one
Cal_BddOr() Returns the BDD for logical OR of argument BDDs
Cal_BddOverflow() Returns 1 if the node limit has been exceeded,
0 otherwise. The overflow flag is cleared.
Cal_BddPairwiseAnd() Returns an array of BDDs obtained by logical
AND of BDD pairs specified by an BDD array in
which a BDD at an even location is paired with
a BDD at an odd location of the array
Cal_BddPairwiseOr() Returns an array of BDDs obtained by logical OR
of BDD pairs specified by an BDD array in
which a BDD at an even location is paired with
a BDD at an odd location of the array
Cal_BddPairwiseXor() Returns an array of BDDs obtained by logical
XOR of BDD pairs specified by an BDD array in
which a BDD at an even location is paired with
a BDD at an odd location of the array
Cal_BddPrintBdd() Prints a BDD in the human readable form.
Cal_BddPrintFunctionProfileMultiple()
Cal_BddPrintFunctionProfileMultiple is like
Cal_BddPrintFunctionProfile except for multiple
BDDs
Cal_BddPrintFunctionProfile() Cal_BddPrintFunctionProfile is like
Cal_BddPrintProfile except it
displays a function profile for f
Cal_BddPrintProfileMultiple() Cal_BddPrintProfileMultiple is like
Cal_BddPrintProfile except it
displays the profile for a set of BDDs
Cal_BddPrintProfile() Displays the node profile for f on fp.
lineLength specifies the
maximum line length. varNamingFn is as in
Cal_BddPrintBdd.
Cal_BddProfileMultiple()
Cal_BddProfile() Returns a "node profile" of f, i.e., the number
of nodes at each level in f.
Cal_BddReduce() Returns a BDD which agrees with f for all
valuations which satisfy c.
Cal_BddRelProd() Returns the result of taking the logical AND of
the argument BDDs and existentially
quantifying some variables from the product.
Cal_BddReorder() Invoke the current dynamic reodering method.
Cal_BddSatisfySupport() Returns a special cube contained in f.
Cal_BddSatisfyingFraction() Returns the fraction of valuations which make f
true. (Note that this fraction is independent
of whatever set of variables f is supposed to
be a function of)
Cal_BddSatisfy() Returns a BDD which implies f, true for
some valuation on which f is true, and which
has at most one node at each
level
Cal_BddSetGCMode() Sets the garbage collection mode, 0 means the
garbage collection should be turned off, 1
means garbage collection should be on.
Cal_BddSizeMultiple() The routine is like Cal_BddSize, but takes a
null-terminated array of BDDs
and accounts for sharing of nodes.
Cal_BddSize() Returns the number of nodes in f when negout is
nonzero. If negout is zero, we pretend that
the BDDs don't have negative-output pointers.
Cal_BddStats() Prints miscellaneous BDD statistics
Cal_BddSubstitute() Substitute a set of variables by functions
Cal_BddSupport() returns the support of f as a null-terminated
array of variables
Cal_BddSwapVars() Return a function obtained by swapping two
variables
Cal_BddThen() Returns the positive cofactor of the argument
BDD with respect to the top variable of the
BDD.
Cal_BddTotalSize() Returns the number of nodes in the Unique table
Cal_BddType() Returns type of a BDD ( 0, 1, +var, -var,
ovrflow, nonterminal)
Cal_BddUnFree() Unfrees the argument BDD.
Cal_BddUndumpBdd() Reads a BDD from a file
Cal_BddVarBlockReorderable() Sets the reoderability of a particular block.
Cal_BddVarSubstitute() Substitute a set of variables by set of another
variables.
Cal_BddVars() Returns the number of BDD variables
Cal_BddXnor() Returns the BDD for logical exclusive NOR of
argument BDDs
Cal_BddXor() Returns the BDD for logical exclusive OR of
argument BDDs
Cal_BddZero() Returns the BDD for the constant zero
Cal_MemAllocation() Returns the memory allocated.
Cal_MemFatal() Prints an error message and exits.
Cal_MemFreeBlock() Frees the block.
Cal_MemFreeRecMgr() Frees all the storage associated with the
specified record manager.
Cal_MemFreeRec() Frees a record managed by the indicated record
manager.
Cal_MemGetBlock() Allocates a new block of the specified size.
Cal_MemNewRecMgr() Creates a new record manager with the given
record size.
Cal_MemNewRec() Allocates a record from the specified record
manager.
Cal_MemResizeBlock() Expands or contracts the block to a new size.
We try to avoid moving the block if possible.
Cal_PipelineCreateProvisionalBdd()
Create a provisional BDD in the pipeline.
Cal_PipelineExecute() Executes a pipeline.
Cal_PipelineInit() Initialize a BDD pipeline.
Cal_PipelineQuit() Resets the pipeline freeing all resources.
Cal_PipelineSetDepth() Set depth of a BDD pipeline.
Cal_PipelineUpdateProvisionalBdd()
Update a provisional Bdd obtained during
pipelining.
Cal_TempAssociationAugment() Adds to the temporary variable association.
Cal_TempAssociationInit() Sets the temporary variable association.
Cal_TempAssociationQuit() Cleans up temporary association
**********************************************************************
int
Cal_AssociationInit(
Cal_BddManager bddManager,
Cal_Bdd * associationInfoU
int pairs
)
Creates or finds a variable association. The association is specified by
associationInfo, which is a an array of BDD with Cal_BddNull(bddManager) as
the end marker. If pairs is 0, the array is assumed to be an array of
variables. In this case, each variable is paired with constant BDD one. Such
an association may viewed as specifying a set of variables for use with
routines such as Cal_BddExists. If pair is not 0, then the even numbered
array elements should be variables and the odd numbered elements should be
the BDDs which they are mapped to. In both cases, the return value is an
integer identifier for this association. If the given association is
equivalent to one which already exists, the same identifier is used for
both, and the reference count of the association is increased by one.
Side Effects: None
void
Cal_AssociationQuit(
Cal_BddManager bddManager,
int associationId
)
Decrements the reference count of the variable association with identifier
id, and frees it if the reference count becomes zero.
Side Effects: None
int
Cal_AssociationSetCurrent(
Cal_BddManager bddManager,
int associationId
)
Sets the current variable association to the one given by id and returns the
ID of the old association. An id of -1 indicates the temporary association
Side Effects: None
Cal_Bdd
Cal_BddAnd(
Cal_BddManager bddManager,
Cal_Bdd fUserBdd,
Cal_Bdd gUserBdd
)
Returns the BDD for logical AND of f and g
Side Effects: None
Cal_Bdd
Cal_BddBetween(
Cal_BddManager bddManager,
Cal_Bdd fMinUserBdd,
Cal_Bdd fMaxUserBdd
)
Returns a minimal BDD f which is contains fMin and is contained in fMax (
fMin <= f <= fMax). This operation is typically used in state space searches
to simplify the representation for the set of states wich will be expanded
at each step (Rk Rk-1' <= f <= Rk).
Side Effects: None
Cal_Bdd
Cal_BddCofactor(
Cal_BddManager bddManager,
Cal_Bdd fUserBdd,
Cal_Bdd cUserBdd
)
Returns the generalized cofactor of BDD f with respect to BDD c. The
constrain operator given by Coudert et al (ICCAD90) is used to find the
generalized cofactor.
Side Effects: None.
Cal_Bdd
Cal_BddCompose(
Cal_BddManager bddManager,
Cal_Bdd fUserBdd,
Cal_Bdd gUserBdd,
Cal_Bdd hUserBdd
)
Returns the BDD obtained by substituting a variable by a function
Side Effects: None
int
Cal_BddDependsOn(
Cal_BddManager bddManager,
Cal_Bdd fUserBdd,
Cal_Bdd varUserBdd
)
Returns 1 if f depends on var and returns 0 otherwise.
Side Effects: None
int
Cal_BddDumpBdd(
Cal_BddManager bddManager,
Cal_Bdd fUserBdd,
Cal_Bdd * userVars,
FILE * fp
)
Writes an encoded description of the BDD to the file given by fp. The
argument vars should be a null-terminated array of variables that include
the support of f . These variables need not be in order of increasing index.
The function returns a nonzero value if f was written to the file
successfully.
Side Effects: required
void
Cal_BddDynamicReordering(
Cal_BddManager bddManager,
int technique
)
Selects the method for dynamic reordering.
Side Effects: None
Cal_Bdd
Cal_BddElse(
Cal_BddManager bddManager,
Cal_Bdd userBdd
)
Returns the negative cofactor of the argument BDD with respect to the top
variable of the BDD.
Side Effects: The reference count of the returned BDD is increased by 1.
Cal_Bdd
Cal_BddExists(
Cal_BddManager bddManager,
Cal_Bdd fUserBdd
)
Returns the BDD for f with all the variables that are paired with something
in the current variable association existentially quantified out.
Side Effects: None.
Cal_Bdd
Cal_BddForAll(
Cal_BddManager bddManager,
Cal_Bdd fUserBdd
)
Returns the BDD for f with all the variables that are paired with something
in the current variable association universally quantified out.
Side Effects: None.
void
Cal_BddFree(
Cal_BddManager bddManager,
Cal_Bdd userBdd
)
Frees the argument BDD. It is an error to free a BDD more than once.
Side Effects: The reference count of the argument BDD is decreased by 1.
void
Cal_BddFunctionPrint(
Cal_BddManager bddManager,
Cal_Bdd userBdd,
char * name
)
Prints the function implemented by the argument BDD
Side Effects: None
void
Cal_BddFunctionProfileMultiple(
Cal_BddManager bddManager,
Cal_Bdd * fUserBddArray,
long * funcCounts
)
optional
Side Effects: None
void
Cal_BddFunctionProfile(
Cal_BddManager bddManager,
Cal_Bdd fUserBdd,
long * funcCounts
)
The nth entry of the function profile array is the number of subfunctions of
f which may be obtained by restricting the variables whose index is less
than n. An entry of zero indicates that f is independent of the variable
with the corresponding index.
Cal_BddId_t
Cal_BddGetIfId(
Cal_BddManager bddManager,
Cal_Bdd userBdd
)
Returns the id of the top variable of the argument BDD.
Side Effects: None
Cal_BddId_t
Cal_BddGetIfIndex(
Cal_BddManager bddManager,
Cal_Bdd userBdd
)
Returns the index of the top variable of the argument BDD.
Side Effects: None
Cal_Bdd
Cal_BddGetRegular(
Cal_BddManager bddManager,
Cal_Bdd userBdd
)
Returns a BDD with positive from a given BDD with arbitrary phase
Side Effects: None.
Cal_Bdd
Cal_BddITE(
Cal_BddManager bddManager,
Cal_Bdd fUserBdd,
Cal_Bdd gUserBdd,
Cal_Bdd hUserBdd
)
Returns the BDD for logical If-Then-Else Description [Returns the BDD for
the logical operation IF f THEN g ELSE h - f g + f' h
Side Effects: None
Cal_Bdd
Cal_BddIdentity(
Cal_BddManager bddManager,
Cal_Bdd userBdd
)
Returns the duplicate BDD of the argument BDD.
Side Effects: The reference count of the BDD is increased by 1.
Cal_Bdd
Cal_BddIf(
Cal_BddManager bddManager,
Cal_Bdd userBdd
)
Returns the BDD corresponding to the top variable of the argument BDD.
Side Effects: None.
Cal_Bdd
Cal_BddImplies(
Cal_BddManager bddManager,
Cal_Bdd fUserBdd,
Cal_Bdd gUserBdd
)
Computes a BDD that implies conjunction of f and Cal_BddNot(g)
Side Effects: none
Cal_Bdd
Cal_BddIntersects(
Cal_BddManager bddManager,
Cal_Bdd fUserBdd,
Cal_Bdd gUserBdd
)
Computes a BDD that implies conjunction of f and g.
Side Effects: None
int
Cal_BddIsBddConst(
Cal_BddManager bddManager,
Cal_Bdd userBdd
)
Returns 1 if the argument BDD is either constant one or constant zero,
otherwise returns 0.
Side Effects: None.
int
Cal_BddIsBddNull(
Cal_BddManager bddManager,
Cal_Bdd userBdd
)
Returns 1 if the argument BDD is NULL, 0 otherwise.
Side Effects: None.
int
Cal_BddIsBddOne(
Cal_BddManager bddManager,
Cal_Bdd userBdd
)
Returns 1 if the argument BDD is constant one, 0 otherwise.
Side Effects: None.
int
Cal_BddIsBddZero(
Cal_BddManager bddManager,
Cal_Bdd userBdd
)
Returns 1 if the argument BDD is constant zero, 0 otherwise.
Side Effects: None.
int
Cal_BddIsCube(
Cal_BddManager bddManager,
Cal_Bdd fUserBdd
)
Returns 1 if the argument BDD is a cube, 0 otherwise
Side Effects: None
int
Cal_BddIsEqual(
Cal_BddManager bddManager,
Cal_Bdd userBdd1,
Cal_Bdd userBdd2
)
Returns 1 if argument BDDs are equal, 0 otherwise.
Side Effects: None.
int
Cal_BddIsProvisional(
Cal_BddManager bddManager,
Cal_Bdd userBdd
)
Returns 1, if the given user BDD contains provisional BDD node.
Side Effects: None.
Cal_Bdd
Cal_BddManagerCreateNewVarAfter(
Cal_BddManager bddManager,
Cal_Bdd userBdd
)
Creates and returns a new variable after the specified one in the variable
order.
Side Effects: None
Cal_Bdd
Cal_BddManagerCreateNewVarBefore(
Cal_BddManager bddManager,
Cal_Bdd userBdd
)
Creates and returns a new variable before the specified one in the variable
order.
Side Effects: None
Cal_Bdd
Cal_BddManagerCreateNewVarFirst(
Cal_BddManager bddManager
)
Creates and returns a new variable at the start of the variable order.
Side Effects: None
Cal_Bdd
Cal_BddManagerCreateNewVarLast(
Cal_BddManager bddManager
)
Creates and returns a new variable at the end of the variable order.
Side Effects: None
int
Cal_BddManagerGC(
Cal_BddManager bddManager
)
For each variable in the increasing id free nodes with reference count equal
to zero freeing a node results in decrementing reference count of then and
else nodes by one.
Side Effects: None.
void *
Cal_BddManagerGetHooks(
Cal_BddManager bddManager
)
Returns the hooks field of the manager.
Side Effects: None
unsigned long
Cal_BddManagerGetNumNodes(
Cal_BddManager bddManager
)
Returns the number of BDD nodes
Side Effects: None
Cal_Bdd
Cal_BddManagerGetVarWithId(
Cal_BddManager bddManager,
Cal_BddId_t id
)
Returns the variable with the specified id, null if no such variable exists
Side Effects: None
Cal_Bdd
Cal_BddManagerGetVarWithIndex(
Cal_BddManager bddManager,
Cal_BddIndex_t index
)
Returns the variable with the specified index, null if no such variable
exists
Side Effects: None
Cal_BddManager
Cal_BddManagerInit(
)
Initializes and allocates fields of the BDD manager. Some of the fields are
initialized for maxNumVars+1 or numVars+1, whereas some of them are
initialized for maxNumVars or numVars. The first kind of fields are
associated with the id of a variable and the second ones are with the index
of the variable.
Side Effects: None
int
Cal_BddManagerQuit(
Cal_BddManager bddManager
)
Frees the BDD manager and all the associated allocations
Side Effects: None
void
Cal_BddManagerSetGCLimit(
Cal_BddManager manager
)
It tries to set the limit at twice the number of nodes in the manager at the
current point. However, the limit is not allowed to fall below the
MIN_GC_LIMIT or to exceed the value of node limit (if one exists).
Side Effects: None.
void
Cal_BddManagerSetHooks(
Cal_BddManager bddManager,
void * hooks
)
Sets the hooks field of the manager.
Side Effects: Hooks field changes.
void
Cal_BddManagerSetParameters(
Cal_BddManager bddManager,
long reorderingThresh
long maxForwardedNode
double repackAfterGCThr
double tableRepackThres
)
This function is used to set the parameters which are used to control the
reordering process. "reorderingThreshold" determines the number of nodes
below which reordering will NOT be invoked, "maxForwardedNodes" determines
the maximum number of forwarded nodes which are allowed (at that point the
cleanup must be done), and "repackingThreshold" determines the fraction of
the page utilized below which repacking has to be invoked. These parameters
have different affect on the computational and memory usage aspects of
reordeing. For instance, higher value of "maxForwardedNodes" will result in
process consuming more memory, and a lower value on the other hand would
invoke the cleanup process repeatedly resulting in increased computation.
Side Effects: None
Cal_Bdd
Cal_BddMultiwayAnd(
Cal_BddManager bddManager,
Cal_Bdd * userBddArray
)
Returns the BDD for logical AND of set of BDDs in the bddArray
Side Effects: None
Cal_Bdd
Cal_BddMultiwayOr(
Cal_BddManager bddManager,
Cal_Bdd * userBddArray
)
Returns the BDD for logical OR of set of BDDs in the bddArray
Side Effects: None
Cal_Bdd
Cal_BddMultiwayXor(
Cal_BddManager bddManager,
Cal_Bdd * userBddArray
)
Returns the BDD for logical XOR of set of BDDs in the bddArray
Side Effects: None
Cal_Bdd
Cal_BddNand(
Cal_BddManager bddManager,
Cal_Bdd fUserBdd,
Cal_Bdd gUserBdd
)
Returns the BDD for logical NAND of f and g
Side Effects: None
Cal_Block
Cal_BddNewVarBlock(
Cal_BddManager bddManager,
Cal_Bdd variable,
long length
)
The block is specified by passing the first variable and the length of the
block. The "length" number of consecutive variables starting from "variable"
are put in the block.
Side Effects: A new block is created.
long
Cal_BddNodeLimit(
Cal_BddManager bddManager,
long newLimit
)
Sets the node limit to new_limit and returns the old limit.
Side Effects: Threshold for garbage collection may change
Cal_Bdd
Cal_BddNor(
Cal_BddManager bddManager,
Cal_Bdd fUserBdd,
Cal_Bdd gUserBdd
)
Returns the BDD for logical NOR of f and g
Side Effects: None
Cal_Bdd
Cal_BddNot(
Cal_BddManager bddManager,
Cal_Bdd userBdd
)
Returns the complement of the argument BDD.
Side Effects: The reference count of the argument BDD is increased by 1.
Cal_Bdd
Cal_BddOne(
Cal_BddManager bddManager
)
Returns the BDD for the constant one
Side Effects: None
Cal_Bdd
Cal_BddOr(
Cal_BddManager bddManager,
Cal_Bdd fUserBdd,
Cal_Bdd gUserBdd
)
Returns the BDD for logical OR of f and g
Side Effects: None
int
Cal_BddOverflow(
Cal_BddManager bddManager
)
Returns 1 if the node limit has been exceeded, 0 otherwise. The overflow
flag is cleared.
Side Effects: None
Cal_Bdd *
Cal_BddPairwiseAnd(
Cal_BddManager bddManager,
Cal_Bdd * userBddArray
)
Returns an array of BDDs obtained by logical AND of BDD pairs specified by
an BDD array in which a BDD at an even location is paired with a BDD at an
odd location of the array
Side Effects: None
Cal_Bdd *
Cal_BddPairwiseOr(
Cal_BddManager bddManager,
Cal_Bdd * userBddArray
)
Returns an array of BDDs obtained by logical OR of BDD pairs specified by an
BDD array in which a BDD at an even location is paired with a BDD at an odd
location of the array
Side Effects: None
Cal_Bdd *
Cal_BddPairwiseXor(
Cal_BddManager bddManager,
Cal_Bdd * userBddArray
)
Returns an array of BDDs obtained by logical XOR of BDD pairs specified by
an BDD array in which a BDD at an even location is paired with a BDD at an
odd location of the array
Side Effects: None
void
Cal_BddPrintBdd(
Cal_BddManager bddManager,
Cal_Bdd fUserBdd,
Cal_VarNamingFn_t VarNamingFn,
Cal_TerminalIdFn_ TerminalIdFn,
Cal_Pointer_t env,
FILE * fp
)
Prints a human-readable representation of the BDD f to the file given by fp.
The namingFn should be a pointer to a function taking a bddManager, a BDD
and the pointer given by env. This function should return either a null
pointer or a srting that is the name of the supplied variable. If it returns
a null pointer, a default name is generated based on the index of the
variable. It is also legal for naminFN to e null; in this case, default
names are generated for all variables. The macro bddNamingFnNone is a null
pointer of suitable type. terminalIdFn should be apointer to a function
taking a bddManager and two longs. plus the pointer given by the env. It
should return either a null pointer. If it returns a null pointer, or if
terminalIdFn is null, then default names are generated for the terminals.
The macro bddTerminalIdFnNone is a null pointer of suitable type.
Side Effects: None.
void
Cal_BddPrintFunctionProfileMultiple(
Cal_BddManager bddManager,
Cal_Bdd * userBdds,
Cal_VarNamingFn_t varNamingProc,
char * env,
int lineLength,
FILE * fp
)
optional
Side Effects: None
void
Cal_BddPrintFunctionProfile(
Cal_BddManager bddManager,
Cal_Bdd f,
Cal_VarNamingFn_t varNamingProc,
char * env,
int lineLength,
FILE * fp
)
optional
Side Effects: None
void
Cal_BddPrintProfileMultiple(
Cal_BddManager bddManager,
Cal_Bdd * userBdds,
Cal_VarNamingFn_t varNamingProc,
char * env,
int lineLength,
FILE * fp
)