Harman Patil (Editor)

Term indexing

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In computer science, a term index is a data structure to facilitate fast lookup of terms and clauses in a logic program, deductive database, or automated theorem prover.

Contents

Many operations in automatic theorem provers require search in huge collections of terms and clauses. Such operations typically fall into the following scheme. Given a collection S of terms (clauses) and a query term (clause) q , find in S some/all terms t related to q according to a certain retrieval condition. Most interesting retrieval conditions are formulated as existence of a substitution that relates in a special way the query and the retrieved objects t . Here is a list of retrieval conditions frequently used in provers:

  • term q is unifiable with term t , i.e., there exists a substitution θ , such that q θ = t θ
  • term t is an instance of q , i.e., there exists a substitution θ , such that q θ = t
  • term t is a generalisation of q , i.e., there exists a substitution θ , such that q = t θ
  • clause q subsumes clause t , i.e., there exists a substitution θ , such that q θ is a subset/submultiset of t
  • clause q is subsumed by t , i.e., there exists a substitution θ , such that t θ is a subset/submultiset of q
  • More often than not, we are actually interested in finding the appropriate substitutions explicitly, together with the retrieved terms t , rather than just in establishing existence of such substitutions.

    Very often the sizes of term sets to be searched are large, the retrieval calls are frequent and the retrieval condition test is rather complex. In such situations linear search in S , when the retrieval condition is tested on every term from S , becomes prohibitively costly. To overcome this problem, special data structures, called indexes, are designed in order to support fast retrieval. Such data structures, together with the accompanying algorithms for index maintenance and retrieval, are called term indexing techniques.

    Classic indexing techniques

  • discrimination trees
  • substitution trees
  • path indexing
  • Substitution trees outperform path indexing, discrimination tree indexing, and abstraction trees.

    A discrimination tree term index stores its information in a trie data structure.

    Modern indexing techniques

  • feature vector indexing
  • code trees
  • context trees
  • relational path indexing
  • References

    Term indexing Wikipedia