class typeThe interface for a predicate term indexing module.['a]predicate_index =object..end
To be used for exactly one predicate/function symbol, not for several at once. Thus adding f(x) and g(x) is not allowed.
Insertion of variants of already inserted terms is allowed
and must keep the data attached to all variants intact.
For an explanation for p_preserving and i_preserving see Subst.
method add : ?no_duplicates:bool -> term -> 'a -> unitterm with attached 'data to the index.
if no_duplicates (false by default) then each term may be stored only once,
i.e. if a term is added more than once
only the first entry is stored with its data,
the others are silently dropped.
method remove : term -> 'a option -> boolterm.
if data is given,
then additionally data must be attached the removed variant.
returns false if no such entry exists.
method clear : unitmethod size : intmethod iter : (term -> 'a -> unit) -> unitList.iter.
function style iterator over all term/data pairs stored in the index.method fold : 'b. ('b -> term -> 'a -> 'b) -> 'b -> 'bList.fold.method get_generalization_iterator : p_preserving:bool -> term -> 'a iteratorterm.method get_shielding_iterator : term -> term -> 'a iteratormethod find_all_variants : term -> 'a listterm
(used for testing only).method find_all_generalizations : p_preserving:bool -> term -> 'a listterm.method find_all_unifiable : p_preserving:bool -> term -> 'a listterm.method find_all_unifiable_subst : p_preserving:bool -> term -> ('a * Subst.subst) listmethod find_all_instances : p_preserving:bool -> term -> 'a listterm.method find_all_shielding : term -> term -> 'a listTerm_indexing.predicate_index.find_strongly_shielding).
Note: if the second term is part of the index is counts
as a shielding term, while the first term does not.method find : term -> 'a optionterm.method find_generalization : p_preserving:bool -> term -> 'a optionterm.method find_unifiable : p_preserving:bool -> term -> 'a optionterm.method find_instance : p_preserving:bool -> term -> 'a optionterm.method find_strongly_shielding : term -> term -> 'a optionfind_strongly_shielding term1 term2
First part of the productivity check (see the Model Evolution paper for details).
returns None, if term2 is not strongly shielded from term1 by the index, i.e. there is no true instance of term2 which is more general than term1.
otherwise, returns a shielding entry.
Note: if the second term is part of the index it counts
as a shielding term, while the first term does not.
method find_shielding : term -> term -> 'a optionfind_shielding index term1 term2
Second part of the productivity check.
returns all index elements that shield term2 from term1, i.e. which have a p-preserving instance which is also a true instance of term2 and more general than term1.
Note: if the second term is part of the index it counts
as a shielding term, while the first term does not.
method to_string : string