Описание слайда:
ПРОГРАММА. РОДСТВЕННЫЕ ОТНОШЕНИЯ
domains name=symbol
predicates
nondeterm male(name) nondeterm female(name)
nondeterm parent(name, name)
nondeterm mother(name, name)
nondeterm sister(name, name)
clauses parent (kat, bob). parent (tom, bob). parent (tom, liz).
parent (bob, ann).
parent (bob, pat).
parent (mary, ann).
parent (pat, juli).
male(tom). male(bob). female(juli).
female(liz). female(kat).
female(pat).
female(ann).
sister (X, Y):- parent(Z,X), parent(Z,Y), X<>Y,
female(X).
mother(X, Y):-parent(X, Y), female(X).
Goal mother (X, Y), write(“mother “,X,’\n’,Y,’\n’).
%mother (X, Y), write(X),nl,write(Y).
%mother (X, Y), write(X,’\n’,Y),nl,fail.