{'fraction_non_alphanumeric': 0.017770597738287562, 'fraction_numerical': 0.0, 'mean_word_length': 5.257575757575758, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Connuence and Semantics of Constraint Simpliication Rules Connuence and Semantics of Constraint Simplication Rules

Constraint Simpliication 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 connuence for CSR programs. Connuence 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, suucient and necessary syntactic condition for connuence of terminating CSR programs. Moreover, as shown in this paper, connuence of a program implies consistency of its logical meaning (under a mild restriction).