Results 1  10
of
59
Containers  Constructing Strictly Positive Types
, 2004
"... ... with disjoint coproducts and initial algebras of container functors (the categorical analogue of Wtypes) — and then establish that nested strictly positive inductive and coinductive types, which we call strictly positive types, exist in any MartinLöf category. Central to our development are t ..."
Abstract

Cited by 85 (28 self)
 Add to MetaCart
... with disjoint coproducts and initial algebras of container functors (the categorical analogue of Wtypes) — and then establish that nested strictly positive inductive and coinductive types, which we call strictly positive types, exist in any MartinLöf category. Central to our development are the notions of containers and container functors, introduced in Abbott, Altenkirch, and Ghani (2003a). These provide a new conceptual analysis of data structures and polymorphic functions by exploiting dependent type theory as a convenient way to define constructions in MartinLöf categories. We also show that morphisms between containers can be full and faithfully interpreted as polymorphic functions (i.e. natural transformations) and that, in the presence of Wtypes, all strictly positive types (including nested inductive and coinductive types) give rise to containers.
Foundations for structured programming with GADTs
 Conference record of the ACM SIGPLANSIGACT Symposium on Principles of Programming Languages
, 2008
"... GADTs are at the cutting edge of functional programming and become more widely used every day. Nevertheless, the semantic foundations underlying GADTs are not well understood. In this paper we solve this problem by showing that the standard theory of data types as carriers of initial algebras of fun ..."
Abstract

Cited by 39 (5 self)
 Add to MetaCart
GADTs are at the cutting edge of functional programming and become more widely used every day. Nevertheless, the semantic foundations underlying GADTs are not well understood. In this paper we solve this problem by showing that the standard theory of data types as carriers of initial algebras of functors can be extended from algebraic and nested data types to GADTs. We then use this observation to derive an initial algebra semantics for GADTs, thus ensuring that all of the accumulated knowledge about initial algebras can be brought to bear on them. Next, we use our initial algebra semantics for GADTs to derive expressive and principled tools — analogous to the wellknown and widelyused ones for algebraic and nested data types — for reasoning about, programming with, and improving the performance of programs involving, GADTs; we christen such a collection of tools for a GADT an initial algebra package. Along the way, we give a constructive demonstration that every GADT can be reduced to one which uses only the equality GADT and existential quantification. Although other such reductions exist in the literature, ours is entirely local, is independent of any particular syntactic presentation of GADTs, and can be implemented in the host language, rather than existing solely as a metatheoretical artifact. The main technical ideas underlying our approach are (i) to modify the notion of a higherorder functor so that GADTs can be seen as carriers of initial algebras of higherorder functors, and (ii) to use left Kan extensions to trade arbitrary GADTs for simplerbutequivalent ones for which initial algebra semantics can be derived.
The Power of Pi
, 2008
"... This paper exhibits the power of programming with dependent types by dint of embedding three domainspecific languages: Cryptol, a language for cryptographic protocols; a small data description language; and relational algebra. Each example demonstrates particular design patterns inherent to depende ..."
Abstract

Cited by 36 (7 self)
 Add to MetaCart
This paper exhibits the power of programming with dependent types by dint of embedding three domainspecific languages: Cryptol, a language for cryptographic protocols; a small data description language; and relational algebra. Each example demonstrates particular design patterns inherent to dependentlytyped programming. Documenting these techniques paves the way for further research in domainspecific embedded type systems.
Exploring the regular tree types
 In Types for Proofs and Programs
, 2004
"... Abstract. In this paper we use the Epigram language to define the universe of regular tree types—closed under empty, unit, sum, product and least fixpoint. We then present a generic decision procedure for Epigram’s inbuilt equality at each type, taking a complementary approach to that of Benke, Dyb ..."
Abstract

Cited by 23 (4 self)
 Add to MetaCart
