Abstract
This paper presents the core type system and type inference algorithm of OCamlDuce, a merger between OCaml and XDuce. The challenge was to combine two type checkers of very different natures while preserving the best properties of both (principality and automatic type reconstruction on one side; very precise types and implicit subtyping on the other side). Type inference can be described by two successive passes: the first one is an ML-like unification-based algorithm which also extracts data flow constraints about XML values; the second one is an XDuce-like algorithm which computes XML types in a direct way. An optional preprocessing pass, called strengthening, can be added to allow more implicit use of XML subtyping. This pass is also very similar to an ML type checker.
- {BCF03} V. Benzaken, G. Castagna, and A. Frisch. CDuce: an XML-friendly general purpose language. In ICFP '03, 8th ACM International Conference on Functional Programming, pages 51--63, Uppsala, Sweden, 2003. ACM Press. Google Scholar
Digital Library
- {Dam85} Luis Manuel Martins Damas. Type assignment in programming languages. PhD thesis, University of Edinburgh, Scotland, April 1985.Google Scholar
- {Fri04} Alain Frisch. Théorie, conception et réalisation dún langage de programmatio n fonctionnel adapté à XML. PhD thesis, Université Paris 7, December 2004.Google Scholar
- {GP03} Vladimir Gapeyev and Benjamin C. Pierce. Regular object types. In European Conference on Object-Oriented Programming (ECOOP), Darms tadt, Germany, 2003.Google Scholar
Cross Ref
- {HFC05} Haruo Hosoya, Alain Frisch, and Giuseppe Castagna. Parametric polymorphism for XML. In POPL, 2005. Google Scholar
Digital Library
- {HM03} Haruo Hosoya and Makoto Murata. Boolean operations and inclusion test for attribute-element constraints. In Eighth International Conference on Implementation and Application of Automata, 2003.Google Scholar
Cross Ref
- {Hos00} Haruo Hosoya. Regular Expression Types for XML. PhD thesis, The University of Tokyo, Japan, December 2000.Google Scholar
- {Hos04} Haruo Hosoya. Regular expression filters for XML. In Programming Languages Technologies for XML (PLAN-X), 2004.Google Scholar
- {HP00} Haruo Hosoya and Benjamin C. Pierce. XDuce: A typed XML processing language. In Proceedings of Third International Workshop on the Web and Data bases (WebDB2000), 2000.Google Scholar
- {HP02} Haruo Hosoya and Benjamin C. Pierce. Regular expression pattern matching for XML. Journal of Functional Programming, 13(4), 2002. Google Scholar
Digital Library
- {HP03} Haruo Hosoya and Benjamin C. Pierce. A typed XML processing language. ACM Transactions on Internet Technology, 3 2):117--148, 2003. Google Scholar
Digital Library
- {HVP00} Haruo Hosoya, Jérôme Vouillon, and Benjamin C. Pierce. Regular expression types for XML. In ICFP '00, volume 35(9) of SIGPLAN Notices, 2000. Google Scholar
Digital Library
- {KMS04} Christian Kirkegaard, Anders Møller, and Michael I. Schwartzbach. Static analysis of XML transformations in Java. IEEE Transactions on Software Engineering, 30(3):181--192, March 2004. Google Scholar
Digital Library
- {L + 01} Xavier Leroy et al. The Objective Caml system release 3. 08; Documentation and user's manual, 2001.Google Scholar
- {Mil78} Robin Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 1978.Google Scholar
Cross Ref
- {OSW99} Martin Odersky, Martin Sulzmann, and Martin Wehr. Type inference with constrained types. TAPOS, 5(1), 1999. Google Scholar
Digital Library
- {SL05} Martin Sulzmann and Kenny Zhuo Ming Lu. A type-safe embedding of XDuce into ML. In The 2005 ACM SIGPLAN Workshop on ML, 2005.Google Scholar
- {Vou06} Jérôme Vouillon. Polymorphic regular tree types and patterns. In POPL, 2006. Google Scholar
Digital Library
Index Terms
OCaml + XDuce
Recommendations
OCaml + XDuce
ICFP '06: Proceedings of the eleventh ACM SIGPLAN international conference on Functional programmingThis paper presents the core type system and type inference algorithm of OCamlDuce, a merger between OCaml and XDuce. The challenge was to combine two type checkers of very different natures while preserving the best properties of both (principality and ...
XDuce: A statically typed XML processing language
XDuce is a statically typed programming language for XML processing. Its basic data values are XML documents, and its types (so-called regular expression types) directly correspond to document schemas. XDuce also provides a flexible form of regular ...
MLF for everyone (users, implementers, and designers)
ML '07: Proceedings of the 2007 workshop on Workshop on MLMLF is an alternative to ML that permits second-order polymorphism as in System F but retains (partial) type inference a la ML. Type annotations are requested only on parameters of functions that are used polymorphically. Type abstractions and type ...







Comments