[mercury-users] Making (cc_)multi into det?

Tyson Dowd trd at cs.mu.OZ.AU
Thu Aug 23 01:19:40 AEST 2001


On 22-Aug-2001, Ondrej Bojar <oboj7042 at ss1000.ms.mff.cuni.cz> wrote:
> Hi.
> 
> Is there a way to change (cc_)multi into det?
> 
> The reason to do is simple: I have a predicate, that can succeed more than
> once. But I whould like to get any of the solutions and use it in a
> predicate, that is otherwise det. And I don't want mercury to propagate
> the truth about multiple solutions further.
> 
> ...I want a "simple" solution to a complex question and I don't like to
> hear all the truth... :-)
> 
> Can I wrap the inner multi-solution predicate into something that would
> make it look like "det"?

See promise_only_solution in the library "builtin" module.

Also see the: Interfacing nondeterministic code with the real world
chapter in the reference manual.

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