(Show Context)
Abstract. In this paper we use the Epigram language to define the universe of regular tree types—closed under empty, unit, sum, product and least fixpoint. We then present a generic decision procedure for Epigram’s inbuilt equality at each type, taking a complementary approach to that of Benke, Dybjer and Jansson [7]. We also give a generic definition of map, taking our inspiration from Jansson and Jeuring [21]. Finally, we equip the regular universe with the partial derivative which can be interpreted functionally as Huet’s notion of ‘zipper’, as suggested by McBride in [27] and implemented (without the fixpoint case) in Generic Haskell by Hinze, Jeuring and Löh [18]. We aim to show through these examples that generic programming can be ordinary programming in a dependently typed language. 1
Dependent types at work
 LERNET 2008. LNCS
, 2009
"... In these lecture notes we give an introduction to functional programming with dependent types. We use the dependently typed programming language Agda which is an extension of MartinLöf type theory. First we show how to do simply typed functional programming in the style of Haskell and ML. Some dif ..."
Abstract

Cited by 21 (1 self)
 Add to MetaCart
In these lecture notes we give an introduction to functional programming with dependent types. We use the dependently typed programming language Agda which is an extension of MartinLöf type theory. First we show how to do simply typed functional programming in the style of Haskell and ML. Some differences between Agda’s type system and the HindleyMilner type system of Haskell and ML are also discussed. Then we show how to use dependent types for programming and we explain the basic ideas behind typechecking dependent types. We go on to explain the CurryHoward identification of propositions and types. This is what makes Agda a programming logic and not only a programming language. According to CurryHoward, we identify programs and proofs, something which is possible only by requiring that all program terminate. However, at the end of these notes we present a method for encoding partial and general recursive functions as total functions using dependent types.
A Dependently Typed Framework for Static Analysis of Program Execution Costs
 In Revised selected papers from IFL 2005: 17th international workshop on implementation and application of functional languages
, 2005
"... Abstract. This paper considers the use of dependent types to capture information about dynamic resource usage in a static type system. Dependent types allow us to give (explicit) proofs of properties with a program; we present a dependently typed core language ��, and define a framework within this ..."
Abstract

Cited by 14 (10 self)
 Add to MetaCart
(Show Context)
Abstract. This paper considers the use of dependent types to capture information about dynamic resource usage in a static type system. Dependent types allow us to give (explicit) proofs of properties with a program; we present a dependently typed core language ��, and define a framework within this language for representing size metrics and their properties. We give several examples of size bounded programs within this framework and show that we can construct proofs of their size bounds within ��. We further show how the framework handles recursive higher order functions and sum types, and contrast our system with previous work based on sized types. 1
Why dependent types matter
 In preparation, http://www.epig.org/downloads/ydtm.pdf
, 2005
"... We exhibit the rationale behind the design of Epigram, a dependently typed programming language and interactive program development system, using refinements of a well known program—merge sort—as a running example. We discuss its relationship with other proposals to introduce aspects of dependent ty ..."
Abstract

Cited by 14 (3 self)
 Add to MetaCart
We exhibit the rationale behind the design of Epigram, a dependently typed programming language and interactive program development system, using refinements of a well known program—merge sort—as a running example. We discuss its relationship with other proposals to introduce aspects of dependent types into functional programming languages and sketch some topics for further work in this area. 1.
A few constructions on constructors
 Types for Proofs and Programs
, 2005
"... Abstract. We present four constructions for standard equipment which can be generated for every inductive datatype: case analysis, structural recursion, no confusion, acyclicity. Our constructions follow a twolevel approach—they require less work than the standard techniques which inspired them [11 ..."
Abstract

Cited by 11 (7 self)
 Add to MetaCart
Abstract. We present four constructions for standard equipment which can be generated for every inductive datatype: case analysis, structural recursion, no confusion, acyclicity. Our constructions follow a twolevel approach—they require less work than the standard techniques which inspired them [11, 8]. Moreover, given a suitably heterogeneous notion of equality, they extend without difficulty to inductive families of datatypes. These constructions are vital components of the translation from dependently typed programs in pattern matching style [7] to the equivalent programs expressed in terms of induction principles [21] and as such play a crucial behindthescenes rôle in Epigram [25]. 1