Unification with Singleton Tree Grammars

  • Adrià Gascón
  • Guillem Godoy
  • Manfred Schmidt-Schauß
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5595)


First-order term unification is an essential concept in areas like functional and logic programming, automated deduction, deductive databases, artificial intelligence, information retrieval, compiler design, etc. We build upon recent developments in general grammar-based compression mechanisms for terms, which are more general than dags and investigate algorithms for first-order unification of compressed terms.

We prove that the first-order unification of compressed terms is decidable in polynomial time, and also that a compressed representation of the most general unifier can be computed in polynomial time.

We use several known results on the used tree grammars, called singleton tree grammars (STG)s, like polynomial time computability of several subalgorithmms: certain grammar extensions, deciding equality of represented terms, and generating the preorder traversal. An innovation is a specialized depth of an STG that shows that unifiers can be represented in polynomial space.


Polynomial Time Word Problem Inference Rule Logic Programming Function Symbol 
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. [BLM05]
    Busatto, G., Lohrey, M., Maneth, S.: Efficient memory representation of XML documents. In: Bierman, G., Koch, C. (eds.) DBPL 2005. LNCS, vol. 3774, pp. 199–216. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  2. [BS01]
    Baader, F., Snyder, W.: Unification theory. In: Robinson, J.A., Voronkov, A. (eds.) Handbook of Automated Reasoning, pp. 445–532. Elsevier/ MIT Press (2001)Google Scholar
  3. [CDG+97]
    Comon, H., Dauchet, M., Gilleron, R., Jacquemard, F., Lugiez, D., Tison, S., Tommasi, M.: Tree automata techniques and applications (1997), (release 1.10.2002)
  4. [GGSS08]
    Gascón, A., Godoy, G., Schmidt-Schauß, M.: Context matching for compressed terms. In: 23rd IEEE LICS, pp. 93–102 (2008),
  5. [GGSST08]
    Gascón, A., Godoy, G., Schmidt-Schauß, M., Tiwari, A.: Context Unification with One Context Variable (to be published) (2008)Google Scholar
  6. [GM02]
    Genest, B., Muscholl, A.: Pattern matching and membership for hierarchical message sequence charts. In: Rajsbaum, S. (ed.) LATIN 2002. LNCS, vol. 2286, pp. 326–340. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  7. [HSTA00]
    Hirao, M., Shinohara, A., Takeda, M., Arikawa, S.: Fully compressed pattern matching algorithm for balanced straight-line programs. In: SPIRE 2000, p. 132. IEEE Computer Society Press, Washington (2000)Google Scholar
  8. [KPR96]
    Karpinski, M., Plandowski, W., Rytter, W.: Efficient algorithms for Lempel-Ziv encoding. In: Proc. 4th Scandinavian Workshop on Algorithm Theory, pp. 392–403. Springer, Heidelberg (1996)Google Scholar
  9. [KRS95]
    Karpinski, M., Rytter, W., Shinohara, A.: Pattern-matching for strings with short description. In: Galil, Z., Ukkonen, E. (eds.) CPM 1995. LNCS, vol. 937, pp. 205–214. Springer, Heidelberg (1995)CrossRefGoogle Scholar
  10. [Lif07]
    Lifshits, Y.: Processing compressed texts: A tractability border. In: Ma, B., Zhang, K. (eds.) CPM 2007. LNCS, vol. 4580, pp. 228–240. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  11. [LM05]
    Lohrey, M., Maneth, S.: The complexity of tree automata and XPath on grammar-compressed trees. In: Farré, J., Litovsky, I., Schmitz, S. (eds.) CIAA 2005. LNCS, vol. 3845. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  12. [LMSS09]
    Lohrey, M., Maneth, S., Schmidt-Schauß, M.: Parameter reduction in grammar-compressed trees. In: Alfaro, L. (ed.) FoSSaCS 2009. LNCS, vol. 5504, pp. 212–226. Springer, Heidelberg (2009)Google Scholar
  13. [Loh06]
    Lohrey, M.: Word problems and membership problems on compressed words. SIAM Journal on Computing 35(5), 1210–1240 (2006)MathSciNetCrossRefzbMATHGoogle Scholar
  14. [LR06]
    Lasota, S., Rytter, W.: Faster algorithm for bisimulation equivalence of normed context-free processes. In: Královič, R., Urzyczyn, P. (eds.) MFCS 2006. LNCS, vol. 4162, pp. 646–657. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  15. [LSSV04]
    Levy, J., Schmidt-Schauß, M., Villaret, M.: Monadic second-order unification is NP-complete. In: van Oostrom, V. (ed.) RTA 2004. LNCS, vol. 3091, pp. 55–69. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  16. [LSSV06a]
    Levy, J., Schmidt-Schauß, M., Villaret, M.: Bounded second-order unification is NP-complete. In: Pfenning, F. (ed.) RTA 2006. LNCS, vol. 4098, pp. 400–414. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  17. [LSSV06b]
    Levy, J., Schmidt-Schauß, M., Villaret, M.: Stratified context unification is NP-complete. In: Furbach, U., Shankar, N. (eds.) IJCAR 2006. LNCS, vol. 4130, pp. 82–96. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  18. [MM82]
    Martelli, A., Montanari, U.: An efficient unification algorithm. ACM Trans. on programming languages and systems 4(2), 258–282 (1982)CrossRefzbMATHGoogle Scholar
  19. [MMS08]
    Maneth, S., Mihaylov, N., Sakr, S.: XML tree structure compression. DEXA, 243–247 (2008)Google Scholar
  20. [MST97]
    Miyazaki, M., Shinohara, A., Takeda, M.: An improved pattern matching algorithm for strings in terms of straight-line programs. In: Hein, J., Apostolico, A. (eds.) CPM 1997. LNCS, vol. 1264, pp. 1–11. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  21. [Pla95]
    Plandowski, W.: The Complexity of the Morphism Equivalence Problem for Context-Free Languages. PhD thesis, Department of Mathematics, Informatics and Mechanics, Warsaw University (1995)Google Scholar
  22. [Rob65]
    Alan Robinson, J.: A machine oriented logic based on the resolution principle. J. of the ACM 12(1), 23–41 (1965)MathSciNetCrossRefzbMATHGoogle Scholar
  23. [SS05]
    Schmidt-Schauß, M.: Polynomial equality testing for terms with shared substructures. Frank report 21, FB Informatik und Mathematik. Goethe-Univ. Frankfurt (November 2005)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Adrià Gascón
    • 1
  • Guillem Godoy
    • 1
  • Manfred Schmidt-Schauß
    • 2
  1. 1.LSI DepartmentUniversitat Politècnica de CatalunyaBarcelonaSpain
  2. 2.Dept. Informatik und Mathematik, Inst.f. InformatikJ.W. Goethe-UniversityFrankfurtGermany

Personalised recommendations