[m-rev.] for review: handle EXCP nodes in wrong and missing answer diagnosis
Mark Brown
mark at cs.mu.OZ.AU
Wed Jan 19 03:14:17 AEDT 2005
On 19-Jan-2005, Ian MacLarty <maclarty at cs.mu.OZ.AU> wrote:
> On Mon, Jan 17, 2005 at 02:26:43PM +1100, Mark Brown wrote:
> > Please post a full diff (including the change to add contour_children, which
> > I haven't yet reviewed in detail). Make sure you do a cvs update first,
> > since there have been other changes committed since you posted this.
> >
>
> Here you go. I might need to add some extra expected outputs for the new test
> case in the debugging grades. I am bootchecking those grades now.
Ok.
> Index: browser/declarative_tree.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/browser/declarative_tree.m,v
> retrieving revision 1.14
> diff -u -r1.14 declarative_tree.m
> --- browser/declarative_tree.m 18 Jan 2005 03:56:51 -0000 1.14
> +++ browser/declarative_tree.m 18 Jan 2005 14:08:48 -0000
> @@ -293,11 +294,12 @@
> get_edt_call_node(Store, Ref, CallId),
> \+ not_at_depth_limit(Store, CallId).
>
> -:- pred trace_weight(wrap(S)::in, edt_node(R)::in, int::out, int::out)
> - is det <= annotated_trace(S, R).
> +:- pred trace_weight(wrap(S)::in, edt_node(R)::in, int::out,
> + int::out) is det <= annotated_trace(S, R).
>
> trace_weight(Store, NodeId, Weight, ExcessWeight) :-
> - node_events(Store, NodeId, 0, Weight, no, 0, 0, ExcessWeight).
> + node_events(Store, NodeId, 0, Weight, no, 0, 0,
> + ExcessWeight).
These changes aren't necessary. There's a couple of other formatting
changes like this, too.
> @@ -321,13 +323,13 @@
> % of whether the final node was a FAIL or not - duplicates need only be
> % recorded for FAIL nodes. This should be `no' initially. DupFactor
> % keeps track of how many times the events before the last REDO could
> - % have been duplicated and should initially be zero.
> + % have been duplicated and should initially be zero.
You've added some extra whitespace here.
Other than that, this change looks fine.
> Index: tests/debugger/declarative/catch.exp
> ===================================================================
> RCS file: /home/mercury1/repository/tests/debugger/declarative/catch.exp,v
> retrieving revision 1.5
> diff -u -r1.5 catch.exp
> --- tests/debugger/declarative/catch.exp 6 Jan 2005 03:20:11 -0000 1.5
> +++ tests/debugger/declarative/catch.exp 18 Jan 2005 05:46:08 -0000
> @@ -17,19 +17,24 @@
> being omitted from the trace.
> p(1, exception(univ_cons("q: bad input")))
> Valid? no
> -Sorry, the diagnosis cannot continue because it requires support for
> -the following: code that catches exceptions.
> -The debugger is a work in progress, and this is not supported in the
> -current version.
> +Call q(1, _)
> +Throws "q: bad input"
> +Expected? no
> +Found unhandled exception:
Now that I see it in action, this is probably not the right explanation
for this bug. What the debugger is saying is that the exception thrown
by 'throw' was not caught by 'q', but in cases like this the proper
explanation would probably be that the exception that is being thrown
is the wrong one. So the message should be "Found unhandled or incorrect
exception".
You don't need to fix that as part of this change, though. That can be
done separately.
Cheers,
Mark.
--------------------------------------------------------------------------
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