[m-rev.] for review: promise_equivalent_solution_sets

Zoltan Somogyi zs at cs.mu.OZ.AU
Wed Mar 22 09:29:23 AEDT 2006


On 21-Mar-2006, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> I don't think the nested_promise_eqv_solution_sets error should be an
> error, instead of (possibly) a warning.  Is there a semantic problem
> with nesting these kinds of goals?

I have made it a warning.

There is a possibility of a semantic problem with such constructs. Consider
the goal

	promise_equivalent_solution_sets [A1] (
		arbitrary [X1] ...,
		...,
		promise_equivalent_solution_sets [A2] (
			arbitrary [X2] ...,
			...
			arbitrary [X3] ...,
			...
		),
		...
	)

For the wrapper "arbitrary [X1]", it is clear that the reason why the
programmer thinks the determinism cast on its goal is justified: because
of the promise_equivalent_solution_sets on A1. For the wrappers on X2 and X3,
there is no such clarity; each one of those could be justified either by
the promise_equivalent_solution_sets on A1 or by the one on X2.

The compiler doesn't really need to care about this ambiguity, but programmers
should.

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