/* ======================================================== */ /* Authors: Smadar Kedar-Cabelli & Thorne McCarty (Rutgers) */ /* This is the example from their MLW 1987 paper. */ /* ======================================================== */ /* Goal concept, as Mitchell, Keller & Kedar-Cabelli called it. */ kill(A,B) :- hate(A,B), possess(A,C), weapon(C). /* Domain Theory. */ hate(W,W) :- depressed(W). possess(U,V) :- buy(U,V). weapon(Z) :- gun(Z). /* Training Example. */ depressed(john). buy(john,gun1). gun(gun1). /* Query. Invoked using something analogous to "q(P,G)." */ query :- explain_and_store(kill(john,john),kill(X,Y)).