[m-dev.] call for opinions on promise_same_solutions syntax

Peter Schachte schachte at csse.unimelb.edu.au
Tue Feb 28 11:36:45 AEDT 2006


On Mon, Feb 27, 2006 at 02:40:24PM +1100, Zoltan Somogyi wrote:
> Recently I proposed that we should have a new construct to handle situations
> such as the one below:

Let me see if I understand this right.  You've got some (possibly
compound) nondet goal p(X) and another (possibly compound) nondet goal
q(X,Y), and what you want to say is that although p may produce many
non-equivalent bindings for X, each of them will result in the same
set of solutions for Y?  So you can't say that the solutions for X are
equivalent, but as far as Y is concerned, they are (so it's OK to
commit to the first solution for X).

If that's the general case, how about just generalizing
promise_equivalent_solutions?  You could say that

	promise_equivalent_solutions Vars Body

means that every solution for every element of Vars entailed by Body
determines the same set of solutions for all other variables that
escape Body (ie, variables appearing both in Body and elsewhere in the
same clause).  That's both syntactically simpler and a smaller change
to the language (though I expect it would be harder to implement,
since you have to analyze the code to determine where to insert the
commit).

-- 
Peter Schachte              You are a sad, strange little man, and you have
schachte at cs.mu.OZ.AU        my pity.
www.cs.mu.oz.au/~schachte/      -- Buzz Lightyear 
Phone: +61 3 8344 1338      
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list