[mercury-users] inferred determinism

Michael Day mikeday at bigpond.net.au
Tue Feb 26 16:57:17 AEDT 2002


> Switch detection will not look past function calls.
> It only looks for unifications that occur before the
> first function call or predicate call in the clause.
> (One reason for this is that moving unifications across function
> calls could change whether or not the program terminates;
> e.g. consider the case where `zero' loops.)

That's unfortunate, as it seems very much an implementation dependent
limitation in determinism analysis (regardless of how impractical it would
be to handle correctly) and the error message is very unobvious if you
don't know how determinism analysis works as it refers to the list 
argument rather than the function argument. (As usual, permute the code 
until it compiles...)

Michael

--------------------------------------------------------------------------
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