[m-rev.] for review: promise scopes (part 1)

Julien Fischer juliensf at cs.mu.OZ.AU
Mon Mar 21 17:43:20 AEDT 2005


On Mon, 21 Mar 2005, Ralph Becket wrote:

> Zoltan Somogyi, Monday, 21 March 2005:
> > For review by Ralph. I would like feedback on the reference manual
> > in particular.
> >
> > Zoltan.
> >
> > Replace the some() HLDS goal with a more general scope() goal, which can be
> > used not just for existential quantification but also for other purposes.
> >
> > The main such purposes are new goal types that allow the programmer
> > to annotate arbitrary goals, and not just whole procedure bodies, with the
> > equivalents of promise_pure/promise_semipure and promise_only_solution:
> >
> > 	promise_pure ( <impure/semipure goal> )
> > 	promise_semipure ( <impure goal> )
> >
> > 	promise_equivalent_solution [OutVar1, OutVar2] (
> > 		<cc_multi/cc_nondet goal that computed OutVar1 & OutVar2>
> > 	)
> >
> > Both are intended to be helpful in writing constraint solvers, as well as in
> > other situations.
>
> The solver implementors have long been asking for a way to avoid putting
> impure and semipure annotations all over the code that currently needs
> them.
>
> Julien and I are of the opinion that inside a promise_[semi]pure scope,
> the annotations should be optional and that adding extra scopes with
> names like promise_pure_with_implicit_annotations would be overkill.
>

Actually, my opinion is that purity annotations shouldn't be optional,
my point was that *if* they are made optional then adding extra
scopes with names like the above would be overkill.

> If there are no strong opinions to the contrary, I plan to make the
> corresponding changes to purity.m in the near future.
>

I don't really want things changed at all, but I suspect
that I may be in the minority here.

Julien.

--------------------------------------------------------------------------
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