Results 1  10
of
11
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 8 (1 self)
 Add to MetaCart
(Show Context)
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
Scrap your zippers: A generic zipper for heterogeneous types
 In WGP ’10
, 2010
"... The zipper type provides the ability to efficiently edit treeshaped data in a purely functional setting by providing constant time edits at a focal point in an immutable structure. It is used in a number of applications and is widely applicable for manipulating treeshaped data structures. The trad ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
(Show Context)
The zipper type provides the ability to efficiently edit treeshaped data in a purely functional setting by providing constant time edits at a focal point in an immutable structure. It is used in a number of applications and is widely applicable for manipulating treeshaped data structures. The traditional zipper suffers from two major limitations, however. First, it operates only on homogeneous types. That is to say, every node the zipper visits must have the same type. In practice, many treeshaped types do not satisfy this condition, and thus cannot be handled by the traditional zipper. Second, the traditional zipper involves a significant amount of boilerplate code. A custom implementation must be written for each type the zipper traverses. This is error prone and must be updated whenever the type being traversed changes. The generic zipper presented in this paper overcomes these limitations. It operates over any type and requires no boilerplate code to be written by the user. The only restriction is that the types traversed must be instances of the Data class from the Scrap your Boilerplate framework.
Refining inductive types
 Logical Methods in Computer Science
, 2012
"... 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 re ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
(Show Context)
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 must often store redundant information about data and their refinements. In this paper we show how to generically derive inductive characterisations of refinements of inductive types, and argue that these characterisations can alleviate some of the aforementioned difficulties associated with ad hoc refinements. Our 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.
Generic Programming with Indexed Functors
, 2011
"... 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

Cited by 2 (0 self)
 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.
A.: Nonfree datatypes in Isabelle/HOL: Animating a manysorted metatheory
 CPP 2013. LNCS
, 2013
"... Abstract. Datatypes freely generated by their constructors are well supported in mainstream proof assistants. Algebraic specification languages offer more expressive datatypes on axiomatic means: nonfree datatypes generated from constructors modulo equations. We have implemented an Isabelle/HOL pa ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
(Show Context)
Abstract. Datatypes freely generated by their constructors are well supported in mainstream proof assistants. Algebraic specification languages offer more expressive datatypes on axiomatic means: nonfree datatypes generated from constructors modulo equations. We have implemented an Isabelle/HOL package for nonfree datatypes, without compromising foundations. The use of the package, and its nonfree iterator in particular, is illustrated with examples: bags, polynomials and λterms modulo αequivalence. The manysorted metatheory of nonfree datatypes is formalized as an ordinary Isabelle theory and is animated by the package into userspecified instances. HOL lacks a type of types, so we employ an ad hoc construction of a universe embedding the relevant parameter types. 1
Generic Datatypes a ̀ la Carte
"... Formal reasoning in proof assistants, also known as mechanization, has high development costs. Building modular reusable components is a key issue in reducing these costs. A stumbling block for reuse is that inductive definitions and proofs are closed to extension. This is a manifestation of the ..."
Abstract
 Add to MetaCart
(Show Context)
Formal reasoning in proof assistants, also known as mechanization, has high development costs. Building modular reusable components is a key issue in reducing these costs. A stumbling block for reuse is that inductive definitions and proofs are closed to extension. This is a manifestation of the expression problem that has been addressed by the MetaTheory a ̀ la Carte (MTC) framework in the context of programming language metatheory. However, MTC’s use of extensible Churchencodings is unsatisfactory. This paper takes a better approach to the problem with datatypegeneric programming (DGP). It applies wellknown DGP techniques to represent modular datatypes, to build functions from functor algebras with folds and to compose proofs from proof algebras by means of induction. Moreover, for certain functionality and proofs our approach can achieve more reuse than MTC: instead of composing modular components we provide a single generic definition once and for all.
Theory and Applications of Induction Recursion Case for Support
"... at the University of Strathclyde and asked to form the Mathematically Structured Programming research group there. Research Summary: Prof. Ghani’s research tries to understand the nature and structure of computation. This is quite a bold statement and inevitably, only partial answers will be forthco ..."
Abstract
 Add to MetaCart
at the University of Strathclyde and asked to form the Mathematically Structured Programming research group there. Research Summary: Prof. Ghani’s research tries to understand the nature and structure of computation. This is quite a bold statement and inevitably, only partial answers will be forthcoming. Nevertheless, this statement shows his commitment to ask deep and fundamental questions so as to produce research which is of the highest calibre and which will stand the test of time rather than become obsolete within a few years. In particular, he has worked extensively in the following areas which form the pillars upon which this proposal is built. – Category Theory: Category theory is a relatively new mathematical discipline which provides an abstract theory of structure and hence is key to Prof. Ghani’s work. He has applied various categorical structures such as monads, comonads, coalgebras, enriched categories and Kan extensions to problems in computation. Of closest relevance to this proposal is his work on containers which provides a theory of concrete data types. – Type Theory: Prof. Ghani uses type theory as an intermediate abstraction between functional programming and its categorical underpinnings. He has worked on features such as type systems, pattern matching and explicit substitutions which make the lambdacalculus closer to “real ” functional languages. He also developed the subject of etaexpansions and showed it to be better behaved than the more traditional theory of etacontractions. He solved the long standing open problem of the decidability of betaetaequality for sum types which had attracted
Journal of Higher Order and Symbolic Computing manuscript No. (will be inserted by the editor) More Dependent Types for Distributed Arrays
"... the date of receipt and acceptance should be inserted later Abstract Localityaware algorithms over distributed arrays can be very difficult to write. Yet such algorithms are becoming more and more important as desktop machines boast more and more processors. This paper shows how a dependentlytyped ..."
Abstract
 Add to MetaCart
(Show Context)
the date of receipt and acceptance should be inserted later Abstract Localityaware algorithms over distributed arrays can be very difficult to write. Yet such algorithms are becoming more and more important as desktop machines boast more and more processors. This paper shows how a dependentlytyped programming language can aid in the development of these algorithms and statically ensure that every welltyped program will only ever access local data. Such static guarantees can help catch programming errors early on in the development cycle and maximise the potential speedup that multicore machines offer. At the same time, the functional specification of effects presented here facilitates the testing of and reasoning about algorithms that manipulate distributed arrays. 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.
Reusability and Dependent Types: Case for Support
"... Robin Milner coined the slogan well typed programs cannot go wrong, advertising the power of types in functional languages like ML and Haskell to catch runtime errors. Nowadays, we can and should go further: dependently typed programming exploits the power of very expressive type systems to delive ..."
Abstract
 Add to MetaCart
(Show Context)
Robin Milner coined the slogan well typed programs cannot go wrong, advertising the power of types in functional languages like ML and Haskell to catch runtime errors. Nowadays, we can and should 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 [84, 85], Agda [90], Coq [18], Ωmega [88], Concoqtion [83], Guru [89], Ynot [77], Epigram [68], and so on. However, expressive type systems have their price: more specific types frequently reduce the reusability of code, whose toospecific implementation type may not fit its current application. This phenomenon already shows up in the traditional HindleyMilner 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, makingmetaprogramming one of their potential killer applications [11], with the potential to combine 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 datatypegeneric 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