Prolog deals with relations
?- isSquareOf(9,3). yes
?- isSquareOf(9,2). no
?- isSquareOf(25,X). X=5 ; X=-5
?- isSquareOf(X,-3). X=9
The program (called a query) can run in many directions
It’s trying to prove the formula given underlying facts
The query can produce many answers
Previous slide
Next slide
Back to first slide
View graphic version