AخA
 
1
father(orville, abe).
2
father(abe, homer).
3
father(homer, bart).
4
father(homer, lisa).
5
father(homer, maggie).
6
grandfather(X, Y) :- father(X, Z), father(Z, Y).
7
grandfather(X, Y)?

Step 1 of 145

grandfather(X, Y)
father(orville, abe)
grandfather(X1, Y1) :- ...
father(abe, homer)
grandfather(X1, Y1) :- ...
father(homer, bart)
grandfather(X1, Y1) :- ...
father(homer, lisa)
grandfather(X1, Y1) :- ...
father(homer, maggie)
grandfather(X1, Y1) :- ...
grandfather(X1, Y1) :- ...
grandfather(X1, Y1) :- ...

About Prolog Visualizer

This Prolog visualizer is created by Zhixuan Lai and Alessandro Warth at CDG labs LA.

Usage:
Made possible by:

Grammar

Prolog Program Rule Query Rule a rule Clause :- Clauses . body Clause . noBody Query a query Clauses ? Clause a clause symbol ( Term , Term ) args symbol noArgs Clauses Clause , Clause Term Clause List variable List [ ] empty [ Contents ] nonEmpty Contents Term , Contents cons1 Term | Term cons2 Term single variable a variable upper alnum symbol a symbol lower alnum tokens variable symbol _

Prolog Visualizer Tutorial