skip to main content
10.1145/2103786.2103798acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Row-based effect types for database integration

Authors Info & Claims
Published:28 January 2012Publication History

ABSTRACT

We present CoreLinks, a call-by-value variant of System F with row polymorphism, row-based effect types, and implicit subkinding, which forms the basis for the Links web programming language. We focus on extensions to CoreLinks for database programming. The effect types support abstraction over database queries, while ensuring that queries are translated predictably to idiomatic and efficient SQL at run-time. Subkinding statically enforces the constraint that queries must return a list of records of base type. Polymorphism over the presence of record labels supports abstraction over database queries, inserts, deletes and updates.

References

  1. J. Armstrong, R. Virding, C. Wikström, and M. Williams. Concurrent Programming in Erlang, Second Edition. Prentice Hall International, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. P. N. Benton, G. M. Bierman, and V. de Paiva. Computational types from a logical perspective. J. Funct. Program., 8(2):177--193, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. M. Blume, U. A. Acar, and W. Chae. Extensible programming with first-class cases. In ICFP, pages 239--250, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Blume, U. A. Acar, and W. Chae. Exception handlers as extensible cases. In APLAS, pages 273--289, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. P. Buneman, L. Libkin, D. Suciu, V. Tannen, and L. Wong. Comprehension syntax. SIGMOD Record, 23(1):87--96, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. L. Cardelli and J. C. Mitchell. Operations on records. In Gunter and Mitchell \citeGunterM93, pages 295--350.Google ScholarGoogle Scholar
  7. J. Cheney, S. Lindley, and H. Müller. DBWiki: A database wiki prototyped in Links. In DBPL, 2011.Google ScholarGoogle Scholar
  8. A. Chlipala. Ur: statically-typed metaprogramming with type-level record computation. In PLDI, pages 122--133, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. E. Cooper. Programming language features for web application development. PhD thesis, University of Edinburgh, 2009.Google ScholarGoogle Scholar
  10. E. Cooper. The script-writer's dream: How to write great SQL in your own language, and be sure it will succeed. In DBPL, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. E. Cooper, S. Lindley, P. Wadler, and J. Yallop. Links: web programming without tiers. In FMCO, volume 4709 of LNCS, pages 266--296, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J. Garrigue. Programming with polymorphic variants. In ML Workshop, Sept. 1998.Google ScholarGoogle Scholar
  13. T. Grust, M. Mayr, J. Rittinger, and T. Schreiber. Ferry: database-supported program execution. In SIGMOD Conference, pages 1063--1066, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. C. A. Gunter and J. C. Mitchell, editors. Theoretical Aspects Of Object-Oriented Programming. Types, Semantics and Language Design. Foundations of Computing Series. MIT Press, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. R. Harper and B. C. Pierce. A record calculus based on symmetric concatenation. In POPL, pages 131--142, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. S. P. Jones and P. Wadler. Comprehensive comprehensions. In Haskell Workshop, pages 61--72, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Links. http://groups.inf.ed.ac.uk/links.Google ScholarGoogle Scholar
  18. R. Matthes. Non-strictly positive fixed points for classical natural deduction. Ann. Pure Appl. Logic, 133(1--3):205--230, 2005.Google ScholarGoogle Scholar
  19. H. R. Nielson, F. Nielson, and T. Amtoft. Polymorphic subtyping for effect analysis: The static semantics. In LOMAPS, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. Ohori. A polymorphic record calculus and its compilation. ACM Trans. Program. Lang. Syst., 17(6):844--895, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. A. Ohori and K. Ueno. Making Standard ML a practical database programming language. In ICFP, pages 307--319, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. D. Rémy. Type inference for records in a natural extension of ML. In Gunter and Mitchell \citeGunterM93, pages 67--95. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. A. Ulrich. A Ferry-based query backend for the Links programming language. Master's thesis, University of Tübingen, 2011.Google ScholarGoogle Scholar
  24. P. Wadler and P. Thiemann. The marriage of effects and monads. Transactions on Computational Logic, 4(1):1--32, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. Wand. Complete type inference for simple objects. In LICS, pages 37--44, 1987.Google ScholarGoogle Scholar
  26. L. Wong. Normal forms and conservative extension properties for query languages over collection types. J. Comput. Syst. Sci., 52(3):495--505, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. L. Wong. Kleisli, a functional query system. J. Funct. Program., 10(1):19--56, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Row-based effect types for database integration

      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
        TLDI '12: Proceedings of the 8th ACM SIGPLAN workshop on Types in language design and implementation
        January 2012
        110 pages
        ISBN:9781450311205
        DOI:10.1145/2103786

        Copyright © 2012 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: 28 January 2012

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate11of26submissions,42%

        Upcoming Conference

        POPL '25

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader