Legend:
Library
Module
Module type
Parameter
Class
Class type
Variable-Lattice-Result
This module implements a variant of a binary decision diagrams. Rather than representing boolean-valued functions over boolean variables, this data structure represents functions that take on values in a semi-ring, and whose variables are assigned values from a lattice, i.e., that are partially ordered.
A decision diagram index. All diagrams and subdiagrams within it are given an index. You can convert this to a tree with unget, and from a tree with get.
Unsafe!! unchecked_cond v t f behaves like cond v t f, but always puts the pattern v in the root node, without ensuring the FDD-ordering invariant is enforced. Only use this if you know what you are doing!
restrict vs t returns a diagram derived from t and that agrees with t when every variable assignment v in vs is true. This will eliminate the variables in vs from the diagram, if present.
This function assumes that a variable will only appear once in the list of variable assignments. If the list assigns multiple values to a variable, then the behavior is unspecified.
fold f g t traverses the diagram, replacing leaf nodes with applications of f to the values that they hold, and branches on variables with applications of g.
equal a b returns whether or not the two diagrams are structurally equal. If two diagrams are structurally equal, then they represent the same combinatorial object. However, if two diagrams are not equal, they still may represent the same combinatorial object. Whether or not this is the case depends on they behavior of the type v.
to_dot t returns a string representation of the diagram using the DOT graph description language. The result of this function can be rendered using Graphviz or any other program that supports the DOT language.