retrieving arguments in the trace

Erwan Jahier Erwan.Jahier at irisa.fr
Fri Nov 7 01:58:28 AEDT 1997


Zoltan Somogyi wrote:
>
> Keeping the stack frame live until the exit or fail trace is not a
> problem; with the current tracing code, you already always have the
> stack frame when you call any of the trace functions (provided the
> procedure has a stack frame at all;
> some don't).
  -------
What are thoses procedures ?


> Erwan and Mireille wrote:
>
> > If the predicate is semidet, at FAIL time we would like to be able
> > to display the values as they were at CALL time. Can you keep the
> > corresponding stack frame alive long enough so that we can retrieve
> > these values ? If not we would have to build our own stack (we would
> > like to avoid this as much as possible :-)).
> 
> [...] The problem is keeping the input arguments alive 
> in the frame [...] It would be more difficult to arrange for them to
> be put in locations that the tracer knew about at runtime [...]
> However, the real problem is that in the presence of destructive
> update [...]

Actually, the current idea is to keep the low-level tracer as cheap
and simple as possible. In a first stage we will work with the
information about the live variables at "call" and "exit" times (and
anymore information you can cheaply get). We will try to reconstruct
the rest of the information within Opium with Prolog or Mercury
programs. It should be possible (at what cost, is another question).

Let us know when this runtime information is available.
 
We have a request: do *not* pass the entire information as a parameter
of the trace function. Instead we would rather have another function at
our disposal so that we can get this information upon demand.

The trace function could have a further argument that, for exemple,
would tell the ranks in the clause of the currently live variables and
an extra function (like get-current-live-var-value(Rank) -> Value)
would enable us to get the values if needed. I suppose we need to know
the type at some point but if we know the rank of the variable we can
deduce its type from static information (??).


Mireille and Erwan.



More information about the developers mailing list