[mercury-users] Determinism question

Nicholas James Nethercote njn at cs.mu.OZ.AU
Fri Sep 7 08:37:12 AEST 2001


On Fri, 7 Sep 2001, Peter Schachte wrote:

> With that explaination, (erroneous, semidet) has two possibilities:  it can
> fail, or neither succeed nor fail.  Thus if it terminates, it fails, so it's
> determinism is failure.  I find it easier to think of erroneous as meaning
> nonterminating, and all the other modes meaning "if it terminates, then ...."

Actually the (erroneous, semidet) case is different - if a goal cannot succeed,
the compiler ignores subsequent conjuncts.  This is from det_analysis.m:

    det_conjunction_detism(DetismA, DetismB, Detism) :-
            determinism_components(DetismA, CanFailA, MaxSolnA),
            ( MaxSolnA = at_most_zero ->
                    Detism = DetismA
            ;
                    determinism_components(DetismB, CanFailB, MaxSolnB),
                    det_conjunction_canfail(CanFailA, CanFailB, CanFail),
                    det_conjunction_maxsoln(MaxSolnA, MaxSolnB, MaxSoln),
                    determinism_components(Detism, CanFail, MaxSoln)
            ).   

--
Nick Nethercote
njn at cs.mu.oz.au

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