Abstract
XML processing languages can be classified according to whether they extract XML data by paths or patterns. The strengths of one category correspond to the weaknesses of the other. In this work, we propose to bridge the gap between these two classes by considering two languages, one in each class: XQuery (for path-based extraction) and \(\mathbb{C}\textrm{Duce}\) (for pattern-based extraction). To this end, we extend \(\mathbb{C}\textrm{Duce}\) so as it can be seen as a succinct core λ-calculus that captures XQuery 3.0. The extensions we consider essentially allow \(\mathbb{C}\textrm{Duce}\) to implement XPath-like navigational expressions by pattern matching and precisely type them. The elaboration of XQuery 3.0 into the extended \(\mathbb{C}\textrm{Duce}\) provides a formal semantics and a sound static type system for XQuery 3.0 programs.
Keywords
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.
References
Alon, N., Milo, T., Neven, F., Suciu, D., Vianu, V.: XML with data values: Typechecking revisited. In: PODS, pp. 138–149. ACM (2001)
Amadio, R.M., Cardelli, L.: Subtyping recursive types. ACM Trans. Program. Lang. Syst. 15(4), 575–631 (1993)
Benedikt, M., Vu, H.: Higher-order functions and structured datatypes. In: WebDB, pp. 43–48 (2012)
Benzaken, V., Castagna, G., Frisch, A.: CDuce: An XML-centric general-purpose language. In: ICFP, pp. 51–63 (2003)
Castagna, G., Nguy\(\widetilde{\widehat{\rm e}}\), K., Xu, Z., Abate, P.: Polymorphic functions with set-theoretic types. Part 2: Local type inference and type reconstruction. In: POPL, pp. 289–302 (2015)
Castagna, G., Nguy\(\widetilde{\widehat{\rm e}}\), K., Xu, Z., Im, H., Lenglet, S., Padovani, L.: Polymorphic functions with set-theoretic types. Part 1: Syntax, semantics, and evaluation. In: POPL, pp. 5–17 (2014)
Castagna, G., Xu, Z.: Set-theoretic foundation of parametric polymorphism and subtyping. In: ICFP, pp. 94–106 (2011)
Engelfriet, J., Vogler, H.: Macro tree transducers. J. Comput. Syst. Sci. 31(1), 71–146 (1985)
Frisch, A.: Théorie, conception et réalisation d’un langage adapté à XML. PhD thesis, Université Paris 7 Denis Diderot (2004)
Frisch, A., Castagna, G., Benzaken, V.: Semantic subtyping: Dealing set-theoretically with function, union, intersection, and negation types. J. ACM 55(4), 1–64 (2008)
Gapeyev, V., Garillot, F., Pierce, B.C.: Statically typed document transformation: An Xtatic experience. In: PLAN-X (2006)
Gapeyev, V., Pierce, B.C.: Paths into patterns. Technical Report MS-CIS-04-25, University of Pennsylvania (October 2004)
Genevès, P., Gesbert, N., Layaïda, N.: Xquery and static typing: Tackling the problem of backward axes (July 2014), http://hal.inria.fr/hal-00872426
Genevès, P., Layaïda, N.: Eliminating dead-code from XQuery programs. In: ICSE (2010)
Genevès, P., Layaïda, N., Schmitt, A.: Efficient static analysis of XML paths and types. In: PLDI (2007)
Hosoya, H., Pierce, B.C.: Regular expression pattern matching for XML. J. Funct. Program. 13(6), 961–1004 (2003)
Hosoya, H., Pierce, B.C.: XDuce: A statically typed XML processing language. ACM Trans. Internet Technol. 3(2), 117–148 (2003)
Huet, G.: The Zipper. J. Funct. Program. 7(5), 549–554 (1997)
Lämmel, R.: Scrap your boilerplate with XPath-like combinators. In: POPL (2007)
Maneth, S., Berlea, A., Perst, T., Seidl, H.: XML type checking with macro tree transducers. In: PODS (2005)
W3C: XPath 1.0 (1999), http://www.w3.org/TR/xpath ,
W3C: XPath 2.0 (2010), http://www.w3.org/TR/xpath20 ,
W3C: XML Query (2010), http://www.w3.org/TR/xquery ,
XQuery 1.0 and XPath 2.0 Formal Semantics, 2nd edn (2010), http://www.w3.org/TR/xquery-semantics/
W3C: XQuery 3.0 (2014), http://www.w3.org/TR/xquery-3.0
W3C: XML Schema (2009), http://www.w3.org/XML/Schema
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Castagna, G., Im, H., Nguyễn, K., Benzaken, V. (2015). A Core Calculus for XQuery 3.0. In: Vitek, J. (eds) Programming Languages and Systems. ESOP 2015. Lecture Notes in Computer Science(), vol 9032. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-46669-8_10
Download citation
DOI: https://doi.org/10.1007/978-3-662-46669-8_10
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-662-46668-1
Online ISBN: 978-3-662-46669-8
eBook Packages: Computer ScienceComputer Science (R0)