Skip to main content

Towards Practical Typechecking for Macro Tree Transducers

  • Conference paper
Database Programming Languages (DBPL 2007)

Part of the book series: Lecture Notes in Computer Science ((LNISA,volume 4797))

Included in the following conference series:

Abstract

Macro tree transducers (mtt) are an important model that both covers many useful XML transformations and allows decidable exact typechecking. This paper reports our first step toward an implementation of mtt typechecker that has a practical efficiency. Our approach is to represent an input type obtained from a backward inference as an alternating tree automaton, in a style similar to Tozawa’s XSLT0 typechecking. In this approach, typechecking reduces to checking emptiness of an alternating tree automaton. We propose several optimizations (Cartesian factorization, state partitioning) on the backward inference process in order to produce much smaller alternating tree automata than the naive algorithm, and we present our efficient algorithm for checking emptiness of alternating tree automata, where we exploit the explicit representation of alternation for local optimizations. Our preliminary experiments confirm that our algorithm has a practical performance that can typecheck simple transformations with respect to the full XHTML in a reasonable time.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Alon, N., Milo, T., Neven, F., Suciu, D., Vianu, V.: XML with data values: Typechecking revisited. In: Proceedings of Symposium on Principles of Database Systems (PODS) (2001)

    Google Scholar 

  2. Appel, A.W., MacQueen, D.B.: Standard ML of New Jersey. In: Third Int’l. Symp. on Prog. Lang. Implementation and Logic Programming, pp. 1–13. Springer, Heidelberg (1991)

    Google Scholar 

  3. Benzaken, V., Castagna, G., Frisch, A.: CDuce: An XML-centric general-purpose language. In: Proceedings of the International Conference on Functional Programming (ICFP), pp. 51–63 (2003)

    Google Scholar 

  4. Engelfriet, J., Filé, G.: The formal power of one-visit attribute grammars. Acta Informatica 16, 275–302 (1981)

    Article  MATH  MathSciNet  Google Scholar 

  5. Engelfriet, J., Maneth, S.: A comparison of pebble tree transducers with macro tree transducers. Acta Informatica 39(9), 613–698 (2003)

    Article  MATH  MathSciNet  Google Scholar 

  6. Engelfriet, J., Vogler, H.: Macro tree transducers. J. Comput. Syst. Sci. 31(1), 146–710 (1985)

    MathSciNet  Google Scholar 

  7. Frisch, A.: Théorie, conception et réalisation d’un langage de programmation adapté à XML. PhD thesis, Universit Paris 7 (2004)

    Google Scholar 

  8. Frisch, A., Hosoya, H.: Towards practial typechecking for macro tree transducers. Technical report, INRIA (2007)

    Google Scholar 

  9. Hosoya, H.: Regular expression filters for XML. Journal of Functional Programming 16(6), 711–750 (2006), Short version appeared in Proceedings of Programming Technologies for XML (PLAN-X), pp. 13–27 (2004)

    Google Scholar 

  10. Hosoya, H., Pierce, B.C.: XDuce: A typed XML processing language. ACM Transactions on Internet Technology 3(2), 117–148 (2003). In: Suciu, D., Vossen, G. (eds.) WebDB 2000. LNCS, vol. 1997, pp. 226–244. Springer, Heidelberg (2001)

    Google Scholar 

  11. Hosoya, H., Vouillon, J., Pierce, B.C.: Regular expression types for XML. ACM Transactions on Programming Languages and Systems, 27(1), 46–90 (2004). Short version appeared in Proceedings of the International Conference on Functional Programming (ICFP), pp. 11–22 (2000)

    Google Scholar 

  12. Leroy, X., Doligez, D., Garrigue, J., Vouillon, J., Rémy, D.: The Objective Caml system. Software and documentation available on the Web (1996), http://pauillac.inria.fr/ocaml/

  13. Maneth, S., Perst, T., Berlea, A., Seidl, H.: XML type checking with macro tree transducers. In: Proceedings of Symposium on Principles of Database Systems (PODS), pp. 283–294 (2005)

    Google Scholar 

  14. Maneth, S., Perst, T., Seidl, H.: Exact XML type checking in polynomial time. In: Schwentick, T., Suciu, D. (eds.) ICDT 2007. LNCS, vol. 4353, pp. 254–268. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  15. Martens, W., Neven, F.: Typechecking top-down uniform unranked tree transducers. In: Proceedings of International Conference on Database Theory, pp. 64–78 (2003)

    Google Scholar 

  16. Martens, W., Neven, F.: Frontiers of tractability for typechecking simple XML transformations. In: Proceedings of Symposium on Principles of Database Systems (PODS), pp. 23–34 (2004)

    Google Scholar 

  17. Milo, T., Suciu, D.: Type inference for queries on semistructured data. In: Proceedings of Symposium on Principles of Database Systems, Philadelphia, pp. 215–226 (May 1999)

    Google Scholar 

  18. Milo, T., Suciu, D., Vianu, V.: Typechecking for XML transformers. In: Proceedings of the Nineteenth ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, pp. 11–22. ACM, New York (2000)

    Google Scholar 

  19. Møller, A., Olesen, M.Ø., Schwartzbach, M.I.: Static validation of XSL Transformations. Technical Report RS-05-32, BRICS, Draft, accepted for TOPLAS (October 2005)

    Google Scholar 

  20. Murata, M.: Transformation of documents and schemas by patterns and contextual conditions. In: Nicholas, C., Wood, D. (eds.) PODDP 1996 and PODP 1996. LNCS, vol. 1293, pp. 153–169. Springer, Heidelberg (1997)

    Google Scholar 

  21. Nakano, K., Mu, S.-C.: A pushdown machine for recursive XML processing. In: Kobayashi, N. (ed.) APLAS 2006. LNCS, vol. 4279, pp. 340–356. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  22. Perst, T., Seidl, H.: Macro forest transducers. Information Processing Letters 89(3), 141–149 (2004)

    Article  MathSciNet  Google Scholar 

  23. Slutzki, G.: Alternating tree automata. Theoretical Computer Science 41, 305–318 (1985)

    Article  MATH  MathSciNet  Google Scholar 

  24. Suda, T., Hosoya, H.: Non-backtracking top-down algorithm for checking tree automata containment. In: Farré, J., Litovsky, I., Schmitz, S. (eds.) CIAA 2005. LNCS, vol. 3845, pp. 83–92. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  25. Tozawa, A.: Towards static type checking for XSLT. In: Proceedings of ACM Symposium on Document Engineering, ACM Press, New York (2001)

    Google Scholar 

  26. Tozawa, A.: XML type checking using high-level tree transducer. In: Hagiya, M., Wadler, P. (eds.) FLOPS 2006. LNCS, vol. 3945, pp. 81–96. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  27. Tozawa, A., Hagiya, M.: XML schema containment checking based on semi-implicit techniques. In: Ibarra, O.H., Dang, Z. (eds.) CIAA 2003. LNCS, vol. 2759, pp. 213–225. Springer, Heidelberg (2003)

    Google Scholar 

  28. Tozawa, A., Hagiya, M.: Efficient decision procedure for a logic for XML, 2004 (unpublished manuscipt)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Marcelo Arenas Michael I. Schwartzbach

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Frisch, A., Hosoya, H. (2007). Towards Practical Typechecking for Macro Tree Transducers. In: Arenas, M., Schwartzbach, M.I. (eds) Database Programming Languages. DBPL 2007. Lecture Notes in Computer Science, vol 4797. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-75987-4_17

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-75987-4_17

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-75986-7

  • Online ISBN: 978-3-540-75987-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics