# Confluence and Semantics of Constraint Simplification Rules

### Full-text

Slim Abdennadher, Feb 21, 2013 Available from:-
- "If a program P is both locally confluent and terminating, then P is confluent (Newman 1942). Confluence implies logical consistency of P (Abdennadher et al. 1999; Haemmerlé et al. 2011). That is, the logical reading of P does not imply false. "

[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 -
- "We next present a theorem that uses fixpoints semantics to reformulate results on CSR logical semantics (Frühwirth 1998; Abdennadher et al. 1999). It says that a state that has at least one answer is in the inductive semantics of a confluent CSR program if and only if its logical reading is satisfiable within the theory CP. "

[Show abstract] [Hide abstract]

**ABSTRACT:**In this paper, we address the problem of defining a fixpoint semantics for Constraint Handling Rules (CHR) that captures the behavior of both simplification and propagation rules in a sound and complete way with respect to their declarative semantics. Firstly, we show that the logical reading of states with respect to a set of simplification rules can be characterized by a least fixpoint over the transition system generated by the abstract operational semantics of CHR. Similarly, we demonstrate that the logical reading of states with respect to a set of propagation rules can be characterized by a greatest fixpoint. Then, in order to take advantage of both types of rules without losing fixpoint characterization, we present an operational semantics with persistent. We finally establish that this semantics can be characterized by two nested fixpoints, and we show the resulting language is an elegant framework to program using coinductive reasoning.Theory and Practice of Logic Programming 08/2011; 11. DOI:10.1017/S1471068411000196 · 0.90 Impact Factor -
- "• The logical models of a CHR program are under-approximated by the least model of its projection. We show moreover that the least model of a confluent CHR program is precisely the least model of its CLP projection (closing hence a ten year-old conjecture by Abdenader et al. [1]). • The success set with respect a CHR program can be charaterized by the successes of its projection. "

##### Conference Paper: CLP projection for constraint handling rules.

[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