next up previous
Next: Querying a Logic Program Up: CS206 Lecture 01 Formal Previous: Functional Programming

From Functions to Relations

Suppose we treat plus as a relation taking 3 arguments.
That is, we say

plus(2,3,5) is true because 2 + 3 = 5.
plus(2,3,4) is false because 2 + 3 $\neq$ 4.
and so on ....

A Logic Program for plus is one that somehow expresses for any three arguments X, Y, Z the truth value of plus(X,Y,Z).



G. Sivakumar 2002-12-31