ABSTRACT
XML database query languages have been studied extensively, but XML database updates have received relatively little attention, and pose many challenges to language design. We are developing an XML update language called FLUX, which stands for FunctionaL Updates for XML, drawing upon ideas from functional programming languages. In prior work, we have introduced a core language for FLUX with a clear operational semantics and a sound, decidable static type system based on regular expression types.
Our initial proposal had several limitations. First, it lacked support for recursive types or update procedures. Second, although a high-level source language can easily be translated to the core language, it is difficult to propagate meaningful type errors from the core language back to the source. Third, certain updates are wellformed yet contain path errors, or "dead" subexpressions which never do any useful work. It would be useful to detect path errors, since they often represent errors or optimization opportunities.
In this paper, we address all three limitations. Specifically, we present an improved, sound type system that handles recursion. We also formalize a source update language and give a translation to the core language that preserves and reflects typability. We also develop a path-error analysis (a form of dead-code analysis) for updates.
Supplemental Material
Available for Download
Supplemental material for: FLUX: functional updates for XML
- A. Balmin, Y. Papakonstantinou, and V. Vianu. Incremental validation of XML documents. ACM Transactions on Database Systems, 29 (4): 710--751, 2004. Google Scholar
Digital Library
- D. Barbosa, A. O. Mendelzon, L. Libkin, L. Mignet, and M. Arenas. Efficient incremental validation of XML documents. In ICDE, pages 671--682. IEEE Computer Society, 2004. Google Scholar
Digital Library
- Michael Benedikt, Angela Bonifati, Sergio Flesca, and Avinash Vyas. Verification of tree updates for optimization. In Kousha Etessami and Sriram K. Rajamani, editors, CAV, volume 3576 of Lecture Notes in Computer Science, pages 379--393. Springer, 2005a. Google Scholar
Digital Library
- Michael Benedikt, Angela Bonifati, Sergio Flesca, and Avinash Vyas. Adding updates to XQuery: Semantics, optimization, and static analysis. In Daniela Florescu and Hamid Pirahesh, editors, XIME-P, 2005b.Google Scholar
- Véronique Benzaken, Giuseppe Castagna, and Alain Frisch. CDuce: an XML-centric general-purpose language. In ICFP '03: Proceedings of the eighth ACM SIGPLAN international conference on Functional programming, pages 51--63, New York, NY, USA, 2003. ACM Press. Google Scholar
Digital Library
- Geert Jan Bex, Frank Neven, and Jan Van den Bussche. DTDs versus XML schema: a practical study. In WebDB '04: Proceedings of the 7th International Workshop on the Web and Databases, pages 79--84, New York, NY, USA, 2004. ACM Press. Google Scholar
Digital Library
- Peter Buneman, Shamim A. Naqvi, Val Tannen, and Limsoon Wong. Principles of programming with complex objects and collection types. Theor. Comp. Sci., 149 (1): 3--48, 1995. Google Scholar
Digital Library
- Cristiano Calcagno, ilippa Gardner, and Uri Zarfaty. Context logic and tree update. In Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2005), pages 271--282, New York, NY, USA, 2005. ACM. Google Scholar
Digital Library
- Don Chamberlin and Jonathan Robie. XQuery update facility requirements. W3C Working Draft, June 2005. http://www.w3.org/TR/xquery-update-requirements/.Google Scholar
- Don Chamberlin, Mike Carey, Daniela Florescu, Donald Kossmann, and Jonathan Robie. XQueryP: Programming with XQuery. In XIME-P, 2006.Google Scholar
- Don Chamberlin, Daniela Florescu, Jim Melton, Jonathan Robie, and Jérôme Siméon. XQuery update facility. W3C Candidate Recommendation, March 2008. http://www.w3c.org/TR/xquery-update-10/.Google Scholar
- James Cheney. Lux: A lightweight, statically typed XML update language. In PLAN-X, pages 25--36, 2007.Google Scholar
- James Cheney. Regular expression subtyping for XML query and update languages. In Proceedings of the 17th European Symposium on Programming (ESOP 2008), number 4960 in LNCS, pages 32--46, 2008a. Google Scholar
Digital Library
- James Cheney. Flux: Functional updates for XML. Technical Report 2008. http://www.w3c.org/TR/xquery-update-10/.Google Scholar
- Byron Choi. What are real DTDs like? In WebDB, pages 43--48, 2002.Google Scholar
- J. Clark. XSL transformations (XSLT). W3C Recommendation, November 1999. http://www.w3.org/TR/xslt.Google Scholar
- Dario Colazzo, Giorgio Ghelli, Paolo Manghi, and Carlo Sartiani. Static analysis for path correctness of XML queries. J. Funct. Program., 16 (4-5): 621--661, 2006. Google Scholar
Digital Library
- Denise Draper, Peter Fankhauser, Mary Fernández, Ashok Malhotra, Kristoffer Rose, Michael Rys, Jérôme Siméon, and ilip Wadler. XQuery 1.0 and XPath 2.0 formal semantics. W3C Recommendation, January 2007. http://www.w3.org/TR/xquery-semantics/.Google Scholar
- Mary F. Fernandez, Jérôme Siméon, and ilip Wadler. A semi-monad for semi-structured data. In Proceedings of the 8th International Conference on Database Theory (ICDT 2001), pages 263--300, London, UK, 2001. Springer-Verlag. Google Scholar
Digital Library
- Alain Frisch. OCaml + XDuce. In ICFP '06: Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming, pages 192--200, New York, NY, USA, 2006. ACM Press. Google Scholar
Digital Library
- Vladimir Gapeyev, Franc¸ois Garillot, and Benjamin C. Pierce. Statically typed document transformation: An Xtatic experience. In Giuseppe Castagna and Mukund Raghavachari, editors, PLAN-X, pages 2--13. BRICS, 2006.Google Scholar
- Philippa Gardner, Gareth Smith, Mark Wheelhouse, and Uri Zarfaty. Local hoare reasoning about DOM. In Proceedings of the 2008 Symposium on Principles of Database Systems (PODS 2008), pages 261--270, 2008. Google Scholar
Digital Library
- G. Ghelli, K. Rose, and J. Sim´eon. Commutativity analysis in XML update languages. In Dan Suciu and Thomas Schwentick, editors, Proceedings of the 11th International Conference on Database Theory (ICDT 2007), pages 374--388, January 2007a. Google Scholar
Digital Library
- Giorgio Ghelli, Christopher Re, and Jérôme Siméon. XQuery!: An XML query language with side effects. In EDBT Workshops, volume 4254 of Lecture Notes in Computer Science, pages 178--191. Springer, 2006. Google Scholar
Digital Library
- Giorgio Ghelli, Nicola Onose, Kristoffer Rose, and Jérôme Siméon. A better semantics for XQuery with side-effects. In Marcelo Arenas and Michael I. Schwartzbach, editors, DBPL, volume 4797 of Lecture Notes in Computer Science, pages 81--96. Springer, 2007b. Google Scholar
Digital Library
- Haruo Hosoya and Benjamin C. Pierce. XDuce: A statically typed XML processing language. ACM Trans. Internet Technology, 3(2):117--148, 2003. Google Scholar
Digital Library
- Haruo Hosoya, Jérôme Vouillon, and Benjamin C. Pierce. Regular expression types for XML. ACM Trans. Program. Lang. Syst., 27(1):46--90, 2005. Google Scholar
Digital Library
- John Hughes. Generalising monads to arrows. Sci. Comput. Program., 37 (1-3):67--111, 2000. Google Scholar
Digital Library
- Andreas Laux and Lars Martin. XUpdate - XML update language. http://xmldb-org.sourceforge.net/xupdate/-xupdate-wd.html, September 2000. Work in progress.Google Scholar
- Hartmut Liefke and Susan B. Davidson. Specifying updates in biomedical databases. In SSDBM, pages 44--53, 1999. Google Scholar
Digital Library
- Anders Møller and Michael I. Schwartzbach. The design space of type checkers for XML transformation languages. In Proceedings of the 10th International Conference on Database Theory (ICDT 2005), pages 17--36, 2005. Google Scholar
Digital Library
- Gargi Sur, Joachim Hammer, and Jérôme Siméon. UpdateX - an XQuery-based language for processing updates in XML. In PLAN-X, 2004.Google Scholar
- Igor Tatarinov, Zachary G. Ives, Alon Y. Halevy, and Daniel S. Weld. Updating XML. In SIGMOD Conference, pages 413--424, 2001. Google Scholar
Digital Library
- Guoren Wang, Mengchi Liu, and Li Lu. Extending XML-RL with update. In IDEAS, pages 66--75. IEEE Computer Society, 2003.Google Scholar
Index Terms
FLUX: functional updates for XML
Recommendations
FLUX: functional updates for XML
ICFP '08XML database query languages have been studied extensively, but XML database updates have received relatively little attention, and pose many challenges to language design. We are developing an XML update language called FLUX, which stands for ...
BiFluX: A Bidirectional Functional Update Language for XML
PPDP '14: Proceedings of the 16th International Symposium on Principles and Practice of Declarative ProgrammingDifferent XML formats are widely used for data exchange and processing, being often necessary to mutually convert between them. Standard XML transformation languages, like XSLT or XQuery, are unsatisfactory for this purpose since they require writing a ...
Extending type systems in a library: Type-safe XML processing in C++
Type systems built directly into the compiler or interpreter of a programming language cannot be easily extended to keep track of run-time invariants of new abstractions. Yet, programming with domain-specific abstractions could benefit from additional ...







Comments