Re: [eclipse-users] reified constraints

From: Malcolm Ryan <malcolmr_at_...25...>
Date: Tue, 18 Sep 2007 17:38:11 +1000
In a related problem, I want use the reified version of in/2 from  
ic_sets:

B #= (I in Set)

but I find that it only propagates when I is instantiated, not when  
it is constrained, so:

[eclipse 32]: I :: [0,1,2,3,4], B #= (I in [1,2]), I #> 2.

B = B{[0, 1]}
I = I{[3, 4]}

B is not instantiated even though clearly I cannot be in [1,2].

I have discovered, however, that the following trick works:

[eclipse 8]: I :: [0,1,2,3,4], J in [1,2], B #= (I #= J), I #> 2.

I = I{[3, 4]}
J = J{[1, 2]}
B = 0
Yes (0.00s cpu)

Can anyone think of a good reason why doing this would be inadvisable?

Malcolm

--
"If there is one thing worse than the modern weakening of major morals
    it is the modern strengthening of minor morals.
Thus it is considered more withering to accuse a man
    of bad taste than of bad ethics."    -- G.K.Chesterton, On Lying  
in Bed
Received on Tue Sep 18 2007 - 08:38:27 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST