module TermAlistIndex:A predefined discrimination tree implementation that uses terms as entries and association lists for the internal tree representation.Index.Indexwith type entry=Term.term
type index
type entry
val make_index : unit -> indexmake_index () returns a newly created index.val clear : index -> unitclear index removes all elements from index.val insert : index -> Term.term -> entry -> unitinsert index term entry inserts a new value, entry, into
index, associated with key term.val remove_variant : index -> Term.term -> unitremove_variant index term context deletes a single entry
which has a variant of term as key from the
index. It has no effect, if the index does not contain such an
entry.val iter_all : (entry -> unit) -> index -> unititer_all f index applies f to all entries in the index.val iter_all_and_throw_away : (entry -> unit) -> index -> unititer_all_and_throw_away f index is similar to iter_all f
index, except, that the implementation is allowed to remove
entries as they are iterated over from the index. The index
must be reinitialized with clear if it is to be used
afterwards.
(Note: A kind of iteration, that allows to remove the
current entry would be more desirable. See Java hashtables.)
val iter_instance_candidates : (entry -> unit) ->
index -> Term.term -> Term.context -> unititer_instance_candidates f index term context applies f to
all those entries in the index, whose keys are variants or proper
instances of term in context , and maybe to more entries
in the index.
context may be Term.null_context.
val iter_generalization_candidates : (entry -> unit) ->
index -> Term.term -> Term.context -> unititer_generalization_candidates f index term context applies f
to all those entries in the index, whose keys are variants or
more general than term in context, and maybe to more
entries in the index.
context may be Term.null_context.
val iter_unification_candidates : (entry -> unit) ->
index -> Term.term -> Term.context -> unititer_unification_candidates f index term applies f to all those
entries in the index, whose keys are unifiable with of term in
context, and maybe to more entries in the index.
context may be Term.null_context.
val size : index -> int