module DT_util:sig..end
typeterm =TermInner.Default.t
typedt =(term, term) Model.DT.t
typesubst =(term, term) Var.Subst.t
val ite : term Var.t ->
then_:dt -> else_:dt -> dt
val eval_subst : subst:subst -> dt -> dtAssert_failure if the substitution binds some of dt's variablesval map_vars : subst:(term, term Var.t) Var.Subst.t ->
dt -> dtval rename_vars : dt -> dtdtval apply : dt -> term -> dtapply dt arg returns the sub-tree of dt for when dt's variable
is equal to arg.Invalid_argument if the dt is not a functionval apply_l : dt -> term list -> dtdt to a list of argumentsInvalid_argument if the dt is not a function with enough argumentsval join : dt -> dt -> dtjoin a b applies b to every leaf of a, grafting the
resulting sub-tree in place of the leaf, using Model.DT_util.apply.
assumes the return type of a is the same as the first
argument of b.
val merge : dt -> dt -> dtmerge a b concatenates the cases of a and b,
merging the common cases recursively, favoring a over b
when needed. The new default/else is a.default.
not commutative.
val merge_l : dt list -> dt
val reorder : term Var.t list -> dt -> dtreorder vars dt rebalances dt so it has the given order of
variables. It is assumed that vars is a permutation of DT.vars dtInvalid_argument if vars is not a permutation of the
variables of dtval remove_vars : term Var.t list -> dt -> dtModel.DT_util.merge_l to merge their sub-cases.
If those variables occur in tests in variables that come earlier
in DT.vars dt, they will not be substituted properlyval remove_first_var : dt -> dtModel.DT_util.remove_vars.Invalid_argument if the tree is constantexception Case_not_found of term
val find_cases : ?subst:subst ->
term ->
(term, term) Model.DT.cases ->
subst * dtCase_not_found if the term is not foundval to_term : dt -> termval print : dt Model.printer