module Mapleaf:sig..end
(guard,leaf).
An alternative, which may be more efficient but a bit less
flexible, is to use functions of module Cudd.User.
In order to be usable with both modules Cudd.Mtbdd and
Cudd.Mtbddc, the signature of the functions of this modules use
the type 'a Vdd.t, but Vdds should not be used directly.
Global option
val restrict : bool Pervasives.ref
guard,leaf is
implicitly iterated on all such pairs contained in the argument
MTBDD.val mapleaf1 : ('a -> 'b) -> 'a Cudd.Vdd.t -> 'b Cudd.Vdd.t\/ guard -> f leafval retractivemapleaf1 : default:'a Cudd.Vdd.t ->
(Cudd.Bdd.vt -> 'b -> Cudd.Bdd.vt * 'a) -> 'b Cudd.Vdd.t -> 'a Cudd.Vdd.tf
are disjoint, return the MTBDD default \/ (\/ nguard ->
nleaf) with (nguard,nleaf) = f guard leaf.val expansivemapleaf1 : default:'a Cudd.Vdd.t ->
merge:('a Cudd.Vdd.t -> 'a Cudd.Vdd.t -> 'a Cudd.Vdd.t) ->
(Cudd.Bdd.vt -> 'b -> Cudd.Bdd.vt * 'a) -> 'b Cudd.Vdd.t -> 'a Cudd.Vdd.t\/ replaced by merge (supposed
to be commutative and associative).val combineleaf1 : default:'c ->
combine:('b -> 'c -> 'c) -> (Cudd.Bdd.vt -> 'a -> 'b) -> 'a Cudd.Vdd.t -> 'cacc
(kind of accumulator) is initialized with default, to
which one progressively add combine acc (f guard leaf).
combine should not be sensitive to the order in which one
iterates on guards and leaves.
guard1,leaf1
(resp. guard2,leaf2) is implicitly iterated on all such
pairs contained in the first (resp. second) argument MTBDD.val mapleaf2 : ('a -> 'b -> 'c) -> 'a Cudd.Vdd.t -> 'b Cudd.Vdd.t -> 'c Cudd.Vdd.t\/ guard1 /\ guard2 -> f leaf1 leaf2val retractivemapleaf2 : default:'a Cudd.Vdd.t ->
(Cudd.Bdd.vt -> 'b -> 'c -> Cudd.Bdd.vt * 'a) ->
'b Cudd.Vdd.t -> 'c Cudd.Vdd.t -> 'a Cudd.Vdd.tf
are disjoint, return the MTBDD
default \/ (\/ nguard -> nleaf) with
(nguard,nleaf) = f (guard1 /\ guard2) leaf1 leaf2.val expansivemapleaf2 : default:'a Cudd.Vdd.t ->
merge:('a Cudd.Vdd.t -> 'a Cudd.Vdd.t -> 'a Cudd.Vdd.t) ->
(Cudd.Bdd.vt -> 'b -> 'c -> Cudd.Bdd.vt * 'a) ->
'b Cudd.Vdd.t -> 'c Cudd.Vdd.t -> 'a Cudd.Vdd.t\/ replaced by merge (supposed
to be commutative and associative).val combineleaf2 : default:'d ->
combine:('c -> 'd -> 'd) ->
(Cudd.Bdd.vt -> 'a -> 'b -> 'c) -> 'a Cudd.Vdd.t -> 'b Cudd.Vdd.t -> 'dacc
(kind of accumulator) is initialized with default, to
which one progressively add combine acc (f (guard1 /\
guard2) leaf1 leaf2).
combine should not be sensitive to the order in which one
iterates on guards and leaves.
tguard,tleaves denotes
resp. the conjunctions of guards (of the array of MTBDD) and
the associated array of leaves.val combineleaf_array : default:'c ->
combine:('b -> 'c -> 'c) ->
tabsorbant:('a -> bool) option array ->
(Cudd.Bdd.vt -> 'a array -> 'b) -> 'a Cudd.Vdd.t array -> 'cacc (kind of accumulator)
is initialized with default, to which one progressively
add combine acc (f (/\ tguard) tleaves).
The arrays are assumed to be non-empty.
If for some i, tabsorbant.(i)=Some abs and absorbant
tleaves.(i)=true, then f (/\ tguard) tleaves is assumed
to return default (this allows optimisation).
combine should not be sensitive to the order in which one
iterates on guards and leaves.
val combineleaf1_array : default:'d ->
combine:('c -> 'd -> 'd) ->
?absorbant:('a -> bool) ->
tabsorbant:('b -> bool) option array ->
(Cudd.Bdd.vt -> 'a -> 'b array -> 'c) ->
'a Cudd.Vdd.t -> 'b Cudd.Vdd.t array -> 'dval combineleaf2_array : default:'e ->
combine:('d -> 'e -> 'e) ->
?absorbant1:('a -> bool) ->
?absorbant2:('b -> bool) ->
tabsorbant:('c -> bool) option array ->
(Cudd.Bdd.vt -> 'a -> 'b -> 'c array -> 'd) ->
'a Cudd.Vdd.t -> 'b Cudd.Vdd.t -> 'c Cudd.Vdd.t array -> 'ecombineleaf_array, but in which the
first (resp. first and second) leaves (and MTBDD) type may be
different.val combineretractive : Cudd.Bdd.vt * 'a -> 'a Cudd.Vdd.t -> 'a Cudd.Vdd.tcombinetractive (guard,leaf) vdd = Vdd.ite guard leaf vdd.
Used in cases where guard and the guard of ``interesting
things'' in vdd are disjoint, hence the name.val combineexpansive : default:'a Cudd.Vdd.t ->
merge:('a Cudd.Vdd.t -> 'b Cudd.Vdd.t -> 'c Cudd.Vdd.t) ->
Cudd.Bdd.vt * 'a -> 'b Cudd.Vdd.t -> 'c Cudd.Vdd.tcombineexpansive ~default ~merge (guard,leaf) vdd = merge
(Vdd.ite guard leaf default) vdd. Implements in some way an
``union'' of (guard,leaf) and vdd.