[m-rev.] for review: fix two bugs in declarative debugger

Julien Fischer juliensf at cs.mu.OZ.AU
Thu Jan 13 16:11:11 AEDT 2005


On Thu, 13 Jan 2005, Ian MacLarty wrote:

> Out of interest I used the declarative debugger's divide and query stategy to
> find both these bugs.  One search space spanned 893 events and took 11 answers
> to locate the bug and the other spanned 166 events and took 8 answers.
>
> For review by anyone.
>
> Estimated hours taken: 3
> Branches: main
>
> Fix two bugs in the declarative debugger that caused an exception to be thrown
> if the `dd' command was issued at a node all of whose descendents were trusted.
>
> Remove a whole lot of now useless code.
>
> browser/declarative_analyser.m
> 	Instead of aborting when no unknown or skipped suspects can be found
> 	with top down search, try to extend the search space upward.  Previously
> 	this was done in decide_analyser_response, however the mechanism to
> 	determine if there were any unknown or skipped suspects in the search
> 	space (are_unknown_suspects) was faulty.  This was fixed by instead
> 	checking for this condition in top_down_search, so it made sense to
> 	try to extend the search space upwards in top_down_search instead
> 	of in decide_analyser_response.  The other search strategies don't need
> 	to be updated since they all revert to top down search if they can't
> 	find any unknown suspects.  The fault with are_unknown_suspects was
> 	that it assumed that an unexplored suspect would have unknown children,
> 	which is not the case if it has no children at all.
>
> browser/declarative_edt.m
> 	Remove are_unknown_suspects and all supporting machinery.
>
> 	Fix another bug in least_skipped which determines which of two suspects
> 	was least skipped: when both suspects were not skipped the wrong
> 	suspect was returned, so when called with foldl on a search space with
> 	no skipped suspects, the starting suspect would be different from the
> 	final suspect, and choose_skipped_suspect depends on them being the
> 	same when there are no skipped suspects.
>
> tests/debugger/declarative/Mmakefile
> tests/debugger/declarative/all_trusted.exp
> tests/debugger/declarative/all_trusted.inp
> tests/debugger/declarative/all_trusted.m
> 	Add a regression test.
>

That looks fine.

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