[m-dev.] IO tabling

Ian MacLarty maclarty at cs.mu.OZ.AU
Fri Jul 22 17:19:17 AEST 2005


On Fri, 22 Jul 2005, Julien Fischer wrote:

>
> On Fri, 22 Jul 2005, Ian MacLarty wrote:
>
> > On Fri, 22 Jul 2005, Julien Fischer wrote:
> >
> > >
> > > I've been using the declarative debugger on a problem
> > > with exception analysis and a couple of aspects of IO tabling
> > > have been proving irritating.
> > >
> > > 1) When the debugger thinks there are too many IO actions it won't
> > >    show me them (is 28 really that many?).  There doesn't seem to
> > >    be a way to browse the IO action in this case.  Would it be possible
> > >    to add a show_io or table_io show command that would display
> > >    a single, specified IO action (or a range thereof.)
> > >
> >
> > There is such a command.  "print io <from io action>-<to io action>"
> > will display a range of IO actions.
>
> Ah, that's what it is.
>
> What's the difference between 'print action' and 'print io' in the
> procedural debugger?  The latter doesn't seem to work.
>

I don't think there is a "print io" command in the procedural debugger.

> > I agree though that more sophisticated browsing and filtering would be useful.
> >
> Likewise.
>
>
> > > 2) It would be good if the debugger could be told to turn on IO
> > >    tabling at the boundaries of specified modules. For example,
> > >    something like:
> > >
> > > 		table_io add_module exception_analysis
> > >
> > >   would cause the debugger to turn on IO tabling everytime the compiler
> > >   entered the exception_analysis module, and turn it off again when
> > >   leaving that module.
> > >
> >
> > I'm not sure that would be very useful or safe.  To be safe IO tabling should
> > be turned on for ALL calls in the search space.  Otherwise there is no
> > way to guarentee that the results will be the same when the code is reexecuted
> > by the declarative debugger.
> >
>
> IO tabling is useful in the procedural debugger as well though, and
> that is where I think this capability would be useful.  The user guide
> should probably mention that turning it on and off is unsafe for the
> declarative debugger, particulary in light of section 7.8 of the user
> guide.
>

But you might still want to do retries accross module boundaries
in the procedural debugger.  I think what you want is the ability to filter IO actions
by module when printing them.  I don't see any need to limit IO tabling to particular
modules, since IO tabling seems to be pretty efficient even when there are millions
of IO actions.

Turning IO tabling on and off in not unsafe for the declarative debugger.  On the
contrary, not turning it on at all and then trying to debug a section of code which
does IO is unsafe.  The declarative debugger will give the user a big warning if this
is done though.  The warning also explains how to turn IO tabling on.

Ian.

--------------------------------------------------------------------------
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