Is there an easy way to view "stack traces" with the interpreter?

Are you refering to the dif/2 solution? Which could work
in the less common case if all queries and all subgoals were
ground. It creates quadratic many dif/2 constraints:

Many of the dif/2 constraints get triggered when the trait/3
goals get satisfied, slowing it down. dif/2 can also not detect
alpha conversion, i.e. that proving ∃Y P(Y) while proving

∃X P(X) is redundant, so that it has less fast failure properties
and can lead to infinite loops. One can easily check that dif/2
is more permissible, than loop checking with (=@=)/2:

?- \+ p(X) =@= p(Y).
false.

?- dif(p(X), p(Y)).
dif(Y, X).

Another name for alpha conversion is variant term. Tabling can
even do more than only alpha conversion detection, for example
SWI-Prolog has also an option to detect subsumption.