Contractive Signatures with Recursive Types, Type Parameters, and Abstract Types

Author(s):  
Hyeonseung Im ◽  
Keiko Nakata ◽  
Sungwoo Park
Keyword(s):  
1987 ◽  
Vol SE-13 (1) ◽  
pp. 65-76 ◽  
Author(s):  
A. Black ◽  
N. Hutchinson ◽  
E. Jul ◽  
H. Levy ◽  
L. Carter
Keyword(s):  

1976 ◽  
Vol 11 (SI) ◽  
pp. 149-154 ◽  
Author(s):  
D. L. Parnas ◽  
John E. Shore ◽  
David Weiss
Keyword(s):  

2012 ◽  
Vol 22 (3) ◽  
pp. 300-374 ◽  
Author(s):  
FRITZ HENGLEIN

AbstractWe introduce the notion ofdiscriminationas a generalization of both sorting and partitioning, and show thatdiscriminators(discrimination functions) can be definedgenerically, by structural recursion on representations oforderingandequivalence relations. Discriminators improve the asymptotic performance of generic comparison-based sorting and partitioning, and can be implemented not to expose more information than the underlying ordering, respectively equivalence relation. For a large class of order and equivalence representations, including all standard orders for regular recursive first-order types, the discriminators execute in the worst-case linear time. The generic discriminators can be coded compactly using list comprehensions, with order and equivalence representations specified using Generalized Algebraic Data Types. We give some examples of the uses of discriminators, including the most-significant digit lexicographic sorting, type isomorphism with an associative-commutative operator, and database joins. Source code of discriminators and their applications in Haskell is included. We argue that built-in primitive types, notably pointers (references), should come with efficient discriminators, not just equality tests, since they facilitate the construction of discriminators for abstract types that are both highly efficient and representation-independent.


1998 ◽  
Vol 29 (4) ◽  
pp. 39-50
Author(s):  
Peter W. O'Hearn
Keyword(s):  

2001 ◽  
Vol 36 (3) ◽  
pp. 236-247
Author(s):  
Peter Sewell
Keyword(s):  

2021 ◽  
Vol 5 (ICFP) ◽  
pp. 1-29
Author(s):  
Richard A. Eisenberg ◽  
Guillaume Duboc ◽  
Stephanie Weirich ◽  
Daniel Lee

Despite the great success of inferring and programming with universal types, their dual—existential types—are much harder to work with. Existential types are useful in building abstract types, working with indexed types, and providing first-class support for refinement types. This paper, set in the context of Haskell, presents a bidirectional type-inference algorithm that infers where to introduce and eliminate existentials without any annotations in terms, along with an explicitly typed, type-safe core language usable as a compilation target. This approach is backward compatible. The key ingredient is to use strong existentials, which support (lazily) projecting out the encapsulated data, not weak existentials accessible only by pattern-matching.


Sign in / Sign up

Export Citation Format

Share Document