[m-dev.] A flavour of programming in Opium

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Jun 6 16:03:06 AEST 1998


On 05-Jun-1998, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
> > finish
> >         Continues execution until it reaches a final (EXIT or FAIL) port
> >         of the call to which the current event refers. Reports an error
> >         if the current event refers to a final port.
> % This is rather called skip in most of the Prolog tracer
> skip_np :-
> 	current_pred(PredName),
> 	f_get(-,-,-,[exit, port],-, PredName,-,-,-,-).

That's not the correct behaviour.
You don't want to skip until a final port for the same PredName,
nor even until a final port for the same predicate
(= <pred or func> module:predname/arity).  Rather,
you want to skip until a final port for the same _call_.
 
> skip :-
> 	finish_np,
> 	print_line.

Presumably you meant s/finish_np/skip_np/.

> > continue
> >         Continues execution until it reaches the end of the program.
> 
> continue :-
> 	f_get(1,1,1,exit,-,main,-,-,-,-,-,-).

This is not correct behaviour -- you missed part of the spec:

| strict commands:
| When a debugger command steps over some events without user interaction at
| those events, the *strictness* of the command controls whether the debugger
| will stop execution and resume user interaction at events to which a spy point
| or break point with state "stop" applies. By default, the debugger will stop
| at such events.

"continue" was not specified as being "strict", so it needs to stop at
break/spy points .

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list