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 -> unit
term
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 -> bool
term
.
if data
is given,
then additionally data
must be attached the removed variant.
returns false if no such entry exists.
method clear : unit
method size : int
method iter : (term -> 'a -> unit) -> unit
List.iter
.
function style iterator over all term/data pairs stored in the index.method fold : 'b. ('b -> term -> 'a -> 'b) -> 'b -> 'b
List.fold
.method get_generalization_iterator : p_preserving:bool -> term -> 'a iterator
term
.method get_shielding_iterator : term -> term -> 'a iterator
method find_all_variants : term -> 'a list
term
(used for testing only).method find_all_generalizations : p_preserving:bool -> term -> 'a list
term
.method find_all_unifiable : p_preserving:bool -> term -> 'a list
term
.method find_all_unifiable_subst : p_preserving:bool -> term -> ('a * Subst.subst) list
method find_all_instances : p_preserving:bool -> term -> 'a list
term
.method find_all_shielding : term -> term -> 'a list
Term_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 option
term
.method find_generalization : p_preserving:bool -> term -> 'a option
term
.method find_unifiable : p_preserving:bool -> term -> 'a option
term
.method find_instance : p_preserving:bool -> term -> 'a option
term
.method find_strongly_shielding : term -> term -> 'a option
find_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 option
find_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