Advertisement

Regular Expression Subtyping for XML Query and Update Languages

  • James Cheney
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4960)

Abstract

XML database query languages such as XQuery employ regular expression types with structural subtyping. Subtyping systems typically have two presentations, which should be equivalent: a declarative version in which the subsumption rule may be used anywhere, and an algorithmic version in which the use of subsumption is limited in order to make typechecking syntax-directed and decidable. However, the XQuery standard type system circumvents this issue by using imprecise typing rules for iteration constructs and defining only algorithmic typechecking, and another extant proposal provides more precise types for iteration constructs but ignores subtyping. In this paper, we consider a core XQuery-like language with a subsumption rule and prove the completeness of algorithmic typechecking; this is straightforward for XQuery proper but requires some care in the presence of more precise iteration typing disciplines. We extend this result to an XML update language we have introduced in earlier work.

Keywords

Regular Expression Operational Semantic Atomic Type Typing Rule Algorithmic Derivation 
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

  1. 1.
    Benzaken, V., Castagna, G., Frisch, A.: CDuce: An XML-centric general-purpose language. In: ICFP 2003: Proceedings of the eighth ACM SIGPLAN international conference on Functional programming, pp. 51–63. ACM Press, New York, NY, USA (2003)CrossRefGoogle Scholar
  2. 2.
    Chamberlin, D., Florescu, D., Robie, J.: XQuery update facility. W3C Working Draft (July 2006), http://www.w3c.org/TR/xqupdate/
  3. 3.
    Cheney, J.: Lux: A lightweight, statically typed XML update language. In: ACM SIGPLAN Workshop on Programming Language Technology and XML (PLAN-X 2007), pp. 25–36 (2007)Google Scholar
  4. 4.
    Cheney, J.: Regular expression subtyping for XML query and update languages. Technical report, arXiv.org (2008), arXiv:0801.0714v1Google Scholar
  5. 5.
    Colazzo, D., Ghelli, G., Manghi, P., Sartiani, C.: Static analysis for path correctness of XML queries. J. Funct. Program. 16(4-5), 621–661 (2006)zbMATHCrossRefMathSciNetGoogle Scholar
  6. 6.
    Draper, D., Fankhauser, P., Fernández, M., Malhotra, A., Rose, K., Rys, M., Siméon, J., Wadler, P.: XQuery 1.0 and XPath 2.0 formal semantics. W3C Recommendation (January 2007)http://www.w3.org/TR/xquery-semantics/
  7. 7.
    Fernández, M.F., Siméon, J., Choi, B., Marian, A., Sur, G.: Implementing XQuery 1.0: The Galax experience. In: VLDB 2003, pp. 1077–1080 (2003)Google Scholar
  8. 8.
    Fernandez, M.F., Siméon, J., Wadler, P.: A semi-monad for semi-structured data. In: Van den Bussche, J., Vianu, V. (eds.) ICDT 2001. LNCS, vol. 1973, pp. 263–300. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  9. 9.
    Frisch, A.: OCaml + XDuce. In: ICFP 2006: Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming, pp. 192–200. ACM Press, New York, NY, USA (2006)CrossRefGoogle Scholar
  10. 10.
    Gapeyev, V., Garillot, F., Pierce, B.C.: Statically typed document transformation: An Xtatic experience. In: Castagna, G., Raghavachari, M. (eds.) PLAN-X, BRICS, pp. 2–13 (2006)Google Scholar
  11. 11.
    Ghelli, G., Rose, K., Siméon, J.: Commutativity analysis in XML update languages. In: Schwentick, T., Suciu, D. (eds.) ICDT 2007. LNCS, vol. 4353, pp. 374–388. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  12. 12.
    Ghelli, G., Re, C., Siméon, J.: XQuery!: An XML query language with side effects. In: Grust, T., Höpfner, H., Illarramendi, A., Jablonski, S., Mesiti, M., Müller, S., Patranjan, P.-L., Sattler, K.-U., Spiliopoulou, M., Wijsen, J. (eds.) EDBT 2006. LNCS, vol. 4254, pp. 178–191. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  13. 13.
    Hosoya, H., Pierce, B.C.: XDuce: A statically typed XML processing language. ACM Trans. Internet Technology 3(2), 117–148 (2003)CrossRefGoogle Scholar
  14. 14.
    Hosoya, H., Vouillon, J., Pierce, B.C.: Regular expression types for XML. ACM Trans. Program. Lang. Syst. 27(1), 46–90 (2005)CrossRefGoogle Scholar
  15. 15.
    Liefke, H., Davidson, S.B.: Specifying updates in biomedical databases. In: SSDBM 1999, pp. 44–53 (1999)Google Scholar
  16. 16.
    Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • James Cheney
    • 1
  1. 1.University of Edinburgh 

Personalised recommendations