Next: Logical Variables (II)
Up: Syntax and Semantics of
Previous: Searching (II)
- Logical variables provide argument passing (to and from
predicates)
- And more interesting stuff (we will see later)
- Logical variable assignment is monotonic
-
- ?- X = a.
X = a
-
- ?- X = a, X = b.
no
(because X cannot be at the same time a and b)
- The constraint
forces the variables to have the same
value
-
- ?- X = Y, X = a.
X = a, Y = a.
-
- ?- X = Y, pet(X), sound(Y, roars).
no
(why?)
-
- ?- X = Y, pet(X).
X = spot, Y = spot
X = barry, Y = barry
Last modification: Thu Oct 7 12:04:03 MEST 1999 <webmaster@clip.dia.fi.upm.es>