Results 1 
3 of
3
When is a type refinement an inductive type
 In FOSSACS, volume 6604 of Lecture Notes in Computer Science
, 2011
"... Abstract. Dependently typed programming languages allow sophisticated properties of data to be expressed within the type system. Of particular use in dependently typed programming are indexed types that refine data by computationally useful information. For example, the Nindexed type of vectors ref ..."
Abstract

Cited by 4 (1 self)
 Add to MetaCart
Abstract. Dependently typed programming languages allow sophisticated properties of data to be expressed within the type system. Of particular use in dependently typed programming are indexed types that refine data by computationally useful information. For example, the Nindexed type of vectors refines lists by their lengths. Other data types may be refined in similar ways, but programmers must produce purposespecific refinements on an ad hoc basis, developers must anticipate which refinements to include in libraries, and implementations often store redundant information about data and their refinements. This paper shows how to generically derive inductive characterisations of refinements of inductive types, and argues that these characterisations can alleviate some of the aforementioned difficulties associated with ad hoc refinements. These characterisations also ensure that standard techniques for programming with and reasoning about inductive types are applicable to refinements, and that refinements can themselves be further refined. 1
Deciding Properties of Lists using Containers
 JOURNAL OF AUTOMATED REASONING
"... We exploit the ability to represent data types as container functors [2,1,3] to develop a novel approach to proving properties of lists using arithmetic decision procedures. Containers capture the idea that concrete data types can be characterised by specifying the shape values take and for every po ..."
Abstract
 Add to MetaCart
We exploit the ability to represent data types as container functors [2,1,3] to develop a novel approach to proving properties of lists using arithmetic decision procedures. Containers capture the idea that concrete data types can be characterised by specifying the shape values take and for every possible shape, explaining where positions within that shape are stored. More importantly, a representation theorem guarantees that polymorphic functions between container data types are given by container morphisms, which are characterised by mappings between shapes and positions. The key to our approach is to restrict the shape maps of container morphisms to functions that have decidable equality, but which allow for a large class of functions. We also capture the behaviour of position mappings of container morphisms as functions on the natural numbers. The shape maps which we consider are given by piecewiselinear functions, of type N n → N. Such functions are decidable, and this enables us to implement decision procedures for lists.
General Terms
"... Much has been said and done about generic programming approaches in stronglytyped functional languages such as Haskell and Agda. Different approaches use different techniques and are better or worse suited for certain uses, depending on design decisions such as generic view, universe size and compl ..."
Abstract
 Add to MetaCart
Much has been said and done about generic programming approaches in stronglytyped functional languages such as Haskell and Agda. Different approaches use different techniques and are better or worse suited for certain uses, depending on design decisions such as generic view, universe size and complexity, etc. We present a simple and intuitive yet powerful approach to generic programming in Agda using indexed functors. We show a universe incorporating fixed points that supports composition, indexing, and isomorphisms, and generalizes a number of previous approaches to generic programming with fixed points. Our indexed functors come with a map operation which obeys the functor laws, and associated recursion morphisms. Albeit expressive, the universe remains simple enough to allow defining standard recursion schemes as well as decidable equality. As for typeindexed datatypes, we show how to compute the type of onehole contexts and define the generic zipper.