bdd_tree/2

bdd_tree(+ BDDHandle, Term)*

Convert the BDD or ADD represented by BDDHandle to a Prolog term of the form bdd( _Dir_, _Nodes_, _Vars_) or mtbdd( _Nodes_, _Vars_), respectively. The arguments are:

  • Dir direction of the BDD, usually 1

  • Nodes list of nodes in the BDD or ADD.

In a BDD nodes may be pp (both terminals are positive) or pn (right-hand-side is negative), and have four arguments: a logical variable that will be bound to the value of the node, the logical variable corresponding to the node, a logical variable, a 0 or a 1 with the value of the left-hand side, and a logical variable, a 0 or a 1 with the right-hand side.

  • Vars are the free variables in the original BDD, or the parameters of the BDD/ADD.

As an example, the BDD for the expression X+(Y+X)\*(-Z) becomes:


 bdd(1,[,pn(N0,Z,1,1),pp(N1,Y,N0,1),pn(N2,X,1,N1)],N2,vs(X,Y,Z))