[m-dev.] trace goals and reordering
Zoltan Somogyi
zoltan.somogyi at runbox.com
Sun May 4 11:38:45 AEST 2025
On Fri, 2 May 2025 12:03:47 +1000, Julien Fischer <jfischer at opturion.com> wrote:
> > > > To address the violation of the law of least astonishment that lead
> > > > to this email, we could add code to after-front-end invocation of
> > > > the simplification pass that, when it finds a procedure body contains
> > > > a trace goal (a goal feature should signal this), does an extra traversal
> > > > of the procedure body. This traversal would update the largest context
> > > > seen so far, which, in the absence of source file and line number pragmas,
> > > > would be the largest line number in the procedure's one-and-only file name.
> > > > It would then generate a warning if, when it arrived at a trace goal, the
> > > > context of the trace goal was *not* bigger than the largest context so far.
> > > > This would light up trace goals that mode analysis has moved to the right.
> > >
> > > I debugged the problem by looking at the HLDS dumps -- I don't think that's
> > > something we should be expecting most users to do.
> >
> > Agreed. Hence the proposal above. That one I *can* implement, if you like.
>
> I think such a warning would be worthwhile
As my creation of mark_trace_goals.m should tell you, I have started to
implement this. However, the above strategy, though useful, will not be
sufficient. For the attached proposed test case, which has three trace goals,
mode analysis moves the first one further to the right than needed.
So after I implement the warning, I will look into that.
Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: moved_trace_goal.m
Type: application/octet-stream
Size: 1546 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/developers/attachments/20250504/999eab9b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: moved_trace_goal.hlds_dump.065-frontend_simplify
Type: application/octet-stream
Size: 11371 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/developers/attachments/20250504/999eab9b/attachment-0001.obj>
More information about the developers
mailing list