Parametric polymorphism for XML

Despite the extensiveness of recent investigations on static typing for XML, parametric polymorphism has rarely been treated. This well-established typing discipline can also be useful in XML processing in particular for programs involving "parametric schemas," i.e., schemas parameterized over other schemas (e.g., SOAP). The difficulty in treating polymorphism for XML lies in how to extend the "semantic" approach used in the mainstream (monomorphic) XML type systems. A naive extension would be "semantic" quantification over all substitutions for type variables. However, this approach reduces to an NEXPTIME-complete problem for which no practical algorithm is known. In this paper, we propose a different method that smoothly extends the semantic approach yet is algorithmically easier. In this, we devise a novel and simple marking technique, where we interpret a polymorphic type as a set of values with annotations of which subparts are parameterized. We exploit this interpretation in every ingredient of our polymorphic type system such as subtyping, inference of type arguments, and so on. As a result, we achieve a sensible system that directly represents a usual expected behavior of polymorphic type systems---"values of variable types are never reconstructed"---in a reminiscence of Reynold's parametricity theory. Also, we obtain a set of practical algorithms for typechecking by local modifications to existing ones for a monomorphic system.

[1]  Helmut Seidl,et al.  Exact XML Type Checking in Polynomial Time , 2007, ICDT.

[2]  Noga Alon,et al.  XML with data values: typechecking revisited , 2001, PODS '01.

[3]  C PierceBenjamin,et al.  Regular expression pattern matching for XML , 2003 .

[4]  Benjamin C. Pierce,et al.  Regular expression types for XML , 2000, TOPL.

[5]  David A. Duce,et al.  Scalable Vector Graphics SVG 1.0 Specification , 2000 .

[6]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[7]  Vivek Sarkar,et al.  XJ: facilitating XML processing in Java , 2005, WWW '05.

[8]  C. M. Sperberg-McQueen,et al.  Extensible Markup Language (XML) , 1997, World Wide Web J..

[9]  Eric van der Vlist,et al.  Relax NG , 2003 .

[10]  Haruo Hosoya,et al.  Non-backtracking Top-Down Algorithm for Checking Tree Automata Containment , 2005, CIAA.

[11]  Alain Frisch,et al.  OCaml + XDuce , 2006, ICFP '06.

[12]  Alain Frisch,et al.  Théorie, conception et réalisation d'un langage de programmation adapté à XML , 2004 .

[13]  Jérôme Vouillon Polymorphism and XDuce-style patterns , 2006, PLAN-X.

[14]  Benjamin C. Pierce,et al.  XDuce: A statically typed XML processing language , 2003, TOIT.

[15]  Luca Cardelli,et al.  An Extension of System F with Subtyping , 1991, TACS.

[16]  Stijn Vansummeren,et al.  Unique Pattern Matching in Strings , 2003, ArXiv.

[17]  Andrew W. Appel,et al.  Standard ML of New Jersey , 1991, PLILP.

[18]  C. M. Sperberg-McQueen,et al.  Extensible markup language , 1997 .

[19]  Giuseppe Castagna,et al.  Corrigendum: decidable bounded quantification , 1995, POPL '95.

[20]  Benjamin C. Pierce,et al.  Regular expression pattern matching for XML , 2003, POPL '01.

[21]  Martin Odersky,et al.  Making the future safe for the past: adding genericity to the Java programming language , 1998, OOPSLA '98.

[22]  Antoine Quint,et al.  Scalable Vector Graphics , 2020, Definitions.

[23]  Makoto Murata,et al.  Boolean Operations for Attribute-Element Constraints , 2003, CIAA.

[24]  Haruo Hosaya,et al.  Regular expression filters for XML , 2006, Journal of Functional Programming.

[25]  Christian Kirkegaard,et al.  XACT - XML Transformations in Java , 2006, PLAN-X.

[26]  K. Stefansson,et al.  Systems of set constraints with negative constraints are NEXPTIME-complete , 1994, Proceedings Ninth Annual IEEE Symposium on Logic in Computer Science.

[27]  Giuseppe Castagna,et al.  Semantic subtyping , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[28]  Philip Wadler,et al.  The Glasgow Haskell Compiler: a technical overview , 1993 .

[29]  John C. Reynolds,et al.  Types, Abstraction and Parametric Polymorphism , 1983, IFIP Congress.

[30]  Makoto Murata,et al.  Extended path expressions of XML , 2001, PODS.

[31]  Robin Milner,et al.  Definition of standard ML , 1990 .

[32]  Giuseppe Castagna,et al.  CDuce: an XML-centric general-purpose language , 2003, ACM SIGPLAN Notices.

[33]  S. McCarron,et al.  XHTML™ 1.1 - Module-based XHTML , 2001 .

[34]  Makoto Murata,et al.  Boolean operations and inclusion test for attribute-element constraints , 2006, Theor. Comput. Sci..

[35]  Hubert Comon,et al.  Tree automata techniques and applications , 1997 .

[36]  Sophie Tison,et al.  Set Constraints and Automata , 1999, Inf. Comput..

[37]  Stephen M. Watt,et al.  Mathematical Markup Language (MathML) Version 3.0 , 2001, WWW 2001.

[38]  Alexander Aiken,et al.  Decidability of Systems of Set Constraints with Negative Constraints , 1994, Inf. Comput..

[39]  Benjamin C. Pierce,et al.  Xduce: a typed xml processing language , 1997 .

[40]  Martin Sulzmann,et al.  A Type-Safe Embedding of XDuce into ML , 2006, ML.

[41]  Colin Runciman,et al.  Haskell and XML: generic combinators or type-based translation? , 1999, ICFP '99.

[42]  Masami Hagiya,et al.  XML Schema Containment Checking Based on Semi-implicit Techniques , 2003, CIAA.

[43]  WadlerPhilip,et al.  Making the future safe for the past , 1998 .

[44]  John C. Mitchell,et al.  F-bounded polymorphism for object-oriented programming , 1989, FPCA.

[45]  Dan Suciu,et al.  Typechecking for XML transformers , 2000, J. Comput. Syst. Sci..

[46]  Helmut Seidl,et al.  XML type checking with macro tree transducers , 2005, PODS.

[47]  Stijn Vansummeren,et al.  Type inference for unique pattern matching , 2006, TOPL.

[48]  Erik Meijer,et al.  Type-indexed rows , 2001, POPL '01.

[49]  Jérôme Vouillon Polymorphic regular tree types and patterns , 2006, POPL '06.

[50]  Haruo Hosoya,et al.  Regular expression pattern matching---a simpler design , 2003 .

[51]  Bjarne Stroustrup,et al.  The Annotated C++ Reference Manual , 1990 .