Module Fingerprint.Make

Parameters

Signature

include Index.TERM_IDX with type elt = X.t
type t
type elt = X.t
module Leaf : Index_intf.LEAF with type elt = elt
val name : string
val empty : unit -> t
val is_empty : t -> bool
val size : t -> int
val add : t -> Index_intf.term -> elt -> t
val add_seq : t -> (Index_intf.term * elt) Iter.t -> t
val add_list : t -> (Index_intf.term * elt) list -> t
val remove : t -> Index_intf.term -> elt -> t
val update_leaf : t -> Index_intf.term -> (elt -> bool) -> t
val remove_seq : t -> (Index_intf.term * elt) Iter.t -> t
val remove_list : t -> (Index_intf.term * elt) list -> t
val iter : t -> (Index_intf.term -> elt -> unit) -> unit
val fold : t -> ('a -> Index_intf.term -> elt -> 'a) -> 'a -> 'a
val retrieve_unifiables : t Scoped.t -> Index_intf.term Scoped.t -> (Index_intf.term * elt * Unif_subst.t) Iter.t

Retrieves a decidable fragment of unifiables. Only one unifier per subterm.

val retrieve_unifiables_complete : ?⁠unif_alg:(Term.t Scoped.t -> Term.t Scoped.t -> Unif_subst.t option OSeq.t) -> t Scoped.t -> Index_intf.term Scoped.t -> (Index_intf.term * elt * Unif_subst.t option OSeq.t) Iter.t

Retrieves all unifiables. The set of unifiers is potentially infinite. Because HO unification is undecidable, the sequence is intersperced with `None`s to ensure termination for each element of the sequence.

val retrieve_generalizations : ?⁠subst:Index_intf.subst -> t Scoped.t -> Index_intf.term Scoped.t -> (Index_intf.term * elt * Index_intf.subst) Iter.t
val retrieve_specializations : ?⁠subst:Index_intf.subst -> t Scoped.t -> Index_intf.term Scoped.t -> (Index_intf.term * elt * Index_intf.subst) Iter.t
val to_dot : elt CCFormat.printer -> t CCFormat.printer

print oneself in DOT into the given file

val default_fp : fingerprint_fun
val empty_with : fingerprint_fun -> t

Empty index, using the given fingerprint function

val get_fingerprint : t -> fingerprint_fun
val update_leaf : t -> Term.t -> (Leaf.elt -> bool) -> t
val pp_keys : t -> unit