Module Bddleaf


module Bddleaf: sig .. end
Manipulation of lists of guards and leafs (internal)


type ('a, 'b) elt = {
   guard : 'a Cudd.Bdd.t;
   leaf : 'b;
}
type ('a, 'b) t = ('a, 'b) elt list 

Utilities


val fold2 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b list -> 'c list -> 'a
val iter2 : ('a -> 'b -> unit) -> 'a list -> 'b list -> unit
Applies f to all pairs (elt1,elt2) with elt1 in list1 and elt2 in list2. Iterates first of the first list, then on the second.

Normalisation


val check_unicity : is_equal:('a -> 'a -> bool) -> ('b, 'a) elt list -> bool
Checking function: raises Failure if problem, returns true otherwise.

Checks that


val check_disjointness : ('a, 'b) elt list -> bool
Checking function: raises Failure if problem, returns true otherwise. Checks that the guards are exclusive.
val cons_unique : is_equal:('a -> 'a -> bool) ->
('b, 'a) elt ->
('b, 'a) elt list -> ('b, 'a) elt list
Performs the join of a list with an element.

Assuming that the list argument satisfies the unicity property, ensures it in the result

val append_unique : is_equal:('a -> 'a -> bool) ->
('b, 'a) elt list ->
('b, 'a) elt list -> ('b, 'a) elt list
Append the two lists.

Assuming that the first list argument satisfies the unicity property, ensures it in the result

val cons_disjoint : is_equal:('a -> 'a -> bool) ->
merge:('a -> 'a -> 'a) ->
('b, 'a) elt ->
('b, 'a) elt list -> ('b, 'a) elt list
Performs the join of a list with an element.

Assuming that the list argument satisfies the disjointness (and unicity) property, ensures it in the result

val append_disjoint : is_equal:('a -> 'a -> bool) ->
merge:('a -> 'a -> 'a) ->
('b, 'a) elt list ->
('b, 'a) elt list -> ('b, 'a) elt list
Appends the two lists.

Assuming that the first list argument satisfies the disjointness (and unicity) property, ensures it in the result

val cons : is_equal:('a -> 'a -> bool) ->
merge:('a -> 'a -> 'a) ->
unique:bool ->
disjoint:bool ->
('b, 'a) elt ->
('b, 'a) elt list -> ('b, 'a) elt list
Calls the right cons function depending on the options.
val append : is_equal:('a -> 'a -> bool) ->
merge:('a -> 'a -> 'a) ->
unique:bool ->
disjoint:bool ->
('b, 'a) elt list ->
('b, 'a) elt list -> ('b, 'a) elt list
Calls the right append function depending on the options.
val make_unique : is_equal:('a -> 'a -> bool) ->
merge:('a -> 'a -> 'a) ->
disjoint:bool -> ('b, 'a) elt list -> ('b, 'a) elt list
Remove duplicatas (by reconstructing the list)
val guard : cudd:'a Cudd.Man.t -> ('a, 'b) t -> 'a Cudd.Bdd.t

Others

Return the union of guards in the list