Higher-order term indexing using substitution trees

We present a higher-order term indexing strategy based on substitution trees for simply typed lambda-terms. There are mainly two problems in adapting first-order indexing techniques. First, many operations used in building an efficient term index and retrieving a set of candidate terms from a large collection are undecidable in general for higher-order terms. Second, the scoping of variables and binders in the higher-order case presents challenges. The approach taken in this article is to reduce the problem to indexing linear higher-order patterns, a decidable fragment of higher-order terms, and delay solving terms outside of this fragment. We present insertion of terms into the index based on computing the most specific linear generalization of two linear higher-order patterns, and retrieval based on matching two linear higher-order patterns. Our theoretical framework maintains that terms are in βη-normal form, thereby eliminating the need to renormalize and raise terms during insertion and retrieval. Finally, we prove correctness of our presented algorithms. This indexing structure is implemented as part of the Twelf system to speed up the execution of the tabled higher-logic programming interpreter.

[1]  Christian Prehofer,et al.  Higher-order narrowing with definitional trees , 1999 .

[2]  I. V. Ramakrishnan,et al.  Term Indexing , 1995, Lecture Notes in Computer Science.

[3]  Peter Graf Substitution Tree Indexing , 1995, RTA.

[4]  Brigitte Pientka Higher-Order Substitution Tree Indexing , 2003, ICLP.

[5]  Steven Skiena,et al.  Principles and practice of unification factoring , 1996, TOPL.

[6]  Frank Pfenning,et al.  Tabled higher-order logic programming , 2003 .

[7]  William McCune,et al.  Experiments with discrimination-tree indexing and path indexing for term retrieval , 1992, Journal of Automated Reasoning.

[8]  Andrei Voronkov,et al.  The design and implementation of VAMPIRE , 2002, AI Commun..

[9]  Claude Kirchner,et al.  Higher-order unification via explicit substitutions , 1995, Proceedings of Tenth Annual IEEE Symposium on Logic in Computer Science.

[10]  Frank Pfenning,et al.  System Description: Twelf - A Meta-Logical Framework for Deductive Systems , 1999, CADE.

[11]  Martín Abadi,et al.  Explicit substitutions , 1989, POPL '90.

[12]  D. Walker,et al.  A concurrent logical framework I: Judgments and properties , 2003 .

[13]  Frank Pfenning,et al.  Intersection types and computational effects , 2000, ICFP '00.

[14]  Frank Pfenning,et al.  Optimizing Higher-Order Pattern Unification , 2003, CADE.

[15]  Peter Graf,et al.  Term Indexing , 1996, Lecture Notes in Computer Science.

[16]  I. V. Ramakrishnan,et al.  Term Indexing , 2001, Handbook of Automated Reasoning.

[17]  George C. Necula,et al.  Oracle-based checking of untrusted software , 2001, POPL '01.

[18]  I. V. Ramakrishnan,et al.  Multistage indexing algorithms for speeding prolog execution , 1994, Softw. Pract. Exp..

[19]  Frank Pfenning,et al.  Unification and anti-unification in the calculus of constructions , 1991, [1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science.

[20]  I. V. Ramakrishnan,et al.  Automata-driven indexing of Prolog clauses , 1989, POPL '90.

[21]  I. V. Ramakrishnan,et al.  Efficient Tabling Mechanisms for Logic Programs , 1995, ICLP.

[22]  Dale Miller,et al.  Unification of Simply Typed Lamda-Terms as Logic Programming , 1991, ICLP.

[23]  Gopalan Nadathur,et al.  The Bedwyr System for Model Checking over Syntactic Expressions , 2007, CADE.

[24]  Brigitte Pientka A Proof-Theoretic Foundation for Tabled Higher-Order Logic Programming , 2002, ICLP.

[25]  Harald Ganzinger,et al.  Fast Term Indexing with Coded Context Trees , 2004, Journal of Automated Reasoning.

[26]  Dale Miller,et al.  A Logic Programming Language with Lambda-Abstraction, Function Variables, and Simple Unification , 1991, J. Log. Comput..

[27]  Karl Crary,et al.  Small Proof Witnesses for LF , 2005, ICLP.

[28]  Colin Stirling,et al.  Higher-Order Matching, Games and Automata , 2007, 22nd Annual IEEE Symposium on Logic in Computer Science (LICS 2007).

[29]  C. R. Ramakrishnan,et al.  Optimizing Clause Resolution: Beyond Unification Factoring , 1995, ILPS.

[30]  Christoph Benzmüller,et al.  Term Indexing for the LEO-II Prover , 2006 .

[31]  Frank Pfenning,et al.  A Linear Spine Calculus , 2003, J. Log. Comput..

[32]  Mark E. Stickel The Path-Indexing Method for Indexing Terms , 1989 .

[33]  I. V. Ramakrishnan,et al.  Efficient Access Mechanisms for Tabled Logic Programs , 1999, J. Log. Program..

[34]  Lawrence C. Paulson,et al.  Natural Deduction as Higher-Order Resolution , 1986, J. Log. Program..

[35]  Brigitte Pientka Tabling for Higher-Order Logic Programming , 2005, CADE.

[36]  C. R. Ramakrishnan,et al.  Design and Implementation of Jump Tables for Fast Indexing of Logic Programs , 1995, PLILP.

[37]  Gopalan Nadathur,et al.  System Description: Teyjus - A Compiler and Abstract Machine Based Implementation of lambda-Prolog , 1999, CADE.

[38]  Frank Pfenning,et al.  Contextual modal type theory , 2008, TOCL.

[39]  Lawrence C. Paulson,et al.  LEO-II - A Cooperative Automatic Theorem Prover for Classical Higher-Order Logic (System Description) , 2008, IJCAR.

[40]  Thomas Hillenbrand Citius altius fortius: Lessons learned from the Theorem Prover WALDMEISTER , 2003, Electron. Notes Theor. Comput. Sci..