module Add:sig..end
type t
Man.d Man.t).
Objects of this type contains both the top node of the ADD and the manager to which the node belongs. The manager can be retrieved with Cudd.Add.manager. Objects of this type are automatically garbage collected.
type add =
| |
Leaf of |
(* | Terminal value | *) |
| |
Ite of |
(* | Decision on CUDD variable | *) |
tval manager : t -> Cudd.Man.dtval is_cst : t -> boolCudd_IsConstant. Is the ADD constant ?val topvar : t -> intCudd_NodeReadIndex. Returns the index of the ADD (65535 for a constant ADD)val dthen : t -> tCudd_T. Returns the positive subnode of the ADDval delse : t -> tCudd_E. Returns the negative subnode of the ADDval dval : t -> floatCudd_V. Returns the value of the assumed constant ADDval cofactors : int -> t -> t * tval cofactor : t -> Cudd.Bdd.dt -> t
val inspect : t -> addval support : t -> Cudd.Bdd.dtCudd_Support. Returns the support (positive cube) of the ADDval supportsize : t -> intCudd_SupportSize. Returns the size of the support of the ADDval is_var_in : int -> t -> boolCuddaux_IsVarIn. Does the given variable belong to the support of the ADD ?val vectorsupport : t array -> Cudd.Bdd.dtCudd_VectorSupport. Returns the support of the array of ADDs.
Raises a Failure exception in case where the array is of size 0 (in such
case, the manager is unknown, and we cannot return an empty support).
val vectorsupport2 : Cudd.Bdd.dt array -> t array -> Cudd.Bdd.dtCudd_VectorSupport. Returns the support of the BDDs and ADDs arrays.
Raises a Failure exception when both arrays are of size 0 (in such
case, the manager is unknown, and we cannot return an empty support).
val cst : Cudd.Man.dt -> float -> tCudd_addConst. Return a constant ADD with the given value.val background : Cudd.Man.dt -> t
val ite : Cudd.Bdd.dt -> t -> t -> tval ite_cst : Cudd.Bdd.dt -> t -> t -> t optionCuddaux_addIteConstant/Cudd_addIteConstant. If-then-else operation, which succeeds only if the resulting node belongs to one of the two ADD.val eval_cst : t -> Cudd.Bdd.dt -> t option
val compose : int -> Cudd.Bdd.dt -> t -> t
val vectorcompose : ?memo:Cudd.Memo.t -> Cudd.Bdd.dt array -> t -> tCuddaux_addVectorCompose/Cudd_addVectorCompose.
Parallel substitution of every variable var present in the manager by the
BDD table.(var) in the ADD. You can optionnally control the memoization
policy, see Cudd.Memo.val varmap : t -> tCuddaux_addVarMap/Cudd_bddVarMap. Permutes the variables as it has been specified with Cudd.Man.set_varmap.val permute : ?memo:Cudd.Memo.t -> t -> int array -> tCudd_addPermute.
Permutes the variables as it is specified by permut (same format as in
Cudd.Man.set_varmap). You can optionnally control the memoization policy, see
Cudd.Memo.val is_equal : t -> t -> bool
Variation of Cudd_EquivDC. Are the two ADDs equal when the BDD (careset) is true ?
val is_equal_when : t -> t -> Cudd.Bdd.dt -> boolval is_eval_cst : t -> Cudd.Bdd.dt -> float optionCuddaux_addEvalConst/Cudd_addEvalConst. Is the ADD constant when the BDD (careset) is true, and in this case what is its value ?val is_ite_cst : Cudd.Bdd.dt -> t -> t -> float optionite constant, and if it is the case, what is its value ?val size : t -> intCudd_DagSize. Size if the ADD as a graph (the number of nodes).val nbpaths : t -> floatCudd_CountPath. Number of paths in the ADD from the root to the leafs.val nbnonzeropaths : t -> floatCudd_CountPathsToNonZero. Number of paths in the ADD from the root to non-zero leaves.val nbminterms : int -> t -> floatCudd_CountMinterm. Number of minterms of the ADD knowing that it depends on the given number of variables.val density : int -> t -> floatCudd_Density. Density of the ADD, which is the ratio of the number of minterms to the number of nodes. The ADD is assumed to depend on nvars variables.val nbleaves : t -> intCudd_CountLeaves. Number of leaves.val iter_cube : (Cudd.Man.tbool array -> float -> unit) -> t -> unitCudd.Bdd.iter_cubeval iter_node : (t -> unit) -> t -> unitCudd.Bdd.iter_nodeval guard_of_node : t -> t -> Cudd.Bdd.dtCuddaux_addGuardOfNode. guard_of_node f node returns the sum of the paths leading from the root node f to the node node of f.val guard_of_nonbackground : t -> Cudd.Bdd.dtval nodes_below_level : t -> int option -> int -> t arrayCuddaux_NodesBelowLevel. nodes_below_level f olevel max returns all (if max<=0), otherwise at most max nodes pointed by the ADD, indexed by a variable of level greater or equal than level, and encountered first in the top-down exploration (i.e., whenever a node is collected, its sons are not collected). If olevel=None, then only constant nodes are collected. The background node may be in the result.val guard_of_leaf : t -> float -> Cudd.Bdd.dtval leaves : t -> float arrayval pick_leaf : t -> floatNone if the only leaf is the background leaf.val guardleafs : t -> (Cudd.Bdd.dt * float) arrayCudd.Bdd.constrain, Cudd.Bdd.tdconstrain, Cudd.Bdd.restrict, Cudd.Bdd.tdrestrictval constrain : t -> Cudd.Bdd.dt -> tval tdconstrain : t -> Cudd.Bdd.dt -> tval restrict : t -> Cudd.Bdd.dt -> tval tdrestrict : t -> Cudd.Bdd.dt -> tval of_bdd : Cudd.Bdd.dt -> tCudd_BddToAdd. Conversion from BDD to 0-1 ADDval to_bdd : t -> Cudd.Bdd.dtCudd_addBddPattern. Conversion from ADD to BDD by replacing all leaves different from 0 by true.val to_bdd_threshold : float -> t -> tCudd_addBddThreshold. Conversion from ADD to BDD by replacing all leaves greater than or equal to the threshold by true.val to_bdd_strictthreshold : float -> t -> tCudd_addBddStrictThreshold. Conversion from ADD to BDD by replacing all leaves strictly greater than the threshold by true.val to_bdd_interval : float -> float -> t -> tCudd_addBddInterval. Conversion from ADD to BDD by replacing all leaves in the interval by true.val exist : Cudd.Bdd.dt -> t -> tCudd_addExistAbstract. Abstracts all the variables in the cube from the ADD by summing over all possible values taken by those variables.val forall : Cudd.Bdd.dt -> t -> tCudd_addUnivAbstract. Abstracts all the variables in the cube from the ADD by taking the product over all possible values taken by those variables.val is_leq : t -> t -> bool
val add : t -> t -> t
val sub : t -> t -> t
val mul : t -> t -> t
val div : t -> t -> t
val min : t -> t -> t
val max : t -> t -> t
val agreement : t -> t -> t
val diff : t -> t -> t
val threshold : t -> t -> t
val setNZ : t -> t -> t
val log : t -> t
val matrix_multiply : int array -> t -> t -> tCudd_addMatrixMultiply.
matrix_multiply z A B performs matrix multiplication of A and B, with z
being the summation variables, which means that they are used to refer columns
of A and to rows of B.
val times_plus : int array -> t -> t -> tCudd_addTimesPlus.val triangle : int array -> t -> t -> tCudd_addTriangle.val mapleaf1 : default:t ->
(Cudd.Bdd.dt -> float -> float) -> t -> tval mapleaf2 : default:t ->
(Cudd.Bdd.dt -> float -> float -> float) ->
t -> t -> tCudd.User for explanations.typeop1 =(float, float) Cudd.Custom.op1
typeop2 =(float, float, float) Cudd.Custom.op2
typeop3 =(float, float, float, float) Cudd.Custom.op3
type opN = {
|
commonN : |
|
closureN : |
|
arityNbdd : |
type opG = {
|
commonG : |
|
arityGbdd : |
|
closureG : |
|
oclosureBeforeRec : |
|
oclosureIte : |
typetest2 =(float, float) Cudd.Custom.test2
typeexist =float Cudd.Custom.exist
typeexistand =float Cudd.Custom.existand
typeexistop1 =(float, float) Cudd.Custom.existop1
typeexistandop1 =(float, float) Cudd.Custom.existandop1
val make_op1 : ?memo:Cudd.Memo.t -> (float -> float) -> op1val make_op2 : ?memo:Cudd.Memo.t ->
?commutative:bool ->
?idempotent:bool ->
?special:(t -> t -> t option) ->
(float -> float -> float) -> op2val make_op3 : ?memo:Cudd.Memo.t ->
?special:(t -> t -> t -> t option) ->
(float -> float -> float -> float) -> op3val make_opN : ?memo:Cudd.Memo.t ->
int ->
int ->
(Cudd.Bdd.dt array -> t array -> t option) -> opNval make_opG : ?memo:Cudd.Memo.t ->
?beforeRec:(int * bool ->
Cudd.Bdd.dt array ->
t array -> Cudd.Bdd.dt array * t array) ->
?ite:(int -> t -> t -> t) ->
int ->
int ->
(Cudd.Bdd.dt array -> t array -> t option) -> opGval make_test2 : ?memo:Cudd.Memo.t ->
?symetric:bool ->
?reflexive:bool ->
?special:(t -> t -> bool option) ->
(float -> float -> bool) -> test2val make_exist : ?memo:Cudd.Memo.t -> op2 -> existval make_existand : ?memo:Cudd.Memo.t -> bottom:float -> op2 -> existandval make_existop1 : ?memo:Cudd.Memo.t -> op1:op1 -> op2 -> existop1val make_existandop1 : ?memo:Cudd.Memo.t ->
op1:op1 -> bottom:float -> op2 -> existandop1val clear_op1 : op1 -> unitval clear_op2 : op2 -> unitval clear_op3 : op3 -> unitval clear_opN : opN -> unitval clear_opG : opG -> unitval clear_test2 : test2 -> unitval clear_exist : exist -> unitval clear_existand : existand -> unitval clear_existop1 : existop1 -> unitval clear_existandop1 : existandop1 -> unitval apply_op1 : op1 -> t -> tval apply_op2 : op2 -> t -> t -> tval apply_op3 : op3 -> t -> t -> tval apply_opN : opN -> Cudd.Bdd.dt array -> t array -> tval apply_opG : opG -> Cudd.Bdd.dt array -> t array -> tval apply_test2 : test2 -> t -> t -> boolval apply_exist : exist -> supp:Cudd.Bdd.dt -> t -> tval apply_existand : existand ->
supp:Cudd.Bdd.dt -> Cudd.Bdd.dt -> t -> tval apply_existop1 : existop1 -> supp:Cudd.Bdd.dt -> t -> tval apply_existandop1 : existandop1 ->
supp:Cudd.Bdd.dt -> Cudd.Bdd.dt -> t -> tval map_op1 : ?memo:Cudd.Memo.t -> (float -> float) -> t -> tval map_op2 : ?memo:Cudd.Memo.t ->
?commutative:bool ->
?idempotent:bool ->
?special:(t -> t -> t option) ->
(float -> float -> float) -> t -> t -> tval map_op3 : ?memo:Cudd.Memo.t ->
?special:(t -> t -> t -> t option) ->
(float -> float -> float -> float) ->
t -> t -> t -> tval map_opN : ?memo:Cudd.Memo.t ->
(Cudd.Bdd.dt array -> t array -> t option) ->
Cudd.Bdd.dt array -> t array -> tval map_test2 : ?memo:Cudd.Memo.t ->
?symetric:bool ->
?reflexive:bool ->
?special:(t -> t -> bool option) ->
(float -> float -> bool) -> t -> t -> boolval transfer : t -> Cudd.Man.d Cudd.Man.t -> t
val _print : t -> unitval print__minterm : Format.formatter -> t -> unitCudd_Printminterm.val print_minterm : (Format.formatter -> int -> unit) ->
(Format.formatter -> float -> unit) -> Format.formatter -> t -> unitprint_minterm print_id print_leaf fmt bdd prints the minterms of the BDD using print_id to print indices of variables and print_leaf to print leaf values.val print : (Format.formatter -> int -> unit) ->
(Format.formatter -> float -> unit) -> Format.formatter -> t -> unit