Efficient second-order matching

  • Régis Curien
  • Zhenyu Qian
  • Hui Shi
Regular Papers
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1103)


The standard second-order matching algorithm by Huet may be expansive in matching a flexible-rigid pair. On one hand, many fresh free variables may need to be introduced; on the other hand, attempts are made to match the heading free variable on the flexible side with every “top layer” on the rigid side and every argument of the heading free variable with every subterm covered by the “top layer”. We propose a new second-order matching algorithm, which introduces no fresh free variables and just considers some selected “top layers”, arguments of the heading free variable and subterms covered by the corresponding “top layers”. A first implementation shows that the new algorithm is more efficient both in time and space than the standard one for a great number of matching problems.


Free Variable Matching Pair Match Problem Formulate Rule Induction Assumption 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    T. Boy de la Tour and R. Caferra. Proof analogy in interactive theorem proving: A method to express and use it via second order pattern matching. In proceedings of AAAI'87, 1987.Google Scholar
  2. 2.
    T. Boy de la Tour and R. Caferra. A formale approach to some usually informal techniques used in mathematical reasoning. In ISSAC'88, pages 402–406. Lecture Notes in Computer Science, 1988.Google Scholar
  3. 3.
    R. S. Boyer and J. S. Moore. A Theorem Prover for a Computational Logic. In Proc. of the 10th International Conference on Automated Deduction, 1990.Google Scholar
  4. 4.
    R. Curien. Outils pour la preuve par analogie. PhD thesis, Université Henri Poincaré — Nancy 1, January 1995.Google Scholar
  5. 5.
    R. Curien. Second Order E-matching as a Tool for Automated Theorem Proving. In Proceedings of EPIA '93 (Portugese Conference on Artificial Intelligence) Porto, Portugal., volume 727 of Lecture Notes in Artificial Intelligence, 93.Google Scholar
  6. 6.
    R. Curien and Z. Qian. Efficiency for second-order matching: the syntactic and AC-cases. Technical report, 1995. Draft paper.Google Scholar
  7. 7.
    G. Dowek. A Second-order Pattern Matching Algorithm in the Cube of Typed λ-calculi. In Mathematical Fundation of Computer Science, LNCS 520, 1991.Google Scholar
  8. 8.
    R. Harper, D. MacQueen, and R. Milner. Standard ML. Technical report, Dept. of Cmputer Science, University of Edinburg, 1986.Google Scholar
  9. 9.
    G. Huet. A unification algorithm for typed λ-calculus. Theoretical Computer Science, 1:27–57, 1975.CrossRefGoogle Scholar
  10. 10.
    G. Huet. Résolution d'Equations dans les langages d'Ordre 1,2, ...,ω. Thèse de Doctorat d'Etat, Université de Paris 7 (France), 1976.Google Scholar
  11. 11.
    G. Huet and B. Lang. Proving and applying program transformations expressed with second-order patterns. Acta Informatica, 11:31–55, 1978.CrossRefGoogle Scholar
  12. 12.
    T. Kolbe and C. Walther. Reusing proofs. In A. Cohn, editor, ECAI'94, 11th European Conference on Artificial Intelligence, pages 80–84, 1994.Google Scholar
  13. 13.
    B. Krieg-Brüchner, J. Liu, H. Shi, and B. Wolff. Towards correct, effficient and reusable transformational developments. In ”KORSO: Methods, Languages, and Tools for the Construction of Correct Software”, ages 270–284. LNCS 1009, 1995.Google Scholar
  14. 14.
    T. Nipkow and Z. Qian. Modular higher-order E-unification. In R. Book, editor, Proc. 4th Int. Conf. Rewriting Techniques and Applications, pages 200–214. LNCS 488, 1991.Google Scholar
  15. 15.
    L. Paulson. Isabelle — A Generic Theorem prover. LNCS 828, 1994.Google Scholar
  16. 16.
    Z. Qian and K. Wang. Higher-order E-unification for arbitrary theories. In K. Apt, ed., Proc. 1992 Joint Int. Conf. and Symp. on Logic Programming. MIT Press, 1992.Google Scholar
  17. 17.
    H. Shi. Extended Matching with Applications to Program Transformation. PhD thesis, Universität Bremen, 1994.Google Scholar
  18. 18.
    W. Snyder. Higher-order E-unification. In M. Stickel, editor, Proc. 10th Int. Conf. Automated Deduction, pages 573–587. Springer-Verlag LNCS 449, 1990.Google Scholar
  19. 19.
    W. Snyder and J. Gallier. Higher-order unification revisited: Complete sets of transformations. J. Symbolic Computation, 8(1 & 2):101–140, 1989.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Régis Curien
    • 1
  • Zhenyu Qian
    • 2
  • Hui Shi
    • 2
  1. 1.CRIN-CNRS & INRIA-LorraineVandoeuvre-les-Nancy CedexFrance
  2. 2.FB3 InformatikUniversität BremenBremenGermany

Personalised recommendations