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.
- J. Armstrong, R. Virding, C. Wikström, and M. Williams. Concurrent Programming in Erlang, Second Edition. Prentice Hall International, 1996. Google ScholarDigital Library
- 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 ScholarDigital Library
- M. Blume, U. A. Acar, and W. Chae. Extensible programming with first-class cases. In ICFP, pages 239--250, 2006. Google ScholarDigital Library
- M. Blume, U. A. Acar, and W. Chae. Exception handlers as extensible cases. In APLAS, pages 273--289, 2008. Google ScholarDigital Library
- P. Buneman, L. Libkin, D. Suciu, V. Tannen, and L. Wong. Comprehension syntax. SIGMOD Record, 23(1):87--96, 1994. Google ScholarDigital Library
- L. Cardelli and J. C. Mitchell. Operations on records. In Gunter and Mitchell \citeGunterM93, pages 295--350.Google Scholar
- J. Cheney, S. Lindley, and H. Müller. DBWiki: A database wiki prototyped in Links. In DBPL, 2011.Google Scholar
- A. Chlipala. Ur: statically-typed metaprogramming with type-level record computation. In PLDI, pages 122--133, 2010. Google ScholarDigital Library
- E. Cooper. Programming language features for web application development. PhD thesis, University of Edinburgh, 2009.Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- J. Garrigue. Programming with polymorphic variants. In ML Workshop, Sept. 1998.Google Scholar
- T. Grust, M. Mayr, J. Rittinger, and T. Schreiber. Ferry: database-supported program execution. In SIGMOD Conference, pages 1063--1066, 2009. Google ScholarDigital Library
- 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 ScholarDigital Library
- R. Harper and B. C. Pierce. A record calculus based on symmetric concatenation. In POPL, pages 131--142, 1991. Google ScholarDigital Library
- S. P. Jones and P. Wadler. Comprehensive comprehensions. In Haskell Workshop, pages 61--72, 2007. Google ScholarDigital Library
- Links. http://groups.inf.ed.ac.uk/links.Google Scholar
- R. Matthes. Non-strictly positive fixed points for classical natural deduction. Ann. Pure Appl. Logic, 133(1--3):205--230, 2005.Google Scholar
- H. R. Nielson, F. Nielson, and T. Amtoft. Polymorphic subtyping for effect analysis: The static semantics. In LOMAPS, 1996. Google ScholarDigital Library
- A. Ohori. A polymorphic record calculus and its compilation. ACM Trans. Program. Lang. Syst., 17(6):844--895, 1995. Google ScholarDigital Library
- A. Ohori and K. Ueno. Making Standard ML a practical database programming language. In ICFP, pages 307--319, 2011. Google ScholarDigital Library
- D. Rémy. Type inference for records in a natural extension of ML. In Gunter and Mitchell \citeGunterM93, pages 67--95. Google ScholarDigital Library
- A. Ulrich. A Ferry-based query backend for the Links programming language. Master's thesis, University of Tübingen, 2011.Google Scholar
- P. Wadler and P. Thiemann. The marriage of effects and monads. Transactions on Computational Logic, 4(1):1--32, 2003. Google ScholarDigital Library
- M. Wand. Complete type inference for simple objects. In LICS, pages 37--44, 1987.Google Scholar
- L. Wong. Normal forms and conservative extension properties for query languages over collection types. J. Comput. Syst. Sci., 52(3):495--505, 1996. Google ScholarDigital Library
- L. Wong. Kleisli, a functional query system. J. Funct. Program., 10(1):19--56, 2000. Google ScholarDigital Library
Index Terms
- Row-based effect types for database integration
Recommendations
Abstracting extensible data types: or, rows by any other name
We present a novel typed language for extensible data types, generalizing and abstracting existing systems of row types and row polymorphism. Extensible data types are a powerful addition to traditional functional programming languages, capturing ideas ...
Structural Subtyping as Parametric Polymorphism
Structural subtyping and parametric polymorphism provide similar flexibility and reusability to programmers. For example, both features enable the programmer to provide a wider record as an argument to a function that expects a narrower one. However, ...
Polymorphic type inference and abstract data types
Many statically typed programming languages provide an abstract data type construct, such as the module in Modula-2. However, in most of these languages, implementations of abstract data types are not first-class values. Thus, they cannot be assigned to ...
Comments