Page
Library
Module
Module type
Parameter
Class
Class type
Source
BddBinary Decision Diagrams (BDDs)
Number of variables
Returns the number of variables max_var. Default value is 0, which means that bdds cannot be created until the module is initialized using set_max_var.
Sets the number max_var of variables. Additionally, the size of the internal nodes table for each variable can be specified. Each table has a default size (7001) and is resized when necessary (i.e. when too many collisions occur). IMPORTANT NOTE: bdds created before set_max_var should not be used anymore.
The abstract type of BDD nodes
View
Accessors
The low and high parts of a bdd, respectively. low and high raise Invalid_argument on Zero and One.
Constructors
val zero : tval one : tBuilds a bdd node. Raises Invalid_argument is the variable is out of 1..max_var.
Generic binary operator constructor
Propositional formulas
Builds a bdd from a propositional formula f. Raises Invalid_argument if f contains a variable out of 1..max_var.
Satisfiability
val is_sat : t -> boolChecks if a bdd is satisfiable i.e. different from zero
val tautology : t -> boolChecks if a bdd is a tautology i.e. equal to one
Returns one truth assignment which satisfies a bdd, if any. The result is chosen deterministically. Raises Not_found if the bdd is zero
Returns one truth assignment which satisfies a bdd, if any. The result is chosen randomly. Raises Not_found if the bdd is zero
Pretty printer
val print_to_dot : t -> file:string -> unitval display : t -> unitdisplays the given bdd using a shell command "dot -Tps <file> | gv -"
Stats