[mercury-users] Determinism of if-then-elses
Nicholas Nethercote
njn at csse.unimelb.edu.au
Wed Apr 12 12:45:57 AEST 2006
On Wed, 12 Apr 2006, Mark Brown wrote:
>> So why does the following code from library/lexer.m compile? The line
>> marked XXX seems to be doing exactly what causes problems in my code.
>
> That goal has no output variables. In such a case all "solutions" must
> be equivalent, so the compiler (safely) prunes away any solutions after
> the first. This changes the nondet goal into a semidet one.
>
> In your case, I guess either S or one of the DCG arguments is an output,
> so the pruning cannot happen.
Ah, I see. Thanks.
Nick
--------------------------------------------------------------------------
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