123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201(* This file is free software, part of Logtk. See file "license" for more details. *)typeterm=Term.ttypesubst=Subst.tmoduletypeLEAF=sigtypettypeeltvalempty:tvaladd:t->term->elt->tvalremove:t->term->elt->tvalis_empty:t->boolvaliter:t->(term->elt->unit)->unitvalfold:t->'a->('a->term->elt->'a)->'avalsize:t->intvalfold_unify:?subst:Unif_subst.t->tScoped.t->termScoped.t->(term*elt*Unif_subst.t)Iter.tvalfold_match:?subst:subst->tScoped.t->termScoped.t->(term*elt*subst)Iter.t(** Match the indexed terms against the given query term *)valfold_matched:?subst:subst->tScoped.t->termScoped.t->(term*elt*subst)Iter.t(** Match the query term against the indexed terms *)endmoduletypeTERM_IDX=sigtypettypeeltmoduleLeaf:LEAFwithtypeelt=eltvalname:stringvalempty:unit->tvalis_empty:t->boolvalsize:t->intvaladd:t->term->elt->tvaladd_seq:t->(term*elt)Iter.t->tvaladd_list:t->(term*elt)list->tvalremove:t->term->elt->tvalremove_seq:t->(term*elt)Iter.t->tvalremove_list:t->(term*elt)list->tvaliter:t->(term->elt->unit)->unitvalfold:t->('a->term->elt->'a)->'a->'avalretrieve_unifiables:?subst:Unif_subst.t->tScoped.t->termScoped.t->(term*elt*Unif_subst.t)Iter.tvalretrieve_generalizations:?subst:subst->tScoped.t->termScoped.t->(term*elt*subst)Iter.tvalretrieve_specializations:?subst:subst->tScoped.t->termScoped.t->(term*elt*subst)Iter.tvalto_dot:eltCCFormat.printer->tCCFormat.printer(** print oneself in DOT into the given file *)endtypelits=termSLiteral.tIter.t(** Iter of literals, as a cheap abstraction on query clauses *)typelabels=Util.Int_set.tmoduletypeCLAUSE=sigtypetvalcompare:t->t->int(** Compare two clauses *)valto_lits:t->lits(** Iterate on literals of the clause *)vallabels:t->labels(** Some integer labels. We assume that if [c] to subsume [d],
then [labels c] is a subset of [labels d] *)endmoduletypeSUBSUMPTION_IDX=sigtypetmoduleC:CLAUSEvalname:stringvalempty:unit->t(** Empty index *)valadd:t->C.t->t(** Index the clause *)valadd_seq:t->C.tIter.t->tvaladd_list:t->C.tlist->tvalremove:t->C.t->t(** Un-index the clause *)valremove_seq:t->C.tIter.t->tvalretrieve_subsuming:t->lits->labels->C.tIter.t(** Fold on a set of indexed candidate clauses, that may subsume
the given clause. *)valretrieve_subsuming_c:t->C.t->C.tIter.tvalretrieve_subsumed:t->lits->labels->C.tIter.t(** Fold on a set of indexed candidate clauses, that may be subsumed by
the given clause *)valretrieve_subsumed_c:t->C.t->C.tIter.tvalretrieve_alpha_equiv:t->lits->labels->C.tIter.t(** Retrieve clauses that are potentially alpha-equivalent to the given clause *)valretrieve_alpha_equiv_c:t->C.t->C.tIter.t(** Retrieve clauses that are potentially alpha-equivalent to the given clause *)valiter:t->C.tIter.tvalfold:('a->C.t->'a)->'a->t->'aendmoduletypeEQUATION=sigtypettyperhs(** An equation can have something other than a term as a right-hand
side, for instance a formula. *)valcompare:t->t->int(** Total order on equations *)valextract:t->(term*rhs*bool)(** Obtain a representation of the (in)equation. The sign indicates
whether it is an equation [l = r] (if true) or an inequation
[l != r] (if false) *)valpriority:t->int(** How "useful" this equation is. Can be safely ignored by
always returning the same number. *)endmoduletypeUNIT_IDX=sigtypetmoduleE:EQUATION(** Module that describes indexed equations *)typerhs=E.rhs(** Right hand side of equation *)valempty:unit->tvalis_empty:t->boolvaladd:t->E.t->t(** Index the given (in)equation *)valadd_seq:t->E.tIter.t->tvaladd_list:t->E.tlist->tvalremove:t->E.t->tvalremove_seq:t->E.tIter.t->tvalsize:t->int(** Number of indexed (in)equations *)valiter:t->(term->E.t->unit)->unit(** Iterate on indexed equations *)valretrieve:?subst:subst->sign:bool->tScoped.t->termScoped.t->(term*rhs*E.t*subst)Iter.t(** [retrieve ~sign (idx,si) (t,st) acc] iterates on
(in)equations l ?= r of given [sign] and substitutions [subst],
such that subst(l, si) = t.
It therefore finds generalizations of the query term. *)valto_dot:tCCFormat.printer(** print the index in the DOT format *)end