module Bdd:sig..end
type 'a t
Objects of type 'a t contain both the top node of the BDD and the manager to which this node belongs. 'a, which is either Cudd.Man.d or Cudd.Man.v indicates the kind of manager to which the node belongs, see module Cudd.Man. The manager can be retrieved with Cudd.Bdd.manager. These objects are automatically garbage collected.
type 'a bdd =
| |
Bool of |
(* | Terminal value | *) |
| |
Ite of |
(* | Decision on CUDD variable | *) |
ttypedt =Cudd.Man.d t
typevt =Cudd.Man.v t
val manager : 'a t -> 'a Cudd.Man.tval is_cst : 'a t -> boolCudd_IsConstant. Is the BDD constant ?val is_complement : 'a t -> boolCudd_IsComplement. Is the BDD a complemented one ?val topvar : 'a t -> intCudd_NodeReadIndex. Returns the index of the (top node of the) BDD (65535 for a constant BDD)val dthen : 'a t -> 'a tCudd_T. Returns the positive subnode of the BDDval delse : 'a t -> 'a tCudd_E. Returns the negative subnode of the BDDval cofactors : int -> 'a t -> 'a t * 'a tval cofactor : 'a t -> 'a t -> 'a t
val inspect : 'a t -> 'a bddval support : 'a t -> 'a tCudd_Support. Returns the support of the BDDval supportsize : 'a t -> intCudd_SupportSize. Returns the size of the support of the BDDval is_var_in : int -> 'a t -> boolCuddaux_IsVarIn. Does the given variable belong the support of the BDD ?val vectorsupport : 'a t array -> 'a tCudd_Cudd_VectorSupport. Returns the support of the array of BDDs.
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). This
operation does not use the global cache, unlike Cudd.Bdd.support.
val support_inter : 'a t -> 'a t -> 'a tCudd_bddLiteralSetIntersection. Intersection of supportsval support_union : 'a t -> 'a t -> 'a tCudd_bddAnd. Union of supportsval support_diff : 'a t -> 'a t -> 'a tCudd_Cofactor. Difference of supportsval list_of_support : 'a t -> int listval dtrue : 'a Cudd.Man.t -> 'a tval dfalse : 'a Cudd.Man.t -> 'a tval ithvar : 'a Cudd.Man.t -> int -> 'a tCudd_bddIthVar. Returns the BDD equivalent to the variable of the given index.val newvar : 'a Cudd.Man.t -> 'a tCudd_bddNewVar. Returns the BDD equivalent to the variable of the next unused index.val newvar_at_level : 'a Cudd.Man.t -> int -> 'a tCudd_bddNewVarAtLevel. Returns the BDD equivalent to the variable of the next unused index and sets its level.val is_true : 'a t -> boolval is_false : 'a t -> boolval is_equal : 'a t -> 'a t -> boolval is_leq : 'a t -> 'a t -> boolCudd_bddLeq. Does the first BDD implies the second one ?val is_inter_empty : 'a t -> 'a t -> boolCudd_bddLeq. Is the intersection (conjunction) of the two BDDs non empty (false) ?val is_equal_when : 'a t -> 'a t -> 'a t -> boolCudd_EquivDC. Are the two first BDDs equal when the third one (careset) is true ?val is_leq_when : 'a t -> 'a t -> 'a t -> boolCudd_bddLeqUnless. Does the first BDD implies the second one when the third one (careset) is true ?val is_included_in : 'a t -> 'a t -> boolCudd_bddLeq. Same as Cudd.Bdd.is_leq
Is the result of ite constant, and if it is the case, what is the constant ?
val is_ite_cst : 'a t -> 'a t -> 'a t -> bool optionval is_var_dependent : int -> 'a t -> boolCudd_bddVarIsDependent. Is the given variable dependent on others in the BDD ?val is_var_essential : int -> bool -> 'a t -> boolCudd_bddIsVarEssential. Is the given variable with the specified phase implied by the BDD ?val size : 'a t -> intCudd_DagSize. Size if the BDD as a graph (the number of nodes).val nbpaths : 'a t -> floatCudd_CountPath. Number of paths in the BDD from the root to the leaves.val nbtruepaths : 'a t -> floatCudd_CountPathsToNonZero. Number of paths in the BDD from the root to the true leaf.val nbminterms : int -> 'a t -> floatCudd_CountMinterm. Number of minterms of the BDD assuming that it depends on the given number of variables.val density : int -> 'a t -> floatCudd_Density. Density
of the BDD, which is the ratio of the number of minterms to the number of
nodes. The BDD is assumed to depend on nvars variables.val dnot : 'a t -> 'a tCudd_Not. Negationval dand : 'a t -> 'a t -> 'a tCudd_bddAnd. Conjunction/Intersectionval dor : 'a t -> 'a t -> 'a tCudd_bddOr. Disjunction/Unionval xor : 'a t -> 'a t -> 'a tCudd_bddXor. Exclusive unionval nand : 'a t -> 'a t -> 'a t
val nor : 'a t -> 'a t -> 'a t
val nxor : 'a t -> 'a t -> 'a tCudd_bddXnor. Equalityval eq : 'a t -> 'a t -> 'a tCudd.Bdd.nxorval ite : 'a t -> 'a t -> 'a t -> 'a tCudd_bddIte. If-then-else operation.val ite_cst : 'a t -> 'a t -> 'a t -> 'a t optionCudd_bddIteConstant. If-then-else operation that succeeds when the result is a node of the arguments.val compose : int -> 'a t -> 'a t -> 'a t
val vectorcompose : ?memo:Cudd.Memo.t -> 'a t array -> 'a t -> 'a tCudd_bddVectorCompose.
vectorcompose table bdd performs a parallel substitution of every variable
var present in the manager by table.(var) in bdd. The size of table
should be at least Cudd.Man.get_bddvar_nb. You can optionnally control the
memoization policy, see Cudd.Memo.val intersect : 'a t -> 'a t -> 'a tCudd_bddIntersect. Returns a BDD included in the intersection of the arguments.val varmap : 'a t -> 'a t
val permute : ?memo:Cudd.Memo.t -> 'a t -> int array -> 'a tCudd_bddPermute.
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 iter_node : ('a t -> unit) -> 'a t -> unit
val iter_cube : (Cudd.Man.tbool array -> unit) -> 'a t -> unitCudd_ForeachCube. Apply the function f to each cube of the
BDD. The cubes are specified as arrays of
elements of type Cudd.Man.tbool. The size of the arrays is equal
to Cudd.Man.get_bddvar_nb, the number of variables present in
the manager.val iter_prime : (Cudd.Man.tbool array -> unit) -> 'a t -> 'a t -> unitCudd_ForeachPrime. Apply the function f to each prime
covering the BDD interval. The first BDD argument is the lower bound,
the second the upper bound (which may be equal to the lower bound).
The primes are specified as arrays of elements of type
Cudd.Man.tbool. The size of the arrays is equal to
Cudd.Man.get_bddvar_nb, the number of variables present in the
manager.val exist : 'a t -> 'a t -> 'a tCudd_bddExistAbstract. exist supp bdd quantifies existentially the set of variables defined by supp in the BDD.val forall : 'a t -> 'a t -> 'a tCudd_bddUnivAbstract. forall supp bdd quantifies universally the set of variables defined by supp in the BDD.val existand : 'a t -> 'a t -> 'a t -> 'a tCudd_bddAndAbstract. Simultaneous existential quantification and intersection of BDDs. Logically, existand supp x y = exist supp (dand x y).val existxor : 'a t -> 'a t -> 'a t -> 'a tCudd_bddXorExistAbstract. Simultaneous existential quantification and exclusive or of BDDs. Logically, existxor supp x y = exist supp (xor x y).val booleandiff : 'a t -> int -> 'a tCudd_bddBooleanDiff. Boolean difference of the BDD with respect to the variable.val cube_of_bdd : 'a t -> 'a tCudd_FindEssential. Returns the smallest cube (in the sens of inclusion) included in the BDD.val cube_of_minterm : 'a Cudd.Man.t -> Cudd.Man.tbool array -> 'a tCudd_CubeArrayToBdd. Converts a minterm to a BDD (which is a cube).val list_of_cube : 'a t -> (int * bool) listval cube_union : 'a t -> 'a t -> 'a tCuddaux_bddCubeUnion. Computes the union of cubes, which is the smallest cube containing both the argument cubes.val pick_minterm : 'a t -> Cudd.Man.tbool arrayCudd_bddPickOneCube. Picks randomly a minterm in the BDD.val pick_cube_on_support : 'a t -> 'a t -> 'a tCudd_bddPickOneMinterm. pick_cube_on_support bdd supp picks randomly a minterm/cube in the BDD, in which all the variables in the support supp have a definite value.
The support argument should contain the support of the BDD (otherwise the result may be incorrect).
val pick_cubes_on_support : 'a t -> 'a t -> int -> 'a t arrayCudd_bddPickArbitraryMinterms. pick_cubes_on_support bdd supp nb picks randomly nb minterms/cubes in the BDD, in which all the variables in the support have a definite value. The support argument should contain the support of the BDD (otherwise the result may be incorrect).
Fails if the effective number of such minterms in the BDD is less than nb.
gencof f c returns a BDD that coincides with f whenever c is true (and which is hopefully smaller). constrain enjoys in addition strong properties (see papers from Madre and Coudert)val constrain : 'a t -> 'a t -> 'a t
val tdconstrain : 'a t -> 'a t -> 'a tCuddaux_bddTDConstrain.val restrict : 'a t -> 'a t -> 'a tCuddaux_bddRestrict.val tdrestrict : 'a t -> 'a t -> 'a tCuddaux_bddTDRestrict.val minimize : 'a t -> 'a t -> 'a t
val licompaction : 'a t -> 'a t -> 'a t
val squeeze : 'a t -> 'a t -> 'a tCudd_bddSqueeze. sqeeze lower upper returns a (smaller) BDD which is in the functional interval [lower,upper].val clippingand : 'a t -> 'a t -> int -> bool -> 'a t
val clippingexistand : 'a t ->
'a t -> 'a t -> int -> bool -> 'a tCudd_bddClippingAndAbstract.
clippingexistand supp f g maxdepth direction (order of argulents changed).val underapprox : int -> int -> bool -> float -> 'a t -> 'a t
val overapprox : int -> int -> bool -> float -> 'a t -> 'a t
val remapunderapprox : int -> int -> float -> 'a t -> 'a t
val remapoverapprox : int -> int -> float -> 'a t -> 'a t
val biasedunderapprox : int ->
int -> float -> float -> 'a t -> 'a t -> 'a t
val biasedoverapprox : int ->
int -> float -> float -> 'a t -> 'a t -> 'a t
XXcompress nvars threshold f.val subsetcompress : int -> int -> 'a t -> 'a t
val supersetcompress : int -> int -> 'a t -> 'a t
val subsetHB : int -> int -> 'a t -> 'a t
val supersetHB : int -> int -> 'a t -> 'a t
XXXsetSP nvars threshold hardlimit f.val subsetSP : int -> int -> bool -> 'a t -> 'a t
val supersetSP : int -> int -> bool -> 'a t -> 'a t
None if no
decomposition has been found.val approxconjdecomp : 'a t -> ('a t * 'a t) optionCudd_bddApproxConjDecomp.
Cudd_bddApproxDisjDecomp.
val approxdisjdecomp : 'a t -> ('a t * 'a t) optionCudd_bddIterConjDecomp.val iterconjdecomp : 'a t -> ('a t * 'a t) optionCudd_bddIterDisjDecomp.val iterdisjdecomp : 'a t -> ('a t * 'a t) optionCudd_bddGenConjDecomp.val genconjdecomp : 'a t -> ('a t * 'a t) optionCudd_bddGenDisjDecomp.val gendisjdecomp : 'a t -> ('a t * 'a t) optionCudd_bddVarConjDecomp.val varconjdecomp : 'a t -> ('a t * 'a t) optionCudd_bddVarDisjDecomp.val vardisjdecomp : 'a t -> ('a t * 'a t) optionval transfer : 'a t -> 'b Cudd.Man.t -> 'b tCudd_bddTransfer. Transfers a BDD to a different manager.val correlation : 'a t -> 'a t -> floatCudd_bddCorrelation. Computes the correlation of f and g (if
f=g, their correlation is 1, if f=not g, it is 0)val correlationweights : 'a t -> 'a t -> float array -> float
val _print : 'a t -> unitval print__minterm : Format.formatter -> 'a t -> unitCudd_Printminterm.val print_minterm : (Format.formatter -> int -> unit) ->
Format.formatter -> 'a t -> unitprint_minterm bassoc fmt bdd prints the minterms of the BDD using
bassoc to convert indices of variables to names.val print : (Format.formatter -> int -> unit) ->
Format.formatter -> 'a t -> unitval print_list : (Format.formatter -> int -> unit) ->
Format.formatter -> (int * bool) list -> unit