-


- - . 4


domains
s=symbol /* s symbol */
predicates
parent(s,s)
female(s)
male(s)
mother(s,s)
father(s,s)
ancestor(s,s)
child(s,s)
clauses
parent(pam,bob). /* - */
parent(tom,bob).
parent(tom,liz).
parent(bob,ann).
parent(bob,pat).
parent(pat,jim).
female(pam). /* - */
female(liz). female(ann). female(pat).
male(tom). /* - */
male(bob). male(jim).
child(Y,X):- /* Y - X, X - Y */
parent(X,Y).
mother(X,Y):- /* X - Y, */
parent(X,Y),female(X). /* X - Y X - */
father(X,Y):- /* X - Y, */
parent(X,Y),male(X). /* X - Y X - */
ancestor(X,Z):- /* X - Z, */
parent(X,Z). /* X - Z */
ancestor(X,Z):- /* X - Z, */
parent(X,Y),ancestor(Y,Z). /* X - Y
Y - Z */
2.
 
, , : ; ; :
domains
point=symbol
predicates
arc_(point,point)
line_(point,point)
tr(point,point,point)
clauses
/* */
arc_(a,c). arc_(b,c). arc_(c,d). arc_(d,a). arc_(d,e). arc_(c,b). arc_(a,f).
/* , A B */
line_(A,B):-arc_(A,B),arc(B,A).



- -  - -  - -