[m-rev.] for review: allow search mode to be changed in DD

Ian MacLarty maclarty at cs.mu.OZ.AU
Fri Aug 19 02:35:03 AEST 2005


On Fri, 19 Aug 2005, Julien Fischer wrote:

>
> On Fri, 19 Aug 2005, Ian MacLarty wrote:
>
> > For review by anyone.
> >
> > Estimated hours taken: 12
> > Branches: main
> >
> > Allow the search mode to be changed from within the declarative debugger.
> >
> >  @sp 1
> >  @item undo
> > -Reset the state of the declarative debugger to what it was before the most
> > -recent `yes', `no', `inadmissible', `trust', `skip' or `mark' answer that has
> > -not already been undone.
> > +Reset the state of the declarative debugger to the state it was in when
> > +the question that came before the current question, and that hasn't already
> > +been undone, was asked.
>
> That's not an improvement.
>

Please suggest something better then.  Otherwise I will just put "Try it and
find out" ;-).

> > + at sp 1
> > + at item mode [ top-down | divide-and-query | binary ]
> > +Change the current search mode.  The search modes may be abbreviated to
> > + at samp{td}, @samp{dq} and @samp{b} respectively.
> >  @sp 1
> >  @item browse [--xml] [@var{n}]
> >  Start the interactive term browser and browse the @var{n}th argument
> > @@ -4279,49 +4283,42 @@
> >  @node Search Modes
> >  @subsection Search Modes
> >
> > -Currently the declarative debugger can operate in one of two modes when
> > -searching for a bug.  The mode to use can be specified as an option to the
> > - at samp{dd} command.  See @ref{Declarative debugging mdb commands} for
> > -information on how to do this.
> > +The declarative debugger can operate in one of several modes when
> > +searching for a bug.  The user can specify which mode to use by giving the
>
> It may be worth mentioning that the mode of the dd affects what
> questions are asked.
>

I've added:
Different search modes will result in different sequences of questions
being asked by the declarative debugger.

> > -recursive program runs.
> > +recursive programs.
> >
> >  This search mode is used by default when no other mode is specified.
> >
> > - at subsubsection Divide and Query Search
> > + at subsubsection Divide and Query Mode
> >
> > -With this search mode the declarative debugger will attempt to halve the size of
> > -the search space with each question.  In many cases this will result in the
> > +With this search mode the declarative debugger will attempt to halve the size
>
> s/will attempt/attempts/
>

Okay.

> > +The user may ask the declarative debugger to do a binary search along the
> > +path in the call tree between the current question and the question that the
> > +user last answered @samp{no} to.  This is useful, for example, when a
> > +recursive predicate is producing incorrect output, but the base case is
> > +correct.
> >
> >  @node Improving the search
> >  @subsection Improving the search
> > @@ -4445,6 +4442,23 @@
> >  predicates and functions in the same module as the predicate or function in the
> >  current question.  See the @samp{trust} command in
> >  @ref{Declarative debugging commands}.
> > +
> > + at subsubsection When different search modes are used
> > +
> > +If a search mode is given when invoking the declarative debugger then that
> > +search mode will be used, unless (a) a subterm is marked during the session,
> > +in which case the subterm is tracked to its origin, or (b) the user
> > +hasn't answered @samp{no} to any questions yet,
>
> s/hasn't/has not/
>

Fine.

> > +in which case top-down search is used until @samp{no} is answered to at least
> > +one question.
> > +
>
> > +If you do not specify a search mode when giving the @samp{dd} command then the
> > +behaviour depends on wether the @samp{--resume} option is present.  If it is
>
> s/wether/whether/
>
> I suggest:
>
> 	If no search mode is specified with the @samp{dd} command then
> 	the search mode depends on if the @samp{--resume} option is
> 	given.
>

Suggestion used.

Ian.

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list