skip to main content
10.1145/1159803.1159829acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

OCaml + XDuce

Published:16 September 2006Publication History

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.

References

  1. {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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. {Dam85} Luis Manuel Martins Damas. Type assignment in programming languages. PhD thesis, University of Edinburgh, Scotland, April 1985.Google ScholarGoogle Scholar
  3. {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 ScholarGoogle Scholar
  4. {GP03} Vladimir Gapeyev and Benjamin C. Pierce. Regular object types. In European Conference on Object-Oriented Programming (ECOOP), Darms tadt, Germany, 2003.Google ScholarGoogle ScholarCross RefCross Ref
  5. {HFC05} Haruo Hosoya, Alain Frisch, and Giuseppe Castagna. Parametric polymorphism for XML. In POPL, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. {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 ScholarGoogle ScholarCross RefCross Ref
  7. {Hos00} Haruo Hosoya. Regular Expression Types for XML. PhD thesis, The University of Tokyo, Japan, December 2000.Google ScholarGoogle Scholar
  8. {Hos04} Haruo Hosoya. Regular expression filters for XML. In Programming Languages Technologies for XML (PLAN-X), 2004.Google ScholarGoogle Scholar
  9. {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 ScholarGoogle Scholar
  10. {HP02} Haruo Hosoya and Benjamin C. Pierce. Regular expression pattern matching for XML. Journal of Functional Programming, 13(4), 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. {HP03} Haruo Hosoya and Benjamin C. Pierce. A typed XML processing language. ACM Transactions on Internet Technology, 3 2):117--148, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. {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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. {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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. {L + 01} Xavier Leroy et al. The Objective Caml system release 3. 08; Documentation and user's manual, 2001.Google ScholarGoogle Scholar
  15. {Mil78} Robin Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 1978.Google ScholarGoogle ScholarCross RefCross Ref
  16. {OSW99} Martin Odersky, Martin Sulzmann, and Martin Wehr. Type inference with constrained types. TAPOS, 5(1), 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. {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 ScholarGoogle Scholar
  18. {Vou06} Jérôme Vouillon. Polymorphic regular tree types and patterns. In POPL, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. OCaml + XDuce

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      ICFP '06: Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming
      September 2006
      308 pages
      ISBN:1595933093
      DOI:10.1145/1159803
      • General Chair:
      • John Reppy,
      • Program Chair:
      • Julia Lawall
      • cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 41, Issue 9
        Proceedings of the 2006 ICFP conference
        September 2006
        296 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/1160074
        Issue’s Table of Contents

      Copyright © 2006 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 16 September 2006

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      Overall Acceptance Rate333of1,064submissions,31%

      Upcoming Conference

      ICFP '24

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader