[eclipse-clp-users] Not equal constraint in String

From: Edgaonkar, Shrirang <Shrirang.Edgaonkar_at_...390...>
Date: Mon, 22 Jun 2015 02:05:37 +0000
Dear Clp Users,

  Following script

solve(STR1, STR2, STR3):-

  STR3 = "ABCD",
  append_strings(STR1, STR2, STR3),
  STR1 \= "",

outputs the following

?- solve(STR1, STR2, STR3).
STR1 = "A"
STR2 = "BCD"
Yes (0.00s cpu, solution 1, maybe more)


whereas the following script

solve(STR1, STR2, STR3):-

  STR3 = "ABCD",
  STR1 \= "",
  append_strings(STR1, STR2, STR3),


?- solve(STR1, STR2, STR3).
No (0.00s cpu)

What is the difference ? Am I missing anything here ?

Thanks in advance.


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 Jun 22 2015 - 02:27:11 CEST

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