[m-dev.] for review: nondet stack dumps.

Tyson Dowd trd at stimpy.cs.mu.oz.au
Mon Apr 6 13:23:24 AEST 1998


On 06-Apr-1998, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 03-Apr-1998, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> > Implement nondet stack dumps.
> > 
> > library/require.m:
> > 	Call MR_dump_stack with MR_curfr.
> > 
> > runtime/mercury_stack_trace.c:
> > runtime/mercury_stack_trace.h:
> > 	Get MR_curfr as input.
> > 	If we hit a nondet stack frame, handle moving down a frame a
> > 	little differently.
> 
> That looks good.  I have only one small comment:
> 
> >  		if (MR_DETISM_DET_CODE_MODEL(determinism)) {
> > +			fprintf(stderr, "\t%s (det stack)\n", label->e_name);
> ...
> > +		} else if (determinism != -1) {
> > +			fprintf(stderr, "\t%s (nondet stack)\n", label->e_name);
> 
> Whether a procedure uses the det stack or the nondet stack is perhaps
> a fairly implementation-oriented notion.  Is it worth printing this out?
> It might be better to print just the determinism of the procedure.
> This would convey more information, in less space.

It certainly is implementation-oriented - I'd like it mostly for myself,
and the rest of the world comes second.  However printing the
determinsim would better for others.

What notation do you think would be best?  
Full words like "deterministic" "erroneous", or contractions like the
tracer uses?  I think full words.

-- 
       Tyson Dowd           # So I asked Sarah: what's the serial number on
                            # your computer? She replied:
     trd at cs.mu.oz.au        #          A-C-2-4-0-V-/-5-0-H-Z
http://www.cs.mu.oz.au/~trd #



More information about the developers mailing list