Results 1 - 10
of
10
A framework for extended algebraic data types
- In Proc. of FLOPS’06, volume 3945 of LNCS
, 2006
"... Abstract. There are a number of extended forms of algebraic data types such as type classes with existential types and generalized algebraic data types. Such extensions are highly useful but their interaction has not been studied formally so far. Here, we present a unifying framework for these exten ..."
Abstract
-
Cited by 22 (9 self)
- Add to MetaCart
Abstract. There are a number of extended forms of algebraic data types such as type classes with existential types and generalized algebraic data types. Such extensions are highly useful but their interaction has not been studied formally so far. Here, we present a unifying framework for these extensions. We show that the combination of type classes and generalized algebraic data types allows us to express a number of interesting properties which are desired by programmers. We support type checking based on a novel constraint solver. Our results show that our system is practical and greatly extends the expressive power of languages such as Haskell and ML. 1
A concurrent Constraint Handling Rules implementation in Haskell with software transactional memory
- in Proc. of ACM SIGPLAN Workshop on Declarative Aspects of Multicore Programming (DAMP’07
, 2007
"... Constraint Handling Rules (CHR) is a concurrent committedchoice constraint logic programming language to describe transformations (rewritings) among multi-sets of constraints (atomic formulae). CHR is widely used in a range of applications spanning from type system design to artificial intelligence. ..."
Abstract
-
Cited by 7 (3 self)
- Add to MetaCart
Constraint Handling Rules (CHR) is a concurrent committedchoice constraint logic programming language to describe transformations (rewritings) among multi-sets of constraints (atomic formulae). CHR is widely used in a range of applications spanning from type system design to artificial intelligence. However, none of the existing CHR implementations we are aware of exploits concurrency or parallelism explicitly. We give a concurrent CHR implementation using GHC (Glasgow Haskell Compiler) with support for Software Transactional Memory. We achieve some significant performance improvements compared to a single-threaded CHR implementation. We obtain a further speed-up, in some cases nearly close to the optimum of 100%, when running programs under under a dual-core processor architecture. Our results show that CHR can be implemented efficiently on a multi-core architecture. 1.
Parallel Execution of Multi Set Constraint Rewrite Rules
"... Abstract. Multi-set constraint rewriting allows for a highly parallel computational model and has been used in a multitude of application domains such as constraint solving, agent specification etc. Rewriting steps can be applied simultaneously as long as they do not interfere with each other. We wi ..."
Abstract
-
Cited by 7 (1 self)
- Add to MetaCart
Abstract. Multi-set constraint rewriting allows for a highly parallel computational model and has been used in a multitude of application domains such as constraint solving, agent specification etc. Rewriting steps can be applied simultaneously as long as they do not interfere with each other. We wish that that the underlying constraint rewrite implementation executes rewrite steps in parallel on increasingly popular becoming multi-core architectures. We design and implement efficient algorithms which allow for the parallel execution of multi-set constraint rewrite rules. Our experiments show that we obtain some significant speed-ups on multi-core architectures. 1
Actors with Multi-Headed Message Receive Patterns
"... Abstract. The actor model provides the programmer with high-level concurrency abstractions to coordinate simultaneous computations by sending and receiving messages. Languages implementing the actor model such as Erlang commonly only support single-headed pattern matching over received messages. We ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
Abstract. The actor model provides the programmer with high-level concurrency abstractions to coordinate simultaneous computations by sending and receiving messages. Languages implementing the actor model such as Erlang commonly only support single-headed pattern matching over received messages. We propose and design an extension of Erlang style actors with receive clauses containing multi-headed message patterns. Patterns may be non-linear and constrained by guards. We provide a number of examples to show the usefulness of the extension. We also explore the design space for multi-headed message matching semantics, for example first-match and rule priority-match semantics. The various semantics are inspired by multi-set constraint matching semantics found in Constraint Handling Rules which provides us with a formal model to study actors with multi-headed message receive patterns. The system can be implemented efficiently and we have built a prototype as a library-extension to Haskell. 1
Principal type inference for GHCstyle multi-parameter type classes
- In Proc. of APLAS’06
, 2006
"... Abstract. We observe that the combination of multi-parameter type classes with existential types and type annotations leads to a loss of principal types and undecidability of type inference. This may be a surprising fact for users of these popular features. We conduct a concise investigation of the ..."
Abstract
-
Cited by 4 (4 self)
- Add to MetaCart
Abstract. We observe that the combination of multi-parameter type classes with existential types and type annotations leads to a loss of principal types and undecidability of type inference. This may be a surprising fact for users of these popular features. We conduct a concise investigation of the problem and are able to give a type inference procedure which, if successful, computes principal types under the conditions imposed by the Glasgow Haskell Compiler (GHC). Our results provide new insights on how to perform type inference for advanced type extensions. 1 Introduction Type systems are important building tools in the design of programming lan-guages. They are typically specified in terms of a set of typing rules which are formulated in natural deduction style. The standard approach towards estab-lishing type soundness is to show that any well-typed program cannot go wrong at run-time. Hence, one of the first tasks of a compiler is to verify whether aprogram is well-typed or not.
Compiling constraint handling rules with lazy and concurrent search techniques
, 2007
"... Abstract. Constraint Handling Rules [3] (CHR) is a concurrent commitedchoice constraint programming language to describe transformations (rewritings) among multi-sets of constraints. One of the main CHR execution tasks is the search for constraints matching a rule head. Several optimization techniqu ..."
Abstract
-
Cited by 4 (0 self)
- Add to MetaCart
Abstract. Constraint Handling Rules [3] (CHR) is a concurrent commitedchoice constraint programming language to describe transformations (rewritings) among multi-sets of constraints. One of the main CHR execution tasks is the search for constraints matching a rule head. Several optimization techniques have been widely studied, yet the actual details of the search strategies and their implementation are rarely the center of attention. In this paper, we explore the implementation of several search strategies using the lazy functional language Haskell. In combination with concurrency abstractions as supported by the Glasgow Haskell Compiler we obtain very clean and efficient implementations for searching of matching constraints. 1
The Chameleon System
- Source Code: Optimal Union-Find ufd rank make @ make(X) <=> root(X,0). findNode @ X ~> PX , find(X,R) <=> find(PX,R), X ~> R. findRoot @ root(X,_) \ find(X,R) <=> R=X. linkEq @ link(X,X) <=> true. linkLeft @ link(X,Y), root(X,RX) root(Y,RY) <=> RX >= RY |
, 2004
"... We give an overview of the major features of the Chameleon programming language, as well as use of the system, from a Haskell programmer's point of view. Chameleon supports typeclass overloading a la Haskell. The novelty of Chameleon is to allow the programmer to specify almost arbitrary conditions ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
We give an overview of the major features of the Chameleon programming language, as well as use of the system, from a Haskell programmer's point of view. Chameleon supports typeclass overloading a la Haskell. The novelty of Chameleon is to allow the programmer to specify almost arbitrary conditions on type classes in terms of Constraint Handling Rules (CHRs). In fact, Chameleon's entire type inference system and evidence translation of programs is phrased in terms of CHRs. 1
Type Inference for Multi-Parameter Type Classes
"... Abstract. We observe that the combination of multi-parameter type classes with existential types and type annotations leads to a loss of principal types. As a consequence type inference in implementations such as GHC is incomplete. This may be a surprising fact for users of these standard features. ..."
Abstract
- Add to MetaCart
Abstract. We observe that the combination of multi-parameter type classes with existential types and type annotations leads to a loss of principal types. As a consequence type inference in implementations such as GHC is incomplete. This may be a surprising fact for users of these standard features. We conduct a concise investigation of the problem and are able to precisely explain why we lose principality and completeness of inference. As remedy we propose several novel inference methods to retain completeness and principality. 1
Constraint and logic languages), D.3.4 Processors (Compilers).Type Inference for GADTs via Herbrand Constraint Abduction
, 2008
"... Type inference for Hindley/Milner and variants is well understood as a constraint solving problem. Recent extensions to Hindley/Milner such as generalized algebraic data types (GADTs) force us to go beyond this approach to inference. In this paper we show how to perform type inference for GADTs usin ..."
Abstract
- Add to MetaCart
Type inference for Hindley/Milner and variants is well understood as a constraint solving problem. Recent extensions to Hindley/Milner such as generalized algebraic data types (GADTs) force us to go beyond this approach to inference. In this paper we show how to perform type inference for GADTs using Herbrand constraint abduction, a solving method to infer missing facts in terms of Herbrand constraints, i.e. conjunctions of type equations. But typeinference for GADTs is very hard, we are the first to give example programs with an infinite number of maximal types. We propose to rule out several kinds of “non-intuitive ” solutions and show that we can construct in this way a complete and decidable type inference approach for GADTs and sketch how to support type error diagnosis. Our results point out new direction how to perform type inference for expressive type systems.
Extracting Programs from . . .
, 2006
"... Standard presentations of type class translation schemes exhibit some surprising problems when translating Haskell 98 programs. We suggests ways how to fix these problems based on a formal framework for extracting programs from type class proofs. Our description includes type improvement and recursi ..."
Abstract
- Add to MetaCart
Standard presentations of type class translation schemes exhibit some surprising problems when translating Haskell 98 programs. We suggests ways how to fix these problems based on a formal framework for extracting programs from type class proofs. Our description includes type improvement and recursive dictionaries – something which has not been formally studied before. Thus, we are able to advance the state of art of translating type classes and open up the possibility for new type class applications.

