Results 1 - 10
of
60
Constraint Handling Rules
- Constraint Programming: Basics and Trends, LNCS 910
, 1995
"... . We are investigating the use of a class of logical formulas to define constraint theories and implement constraint solvers at the same time. The representation of constraint evaluation in a declarative formalism greatly facilitates the prototyping, extension, specialization and combination of cons ..."
Abstract
-
Cited by 171 (29 self)
- Add to MetaCart
. We are investigating the use of a class of logical formulas to define constraint theories and implement constraint solvers at the same time. The representation of constraint evaluation in a declarative formalism greatly facilitates the prototyping, extension, specialization and combination of constraint solvers. In our approach, constraint evaluation is specified using multiheaded guarded clauses called constraint handling rules (CHRs). CHRs define determinate conditional rewrite systems that express how conjunctions of constraints propagate and simplify. In this paper we concentrate on CHRs as an extension for constraint logic programming languages. Into such languages, the CHRs can be tightly integrated. They can make use of any hard-wired solvers already built into the host language. Program clauses can be used to specify the non-deterministic behavior of constraints, i.e. to introduce search by constraints. In this way our approach merges the advantages of constraints (eager simp...
A theory of overloading
- ACM Transactions on Programming Languages and Systems (TOPLAS
, 2002
"... Abstract We introduce a novel approach for debugging ill-typed programs in the Hindley/Milner system. We map the typing problem for a program to a system of constraints each attached to program code that generates the constraints. We use reasoning about constraint satisfiability and implication to f ..."
Abstract
-
Cited by 52 (17 self)
- Add to MetaCart
Abstract We introduce a novel approach for debugging ill-typed programs in the Hindley/Milner system. We map the typing problem for a program to a system of constraints each attached to program code that generates the constraints. We use reasoning about constraint satisfiability and implication to find minimal justifications of type errors, and to explain unexpected types that arise. Through an interactive process akin to declarative debugging, a user can track down exactly where a type error occurs. We are able to capture various extensions of the Hindley/Milner system such as type annotations and Haskell-style type class overloading. The approach has been implemented as part of the Chameleon system.
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 47 (21 self)
- Add to MetaCart
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.
The Refined Operational Semantics of Constraint Handling Rules
- IN 20TH INTERNATIONAL CONFERENCE ON LOGIC PROGRAMMING (ICLP’04
, 2004
"... Constraint Handling Rules (CHRs) are a high-level rulebased programming language commonly used to write constraint solvers. The theoretical operational semantics for CHRs is highly non-deterministic and relies on writing confluent programs to have a meaningful behaviour. Implementations of CHRs use ..."
Abstract
-
Cited by 41 (3 self)
- Add to MetaCart
Constraint Handling Rules (CHRs) are a high-level rulebased programming language commonly used to write constraint solvers. The theoretical operational semantics for CHRs is highly non-deterministic and relies on writing confluent programs to have a meaningful behaviour. Implementations of CHRs use an operational semantics which is considerably finer than the theoretical operational semantics, but is still nondeterministic (from the user's perspective). This paper formally defines this refined operational semantics and proves it implements the theoretical operational semantics. It also shows how to create a (partial) confluence checker capable of detecting programs which are confluent under this semantics, but not under the theoretical operational semantics. This supports the use of new idioms in CHR programs.
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 30 (14 self)
- Add to MetaCart
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.
An Experimental CLP Platform for Integrity Constraints and Abduction
- In Proceedings of FQAS2000, Flexible Query Answering Systems: Advances in Soft Computing series
, 2000
"... Integrity constraint and abduction are important in query-answering systems for enhanced query processing and for expressing knowledge in databases. A straightforward characterization of the two is given in a subset of the language CHR _ , originally intended for writing constraint solvers to be a ..."
Abstract
-
Cited by 30 (11 self)
- Add to MetaCart
Integrity constraint and abduction are important in query-answering systems for enhanced query processing and for expressing knowledge in databases. A straightforward characterization of the two is given in a subset of the language CHR _ , originally intended for writing constraint solvers to be applied for CLP languages. This subset has a strikingly simple computational model that can be executed using existing, Prolog-based technology. Together with earlier results, this confirms CHR _ as a multiparadigm platform for experimenting with combinations of top-down and bottom-up evaluation, disjunctive databases and, as shown here, integrity constraint and abduction 1 Introduction Constraint logic programming (CLP) [10] is established as an extension to logic programming that adds higher expressibility and in some cases more efficient query evaluation. CLP has also given rise to a field of constraint databases [14]. In the present paper, we suggest CLP techniques applied for defini...
CHR: A Flexible Query Language
- In FQAS ’98: Proceedings of the Third International Conference on Flexible Query Answering Systems
"... . We show how the language CHR, a high-level logic language for the implementation of constraint solvers, can be slightly extended to become a general-purpose logic programming language with an expressive power subsuming the expressive power of Horn clause programs with SLD resolution. The extended ..."
Abstract
-
Cited by 28 (1 self)
- Add to MetaCart
. We show how the language CHR, a high-level logic language for the implementation of constraint solvers, can be slightly extended to become a general-purpose logic programming language with an expressive power subsuming the expressive power of Horn clause programs with SLD resolution. The extended language, called "CHR ", retains however the extra features of CHR, e.g., committed choice and matching, which are important for other purposes, especially for efficiently solving constraints. CHR turns out to be a very flexible query language since it supports several (constraint) logic programming paradigms and allows to mix them in a single program. In particular, it supports top-down query evaluation and also bottom-up evaluation as it is frequently used in (disjunctive) deductive databases. 1 Introduction Constraint Handling Rules (CHR) is a high-level logic language for the implementation of constraint solvers [7]. Its operational semantics differs from SLD resolution in various...
Confluence and Semantics of Constraint Simplification Rules
- CONSTRAINTS JOURNAL
, 1999
"... Constraint Simplification Rules (CSR) is a subset of the Constraint Handling Rules (CHR) language. CHR is a powerful special-purpose declarative programming language for writing constraint solvers. The CSR subset of CHR forms essentially a committed-choice language consisting of guarded rules with ..."
Abstract
-
Cited by 28 (14 self)
- Add to MetaCart
Constraint Simplification Rules (CSR) is a subset of the Constraint Handling Rules (CHR) language. CHR is a powerful special-purpose declarative programming language for writing constraint solvers. The CSR subset of CHR forms essentially a committed-choice language consisting of guarded rules with multiple heads that replace constraints by simpler ones until they are solved. This paper gives declarative and operational semantics as well as soundness and completeness results for CSR programs. In this paper, we introduce a notion of confluence for CSR programs. Confluence is an essential syntactical property of any constraint solver. It ensures that the solver will always compute the same result for a given set of constraints independent of which rules are applied. It also means that it does not matter for the result in which order the constraints arrive at the constraint solver. We give a decidable, sufficient and necessary syntactic condition for confluence of terminating CSR progra...
Parallelizing union-find in Constraint Handling Rules using confluence analysis
- LOGIC PROGRAMMING: 21ST INTERNATIONAL CONFERENCE, ICLP 2005, VOLUME 3668 OF LECTURE NOTES IN COMPUTER SCIENCE
, 2005
"... Constraint Handling Rules is a logical concurrent committedchoice rule-based language. Recently it was shown that the classical union-find algorithm can be implemented in CHR with optimal time complexity. Here we investigate if a parallel implementation of this algorithm is also possible in CHR. The ..."
Abstract
-
Cited by 27 (14 self)
- Add to MetaCart
Constraint Handling Rules is a logical concurrent committedchoice rule-based language. Recently it was shown that the classical union-find algorithm can be implemented in CHR with optimal time complexity. Here we investigate if a parallel implementation of this algorithm is also possible in CHR. The problem is hard for several reasons:- Up to now, no parallel computation model for CHR was defined.- Tarjan’s optimal union-find is known to be hard to parallelize.- The parallel code should be as close as possible to the sequential one. It turns out that confluence analysis of the sequential implementation gives almost all the information needed to parallelize the union-find algorithm under a rather general parallel computation model for CHR.
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

