[m-rev.] for review: minimal model tabling enhancements
Zoltan Somogyi
zs at cs.mu.OZ.AU
Fri Mar 14 19:08:48 AEDT 2003
On 14-Mar-2003, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > -#ifdef MR_HIGHLEVEL_CODE
> > - MR_fatal_error(""sorry, not implemented: ""
> > - ""minimal_model tabling with --high-level-code"");
> > -#else
> > - subgoal->generator_maxfr = MR_prevfr_slot(MR_maxfr);
> > - subgoal->generator_sp = MR_sp;
> > -#endif
> > + subgoal->MR_sg_generator_fr = MR_curfr;
>
> Why did you delete the #ifdef MR_HIGHLEVEL_CODE here?
> Won't referring to MR_curfr here lead to an error if this
> code is compiled with MR_HIGHLEVEL_CODE enabled?
The whole code block is inside #ifdef MR_USE_MINIMAL_MODEL, which means
that if MR_HIGHLEVEL_CODE is defined, you would have gotten an error message
far earlier.
> ...
> > +
> > + /*
> > + ** we should compute, for all followers, the common ancestor
> > + ** of the follower and this generator, and save to the deepest
> > + ** common ancestor XXX
>
> That comment looks incomplete?
It is missing only a period at the end of the sentence.
> > + /* YYY OLD */
> > + /* we should free the old resume_info structure */
> > + MR_cur_leader->MR_sg_resume_info = NULL;
> > +
> > + /* YYY OLD */
> > + /* We are done with this generator */
> > + (void) MR_pop_generator();
>
> The "YYY OLD" comment here isn't very helpful...
Deleted.
> > +static MR_bool
> > +MR_nofail_ip(MR_Code *ip)
> > +{
> > + if (ip == MR_ENTRY(MR_do_fail)) {
> > + return MR_FALSE;
> > + }
> > + if (ip == MR_ENTRY(MR_do_trace_redo_fail_shallow)) {
> > + return MR_FALSE;
> > + }
> > + if (ip == MR_ENTRY(MR_do_trace_redo_fail_deep)) {
> > + return MR_FALSE;
> > + }
> > +#ifdef MR_USE_MINIMAL_MODEL
> > + if (ip == MR_ENTRY(MR_RESUME_ENTRY)) {
> > + return MR_FALSE;
> > + }
> > +#endif
> > +
> > + return MR_TRUE;
> > +}
>
> A comment here indicating the intended semantics of this routine
> would be helpful.
I added:
/*
** Return false iff the given label effectively implements the predicate "fail"
** and true otherwise.
*/
> "mday" should also be deleted from the list of tests that do not pass.
Done.
> typedef MR_Next MR_TraceCmdFunc(char **words, int word_count,
> MR_Trace_Cmd_Info *cmd, MR_Event_Info *event_info,
> MR_Event_Details *event_details, MR_Code **jumpaddr);
Done.
Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list