Testy pluginu prolog.
<prolog cache=„true” goal=„zwierze(X),write(X),nl,fail”> zwierze(pies). zwierze(kot). </prolog>
A parent and a female is somebody's mother. A parent and a male is somebody's father.
<prolog cache=„true”> mother(X,Y) :-
parent(X,Y), female(X).
father(X,Y) :-
parent(X,Y), male(X).
</prolog>
Info about all families gathered in this namespace.
<prolog scope=„.:*_family”> </prolog>
There is Kate and Liz obviously girls, and a couple of boys: Tom and Bob. Kate is Bob's mom, while Tom is his dad. Tom is also Liz's dad.
<prolog cache=„true”> female(person(kate,smith)). female(person(liz,smith)).
male(person(tom,smith)). male(person(bob,smith)).
parent(person(kate,smith),person(bob,smith)). parent(person(tom,smith),person(bob,smith)). parent(person(tom,smith),person(liz,smith)). </prolog>
-RESULT-
<prolog goal=„male(X),write(X),nl,fail” scope=„.*”> </prolog>
<prolog goal=„mother(X,Y),write(X),nl,fail” scope=„.*:testyprolog2”> </prolog>
<prolog goal=„father(X,Y),write(X),nl,fail” scope=„pl:miw:miw08_dokuviz:testyprolog2”> </prolog>
<prolog goal=„mother(X,_),write(X),nl,fail” scope=„.*family” > </prolog>
and again:
<prolog goal=„mother(X,_),write(X),nl,fail” scope=„.*family.*”> </prolog>