I'm trying to understand the exact search order of Prolog. In my university course script there are shown traces that show exactly where the "pointer" is at the moment. Let the following be our database:
a(a, a, b).
a(a, a, c).
a(a, a, d).
a(a, a, e).
a(a, a, f).
Then the output of Prolog should be something like this:
?- a(a, a, f).
a(a, a, b). fail
a(a, a, c). fail
a(a, a, d). fail
a(a, a, e). fail
a(a, a, f). succ
Here I can see exactly where prolog is searching right now and whether the unification is possible or not. This view would be very helpful when trying to understand rules and recursion in Prolog.
I have tried to use trace/0, trace/1 and debug/0. But it just shows me rather confusing and IMO unnecessary information.
Is there a command in Prolog to view something like I mentioned above? Thanks!