[eclipse-clp-users] Two problems with the ic-Solver

From: Andreas Berger <bergeand_at_tu-cottbus.de>
Date: Wed, 10 Feb 2010 18:11:05 +0100

I'm using ECLiPSe Prolog for my bachelor-thesis at the chair Computer 
Networks and Communications Systems at the BTU-Cottbus 

The C++ programm I write uses ECLiPSe to solve a set of constraints that 
are read in from a file.

I need help with two problems that appear with the usage of the ic-library.

The following code shows the behaviour of ic, when giving it two mutual 
exclusive Constraints at the ECLiPSe commandline. In this case I just 
wan't to know if the given CSP is solveable. (ic library is loaded).

/[eclipse 2]: A #< B, A #> B.

A = A{-1.0Inf .. 1.0Inf}
B = B{-1.0Inf .. 1.0Inf}

Delayed goals:
     B{-1.0Inf .. 1.0Inf} - A{-1.0Inf .. 1.0Inf} #> 0
     -(B{-1.0Inf .. 1.0Inf}) + A{-1.0Inf .. 1.0Inf} #> 0
Yes (0.00s cpu)
Why does the solver say it's possible to solve something like this?

At the second step when I try to get a specific solution for the problem 
with locate, ECLiPSe gets in an infinite loop and does not return anymore.

/[eclipse 3]: A #< B, A #> B, locate([A,B],0.1)./

Why? How can i avoid this?

Can someone explain me this behaviour and maybe a way to bypass this 


I want to express a Constraint of the Form:

"Give me a Number X, which is bitwise connected (C++ '&' ) with a second 
Number A is 0.

Something like:  A /\ X = 0, give me a possible X when A = 9.

I can't find an appropiate predicate for such kind of problem. I tried 
the following construct:
9 /\ X #= 0,  but of course it does not work.

Can someone give me a hint to solve this problem please.

Thank's and
Best regards

Received on Wed Feb 10 2010 - 17:30:53 CET

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