[eclipse-clp-users] Customized Search

From: Bogdan Tanasa <g-bogta_at_ida.liu.se>
Date: Sat, 7 May 2011 20:59:42 +0200
Hi,

 

I have an array of Boolean variables x_1, x_2, ., x_n and the following
relation:

 

x_i = y(x_1, ., x_i-1) * z + (1 - y) * x_i.

I my code I am invoking search / 6 on the x variables but I get a wrong
behavior. 

 

y is a Boolean function of the previous i - 1 variables while z is an
Boolean function which depends on completely other variables then x.

 

The recursive relation should work like this:

If y is 1 then x_i have to take the value of z and if y is 0 then x_i should
be instantiated by a search predicate.

In other words if y is 1 the search procedure does not have to change the
value of x_i.

 

I was expecting that x_i #= y(x_1, ., x_i-1) * z + (1 - y) * x_i will do
trick but it doesn't. 

 

Can you please help with some ideas ?

Thanks,

Bogdan.

 
Received on Sat May 07 2011 - 18:59:55 CEST

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