CLP - missing variable binding

I’m using: SWI-Prolog version 8.0.2-1

Why do I get no bindings for X and Y in the third query, although I get bindings in the first two queries?

?- 2X+Y #= 5 , 2Y +X #= 7 , [Y,X] ins -1000000…sup.
X = 1,
Y = 3.

?- 2X+Y #= 5 , 2Y +X #= 7 , [Y,X] ins inf…100000.
X = 1,
Y = 3.

?- 2X+Y #= 5 , 2Y +X #= 7 , [Y,X] ins inf…sup.
X+2Y#=7,
2
X+Y#=5.

I would appreciate any comment or pointer to further reading.

Thanks,

Stefan

The FD in CLPFD means “finite domain” and inf…sup is not finite, so it returns the relation instead.

Sorry, but -1000000…sup is also not finite, but yields a solution, i.e. can be solved. Why that?

Iam,

-1000000…sup has a finite beginning, which alows the engine to have a starting point.

Why is the engine limited in this aspect? I mean:
The engine could take any number (e.g. 0) as starting point, start two processes (either in parallel or alternate between the two processes), such that 1 process regards inf…0 and the other 0…sup. As the current engine terminates for both semi-open intervals, inf…0 and 0…sup, correctly, a new engine using two processes should be able to come up with the correct result.

1 Like