[mercury-users] How did Mercury do away with the cut?
Richard A. O'Keefe
ok at atlas.otago.ac.nz
Fri Jul 6 14:24:13 AEST 2001
Terrence Monroe Brannon <tmbranno at oracle.com> wrote:
I always found the cut to be a confusing part of Prolog. I was
wondering how Mercury managed to eliminate the necessity for this
predicate.
Determinacy analysis using modes eliminates most green cuts.
"Promise one solution" (which I haven't used yet) could fix others.
If-then-else replaces most red cuts.
In eliminating it, is it still possible to make programs semantically
equivalent to Prolog in about the same amount of code?
I've translated a few thousand lines of Prolog to Mercury.
The lack of logical variables (or even incomplete data structures)
is far more difficult to deal with.
--------------------------------------------------------------------------
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