Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 27 |
Nodes: | 6 (0 / 6) |
Uptime: | 43:34:50 |
Calls: | 631 |
Calls today: | 2 |
Files: | 1,187 |
D/L today: |
24 files (29,813K bytes) |
Messages: | 175,620 |
Hi,
UWN wrote:
?- call((!,false->true;true)).
-a-a false, unexpected.
-a-a true. % expected, but not found. Works in 14 other systems.
Nope, I get:
/* Dogelog Player */
?- call((!,false->true;true)).
EfU? Fehler: Pr|ndikat false/0 undefiniert.
-a-a-a user auf 1
But this here works:
/* Dogelog Player */
?- call((!,fail->true;true)).
true.
LoL
Bye
Hi,
Because Prolog has no false/0. It
only has fail/0, everything else is
Negation as Failure interpretation:
\+ P If the goal P has a solution, fail,
-aotherwise succeed. This is not real negation
-a("P is false"), but a kind of pseudo-negation
-ameaning "P is not provable". It is defined as if by
-a\+(P) :- P, !, fail.
-a\+(_).
https://userweb.fct.unl.pt/~lmp/publications/online-papers/DECsystem-10%20PROLOG%20USER%27S%20MANUAL.pdf
Bye
Mild Shock schrieb:
Hi,
UWN wrote:
?- call((!,false->true;true)).
-a-a-a false, unexpected.
-a-a-a true. % expected, but not found. Works in 14 other systems.
Nope, I get:
/* Dogelog Player */
?- call((!,false->true;true)).
EfU? Fehler: Pr|ndikat false/0 undefiniert.
-a-a-a-a user auf 1
But this here works:
/* Dogelog Player */
?- call((!,fail->true;true)).
true.
LoL
Bye