for review: interface to external opium-style debugger

Erwan JAHIER jahier at cs.mu.OZ.AU
Tue Feb 10 10:51:35 AEDT 1998


Fergus Henderson wrote:


+%-----------------------------------------------------------------------
> +% File: debugger_interface.m
...
> +% This module exports the following C functions:
> +%      ML_DI_output_current
> +%      ML_DI_found_match

I'am not very happy with that name. I the long run, we want to be able
to support backward move in the trace history. 
What do you think of "ML_DI_forward_match" ?


> +found_match(EventNumber, CallNumber, DepthNumber, Port,
> +               ModuleName, PredName, Arity, ModeNum, Determinism, Args,
> +               Path, DebuggerRequest) :-
> +       (
> +               DebuggerRequest = forward_move(MatchEventNumber,
> +                       MatchCallNumber, MatchDepthNumber, MatchPort,
> +                       MatchModuleName, MatchPredName, MatchArity,
> +                       MatchModeNum, MatchDeterminism, MatchArgs, MatchPath)
> +       ->
> +               match(MatchEventNumber, EventNumber),
> +               match(MatchCallNumber, CallNumber),
> +               match(MatchDepthNumber, DepthNumber),
> +               match(MatchPort, Port),
> +               match(MatchModuleName, ModuleName),
> +               match(MatchPredName, PredName),
> +               match(MatchArity, Arity),
> +               match(MatchModeNum, ModeNum),
> +               match(MatchDeterminism, Determinism),
> +               match(MatchArgs, Args),
> +               match(MatchPath, Path)
> +       ;
> +               error("found_match: forward_move expected")
> +       ).
> +
> +% match(MatchPattern, Value) is true iff Value matches the specified pattern.
> +:- pred match(match(T), T).
> +:- mode match(in, in) is semidet.
> +
> +match(nop, _).
> +match(exact(X), X).
> +match(neg(X), Y) :- X \= Y.


As Zoltan noticed the day you were hacking that stuff, that is not the
way we (Mireille and I) want this thing to be done. We only want to find
out a given attribute if it is wanted (especially for the argument
attribute of course) and if an attribute didn't match, it then become
unnecessary to find out the other attributes. 
I know you know it and it is ok for a first ride. So maybe we should add
an XXX ?  


-- 
R1.



More information about the developers mailing list