Newsgroups: comp.constraints
Path: cantaloupe.srv.cs.cmu.edu!fs7.ece.cmu.edu!hudson.lm.com!godot.cc.duq.edu!news.duke.edu!agate!hpg30a.csc.cuhk.hk!eng_ser1!jlee
From: jlee@cs.cuhk.hk (Jimmy Ho Man Lee)
Subject: Re: Solving a conjunction of X <= Y clauses
Message-ID: <D2Lysz.3qn@eng_ser1.erg.cuhk.hk>
Lines:  28
Sender: news@eng_ser1.erg.cuhk.hk
Organization: Engineering Faculty, The Chinese U. of Hong Kong
References: <D25DLK.Jwo@ips.cs.tu-bs.de> <D2Anqx.BEK@ecrc.de>
Date: Wed, 18 Jan 1995 15:53:22 GMT

thom@ecrc.de (Thom Fruehwirth) writes:

>Such algorithms are easily implemented with constraint handling rules (CHRs),
>a special purpose language to write constraint systems. CHRs are available
>as a library of the constraint logic programming platform ECLiPSe. The
>library includes about 20 constraint solvers, one of it solves your problems
>of type 1 and type 2 over the reals and rationals. By adding some rules, 
>the solver can be extended to work for integers or finite numerical domains.

>You just have to encode the axioms of the corresponding theory.
>You start with something like:

>	reflexivity @ X=<X <=> true.
>	symmetry @ X=<Y,Y=<X <=> X=Y.
>	transitivity @ X=<Y,Y=<Z ==> X=<Z.

>	check_numbers @ N=<M <=> number(N),number(M) | check_leq(N,M).

>Solving A=<B,1=<A,B=<1 leads to the following sequence of rule applications:

> 1=<A,A=<B propagates 1=<B by transitivity.
> 1=<B,B=<1 simplifies to B=1 by symmetry.
> B=<A,A=<B simplifies to A=B by symmetry.
Any papers or techreports describing CHRs and its solvers?  Thanx.

Cheers,
jim
