[m-rev.] for review: granularity control

Zoltan Somogyi zs at csse.unimelb.edu.au
Fri Nov 3 17:10:52 AEDT 2006


On 03-Nov-2006, Peter Wang <wangp at students.csse.unimelb.edu.au> wrote:
> > I have replaced it with a macro, but is there a similar condition for high
> > level grades, and if so, what is it?
> 
> Parallel conjunctions are not supported in high level grades, so there's
> nothing similar.

OK, I will make the whole pass conditional on a low level grade.

> > > > +                generate_foreign_proc(ModuleName, ProcName, predicate,
> > > > +                    only_mode, detism_semi, purity_semipure, Attributes,
> > > > +                    Args, ExtraArgs, MaybeRuntimeCond, Code, Features,
> > > > +                    InstMapDeltaSrc, ModuleInfo, Context, Cond),
> > > 
> > > I can't see why the goal would need to be semipure.  It will read from
> > > the environment, but the result won't change due to the value it reads.
> > > Also, the values it will read will be affected by pure code, and will be
> > > dynamically changing due to the load so purity doesn't come into it.
> > 
> > Actually, I think that last part means it has to actually be *impure*.
> 
> I see it as similar to memory allocation: a goal can allocate memory at
> different addresses depending on when it is executed, but that doesn't
> affect its purity.

That's why there is a promise_pure around the if-then-else as a whole,
but the outcome of the actual test *does* depend on implementation details,
so it cannot be pure.

> Not sure.  I'd run ldd on the programs and see if there are any
> differences.

Will do; thanks.

Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list