Article

Confluence and Semantics of Constraint Simplification Rules

Constraints (Impact Factor: 1.15). 03/1998; DOI: 10.1023/A:1009842826135
Source: DBLP

ABSTRACT . 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...

Download full-text

Full-text

Available from: Slim Abdennadher, Feb 21, 2013
1 Follower
 · 
95 Views
  • Source
    [Show abstract] [Hide abstract]
    ABSTRACT: We consider the application of Constraint Handling Rules (CHR) for the specification of type inference systems, such as that used by Haskell. Confluence of CHR guarantees that the answer provided by type inference is correct and consistent. The standard method for establishing confluence relies on an assumption that the CHR program is terminating. However, many examples in practice give rise to non-terminating CHR programs, rendering this method inapplicable. Despite no guarantee of termination or confluence, the Glasgow Haskell Compiler (GHC) supports options that allow the user to proceed with type inference anyway, e.g. via the use of the UndecidableInstances flag. In this paper we formally identify and verify a set of relaxed criteria, namely range-restrictedness, local confluence, and ground termination, that ensure the consistency of CHR-based type inference that maps to potentially non-terminating CHR programs.
    Theory and Practice of Logic Programming 05/2014; 14(4-5). DOI:10.1017/S1471068414000246 · 0.90 Impact Factor
  • Source
    [Show abstract] [Hide abstract]
    ABSTRACT: This paper introduces and studies the notion of CLP projection for Constraint Handling Rules (CHR). The CLP projection consists of a naive translation of CHR programs into Constraint Logic Programs (CLP). We show that the CLP projection provides a safe operational and declarative approximation for CHR programs. We demonstrate moreover that a confluent CHR program has a least model, which is precisely equal to the least model of its CLP projection (closing hence a ten year-old conjecture by Abdenader et al.). Finally, we illustrate how the notion of CLP projection can be used in practice to apply CLP analyzers to CHR. In particular, we show results from applying AProVE to prove termination, and CiaoPP to infer both complexity upper bounds and types for CHR programs.
    Proceedings of the 13th International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming, July 20-22, 2011, Odense, Denmark; 01/2011
  • Source
    [Show abstract] [Hide abstract]
    ABSTRACT: (To appear in Theory and Practice of Logic Programming (TPLP)) We introduce a systematic, concurrent execution scheme for Constraint Handling Rules (CHR) based on a previously proposed sequential goal-based CHR semantics. We establish strong correspondence results to the abstract CHR semantics, thus guaranteeing that any answer in the concurrent, goal-based CHR semantics is reproducible in the abstract CHR semantics. Our work provides the foundation to obtain efficient, parallel CHR execution schemes.
    Theory and Practice of Logic Programming 06/2010; 11(06). DOI:10.1017/S147106841000044X · 0.90 Impact Factor