Results 1 - 10
of
64
Associated Types with Class
- In POPL ’05: Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
, 2005
"... In this paper, we explore an extension to Haskell type classes that allows a type class declaration to define data types as well as values (or methods). Similarly, an instance declaration gives a witness for such data types, as well as a witness for each method. It turns out that this extension dire ..."
Abstract
-
Cited by 96 (24 self)
- Add to MetaCart
(Show Context)
In this paper, we explore an extension to Haskell type classes that allows a type class declaration to define data types as well as values (or methods). Similarly, an instance declaration gives a witness for such data types, as well as a witness for each method. It turns out that this extension directly supports the idea of a type-indexed type, and is useful in many applications, especially for self-optimising libraries that adapt their data representations and algorithms in a type-directed manner.
Associated type synonyms
- In Proceedings of the Tenth ACM SIGPLAN International Conference on Functional Programming
, 2005
"... Haskell programmers often use a multi-parameter type class in which one or more type parameters are functionally dependent on the first. Although such functional dependencies have proved quite popular in practice, they express the programmer’s intent somewhat indirectly. Developing earlier work on a ..."
Abstract
-
Cited by 95 (22 self)
- Add to MetaCart
(Show Context)
Haskell programmers often use a multi-parameter type class in which one or more type parameters are functionally dependent on the first. Although such functional dependencies have proved quite popular in practice, they express the programmer’s intent somewhat indirectly. Developing earlier work on associated data types, we propose to add functionally-dependent types as type synonyms to type-class bodies. These associated type synonyms constitute an interesting new alternative to explicit functional dependencies.
Google’s MapReduce Programming Model — Revisited
"... Google’s MapReduce programming model serves for processing large data sets in a massively parallel manner. We deliver the first rigorous description of the model including its advancement as Google’s domain-specific language Sawzall. To this end, we reverse-engineer the seminal papers on MapReduce a ..."
Abstract
-
Cited by 82 (1 self)
- Add to MetaCart
(Show Context)
Google’s MapReduce programming model serves for processing large data sets in a massively parallel manner. We deliver the first rigorous description of the model including its advancement as Google’s domain-specific language Sawzall. To this end, we reverse-engineer the seminal papers on MapReduce and Sawzall, and we capture our findings as an executable specification. We also identify and resolve some obscurities in the informal presentation given in the seminal papers. We use typed functional programming (specifically Haskell) as a tool for design recovery and executable specification. Our development comprises three components: (i) the basic program skeleton that underlies MapReduce computations; (ii) the opportunities for parallelism in executing MapReduce computations; (iii) the fundamental characteristics of Sawzall’s aggregators as an advancement of the MapReduce approach. Our development does not formalize the more implementational aspects of an actual, distributed execution of MapReduce computations.
Strongly typed heterogeneous collections
- In Haskell ’04: Proceedings of the ACM SIGPLAN workshop on Haskell
, 2004
"... A heterogeneous collection is a datatype that is capable of storing data of different types, while providing operations for look-up, update, iteration, and others. There are various kinds of heterogeneous collections, differing in representation, invariants, and access operations. We describe HLIST ..."
Abstract
-
Cited by 74 (13 self)
- Add to MetaCart
A heterogeneous collection is a datatype that is capable of storing data of different types, while providing operations for look-up, update, iteration, and others. There are various kinds of heterogeneous collections, differing in representation, invariants, and access operations. We describe HLIST — a Haskell library for strongly typed heterogeneous collections including extensible records. We illustrate HLIST’s benefits in the context of type-safe database access in Haskell. The HLIST library relies on common extensions of Haskell 98. Our exploration raises interesting issues regarding Haskell’s type system, in particular, avoidance of overlapping instances, and reification of type equality and type unification.
The Computational Power and Complexity of Constraint Handling Rules
- In Second Workshop on Constraint Handling Rules, at ICLP05
, 2005
"... Constraint Handling Rules (CHR) is a high-level rule-based programming language which is increasingly used for general purposes. We introduce the CHR machine, a model of computation based on the operational semantics of CHR. Its computational power and time complexity properties are compared to thos ..."
Abstract
-
Cited by 52 (21 self)
- Add to MetaCart
(Show Context)
Constraint Handling Rules (CHR) is a high-level rule-based programming language which is increasingly used for general purposes. We introduce the CHR machine, a model of computation based on the operational semantics of CHR. Its computational power and time complexity properties are compared to those of the well-understood Turing machine and Random Access Memory machine. This allows us to prove the interesting result that every algorithm can be implemented in CHR with the best known time and space complexity. We also investigate the practical relevance of this result and the constant factors involved. Finally we expand the scope of the discussion to other (declarative) programming languages.
An Implementation of Session Types
- In PADL, volume 3057 of LNCS
, 2004
"... A session type is an abstraction of a set of sequences of heterogeneous values sent and received over a communication channel. Session types can be used for specifying stream-based Internet protocols. ..."
Abstract
-
Cited by 34 (0 self)
- Add to MetaCart
(Show Context)
A session type is an abstraction of a set of sequences of heterogeneous values sent and received over a communication channel. Session types can be used for specifying stream-based Internet protocols.
Sound and Decidable Type Inference for Functional Dependencies
, 2004
"... Functional dependencies are a popular and useful extension to Haskell style type classes. In this paper, we give a reformulation of functional dependencies in terms of Constraint Handling Rules (CHRs). In previous work, CHRs have been employed for describing user-programmable type extensions in th ..."
Abstract
-
Cited by 33 (15 self)
- Add to MetaCart
(Show Context)
Functional dependencies are a popular and useful extension to Haskell style type classes. In this paper, we give a reformulation of functional dependencies in terms of Constraint Handling Rules (CHRs). In previous work, CHRs have been employed for describing user-programmable type extensions in the context of Haskell style type classes. Here, we make use of CHRs to provide for the first time a concise result that under some sufficient conditions, functional dependencies allow for sound and decidable type inference. The sucient conditions imposed on functional dependencies can be very limiting. We show how to safely relax these conditions.
A Framework for Extended Algebraic Data Types
, 2005
"... Extended forms of algebraic data types allow for sophisticated type extensions. A number of proposals exists and its often hard to understand what has been achieved. Here, we present a unifying framework which subsumes previous systems such as guarded recursive data types, the combination of type cl ..."
Abstract
-
Cited by 19 (8 self)
- Add to MetaCart
(Show Context)
Extended forms of algebraic data types allow for sophisticated type extensions. A number of proposals exists and its often hard to understand what has been achieved. Here, we present a unifying framework which subsumes previous systems such as guarded recursive data types, the combination of type classes and existential types etc. We give an in depth discussion of the type inference problem and identify sufficient conditions under which we obtain completeness. Our results show that our system is practical and greatly extends the expressive power of languages such as Haskell and ML.
Improving type error diagnosis
- In Haskell’03: Proceedings of the ACM SIGPLAN Workshop on Haskell
, 2003
"... All in-text references underlined in blue are linked to publications on ResearchGate, letting you access and read them immediately. ..."
Abstract
-
Cited by 18 (6 self)
- Add to MetaCart
(Show Context)
All in-text references underlined in blue are linked to publications on ResearchGate, letting you access and read them immediately.
Automatic Implication Checking for CHR Constraints
, 2005
"... Constraint Handling Rules (CHRs) are a high-level rule-based programming language commonly used to define constraint solvers. We present a method for automatic implication checking between constraints of CHR solvers. Supporting implication is important for implementing extensible solvers and reifica ..."
Abstract
-
Cited by 16 (13 self)
- Add to MetaCart
Constraint Handling Rules (CHRs) are a high-level rule-based programming language commonly used to define constraint solvers. We present a method for automatic implication checking between constraints of CHR solvers. Supporting implication is important for implementing extensible solvers and reification, and for building hierarchical CHR constraint solvers. Our method does not copy the entire constraint store, but performs the check in place using a trailing mechanism. The necessary code enhancements can be done by automatic program transformation based on the rules of the solver. We extend our method to work for hierarchically organized modular CHR solvers. We show the soundness of our method and its completeness for a restricted class of canonical solver as well as for specific existing non-canonical CHR solvers. We evaluate our trailing method experimentally by comparing with the copy approach: runtime is almost halved.