|
Adiar 2.1.0
An External Memory Decision Diagram Library
|
A Binary Decision Diagram (BDD) represents a boolean function \( \{ 0, 1 \}^n \rightarrow \{ 0, 1 \} \) over a finite domain of \( n \) boolean input variables. More...
Classes | |
| class | adiar::__bdd |
| A (possibly) unreduced Binary Decision Diagram. More... | |
| class | adiar::bdd |
| A reduced Binary Decision Diagram. More... | |
Functions | |
| bdd | adiar::bdd_const (bool value) |
| The BDD representing the given constant value. | |
| bdd | adiar::bdd_terminal (bool value) |
| The BDD representing the given constant value. | |
| bdd | adiar::bdd_false () |
The BDD representing the constant false. | |
| bdd | adiar::bdd_bot () |
| The bottom of the powerset lattice. | |
| bdd | adiar::bdd_true () |
The BDD representing the constant true. | |
| bdd | adiar::bdd_top () |
| The top of the powerset lattice. | |
| bdd | adiar::bdd_ithvar (bdd::label_type var) |
| The BDD representing the i'th variable. | |
| bdd | adiar::bdd_nithvar (bdd::label_type var) |
| The BDD representing the negation of the i'th variable. | |
| bdd | adiar::bdd_and (const generator< int > &vars) |
| The BDD representing the logical 'and' of all the given variables, i.e. a term of variables. | |
| bdd | adiar::bdd_and (const generator< pair< bdd::label_type, bool > > &vars) |
| The BDD representing the logical 'and' of all the given variables, i.e. a term of variables. | |
| template<typename ForwardIt , typename = enable_if<!is_convertible<ForwardIt, bdd>>> | |
| bdd | adiar::bdd_and (ForwardIt begin, ForwardIt end) |
| The BDD representing the logical 'and' of all the given variables, i.e. a term of variables. | |
| bdd | adiar::bdd_or (const generator< int > &vars) |
| The BDD representing the logical 'or' of all the given variables, i.e. a clause of variables. | |
| bdd | adiar::bdd_or (const generator< pair< bdd::label_type, bool > > &vars) |
| The BDD representing the logical 'or' of all the given variables, i.e. a clause of variables. | |
| template<typename ForwardIt , typename = enable_if<!is_convertible<ForwardIt, bdd>>> | |
| bdd | adiar::bdd_or (ForwardIt begin, ForwardIt end) |
| The BDD representing the logical 'or' of all the given variables, i.e. a clause of variables. | |
| bdd | adiar::bdd_cube (const generator< int > &vars) |
| The BDD representing the cube of all the given variables. | |
| bdd | adiar::bdd_cube (const generator< pair< bdd::label_type, bool > > &vars) |
| The BDD representing the cube of all the given variables. | |
| template<typename ForwardIt > | |
| bdd | adiar::bdd_cube (ForwardIt begin, ForwardIt end) |
| The BDD representing the cube of all the given variables. | |
| bdd | adiar::bdd_not (const bdd &f) |
| Negation of a BDD. | |
| bdd | adiar::operator~ (const bdd &f) |
| __bdd | adiar::bdd_apply (const bdd &f, const bdd &g, const predicate< bool, bool > &op) |
| Apply a binary operator between two BDDs. | |
| __bdd | adiar::bdd_apply (const exec_policy &ep, const bdd &f, const bdd &g, const predicate< bool, bool > &op) |
| Apply a binary operator between two BDDs. | |
| __bdd | adiar::bdd_and (const bdd &f, const bdd &g) |
| Logical 'and' operator. | |
| __bdd | adiar::bdd_and (const exec_policy &ep, const bdd &f, const bdd &g) |
| Logical 'and' operator. | |
| __bdd | adiar::operator& (const bdd &lhs, const bdd &rhs) |
| __bdd | adiar::operator* (const bdd &lhs, const bdd &rhs) |
| __bdd | adiar::bdd_nand (const bdd &f, const bdd &g) |
| Logical 'nand' operator. | |
| __bdd | adiar::bdd_nand (const exec_policy &ep, const bdd &f, const bdd &g) |
| Logical 'nand' operator. | |
| __bdd | adiar::bdd_or (const bdd &f, const bdd &g) |
| Logical 'or' operator. | |
| __bdd | adiar::bdd_or (const exec_policy &ep, const bdd &f, const bdd &g) |
| Logical 'or' operator. | |
| __bdd | adiar::operator| (const bdd &lhs, const bdd &rhs) |
| bdd | adiar::operator+ (const bdd &f) |
| __bdd | adiar::operator+ (const bdd &lhs, const bdd &rhs) |
| __bdd | adiar::bdd_nor (const bdd &f, const bdd &g) |
| Logical 'nor' operator. | |
| __bdd | adiar::bdd_nor (const exec_policy &ep, const bdd &f, const bdd &g) |
| Logical 'nor' operator. | |
| __bdd | adiar::bdd_xor (const bdd &f, const bdd &g) |
| Logical 'xor' operator. | |
| __bdd | adiar::bdd_xor (const exec_policy &ep, const bdd &f, const bdd &g) |
| Logical 'xor' operator. | |
| __bdd | adiar::operator^ (const bdd &lhs, const bdd &rhs) |
| __bdd | adiar::bdd_xnor (const bdd &f, const bdd &g) |
| Logical 'xnor' operator. | |
| __bdd | adiar::bdd_xnor (const exec_policy &ep, const bdd &f, const bdd &g) |
| Logical 'xnor' operator. | |
| __bdd | adiar::bdd_imp (const bdd &f, const bdd &g) |
| Logical 'implication' operator. | |
| __bdd | adiar::bdd_imp (const exec_policy &ep, const bdd &f, const bdd &g) |
| Logical 'implication' operator. | |
| __bdd | adiar::bdd_invimp (const bdd &f, const bdd &g) |
| Logical 'inverse implication' operator. | |
| __bdd | adiar::bdd_invimp (const exec_policy &ep, const bdd &f, const bdd &g) |
| Logical 'inverse implication' operator. | |
| __bdd | adiar::bdd_equiv (const bdd &f, const bdd &g) |
| Logical 'equivalence' operator. | |
| __bdd | adiar::bdd_equiv (const exec_policy &ep, const bdd &f, const bdd &g) |
| Logical 'equivalence' operator. | |
| __bdd | adiar::bdd_diff (const bdd &f, const bdd &g) |
| Logical 'difference' operator. | |
| __bdd | adiar::bdd_diff (const exec_policy &ep, const bdd &f, const bdd &g) |
| Logical 'difference' operator. | |
| bdd | adiar::operator- (const bdd &f) |
| __bdd | adiar::operator- (const bdd &lhs, const bdd &rhs) |
| __bdd | adiar::bdd_less (const bdd &f, const bdd &g) |
| Logical 'less than' operator. | |
| __bdd | adiar::bdd_less (const exec_policy &ep, const bdd &f, const bdd &g) |
| Logical 'less than' operator. | |
| __bdd | adiar::bdd_ite (const bdd &f, const bdd &g, const bdd &h) |
| If-Then-Else operator. | |
| __bdd | adiar::bdd_ite (const exec_policy &ep, const bdd &f, const bdd &g, const bdd &h) |
| If-Then-Else operator. | |
| __bdd | adiar::bdd_restrict (const bdd &f, bdd::label_type var, bool val) |
| Restrict a single variable to a constant value. | |
| __bdd | adiar::bdd_restrict (const exec_policy &ep, const bdd &f, bdd::label_type var, bool val) |
| Restrict a single variable to a constant value. | |
| __bdd | adiar::bdd_restrict (const bdd &f, const generator< pair< bdd::label_type, bool > > &xs) |
| Restrict a subset of variables to constant values. | |
| __bdd | adiar::bdd_restrict (const exec_policy &ep, const bdd &f, const generator< pair< bdd::label_type, bool > > &xs) |
| Restrict a subset of variables to constant values. | |
| template<typename ForwardIt > | |
| __bdd | adiar::bdd_restrict (const bdd &f, ForwardIt begin, ForwardIt end) |
| Restrict a subset of variables to constant values. | |
| template<typename ForwardIt > | |
| __bdd | adiar::bdd_restrict (const exec_policy &ep, const bdd &f, ForwardIt begin, ForwardIt end) |
| Restrict a subset of variables to constant values. | |
| __bdd | adiar::bdd_low (const bdd &f) |
Restrict the root to false, i.e. follow its low edge. | |
| __bdd | adiar::bdd_low (const exec_policy &ep, const bdd &f) |
Restrict the root to false, i.e. follow its low edge. | |
| __bdd | adiar::bdd_high (const bdd &f) |
Restrict the root to true, i.e. follow its high edge. | |
| __bdd | adiar::bdd_high (const exec_policy &ep, const bdd &f) |
Restrict the root to true, i.e. follow its high edge. | |
| __bdd | adiar::bdd_exists (const bdd &f, bdd::label_type var) |
| Existential quantification of a single variable. | |
| __bdd | adiar::bdd_exists (const exec_policy &ep, const bdd &f, bdd::label_type var) |
| Existential quantification of a single variable. | |
| __bdd | adiar::bdd_exists (const bdd &f, const predicate< bdd::label_type > &vars) |
| Existential quantification of multiple variables. | |
| __bdd | adiar::bdd_exists (const exec_policy &ep, const bdd &f, const predicate< bdd::label_type > &vars) |
| Existential quantification of multiple variables. | |
| __bdd | adiar::bdd_exists (const bdd &f, const generator< bdd::label_type > &vars) |
| Existential quantification of multiple variables. | |
| __bdd | adiar::bdd_exists (const exec_policy &ep, const bdd &f, const generator< bdd::label_type > &vars) |
| Existential quantification of multiple variables. | |
| template<typename ForwardIt > | |
| __bdd | adiar::bdd_exists (const bdd &f, ForwardIt begin, ForwardIt end) |
| Existential quantification of multiple variables. | |
| template<typename ForwardIt > | |
| __bdd | adiar::bdd_exists (const exec_policy &ep, const bdd &f, ForwardIt begin, ForwardIt end) |
| Existential quantification of multiple variables. | |
| __bdd | adiar::bdd_forall (const bdd &f, bdd::label_type var) |
| Forall quantification of a single variable. | |
| __bdd | adiar::bdd_forall (const exec_policy &ep, const bdd &f, bdd::label_type var) |
| Forall quantification of a single variable. | |
| __bdd | adiar::bdd_forall (const bdd &f, const predicate< bdd::label_type > &vars) |
| Forall quantification of multiple variables. | |
| __bdd | adiar::bdd_forall (const exec_policy &ep, const bdd &f, const predicate< bdd::label_type > &vars) |
| Forall quantification of multiple variables. | |
| __bdd | adiar::bdd_forall (const bdd &f, const generator< bdd::label_type > &vars) |
| Forall quantification of multiple variables. | |
| __bdd | adiar::bdd_forall (const exec_policy &ep, const bdd &f, const generator< bdd::label_type > &vars) |
| Forall quantification of multiple variables. | |
| template<typename ForwardIt > | |
| __bdd | adiar::bdd_forall (const bdd &f, ForwardIt begin, ForwardIt end) |
| Forall quantification of multiple variables. | |
| template<typename ForwardIt > | |
| __bdd | adiar::bdd_forall (const exec_policy &ep, const bdd &f, ForwardIt begin, ForwardIt end) |
| Forall quantification of multiple variables. | |
| bdd | adiar::bdd_replace (const bdd &f, const function< bdd::label_type(bdd::label_type)> &m) |
| Replace variables in f according to the mapping in m. | |
| bdd | adiar::bdd_replace (const exec_policy &ep, const bdd &f, const function< bdd::label_type(bdd::label_type)> &m) |
| Replace variables in f according to the mapping in m. | |
| bdd | adiar::bdd_replace (const bdd &f, const function< bdd::label_type(bdd::label_type)> &m, replace_type m_type) |
| Replace variables in f according to the mapping in m. | |
| bdd | adiar::bdd_replace (const exec_policy &ep, const bdd &f, const function< bdd::label_type(bdd::label_type)> &m, replace_type m_type) |
| Replace variables in f according to the mapping in m. | |
| bdd | adiar::bdd_relprod (const bdd &states, const bdd &relation, const predicate< bdd::label_type > &pred) |
| Relational Product of states and a relation. | |
| bdd | adiar::bdd_relprod (const exec_policy &ep, const bdd &states, const bdd &relation, const predicate< bdd::label_type > &pred) |
| Relational Product of states and a relation. | |
| bdd | adiar::bdd_relnext (const bdd &states, const bdd &relation, const function< optional< bdd::label_type >(bdd::label_type)> &m) |
| Forwards step with the Relational Product, including relabelling. | |
| bdd | adiar::bdd_relnext (const exec_policy &ep, const bdd &states, const bdd &relation, const function< optional< bdd::label_type >(bdd::label_type)> &m) |
| Forwards step with the Relational Product, including relabelling. | |
| bdd | adiar::bdd_relnext (const bdd &states, const bdd &relation, const function< optional< bdd::label_type >(bdd::label_type)> &m, replace_type m_type) |
| Forwards step with the Relational Product, including relabelling. | |
| bdd | adiar::bdd_relnext (const exec_policy &ep, const bdd &states, const bdd &relation, const function< optional< bdd::label_type >(bdd::label_type)> &m, replace_type m_type) |
| Forwards step with the Relational Product, including relabelling. | |
| bdd | adiar::bdd_relnext (const bdd &states, const bdd &relation, const bdd::label_type varcount) |
| Forwards step with the Relational Product for disjoint variable orderings, including relabelling. | |
| bdd | adiar::bdd_relnext (const exec_policy &ep, const bdd &states, const bdd &relation, const bdd::label_type varcount) |
| Forwards step with the Relational Product for disjoint variable orderings, including relabelling. | |
| bdd | adiar::bdd_relnext (const bdd &states, const bdd &relation) |
| Forwards step with the Relational Product for interleaved variable orderings, including relabelling. | |
| bdd | adiar::bdd_relnext (const exec_policy &ep, const bdd &states, const bdd &relation) |
| Forwards step with the Relational Product for interleaved variable orderings, including relabelling. | |
| bdd | adiar::bdd_relprev (const bdd &states, const bdd &relation, const function< optional< bdd::label_type >(bdd::label_type)> &m) |
| Backwards step with the Relational Product, including relabelling. | |
| bdd | adiar::bdd_relprev (const exec_policy &ep, const bdd &states, const bdd &relation, const function< optional< bdd::label_type >(bdd::label_type)> &m) |
| Backwards step with the Relational Product, including relabelling. | |
| bdd | adiar::bdd_relprev (const bdd &states, const bdd &relation, const function< optional< bdd::label_type >(bdd::label_type)> &m, replace_type m_type) |
| Backwards step with the Relational Product, including relabelling. | |
| bdd | adiar::bdd_relprev (const exec_policy &ep, const bdd &states, const bdd &relation, const function< optional< bdd::label_type >(bdd::label_type)> &m, replace_type m_type) |
| Backwards step with the Relational Product, including relabelling. | |
| bdd | adiar::bdd_relprev (const bdd &states, const bdd &relation, const bdd::label_type varcount) |
| Backwards step with the Relational Product for disjoint variable orderings, including relabelling. | |
| bdd | adiar::bdd_relprev (const exec_policy &ep, const bdd &states, const bdd &relation, const bdd::label_type varcount) |
| Backwards step with the Relational Product for disjoint variable orderings, including relabelling. | |
| bdd | adiar::bdd_relprev (const bdd &states, const bdd &relation) |
| Backwards step with the Relational Product for interleaved variable orderings, including relabelling. | |
| bdd | adiar::bdd_relprev (const exec_policy &ep, const bdd &states, const bdd &relation) |
| Backwards step with the Relational Product for interleaved variable orderings, including relabelling. | |
| bool | adiar::bdd_iscanonical (const bdd &f) |
| Check whether a BDD is canonical. | |
| bool | adiar::bdd_isconst (const bdd &f) |
| Whether a BDD is a constant. | |
| bool | adiar::bdd_isterminal (const bdd &f) |
| Whether a BDD is a constant (terminal). | |
| bool | adiar::bdd_isfalse (const bdd &f) |
Whether a BDD is the constant false. | |
| bool | adiar::bdd_istrue (const bdd &f) |
Whether a BDD is the constant true. | |
| bool | adiar::bdd_isvar (const bdd &f) |
| Whether a BDD is a function dependent on a single variable, i.e. is a literal. | |
| bool | adiar::bdd_isithvar (const bdd &f) |
| Whether a BDD is the function of a single positive variable. | |
| bool | adiar::bdd_isnithvar (const bdd &f) |
| Whether a BDD is the function of a single negative variable. | |
| bool | adiar::bdd_iscube (const bdd &f) |
| Whether a BDD represents a cube. | |
| bool | adiar::bdd_equal (const bdd &f, const bdd &g) |
| Whether the two BDDs represent the same function. | |
| bool | adiar::bdd_equal (const exec_policy &, const bdd &f, const bdd &g) |
| Whether the two BDDs represent the same function. | |
| bool | adiar::operator== (const bdd &f, const bdd &g) |
| bool | adiar::bdd_unequal (const bdd &f, const bdd &g) |
| Whether the two BDDs represent different functions. | |
| bool | adiar::bdd_unequal (const exec_policy &ep, const bdd &f, const bdd &g) |
| Whether the two BDDs represent different functions. | |
| bool | adiar::operator!= (const bdd &f, const bdd &g) |
| size_t | adiar::bdd_nodecount (const bdd &f) |
| The number of (internal) nodes used to represent the function. | |
| bdd::label_type | adiar::bdd_varcount (const bdd &f) |
| The number of variables that influence the outcome of the Boolean function, i.e. the number of levels present in the BDD. | |
| uint64_t | adiar::bdd_pathcount (const bdd &f) |
| Count all unique (but not necessarily disjoint) paths to the true terminal. | |
| uint64_t | adiar::bdd_pathcount (const exec_policy &ep, const bdd &f) |
| Count all unique (but not necessarily disjoint) paths to the true terminal. | |
| uint64_t | adiar::bdd_satcount (const bdd &f, bdd::label_type varcount) |
| Count the number of assignments x that make f(x) true. | |
| uint64_t | adiar::bdd_satcount (const exec_policy &ep, const bdd &f, bdd::label_type varcount) |
| Count the number of assignments x that make f(x) true. | |
| uint64_t | adiar::bdd_satcount (const bdd &f) |
| Count the number of assignments x that make f(x) true. | |
| uint64_t | adiar::bdd_satcount (const exec_policy &ep, const bdd &f) |
| Count the number of assignments *x that make f(x) true. | |
| void | adiar::bdd_support (const bdd &f, const consumer< bdd::label_type > &cb) |
| Get (in ascending order) all of the variable labels that occur in the BDD. | |
| template<typename OutputIt , typename = enable_if<!is_convertible<OutputIt, consumer<bdd::label_type>>>> | |
| OutputIt | adiar::bdd_support (const bdd &f, OutputIt iter) |
| Copy all of the variable labels (in ascending order) that occur in the BDD into the given container. | |
| bdd::label_type | adiar::bdd_topvar (const bdd &f) |
| Get the root's variable label. | |
| bdd::label_type | adiar::bdd_minvar (const bdd &f) |
| Get the minimal occurring variable in the function's support. | |
| bdd::label_type | adiar::bdd_maxvar (const bdd &f) |
| Get the maximal occurring variable in the function's support. | |
| bdd | adiar::bdd_satmin (const bdd &f) |
| The lexicographically smallest cube x such that f(x) is true. | |
| bdd | adiar::bdd_satmin (const bdd &f, const generator< bdd::label_type > &d, const size_t d_size=bdd::max_label+1) |
| The lexicographically smallest x such that f(x) is true within the given domain. | |
| template<typename ForwardIt , typename = enable_if<is_const<typename ForwardIt::reference>>> | |
| bdd | adiar::bdd_satmin (const bdd &f, ForwardIt cbegin, ForwardIt cend) |
| The lexicographically smallest x such that f(x) is true. | |
| bdd | adiar::bdd_satmin (const bdd &f, const bdd &d) |
| The lexicographically smallest x such that f(x) is true. | |
| void | adiar::bdd_satmin (const bdd &f, const consumer< pair< bdd::label_type, bool > > &c) |
| The lexicographically smallest x such that f(x) is true. | |
| template<typename OutputIt , typename = enable_if<!is_convertible<OutputIt, consumer<pair<bdd::label_type, bool>>> && !is_convertible<OutputIt, bdd>>> | |
| OutputIt | adiar::bdd_satmin (const bdd &f, OutputIt iter) |
| The lexicographically smallest x such that f(x) is true. | |
| bdd | adiar::bdd_satmax (const bdd &f) |
| The lexicographically largest cube x such that f(x) is true. | |
| bdd | adiar::bdd_satmax (const bdd &f, const generator< bdd::label_type > &d, const size_t d_size=bdd::max_label+1) |
| The lexicographically largest x such that f(x) is true within the given domain. | |
| template<typename ForwardIt , typename = enable_if<is_const<typename ForwardIt::reference>>> | |
| bdd | adiar::bdd_satmax (const bdd &f, ForwardIt cbegin, ForwardIt cend) |
| The lexicographically largest x such that f(x) is true. | |
| bdd | adiar::bdd_satmax (const bdd &f, const bdd &d) |
| The lexicographically largest x such that f(x) is true. | |
| void | adiar::bdd_satmax (const bdd &f, const consumer< pair< bdd::label_type, bool > > &c) |
| The lexicographically largest x such that f(x) is true. | |
| template<typename OutputIt , typename = enable_if<!is_convertible<OutputIt, consumer<pair<bdd::label_type, bool>>> && !is_convertible<OutputIt, bdd>>> | |
| OutputIt | adiar::bdd_satmax (const bdd &f, OutputIt iter) |
| The lexicographically largest x such that f(x) is true. | |
| pair< bdd, double > | adiar::bdd_optmin (const bdd &f, const cost< bdd::label_type > &c) |
| Obtain the satisfying assignment that is minimal for the given linear cost function over the global domain. | |
| pair< bdd, double > | adiar::bdd_optmin (const exec_policy &ep, const bdd &f, const cost< bdd::label_type > &c) |
| obtain the satisfying assignment that is minimal for the given linear cost function over the global domain. | |
| double | adiar::bdd_optmin (const bdd &f, const cost< bdd::label_type > &c, const consumer< pair< bdd::label_type, bool > > &cb) |
| Obtain the satisfying assignment that is minimal for the given linear cost function over the global domain. | |
| double | adiar::bdd_optmin (const exec_policy &ep, const bdd &f, const cost< bdd::label_type > &c, const consumer< pair< bdd::label_type, bool > > &cb) |
| Obtain the satisfying assignment that is minimal for the given linear cost function over the global domain. | |
| bool | adiar::bdd_eval (const bdd &f, const predicate< bdd::label_type > &xs) |
| Evaluate a BDD according to an assignment to its variables. | |
| bool | adiar::bdd_eval (const bdd &f, const generator< pair< bdd::label_type, bool > > &xs) |
| Evaluate a BDD according to an assignment to its variables. | |
| template<typename ForwardIt > | |
| bool | adiar::bdd_eval (const bdd &f, ForwardIt begin, ForwardIt end) |
| Evaluate a BDD according to an assignment to its variables. | |
| __bdd | adiar::bdd_from (const zdd &A, const generator< bdd::label_type > &dom) |
| Obtains the BDD that represents the same function/set as the given ZDD within the given domain. | |
| __bdd | adiar::bdd_from (const exec_policy &ep, const zdd &A, const generator< bdd::label_type > &dom) |
| Obtains the BDD that represents the same function/set as the given ZDD within the given domain. | |
| template<typename ForwardIt > | |
| __bdd | adiar::bdd_from (const zdd &A, ForwardIt begin, ForwardIt end) |
| Obtains the BDD that represents the same function/set as the given ZDD within the given domain. | |
| template<typename ForwardIt > | |
| __bdd | adiar::bdd_from (const exec_policy &ep, const zdd &A, ForwardIt begin, ForwardIt end) |
| Obtains the BDD that represents the same function/set as the given ZDD within the given domain. | |
| __bdd | adiar::bdd_from (const zdd &A) |
| Obtains the BDD that represents the same function/set as the given ZDD within the global domain. | |
| __bdd | adiar::bdd_from (const exec_policy &ep, const zdd &A) |
| Obtains the BDD that represents the same function/set as the given ZDD within the global domain. | |
| void | adiar::bdd_printdot (const bdd &f, std::ostream &out=std::cout, bool include_id=false) |
| Output a DOT drawing of a BDD to the given output stream. | |
| void | adiar::bdd_printdot (const bdd &f, const std::string &file_name, bool include_id=false) |
| Output a DOT drawing of a BDD to the file with the given name. | |
A Binary Decision Diagram (BDD) represents a boolean function \( \{ 0, 1 \}^n \rightarrow \{ 0, 1 \} \) over a finite domain of \( n \) boolean input variables.
The bdd class takes care of reference counting and optimal garbage collection of the underlying files. To ensure the most disk-space is available, try to release your bdd objects as quickly as possible and/or minimise the number of lvalues of said type.
To construct a more complex but well-structured bdd by hand, please use the bdd_builder (see builder) instead.
The BDD representing the logical 'and' of all the given variables, i.e. a term of variables.
Any negative labels provided by the generator are interpreted as the negation of said variable.
| vars | Generator of labels of variables in descending order. These values can at most be bdd::max_label. |
| invalid_argument | If vars are not in descending order. |
The BDD representing the logical 'and' of all the given variables, i.e. a term of variables.
| vars | Generator of pairs (label, negated) in descending order. These values can at most be bdd::max_label. |
| invalid_argument | If vars are not in descending order. |
The BDD representing the logical 'and' of all the given variables, i.e. a term of variables.
Any negative labels provided by the generator are interpreted as the negation of said variable.
| begin | Single-pass forward iterator that provides the variables in descending order. All its values should be smaller than or equals to bdd::max_label. |
| end | Marks the end for begin. |
| invalid_argument | If the iterator does not provide values in descending order. |
Apply a binary operator between two BDDs.
| f | BDD for the left-hand-side of the operator |
| g | BDD for the right-hand-side of the operator |
| op | Binary predicate on bool to-be applied. |
|
inline |
The BDD representing the cube of all the given variables.
Any negative labels provided by the generator are interpreted as the negation of said variable.
| vars | Generator of labels of variables in descending order. These values can at most be bdd::max_label. |
| invalid_argument | If vars are not in descending order. |
The BDD representing the cube of all the given variables.
| vars | Generator of pairs (label, negated) in descending order. These values can at most be bdd::max_label. |
| invalid_argument | If vars are not in descending order. |
The BDD representing the cube of all the given variables.
Any negative labels provided by the generator are interpreted as the negation of said variable.
| begin | Single-pass forward iterator that provides the variables in descending order. All its values should be smaller than or equals to bdd::max_label. |
| end | Marks the end for begin. |
| invalid_argument | If the iterator does not provide values in descending order. |
Whether the two BDDs represent the same function.
f or g is an unreduced result of an immediate computation as part of evaluating bdd_equal's' parameters, one will have to pay the cost of reducing it. If you need the result later, please store it in an intermediate variable. Evaluate a BDD according to an assignment to its variables.
| f | The BDD to evaluate. |
| xs | Assignments (i,v) to variables in (in ascending order). |
| out_of_range | If traversal of the BDD leads to going beyond the end of the content of xs. |
| invalid_argument | If a level in the BDD does not exist in xs. |
Evaluate a BDD according to an assignment to its variables.
The given assignment function may assume/abuse that it is only called with the labels in a strictly increasing order.
| f | The BDD to evaluate |
| xs | An assignment function of the type \( \texttt{label\_t} \rightarrow \texttt{bool} \). |
Evaluate a BDD according to an assignment to its variables.
| f | The BDD to evaluate. |
| begin | Single-pass forward iterator that provides the assignment in ascending order. |
| end | Marks the end for begin. |
| out_of_range | If traversal of the BDD leads to going beyond the end of the content of xs. |
| invalid_argument | If a level in the BDD does not exist in xs. |
| __bdd adiar::bdd_exists | ( | const bdd & | f, |
| bdd::label_type | var | ||
| ) |
Existential quantification of a single variable.
Computes the BDD for \( \exists x_{i} : f \) faster than computing \( f|_{x_i = \bot} \lor f|_{x_i = \top} \) using bdd_apply and bdd_restrict.
| f | BDD to be quantified |
| var | Variable to quantify in f |
Existential quantification of multiple variables.
| f | BDD to be quantified. |
| vars | Generator function, that produces variables to be quantified in descending order. These values have to be smaller than or equals to bdd::max_label. |
Existential quantification of multiple variables.
| f | BDD to be quantified. |
| vars | Predicate to identify the variables to quantify in f. You may abuse the fact, that this predicate will only be invoked in ascending/descending order of the levels in f (but, with retraversals). |
Existential quantification of multiple variables.
| f | BDD to be quantified. |
| begin | Single-pass forward iterator that provides the to-be quantified variables in descending order. All variables should be smaller than or equals to bdd::max_label. |
| end | Marks the end for begin. |
| __bdd adiar::bdd_forall | ( | const bdd & | f, |
| bdd::label_type | var | ||
| ) |
Forall quantification of a single variable.
Computes the BDD for \( \forall x_{i} : f \) faster than computing \( f|_{x_i = \bot} \land f|_{x_i = \top} \) using bdd_apply and bdd_restrict.
| f | BDD to be quantified. |
| var | Variable to quantify in f |
Forall quantification of multiple variables.
| f | BDD to be quantified. |
| gen | Generator function, that produces variables to be quantified in descending order. These values have to be smaller than or equals to bdd::max_label. |
Forall quantification of multiple variables.
| f | BDD to be quantified. |
| vars | Predicate to identify the variables to quantify in f. You may abuse the fact, that this predicate will only be invoked in ascending/descending order of the levels in f (but, with retraversals). |
Forall quantification of multiple variables.
| f | BDD to be quantified. |
| begin | Single-pass forward iterator that provides the to-be quantified variables in descending order. All values should be smaller than or equals to bdd::max_label. |
| end | Marks the end for begin. |
Obtains the BDD that represents the same function/set as the given ZDD within the global domain.
| A | Family of a set (within the given global Variable Domain) |
A.Obtains the BDD that represents the same function/set as the given ZDD within the given domain.
| A | Family of a set (within the given domain) |
| dom | Generator function of domain variables in ascending order. These values may not exceed bdd::max_label. |
Obtains the BDD that represents the same function/set as the given ZDD within the given domain.
| A | Family of a set (within the given domain) |
| begin | Single-pass forward iterator that provides the domain's variables in ascending order. These values may not exceed bdd::max_label. |
| end | Marks the end for begin. |
Restrict the root to true, i.e. follow its high edge.
| invalid_argument | If f is a terminal. |
Whether a BDD is a constant.
Whether a BDD is the function of a single positive variable.
Whether f is equivalent to \( x \).
Whether a BDD is the function of a single negative variable.
Whether f is equivalent to \( \neg x \).
Whether a BDD is a constant (terminal).
Whether a BDD is a function dependent on a single variable, i.e. is a literal.
Whether f is equivalent to \( x \) or \( \neg x \).
If-Then-Else operator.
Computes the BDD expressing \( f ? g : h \) more efficient than computing \( (f
\land g) \lor (\neg f \land h) \) with bdd_apply.
| f | BDD for the if conditional |
| g | BDD for the then case |
| h | BDD for the else case |
| bdd adiar::bdd_ithvar | ( | bdd::label_type | var | ) |
The BDD representing the i'th variable.
| var | The label of the desired variable. This value must be smaller or equals to bdd::max_label. |
| invalid_argument | If var is a too large value. |
Restrict the root to false, i.e. follow its low edge.
| invalid_argument | If f is a terminal. |
| bdd::label_type adiar::bdd_maxvar | ( | const bdd & | f | ) |
Get the maximal occurring variable in the function's support.
| invalid_argument | If f is a terminal. |
| bdd::label_type adiar::bdd_minvar | ( | const bdd & | f | ) |
Get the minimal occurring variable in the function's support.
| invalid_argument | If f is a terminal. |
| bdd adiar::bdd_nithvar | ( | bdd::label_type | var | ) |
The BDD representing the negation of the i'th variable.
| var | The label of the desired variable. This value must be smaller or equals to / bdd::max_label. |
| invalid_argument | If var is a too large value. |
Negation of a BDD.
Flips the negation flag such that reading nodes with a node_stream within Adiar's algorithms will on-the-fly change the false terminals into the true terminals and vice versa.
Obtain the satisfying assignment that is minimal for the given linear cost function over the global domain.
| f | The BDD of feasible solutions |
| c | A (pure) function that provides the cost function's coefficient. |
| double adiar::bdd_optmin | ( | const bdd & | f, |
| const cost< bdd::label_type > & | c, | ||
| const consumer< pair< bdd::label_type, bool > > & | cb | ||
| ) |
Obtain the satisfying assignment that is minimal for the given linear cost function over the global domain.
| f | The BDD of feasible solutions |
| c | A (pure) function that provides the cost function's coefficient. |
| cb | A callback function that is called in descending order. |
f is a terminal, cb will never be called The BDD representing the logical 'or' of all the given variables, i.e. a clause of variables.
Any negative labels provided by the generator are interpreted as the negation of said variable.
| vars | Generator of labels of variables in descending order. When These values can at most be bdd::max_label. |
| invalid_argument | If vars are not in descending order. |
The BDD representing the logical 'or' of all the given variables, i.e. a clause of variables.
| vars | Generator of pairs (label, negated) in descending order. These values can at most be bdd::max_label. |
| invalid_argument | If vars are not in descending order. |
The BDD representing the logical 'or' of all the given variables, i.e. a clause of variables.
Any negative labels provided by the generator are interpreted as the negation of said variable.
| begin | Single-pass forward iterator that provides the variables in descending order. All its values should be smaller than or equals to bdd::max_label. |
| end | Marks the end for begin. |
| invalid_argument | If the iterator does not provide values in descending order. |
Count all unique (but not necessarily disjoint) paths to the true terminal.
Forwards step with the Relational Product for interleaved variable orderings, including relabelling.
| states | A symbolic representation of the current set of states. These are all encoded with even variables. |
| relation | A relation between current (even) and next (odd) state variables. |
Forwards step with the Relational Product for disjoint variable orderings, including relabelling.
| states | A symbolic representation of the current set of states. These are all encoded with the variables 0, 1, ... varcount - 1. |
| relation | A relation between current and next state variables. The next state is encoded with variables varcount, varcount+1, ... 2*varcount - 1. |
| bdd adiar::bdd_relnext | ( | const bdd & | states, |
| const bdd & | relation, | ||
| const function< optional< bdd::label_type >(bdd::label_type)> & | m | ||
| ) |
Forwards step with the Relational Product, including relabelling.
| states | A symbolic representation of the current set of states. |
| relation | A relation between current and next states. |
| m | A (partial) variable relabelling from next to current. Variables for which m returns an empty value are existentially quantified, i.e. the previously current state variables. For all intends an purposes, this relabelling happens after quantification. |
| invalid_argument | if m is not a monotonic relabelling. |
| bdd adiar::bdd_relnext | ( | const bdd & | states, |
| const bdd & | relation, | ||
| const function< optional< bdd::label_type >(bdd::label_type)> & | m, | ||
| replace_type | m_type | ||
| ) |
Forwards step with the Relational Product, including relabelling.
| states | A symbolic representation of the current set of states. |
| relation | A relation between current and next states. |
| m | A (partial) variable relabelling from next to current. Variables for which m returns an empty value are existentially quantified, i.e. the previously current state variables. For all intends an purposes, this relabelling happens after quantification. |
| m_type | Guarantees on the class of variable relabelling, e.g. whether it is monotonic. |
| invalid_argument | if m is not a monotonic relabelling. |
Backwards step with the Relational Product for interleaved variable orderings, including relabelling.
| states | A symbolic representation of the current set of states. These are all encoded with even variables. |
| relation | A relation between current (even) and next (odd) state variables. |
Backwards step with the Relational Product for disjoint variable orderings, including relabelling.
| states | A symbolic representation of the current set of states. These are all encoded with the variables 0, 1, ... varcount - 1. |
| relation | A relation between current and next state variables. The next state is encoded with variables varcount, varcount+1, ... 2*varcount - 1. |
| bdd adiar::bdd_relprev | ( | const bdd & | states, |
| const bdd & | relation, | ||
| const function< optional< bdd::label_type >(bdd::label_type)> & | m | ||
| ) |
Backwards step with the Relational Product, including relabelling.
| states | A symbolic representation of the current set of states. |
| relation | A relation between current and next states. |
| m | A (partial) variable relabelling from current to next. Variables for which m returns an empty value are existentially quantified, i.e. the next state variables (the previously current state variables). For all intends an purposes, this relabelling happens prior to conjunction. |
| invalid_argument | if m is not a monotonic relabelling. |
| bdd adiar::bdd_relprev | ( | const bdd & | states, |
| const bdd & | relation, | ||
| const function< optional< bdd::label_type >(bdd::label_type)> & | m, | ||
| replace_type | m_type | ||
| ) |
Backwards step with the Relational Product, including relabelling.
| states | A symbolic representation of the current set of states. |
| relation | A relation between current and next states. |
| m | A (partial) variable relabelling from current to next. Variables for which m returns an empty value are existentially quantified, i.e. the next state variables (the previously current state variables). For all intends and purposes, this relabelling happens prior to conjunction. |
| m_type | Guarantees on the class of variable relabelling, e.g. whether it is monotonic. |
| invalid_argument | if m is not a monotonic relabelling. |
| bdd adiar::bdd_relprod | ( | const bdd & | states, |
| const bdd & | relation, | ||
| const predicate< bdd::label_type > & | pred | ||
| ) |
Relational Product of states and a relation.
| states | A symbolic representation of the current (or next) set of states. |
| relation | A relation between current and next states. |
| m | Predicate whether a variable should be existentially quantified. |
| bdd adiar::bdd_replace | ( | const bdd & | f, |
| const function< bdd::label_type(bdd::label_type)> & | m | ||
| ) |
Replace variables in f according to the mapping in m.
| f | BDD to replace variables within |
| m | Function from BDD label to another (or itself). |
| invalid_argument | if m is not a monotonic relabelling. |
| bdd adiar::bdd_replace | ( | const bdd & | f, |
| const function< bdd::label_type(bdd::label_type)> & | m, | ||
| replace_type | m_type | ||
| ) |
Replace variables in f according to the mapping in m.
| f | BDD to replace variables within |
| m | Function from BDD label to another (or itself). |
| m_type | Guarantees on the class of variable relabelling, e.g. whether it is monotonic. |
| invalid_argument | if m_type classifies m as not monotonic. |
| __bdd adiar::bdd_restrict | ( | const bdd & | f, |
| bdd::label_type | var, | ||
| bool | val | ||
| ) |
Restrict a single variable to a constant value.
The variable i is restricted to the value v.
| f | BDD to restrict. |
| var | Variable to assign |
| val | Value assigned |
Restrict a subset of variables to constant values.
For each tuple (i,v) in the assignment xs, the variable with label i is set to the constant value v. This binds the scope of the variables in xs, i.e. any later mention of a variable i is not the same as variable i in xs.
| f | BDD to restrict. |
| xs | Assignments (i,v) to variables in (in ascending order). |
Restrict a subset of variables to constant values.
For each tuple (i,v) provided by the iterator, the variable with label i is set to the constant value v.
| f | BDD to restrict |
| begin | Single-pass forward iterator that provides the to-be restricted variables in ascending order. All variables should be smaller than or equals to bdd::max_label. |
| end | Marks the end for begin. |
Count the number of assignments x that make f(x) true.
Same as bdd_satcount(f, varcount), with varcount set to be the size of the global domain or the number of variables within the given BDD.
| uint64_t adiar::bdd_satcount | ( | const bdd & | f, |
| bdd::label_type | varcount | ||
| ) |
Count the number of assignments x that make f(x) true.
| f | BDD to count within. |
| varcount | The number of variables in the domain of the function. This number should be larger than or equal to the number of levels in the BDD ( |
| invalid_argument | If varcount is not larger than the number of levels in the BDD. |
The lexicographically largest cube x such that f(x) is true.
Outputs the trace of the high-most path to the true terminal. The resulting assignment is lexicographically largest, where every variable is treated as a digit and \( x_0 > x_1 > \dots \).
true terminal reflects the maximal assignment. The lexicographically largest x such that f(x) is true.
| f | BDD of interest. |
| d | BDD cube of variables that ought to be included. |
true terminal reflects the maximal assignment.| domain_error | If bdd_iscube(d) is not satisfied. |
The lexicographically largest x such that f(x) is true.
| c | Consumer that is called in ascending order of the bdd's levels with the (var, value) pairs of the assignment. |
| bdd adiar::bdd_satmax | ( | const bdd & | f, |
| const generator< bdd::label_type > & | d, | ||
| const size_t | d_size = bdd::max_label+1 |
||
| ) |
The lexicographically largest x such that f(x) is true within the given domain.
| d | Generator of domain in ascending order. |
| d_size | Upper bound on the number of elements generated by d. |
true terminal reflects the maximal assignment. The lexicographically largest x such that f(x) is true.
| f | BDD of interest. |
| begin | Single-pass forward iterator of immutable variables in ascending ordering. |
| end | Marks the end for begin. |
true terminal reflects the maximal assignment and (at least) includes the variables in [begin, end). | OutputIt adiar::bdd_satmax | ( | const bdd & | f, |
| OutputIt | iter | ||
| ) |
The lexicographically largest x such that f(x) is true.
| f | BDD of interest. |
| begin | Single-pass output iterator for where to place the output. |
The lexicographically smallest cube x such that f(x) is true.
Outputs the trace of the low-most path to the true terminal. The resulting assignment is lexicographically smallest, where every variable is treated as a digit and \( x_0 > x_1 > \dots \).
true terminal reflects the minimal assignment. The lexicographically smallest x such that f(x) is true.
| f | BDD of interest. |
| d | BDD cube of variables that ought to be included. |
true terminal reflects the minimal assignment.| domain_error | If bdd_iscube(d) is not satisfied. |
The lexicographically smallest x such that f(x) is true.
| c | Consumer that is called in ascending order of the bdd's levels with the (var, value) pairs of the assignment. |
| bdd adiar::bdd_satmin | ( | const bdd & | f, |
| const generator< bdd::label_type > & | d, | ||
| const size_t | d_size = bdd::max_label+1 |
||
| ) |
The lexicographically smallest x such that f(x) is true within the given domain.
| d | Generator of domain in ascending order. |
| d_size | Upper bound on the number of elements generated by d. This value is merely an allocation hint for the sake of optimisation. |
true terminal reflects the minimal assignment. The lexicographically smallest x such that f(x) is true.
| f | BDD of interest. |
| begin | Single-pass forward iterator of immutable variables in ascending ordering. |
| end | Marks the end for begin. |
true terminal reflects the minimal assignment and (at least) includes the variables in [begin, end). | OutputIt adiar::bdd_satmin | ( | const bdd & | f, |
| OutputIt | iter | ||
| ) |
The lexicographically smallest x such that f(x) is true.
| f | BDD of interest. |
| begin | Single-pass output iterator for where to place the output. |
Get (in ascending order) all of the variable labels that occur in the BDD.
| f | BDD of interest. |
| cb | Callback function that consumes the variable labels. |
| OutputIt adiar::bdd_support | ( | const bdd & | f, |
| OutputIt | iter | ||
| ) |
Copy all of the variable labels (in ascending order) that occur in the BDD into the given container.
| f | BDD of interest. |
| iter | Single-pass output iterator for where to place the output. |
| bdd::label_type adiar::bdd_topvar | ( | const bdd & | f | ) |
Get the root's variable label.
| invalid_argument | If f is a terminal. |
| bdd adiar::bdd_true | ( | ) |
The BDD representing the constant true.
Whether the two BDDs represent different functions.
f or g is an unreduced result of an immediate computation as part of evaluating bdd_unequal's' parameters, one will have to pay the cost of reducing it. If you need the result later, please store it in an intermediate variable.| bdd adiar::operator+ | ( | const bdd & | f | ) |
| bdd adiar::operator- | ( | const bdd & | f | ) |