[mercury-users] Request for comments on this code
Julien Fischer
juliensf at csse.unimelb.edu.au
Tue Jul 11 18:24:19 AEST 2006
On Tue, 11 Jul 2006, Peter Schachte wrote:
> On Tue, Jul 11, 2006 at 01:47:42PM +1000, Julien Fischer wrote:
>> On Mon, 10 Jul 2006, Peter Schachte wrote:
>>> With && you're saying the code is pure and
>>> order doesn't matter, but just for operational reasons we want the
>>> code before the && to complete before starting the code after it. But
>>> in that case, why is this so rigid? Isn't && only advisory?
>>
>> What would be the point of it if it were only advisory?
>
> Telling Mercury a preferred order for two goals. A suggestion to the
> compiler.
>
> I guess the question really is to what extent you trust the compiler.
> If the compiler gets clever and discovers that in some mode it's
> better to execute those goals in the opposite order, why shouldn't it
> reorder them? We're stipulating that this isn't a question of
> correctness, just performance. And if you've specified a mode for a
> predicate that requires the goals be reordered, I'd rather have it
> reorder the goals, perhaps with a warning, than to refuse to compile.
>
> What do you want && for?
I don't (at the moment) - I was merely commenting on your question of how
such a construct would handle functions in the head of a clause.
Mark gave an example of where && would be useful (make sure that labelling
only happens after posting constraints in code that uses solver types)
further back in this thread (somewhere).
Julien.
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at csse.unimelb.edu.au
administrative address: owner-mercury-users at csse.unimelb.edu.au
unsubscribe: Address: mercury-users-request at csse.unimelb.edu.au Message: unsubscribe
subscribe: Address: mercury-users-request at csse.unimelb.edu.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list