Results 1  10
of
16
Indexed Containers
"... Abstract. The search for an expressive calculus of datatypes in which canonical algorithms can be easily written and proven correct has proved to be an enduring challenge to the theoretical computer science community. Approaches such as polynomial types, strictly positive types and inductive types h ..."
Abstract

Cited by 37 (5 self)
 Add to MetaCart
(Show Context)
Abstract. The search for an expressive calculus of datatypes in which canonical algorithms can be easily written and proven correct has proved to be an enduring challenge to the theoretical computer science community. Approaches such as polynomial types, strictly positive types and inductive types have all met with some success but they tend not to cover important examples such as types with variable binding, types with constraints, nested types, dependent types etc. In order to compute with such types, we generalise from the traditional treatment of types as free standing entities to families of types which have some form of indexing. The hallmark of such indexed types is that one must usually compute not with an individual type in the family, but rather with the whole family simultaneously. We implement this simple idea by generalising our previous work on containers to what we call indexed containers and show that they cover a number of sophisticated datatypes and, indeed, other computationally interesting structures such as the refinement calculus and interaction structures. Finally, and rather surprisingly, the extra structure inherent in indexed containers simplifies the theory of containers and thereby allows for a much richer and more expressive calculus. 1
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
Modularising inductive families
 In Jaakko Järvi and ShinCheng Mu, editors, Workshop on Generic Programming, WGP’11
, 2011
"... Dependently typed programmers are encouraged to use inductive families to integrate constraints with data construction. Different constraints are used in different contexts, leading to different versions of datatypes for the same data structure. For example, sequences might be constrained by length ..."
Abstract

Cited by 6 (3 self)
 Add to MetaCart
(Show Context)
Dependently typed programmers are encouraged to use inductive families to integrate constraints with data construction. Different constraints are used in different contexts, leading to different versions of datatypes for the same data structure. For example, sequences might be constrained by length or by an ordering on elements, giving rise to different datatypes “vectors ” and “sorted lists ” for the same underlying data structure of sequences. Modular implementation of common operations for these structurally similar datatypes has been a longstanding problem. We propose a datatypegeneric solution, in which we axiomatise a family of isomorphisms between datatypes and their more refined versions as datatype refinements, and show that McBride’s ornaments can be translated into such refinements. With the ornamentinduced refinements, relevant properties of the operations can be separately proven for each constraint, and after the programmer selects several constraints to impose on a basic datatype and synthesises a new datatype incorporating those constraints, the operations can be routinely upgraded to work with the synthesised datatype. 1
Modular TypeSafety Proofs in Agda
"... Methods for reusing code are widespread and well researched, but methods for reusing proofs are still emerging. We consider the use of dependent types for this purpose, introducing a modular approach for composing mechanized proofs. We show that common techniques for abstracting algorithms over data ..."
Abstract

Cited by 5 (0 self)
 Add to MetaCart
(Show Context)
Methods for reusing code are widespread and well researched, but methods for reusing proofs are still emerging. We consider the use of dependent types for this purpose, introducing a modular approach for composing mechanized proofs. We show that common techniques for abstracting algorithms over data structures naturally translate to abstractions over proofs. We introduce a language composed of a series of smaller language components, each defined as functors, and tie them together by taking the fixed point of their sum [Malcom, 1990]. We then give proofs of type preservation for each language component and show how to compose these proofs into a proof for the entire language, again by taking the fixed point of a sum of functors.
Dependent Interoperability
"... In this paper we study the problem of interoperability—combining constructs from two separate programming languages within one program—in the case where one of the two languages is dependently typed and the other is simply typed. We present a core calculus called SD, which combines dependently and ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
(Show Context)
In this paper we study the problem of interoperability—combining constructs from two separate programming languages within one program—in the case where one of the two languages is dependently typed and the other is simply typed. We present a core calculus called SD, which combines dependently and simplytyped sublanguages and supports userdefined (dependent) datatypes, among other standard features. SD has “boundary terms ” that mediate the interaction between the two sublanguages. The operational semantics of SD demonstrates how the necessary dynamic checks, which must be done when passing a value from the simplytyped world to the dependently typed world, can be extracted from the dependent type constructors themselves, modulo userdefined functions for marshaling values across the boundary. We establish typesafety and other metatheoretic properties of SD, and contrast this approach to others in the literature. Categories and Subject Descriptors D.3.1 [Programming Languages]:
A Categorical Treatment of Ornaments
"... Abstract—Ornaments aim at taming the multiplication of specialpurpose datatypes in dependently typed programming languages. In type theory, purpose is logic. By presenting datatypes as the combination of a structure and a logic, ornaments relate these specialpurpose datatypes through their common ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
(Show Context)
Abstract—Ornaments aim at taming the multiplication of specialpurpose datatypes in dependently typed programming languages. In type theory, purpose is logic. By presenting datatypes as the combination of a structure and a logic, ornaments relate these specialpurpose datatypes through their common structure. In the original presentation, the concept of ornament was introduced concretely for an example universe of inductive families in type theory, but it was clear that the notion was more general. This paper digs out the abstract notion of ornaments in the form of a categorical model. As a necessary first step, we abstract the universe of datatypes using the theory of polynomial functors. We are then able to characterise ornaments as cartesian morphisms between polynomial functors. We thus gain access to powerful mathematical tools that shall help us understand and develop ornaments. We shall also illustrate the adequacy of our model. Firstly, we rephrase the standard ornamental constructions into our framework. Thanks to its conciseness, we gain a deeper understanding of the structures at play. Secondly, we develop new ornamental constructions, by translating categorical structures into type theoretic artefacts.
Functors are Type Refinement Systems
, 2014
"... HAL is a multidisciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers. L’archive ouverte p ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
HAL is a multidisciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers. L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et a ̀ la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés. Copyright
Relational Algebraic Ornaments
"... Dependently typed programming is hard, because ideally dependently typed programs should share structure with their correctness proofs, but there are very few guidelines on how one can arrive at such integrated programs. McBride’s algebraic ornamentation provides a methodological advancement, by w ..."
Abstract
 Add to MetaCart
(Show Context)
Dependently typed programming is hard, because ideally dependently typed programs should share structure with their correctness proofs, but there are very few guidelines on how one can arrive at such integrated programs. McBride’s algebraic ornamentation provides a methodological advancement, by which the programmer can derive a datatype from a specification involving a fold, such that a program that constructs elements of that datatype would be correct by construction. It is thus an effective method that leads the programmer from a specification to a dependently typed program. We enhance the applicability of this method by generalising algebraic ornamentation to a relational setting and bringing in relational algebraic methods, resulting in a hybrid approach that makes essential use of both dependently typed programming and relational program derivation. A dependently typed solution to the minimum coin change problem is presented as a demonstration of this hybrid approach. We also give a theoretically interesting “completeness theorem ” of relational algebraic ornaments, which sheds some light on the expressive power of ornaments and inductive families.