Re: [eclipse-clp-users] How to extend lib(ic) to get stronger propagation?

From: Helmut Simonis <>
Date: Tue, 17 Nov 2009 12:46:49 -0000

there are two possibilities there:

a) you can use something like CHR to detect combinations of constraints from
which you can detect new constraints. This is expressed as rules that you
can write yourself, very easy to do in ECLiPSe.

b) You can treat a set of inequalities as a global constraint, set up a
graph and then detect properties (e.g. cycles) in that graph. This can be
more powerful, but you will have to write the constraint yourself. There
have been some publications on this, I don't have a reference handy. Perhaps
somebody else can help?


-----Original Message-----
From: Ulrich Scholz [] 
Sent: 17 November 2009 12:25
Subject: [eclipse-clp-users] How to extend lib(ic) to get stronger

Hi again,

It is clear that a constraint package cannot detect and propagate all
possible simplifications.  But sometimes, a specific simplification can be
of great help.

Consider the following constraint program.

  [eclipse 3]: lib(ic), [A, B] :: [0, 100], A #=< B, B #=< A.

  A = A{[0, 100]}
  B = B{[0, 100]}

  Delayed goals:
          -(B{[0, 100]}) + A{[0, 100]} #=< 0
          B{[0, 100]} - A{[0, 100]} #=< 0
  Yes (0.00s cpu)

It would really help me if (an extended) ic would simplify this case to
A#=B.  Labeling is no option for me, I need to detect this case early.

Could you suggest an approach?  Maybe checking some conditions on every
posting of #=<?  Depending on the outcome, I could thenpost one of #=, #<,
or #=<.



Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus
what you do best, core application coding. Discover what's new with
Crystal Reports now.
ECLiPSe-CLP-Users mailing list
Received on Tue Nov 17 2009 - 12:47:19 CET

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET