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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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)
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)
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)
Engelfriet, J., Filé, G.: The formal power of one-visit attribute grammars. Acta Informatica 16, 275–302 (1981)
Engelfriet, J., Maneth, S.: A comparison of pebble tree transducers with macro tree transducers. Acta Informatica 39(9), 613–698 (2003)
Engelfriet, J., Vogler, H.: Macro tree transducers. J. Comput. Syst. Sci. 31(1), 146–710 (1985)
Frisch, A.: Théorie, conception et réalisation d’un langage de programmation adapté à XML. PhD thesis, Universit Paris 7 (2004)
Frisch, A., Hosoya, H.: Towards practial typechecking for macro tree transducers. Technical report, INRIA (2007)
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)
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)
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)
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/
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)
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)
Martens, W., Neven, F.: Typechecking top-down uniform unranked tree transducers. In: Proceedings of International Conference on Database Theory, pp. 64–78 (2003)
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)
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)
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)
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)
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)
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)
Perst, T., Seidl, H.: Macro forest transducers. Information Processing Letters 89(3), 141–149 (2004)
Slutzki, G.: Alternating tree automata. Theoretical Computer Science 41, 305–318 (1985)
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)
Tozawa, A.: Towards static type checking for XSLT. In: Proceedings of ACM Symposium on Document Engineering, ACM Press, New York (2001)
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)
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)
Tozawa, A., Hagiya, M.: Efficient decision procedure for a logic for XML, 2004 (unpublished manuscipt)
Author information
Authors and Affiliations
Editor information
Rights 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)