[eclipse-clp-users] Boolean value behaviour

From: Edgaonkar, Shrirang <Shrirang.Edgaonkar_at_...390...>
Date: Mon, 8 Feb 2016 04:01:49 +0000
Dear clp users,



 Following is the script that executes:-

Script 1:



:- lib(ic).
solveNull(A,B):-

A #:: 0..1,
B #:: 0..1,

A #\= B,
B #= 1.



It provides the solution of A as 0 and B as 1 but I do not wish to have A as 0. I wish to restrict A to be var(See the script 2 below. It should pass.). One solution is to change the domain of A to 0..2 or 0..3. Is there a cleaner way of doing it?



Script 2:

:- lib(ic).
solveNull(A,B):-

A #:: 0..1,
B #:: 0..1,

A #\= B,
B #= 1,
var(A).



I am almost sure there isn't any solution to it but I wanted my search subroutine to decide the value of A.



Kindly help me.



Thanks and Regards,

Shrirang Edgaonkar

______________________________________________________________________
Disclaimer: This email and any attachments are sent in strictest confidence
for the sole use of the addressee and may contain legally privileged,
confidential, and proprietary data. If you are not the intended recipient,
please advise the sender by replying promptly to this email and then delete
and destroy this email and any attachments without any further use, copying
or forwarding.
Received on Mon Feb 08 2016 - 04:02:05 CET

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:30 CEST