I’m using: SWI-Prolog version 8.4.0 64 bits, with XPCE 2.0
When I run a graphical tracer with gtrace sometimes it shows decompiled listing of a predicate rather than the predicate in its original file. This happens when the first clause of the predicate has the form “Var =…” where Var occurs in the head of the predicate rule.
This is how to replicate.
Except for list2_pred
, all predicates are displayed in decompiling form by the XPCE tracer.
% file named reason.pl
list2_pred(Info) :-
print('Normal'),
Info = [_, _, _].
term_pred(Info) :-
Info = (_, _, _),
print('Ok').
term_t_pred(Info) :-
Info = t(_, _, _),
print('Ok').
atom_pred(Info) :-
Info = 'Atom',
print('Ok').
list1_pred(Info) :-
true,
Info = [_, _, _],
print('Weird').
There was another issue about a decompiled listing of gtrace, but I don’t think it is related to this.