[m-dev.] debugging grades and I/O tabling

Zoltan Somogyi zs at cs.mu.OZ.AU
Wed Aug 28 12:45:43 AEST 2002


On 28-Aug-2002, Mark Brown <dougl at cs.mu.OZ.AU> wrote:
> So if a procedure in category 2 calls another module which is deep traced,
> then events from the latter module will be suppressed?  If that module
> actually does contain a bug, then the declarative debugger may wrongly
> accuse the shallow traced module of being buggy.

In a sense, it is. By compiling that module with shallow tracing, the
programmer implied that he/she believed the code in that module to be correct,
thus implicitly believing that all the code that it depends on, including such
code in other modules, to be correct also.

> I suppose we could fix
> this by modifying the declarative debugger to detect when the bug is actually
> at the interface of a shallow traced procedure, and if so report that the bug
> may be in that procedure or one called from it.

Exactly.

> But I'd rather avoid 
> weakening the definition of bug in this way, particularly since we go to
> all the trouble of avoiding this sort of weakening in the case of higher
> order arguments.

I don't see that as a weakening.

When you assert that list__filter is correct, you are not asserting that
every closure passed to it as an argument is correct, since you have no
control over the actual arguments in calls to list__filter. However, you
do have control over the implementation of list__filter itself, and by
asserting list__filter to be correct, you are implying that all the code
in its implementation is correct.

> Is it possible to extend the analysis to figure out which procedures have
> some descendant which is deep traced?

In general no, because the answer may change after you have used it.
Programmers can change the trace level of module m1 after you compiled module
m2 relying on the previous trace level of module m1.

> On the other hand, maybe we can dispense with the requirement that adjacent
> events have to be at the same depth or adjacent depths.

I actually think that requirement is a desirable one, and I don't like the fact
that shallow tracing violates it. Interface tracing doesn't.

Zoltan.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list