[m-rev.] for review: fix bug #20
Julien Fischer
juliensf at csse.unimelb.edu.au
Fri Feb 5 14:14:41 AEDT 2010
On Thu, 4 Feb 2010, Ian MacLarty wrote:
> On Wed, Feb 03, 2010 at 07:14:14PM +1100, Julien Fischer wrote:
>>
>> 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.)
>
> Done. Here is the new log and diff:
>
> 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 show a
> warning and ask the user if the search should continue in ancestor calls
> (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.
>
> 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. Ask the user if the search should
> continue in the supertree.
>
> Add a predicate to perform per-session initialization. This
> currently resets the warn_if_searching_supertree flag.
>
> browser/declarative_oracle.m:
> browser/declarative_user.m:
> Add get_user_input_stream functions.
>
> tests/debugger/declarative/Mmakefile:
> tests/debugger/declarative/all_trusted.exp:
> tests/debugger/declarative/all_trusted.exp2:
> tests/debugger/declarative/all_trusted.inp:
> Include the warning message in the expected output.
>
> tests/debugger/declarative/supertree_warning.exp:
> tests/debugger/declarative/supertree_warning.inp:
> tests/debugger/declarative/supertree_warning.m:
> New test case.
>
> 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.
>
That looks fine -- thanks for looking at that.
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