[m-rev.] for review: cliques on the stack and the debugger
Zoltan Somogyi
zs at unimelb.edu.au
Thu May 24 14:54:38 AEST 2012
On 26-Apr-2012, Peter Wang <novalazy at gmail.com> wrote:
> Later, it would be nice to display cliques less obtrusively, e.g.
>
> 0 pred mutrec_higher_order.q3/3-0 (det) (mutrec_higher_order.m:233)
> 1 pred mutrec_higher_order.q1/3-0 (det) (mutrec_higher_order.m:186)
> 2 pred mutrec_higher_order.q2/3-0 (det) (mutrec_higher_order.m:213)
> 3 pred mutrec_higher_order.repeat_steps/5-0 (det) (mutrec_higher_order.m:78)
> 4 ? 2* pred mutrec_higher_order.p2/3-0 (det) (mutrec_higher_order.m:133 and others)
> 6 ? pred mutrec_higher_order.p3/3-0 (det) (mutrec_higher_order.m:155)
> 7 ? 2* pred mutrec_higher_order.p2/3-0 (det) (mutrec_higher_order.m:126 and others)
> 9 ? pred mutrec_higher_order.p3/3-0 (det) (mutrec_higher_order.m:155)
> 10 2* pred mutrec_higher_order.p1/3-0 (det) (mutrec_higher_order.m:97 and others)
> 12 pred mutrec_higher_order.test/2-0 (det) (mutrec_higher_order.m:43)
> 13 pred mutrec_higher_order.main/2-0 (det) (mutrec_higher_order.m:34)
I don't think the above works, for two reasons. One, the main motivation
for detecting cliques is to that you can AVOID printing potentially thousands
of lines for a clique. (The example that motivated me to implement this change
as a stack dump that printed more than 100,000 lines, taking forever to do so.)
Simply marking the lines in a clique does not accomplish that objective.
And two, even if you wanted to just mark the calls in a clique, the above
design would not do that unambiguously. If you get output of the form
? ...
? ...
? ...
? ...
? ...
? ...
the programmer won't know whether these six calls come from one clique,
or from two cliques back-to-back, without looking at the names of the called
predicates, at which point the ? signs lose most of their usefulness.
Can anyone suggest what the output of a stack trace with cliques should
LOOK LIKE?
I am following all your other suggestions.
Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list