S 24 P 1 Negation As Failure
S 24 P 1 Negation As Failure
S 24 P 1 Negation As Failure
Programming Paradigms
Reading Assignment
Programming in Prolog
Using the ISO Standard
(5th Edition)
Chapters 1 - 4
Chapter 4
Cut (!/0)
Commits to choices made during the immediate parent
predicate
\+
Implemented using !, fail
A \= B
The same as \+ A = B
A =\= B
Does not use cut fail
Example
overlap(A, B) :- member(X, A), member(X, B).
disjoint(A, B) :- \+ overlap(A, B).