Indiana University Bloomington

School of Informatics and Computing

Technical Report TR605:
Essential Language Support for Generic Programming: Formalization Part 1

Jeremy Siek and Andrew Lumsdaine
(Dec 2004), 70
[A shorter version of the paper was submitted to the PLDI 2005 conference.]
Abstract:
``Concepts'' are an essential language feature needed to support generic programming in the large. Concepts allow for succinct expression of bounds on type parameters of generic algorithms, enable systematic organization of problem domain abstractions, and make generic algorithms easier to use. In this paper we formalize the design of a type system and semantics for concepts that is suitable for non-type-inferencing languages. Our design shares much in common with the type classes of Haskell, though our primary influence is from best practices in the \Cpp{} community, where concepts are used to document type requirements for templates in generic libraries. The technical development in this paper defines an extension to System F and a type-directed translation from the extension back to System F. The translation is proved sound; the proof is written in the human readable but machine checkable Isar language and has been automatically verified by the Isabelle proof assistant. This document was generated directly from the Isar theory files using Isabelle's support for literate proofs.

Available as: