Skip to main content

Reusability and Dependent Types

1st October 2009 to 31st March 2013

Robin Milner coined the slogan "well typed programs cannot go wrong", advertising the strength of typed functional languages like ML and Haskell in using types to catch runtime errors. Nowadays, we can and want to go further: dependently typed programming exploits the power of very expressive type systems to deliver stronger guarantees but also additional support for software development, using types to guide the development process. This is witnessed by a recent surge of language proposals with the goal to harness the power of dependent types, e.g. Haskell with GADTs, Agda, Coq, Omega, Concoqtion, Guru, Ynot, Epigram and so on.

However, expressive type systems have their price: more specific types frequently reduce the reusability of code, whose too-specific implementation type may not fit its current application. This phenomenon already shows up in the traditional Hindley-Milner style type system of ML and Haskell; it becomes even more prevalent in a dependently typed setting. Luckily, all is not lost: dependent types are expressive enough that they can talk about themselves reflectively, making meta-programming one of its potential killer applications with the potential of combining expressive types and reusable software components.

Based on and inspired by recent research at Nottingham on dependently typed programming (EPSRC EP/C512022/1) and container types (EPSRC EP/C511964/2) and at Oxford on datatype-generic programming (EPSRC GR/S27078/01, EP/E02128X/1) we plan to explore the potential of dependent types to deliver reusable and reliable software components. To achieve this, we intend to explore two alternative roads—reusability by structure and reusability by design—and express both within a dependently typed framework. Our programme is to build new tools extending the Epigram 2 framework, investigate the underlying theory using container types, and most importantly establish novel programming patterns and libraries.

Selected Publications

View All

Principal Investigator

People

Josh Ko
Maciej Pirog

Share this: