[mercury-users] Confused about "undefined behaviour" of promise_only_solution
Fergus Henderson
fjh at cs.mu.OZ.AU
Mon Nov 29 19:36:54 AEDT 2004
On 27-Nov-2004, Kral Stefan <skral at mips.complang.tuwien.ac.at> wrote:
>
> I have not yet understood the idea behind the
> cc-modes. Does it all boils down to "Do not care that the
> program declaratively describes zillions of solutions, or
> indeed does not terminate universally. Just declare
> everything non-deterministic as CC-nondet/CC-multi,
> and think of the program exit as some kind of red cut."?
Almost.
One important difference between Mercury and Prolog is that
by default Mercury does NOT guarantee the order of execution
of disjunctions or multiple clauses.
If termination of your algorithm is dependent on the order
of clause selection, you should document this carefully,
and make sure to compile your program with the "--no-reorder-disj"
option.
--
Fergus Henderson | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list