395 research outputs found
Linear-Logic Based Analysis of Constraint Handling Rules with Disjunction
Constraint Handling Rules (CHR) is a declarative committed-choice programming
language with a strong relationship to linear logic. Its generalization CHR
with Disjunction (CHRv) is a multi-paradigm declarative programming language
that allows the embedding of horn programs. We analyse the assets and the
limitations of the classical declarative semantics of CHR before we motivate
and develop a linear-logic declarative semantics for CHR and CHRv. We show how
to apply the linear-logic semantics to decide program properties and to prove
operational equivalence of CHRv programs across the boundaries of language
paradigms
Optimal Union-Find in Constraint Handling Rules
Constraint Handling Rules (CHR) is a committed-choice rule-based language
that was originally intended for writing constraint solvers. In this paper we
show that it is also possible to write the classic union-find algorithm and
variants in CHR. The programs neither compromise in declarativeness nor
efficiency. We study the time complexity of our programs: they match the
almost-linear complexity of the best known imperative implementations. This
fact is illustrated with experimental results.Comment: 12 pages, 3 figures, to appear in Theory and Practice of Logic
Programming (TPLP
Observational equivalences for linear logic CC languages
Linear logic Concurrent Constraint programming (LCC) is an extension of
concurrent constraint programming (CC) where the constraint system is based on
Girard's linear logic instead of the classical logic. In this paper we address
the problem of program equivalence for this programming framework. For this
purpose, we present a structural operational semantics for LCC based on a label
transition system and investigate different notions of observational
equivalences inspired by the state of art of process algebras. Then, we
demonstrate that the asynchronous \pi-calculus can be viewed as simple
syntactical restrictions of LCC. Finally we show LCC observational equivalences
can be transposed straightforwardly to classical Concurrent Constraint
languages and Constraint Handling Rules, and investigate the resulting
equivalences.Comment: 17 page
Unfolding in CHR
Program transformation is an appealing technique which allows to improve
run-time efficiency, space-consumption and more generally to optimize a given
program. Essentially it consists of a sequence of syntactic program
manipulations which preserves some kind of semantic equivalence. One of the
basic operations which is used by most program transformation systems is
unfolding which consists in the replacement of a procedure call by its
definition. While there is a large body of literature on transformation and
unfolding of sequential programs, very few papers have addressed this issue for
concurrent languages and, to the best of our knowledge, no other has considered
unfolding of CHR programs.
This paper defines a correct unfolding system for CHR programs. We define an
unfolding rule, show its correctness and discuss some conditions which can be
used to delete an unfolded rule while preserving the program meaning. We prove
that confluence and termination properties are preserved by the above
transformations
- …