[eclipse-clp-users] Domains of ic variables

From: Dario Campagna <dario.campagna_at_...184...>
Date: Mon, 10 Aug 2009 19:44:01 +0200
Hi,

	I have a question regarding the domain representation of ic variables.

Let us consider the following goal

[eclipse 4]: A #:: [-1000000000 .. 1 , 4, 6, 9, 13 .. 16, 20 .. 60],  
get_domain(A,D), writeln(D).
[-1000000000 .. 1, 4, 6, 9, 13 .. 16, 20 .. 60]

A = A{[-1000000000 .. 1, 4, 6, 9, 13 .. 16, 20 .. 60]}
D = [-1000000000 .. 1, 4, 6, 9, 13 .. 16, 20 .. 60]
Yes (0.16s cpu)

The predicate writeln print the domain we indicated for A.

Let us consider this slightly different goal

[eclipse 5]: A #:: [-10000000000 .. 1 , 4, 6, 9, 13 .. 16, 20 .. 60],  
get_domain(A,D), writeln(D).
-10000000000 .. 60

A = A{-10000000000 .. 60}
D = -10000000000 .. 60


Delayed goals:
	ic_kernel : exclude_range(A{-10000000000 .. 60}, 17, 19)
	ic_kernel : exclude_range(A{-10000000000 .. 60}, 10, 12)
	ic_kernel : exclude_range(A{-10000000000 .. 60}, 7, 8)
	ic_kernel : exclude_range(A{-10000000000 .. 60}, 5, 5)
	ic_kernel : exclude_range(A{-10000000000 .. 60}, 2, 3)
Yes (0.00s cpu)

This time the predicate writeln/1 print a domain that is different  
from the one we indicated for A.

Why in the result of [eclipse 5] the domain of A is an interval and we  
have five delayed constraints for the variable A?
Is it possible to obtain a result equivalent to the one obtained with  
[eclipse 4] in cases similar to [eclipse 5]?


Thanks.
Dario Campagna
Received on Mon Aug 10 2009 - 17:44:23 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 09:13:20 CEST