[m-rev.] for review: implement undo for declarative debugger

Julien Fischer juliensf at cs.mu.OZ.AU
Tue Jul 26 01:25:15 AEST 2005


On Mon, 25 Jul 2005, Ian MacLarty wrote:

> For review by anyone.
>
> Estimated hours taken: 6
> Branches: main
>
> Implement `undo' command in the declarative debugger.
> The `undo' command takes the debugger back to the state it was in before the
> last answer was given (`skip' is counted as an answer in this case).
>
> browser/declarative_analyser.m:
> 	Add an interface predicate which allows us to get the last question
> 	asked by the analyser.
>
> 	Do not handle `show_info' in process_answer, since `show_info' is
> 	no longer considered an answer (see below).
>
> browser/declarative_debugger.m:
> 	Make `show_info' an oracle response, instead of an oracle answer,
> 	since it doesn't affect the search space.
>
> 	Get rid of diagnoser_{get,set}_{analyser,oracle}, because they serve
> 	no abstraction purpose and maintaining them is a pain.
>
> 	Add a new field to the diagnoser which records the state of the
> 	diagnoser before the previous oracle answer.  This turns the
> 	diagnoser into a stack.  Add predicates to push and pop
> 	diagnosers from this stack.
>
> 	Push the current diagnoser onto the stack when an oracle answer
> 	is received.
> 	Pop the previous diagnoser when the `undo' command is issued.
>
> browser/declarative_oracle.m:
> 	Add `undo' to the set of possible oracle responses.
>
> 	Add a predicate which makes the current knowledge base of one oracle
> 	the revised knowledge base of another oracle.
>
> 	Fix a spelling mistake.
>
> 	Add a predicate to get the output stream used to communicate with the
> 	user.
>
> browser/declarative_user.m:
> 	Add the `undo' user response.
>
> 	Add a predicate to get the output stream used to communicate with the
> 	user.  This is used by the diagnoser to print a "Undo stack empty"
> 	message.
>
> tests/debugger/declarative/Mmakefile:
> tests/debugger/declarative/undo.exp:
> tests/debugger/declarative/undo.inp:
> tests/debugger/declarative/undo.m:
> 	Test the new command.
>
You need to document the new command.  Otherwise that looks
okay.

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