Typechecking Top-Down Uniform Unranked Tree Transducers

  • Wim Martens
  • Frank Neven
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2572)


We investigate the typechecking problem for XML queries: statically verifying that every answer to a query conforms to a given output schema, for inputs satisfying a given input schema. As typechecking quickly turns undecidable for query languages capable of testing equality of data values, we return to the limited framework where we abstract XML documents as labeled ordered trees. We focus on simple top-down recursive transformations motivated by XSLT and structural recursion on trees. We parameterize the problem by several restrictions on the transformations (deleting, non-deleting, bounded width) and consider both tree automata and DTDs as output schemas. The complexity of the typechecking problems in this scenario range from PTIME to EXP- TIME.


Regular Language Input Tree Transformation Language Tree Automaton Tree Language 
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.
    N. Alon, T. Milo, F. Neven, D. Suciu, and V. Vianu. Typechecking XML views of relational databases. In Proc. 16th IEEE Symposium on Logic in Computer Science (LICS 2001), pages 421–130, 2001.Google Scholar
  2. 2.
    N. Alon, T. Milo, F. Neven, D. Suciu, and V. Vianu. XML with data values: Typechecking revisited. In Proc. 20th Symposium on Principles of Database Systems (PODS 2001), pages 560–572, 2001.Google Scholar
  3. 3.
    G. J. Bex, S. Maneth, and F. Neven. A formal model for an expressive fragment of XSLT. Information Systems, 27(1):21–39, 2002.zbMATHCrossRefGoogle Scholar
  4. 4.
    A. Brüggemann-Klein, M. Murata, and D. Wood. Regular tree and regular hedge languages over unranked alphabets: Version 1, april 3, 2001. Technical Report HKUST-TCSC-2001-0, The Hongkong University of Science and Technology, 2001.Google Scholar
  5. 5.
    P. Buneman, M. Fernandez, and D. Suciu. UnQl: a query language and algebra for semistructured data based on structural recursion. The VLDB Journal, 9(1):76–110, 2000.CrossRefGoogle Scholar
  6. 6.
    James Clark. XSL transformations version 1.0., august 1999.
  7. 7.
    World Wide Web Consortium. XML Schema.
  8. 8.
    S. A. Cook. An observation on time-storage trade-off. Journal of Computer and System Sciences, 9(3):308–316, 1974.zbMATHMathSciNetGoogle Scholar
  9. 9.
    J. Engelfriet and H. Vogler. Macro tree transducers. Journal of Computer and System Sciences, 1985.Google Scholar
  10. 10.
    M. R. Garey and D. S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. Freeman, 1979.Google Scholar
  11. 11.
    F. Gécseg and M. Steinby. Tree languages. In G. Rozenberg and A. Salomaa, editors, Handbook of Formal Languages, volume 3, chapter 1, pages 1–68. Springer, 1997.Google Scholar
  12. 12.
    R. E. Ladner, R. J. Lipton, and L. J. Stockmeyer. Alternating pushdown and stack automata. SIAM Journal on Computing, 13(1):135–155, 1984.zbMATHCrossRefMathSciNetGoogle Scholar
  13. 13.
    S. Maneth and F. Neven. Structured document transformations based on XSL. In R. Connor and A. Mendelzon, editors, Research Issues in Structured and Semistructured Database Programming (DBPL’99), volume 1949 of Lecture Notes in Computer Science, pages 79–96. Springer, 2000.CrossRefGoogle Scholar
  14. 14.
    T. Milo and D. Suciu. Type inference for queries on semistructured data. In Proceedings of the Eighteenth ACM Symposium on Principles of Database Systems, pages 215–226. ACM Press, 1999.Google Scholar
  15. 15.
    T. Milo, D. Suciu, and V. Vianu. Type checking for XML transformers. In Proceedings of the Nineteenth ACM Symposium on Principles of Database Systems, pages 11–22. ACM Press, 2000.Google Scholar
  16. 16.
    F. Neven. Automata theory for XML researchers. SIGMOD Record, 31(3), 2002.Google Scholar
  17. 17.
    F. Neven and T. Schwentick. XML schemas without order. Unpublished manuscript, 1999.Google Scholar
  18. 18.
    F. Neven and T. Schwentick. Query automata on finite trees. Theoretical Computer Science, 275:633–674, 2002.zbMATHCrossRefMathSciNetGoogle Scholar
  19. 19.
    Y. Papakonstantinou and V. Vianu. DTD inference for views of XML data. In Proc. 20th Symposium on Principles of Database Systems (PODS 2001), pages 35–46. ACM Press, 2001.Google Scholar
  20. 20.
    H. Seidl. Deciding equivalence of finite tree automata. SIAM Journal on Computing, 19(3):424–437, 1990.zbMATHCrossRefMathSciNetGoogle Scholar
  21. 21.
    H. Seidl. Haskell overloading is DEXPTIME-complete. Information Processing Letters, 52(2):57–60, 1994.zbMATHCrossRefMathSciNetGoogle Scholar
  22. 22.
    L. J. Stockmeyer and A. R. Meyer. Word problems requiring exponential time: Preliminary report. In Conference Record of Fifth Annual ACM Symposium on Theory of Computing, pages 1–9, Austin, Texas, 30 April–2 May 1973.Google Scholar
  23. 23.
    D. Suciu. Typechecking for semistructured data. In Proceedings of the 8th Workshop on Data Bases and Programming Languages (DBPL 2001), 2001.Google Scholar
  24. 24.
    D. Suciu. The XML typechecking problem. SIGMOD Record, 31(1):89–96, 2002.CrossRefGoogle Scholar
  25. 25.
    A. Tozawa. Towards static type checking for XSLT. In Proceedings of ACM Symposium on Document Engineering, 2001.Google Scholar
  26. 26.
    M. Y. Vardi. A note on the reduction of two-way automata to one-way automata. Information Processing Letters, 30:261–264, March 1989.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Wim Martens
    • 1
  • Frank Neven
    • 1
  1. 1.University of LimburgLimburg

Personalised recommendations