Abstract
Stay macro tree transducers (smtts) are an expressive formalism for reasoning about XSLT-like document transformations. Here, we consider the exact type checking problem for smtts. While the problem is decidable, the involved technique of inverse type inference is known to have exponential worst-case complexity (already for top-down transformations without parameters). We present a new adaptive type checking algorithm based on forward type inference through exact characterizations of output languages. The new algorithm correctly type-checks all call-by-value smtts. Given that the output type is specified by a deterministic automaton, the algorithm is polynomial-time whenever the transducer uses only few parameters and visits every input node only constantly often. Our new approach can also be generalized from smtts to stay macro forest transducers which additionally support concatenation as built-in output operation.
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
Boag, S., Chamberlin, D., et al. (eds.): XQuery 1.0: An XML Query Language. World Wide Web Consortium Working Draft (2003), Available at: http://www.w3.org/TR/xquery/
Bojańczyk, M., Walukiewicz, I.: Unranked Tree Algebra. Technical report, University of Warsaw (2005)
Clark, J., Murata, M., et al.: RelaxNG Specification. OASIS, Available online: http://www.oasis-open.org/committees/relax-ng
Engelfriet, J.: Context-Free Graph Grammars. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, pp. 125–213. Springer, Berlin (1997)
Engelfriet, J., Maneth, S.: Macro Tree Transducers, Attribute Grammars, and MSO Definable Tree Translations. Inform. and Comput. 154(1), 34–91 (1999)
Engelfriet, J., Maneth, S.: A Comparison of Pebble Tree Transducers with Macro Tree Transducers. Acta Informatica 39, 613–698 (2003)
Engelfriet, J., Schmidt, E.M.: IO and OI (I&II). J. Comp. Syst. Sci. 15, 328–353 (1977), 16, 67–99 (1978)
Engelfriet, J., Vogler, H.: Macro Tree Transducers. J. Comp. Syst. Sci. 31, 71–146 (1985)
Fischer, M.J.: Grammars with Macro-like Productions. PhD thesis, Harvard University, Massachusetts (1968)
Frisch, A.: Regular Tree Language Recognition with Static Information. In: PLAN-X (2004)
Hosoya, H., Frisch, A., Castagna, G.: Parametric Polymorphism for XML. In: POPL, pp. 50–62. ACM Press, New York (2005)
Hosoya, H., Pierce, B.C.: Regular expression pattern matching for XML. Journal of Functional Programming 13(6), 961–1004 (2002)
Hosoya, H., Pierce, B.C.: XDuce: A Statically Typed XML Processing Language. ACM Trans. Inter. Tech. 3(2), 117–148 (2003)
Kirkegaard, C., Møller, A., Schwartzbach, M.I.: Static Analysis of XML Transformations in Java. IEEE Trans. Soft. Eng. 30, 181–192 (2004)
Maneth, S., Berlea, A., Perst, T., Seidl, H.: XML Type Checking with Macro Tree Transducers. In: PODS, pp. 283–294. ACM Press, New York (2005)
Martens, W., Neven, F.: Frontiers of Tractability for Typechecking Simple XML Transformations. In: PODS, pp. 23–34. ACM Press, New York (2004)
Martens, W., Neven, F.: On the complexity of typechecking top-down xml transformations. Theor. Comput. Sci. 336, 153–180 (2005)
Milo, T., Suciu, D., Vianu, V.: Typechecking for XML Transformers. J. Comp. Syst. Sci. 66, 66–97 (2003)
Møller, A., Olesen, M., Schwartzbach, M.: Static Validation of XSL Transformations. Technical Report RS-05-32, BRICS (October 2005)
Møller, A., Schwartzbach, M.I.: The Design Space of Type Checkers for XML Transformation Languages. In: ICDT, pp. 17–36. Springer, Heidelberg (2005)
Murata, M., Lee, D., Mani, M.: Taxonomy of XML Schema Languages using Formal Language Theory. In: Extreme Markup Languages (2000)
Neven, F.: Automata Theory for XML Researchers. SIGMOD Record 31(3), 39–46 (2002)
Perst, T., Seidl, H.: Macro Forest Transducers. Inf. Proc. Letters 89, 141–149 (2004)
Rounds, W.C.: Mappings and Grammars on Trees. Math. Systems Theory 4, 257–287 (1970)
Schmidt, A., Waas, F., Kersten, M.L., Carey, M.J., Manolescu, I., Busse, R.: Xmark: A benchmark for XML data management. In: VLDB, pp. 974–985. Morgan Kaufmann, San Francisco (2002)
Seidl, H.: Haskell Overloading is DEXPTIME Complete. Inf. Proc. Letters 52, 57–60 (1994)
Seidl, H.: Least Solutions of Equations over \(\cal N\). In: ICALP, pp. 400–411. Springer, Heidelberg (1994)
W3C. Extensible Markup Language (XML) 1.0, 2nd edn. (October 6, 2000), Available online: http://www.w3.org/TR/2000/REC-xml-20001006
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Maneth, S., Perst, T., Seidl, H. (2006). Exact XML Type Checking in Polynomial Time. In: Schwentick, T., Suciu, D. (eds) Database Theory – ICDT 2007. ICDT 2007. Lecture Notes in Computer Science, vol 4353. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11965893_18
Download citation
DOI: https://doi.org/10.1007/11965893_18
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-69269-0
Online ISBN: 978-3-540-69270-6
eBook Packages: Computer ScienceComputer Science (R0)