PREDICATES
father(string,string).
ancestor(string,string,string).
CLAUSES
father(a, b).
father(b, c).
ancestor(X, Y, Z):- father(X,Y), father(Y, Z).
GOAL
ancestor
(X
, Y
, Z
), write(X
,”
-”
,Y
,”
-”
,Z
),nl
.
UFJFRElDQVRFUwogCmZhdGhlcihzdHJpbmcsc3RyaW5nKS4KIAphbmNlc3RvcihzdHJpbmcsc3RyaW5nLHN0cmluZykuCiAKQ0xBVVNFUwogCmZhdGhlcihhLCBiKS4KZmF0aGVyKGIsIGMpLgogCmFuY2VzdG9yKFgsIFksIFopOi0gZmF0aGVyKFgsWSksIGZhdGhlcihZLCBaKS4KIApHT0FMCiAKYW5jZXN0b3IoWCwgWSwgWiksIHdyaXRlKFgs4oCdLeKAnSxZLOKAnS3igJ0sWiksbmwu
prog.pl:3:1: syntax error: . or operator expected after expression
prog.pl:9:1: syntax error: . or operator expected after expression
prog.pl:12: warning: discontiguous predicate ancestor/3 - clause ignored
prog.pl:16:1: syntax error: . or operator expected after expression
3 error(s)
compilation failed