[m-rev.] for review: fix bug #20

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Feb 3 19:14:14 AEDT 2010


Hi,

On Wed, 3 Feb 2010, Ian MacLarty wrote:

> Print a warning when the declarative debugger is about to search in the
> supertree of the starting node and there has been no interaction with the user
> yet (bug #20).  This could happen when the user issues the dd command at a node
> whose descendents are all trusted.  In this case the declarative debugger will
> begin searching in the ancestors of the node where the dd command was issued,
> which can seem unintuitive.  The warning message should help the user
> understand what is going on.

When I spoke to Zoltan about this the other day he suggested that, in
addition to emitting the warning, the debugger should ask the user to
choose whether they wish to begin searching in the ancestors or abort
the dd session.
(The latter may be preferable in some cases, e.g. where a user has
erroneously trusted some modules and only realises it upon seeing the
warning.)

> browser/declarative_debugger.m:
>    Add a warn_if_searching_supertree flag to the declarative debugger state.
>    This flag is initially set to yes and is changed to no after a user
>    interaction.
>
>    Print a warning if a supertree is requested and there has been
>    no interaction with the user yet.
>
>    Add a predicate to perform per-session initialization.  This
>    currently resets the warn_if_searching_supertree flag.
>
> trace/mercury_trace_cmd_dd.c:
>    Do per-session initialization.
>
> trace/mercury_trace_declarative.c:
> trace/mercury_trace_declarative.h:
>    Add a wrapper function to call the new session initialization
>    predicate.

The diff looks fine otherwise.

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