[mercury-users] ....use of solution/2
Stefan Hinterstoisser
supersteveee at gmx.de
Sun Mar 21 16:31:00 AEDT 2004
Hi Fergus!
Thanx a lot for that... I`m just wondering if (because I looked it up and
I`m not quite sure about it) I can give the solution/2 predicate also a
predicate with several inputs (for sure only one output!)...so would something like
this work??
pred predicat(out, in, in) is nondet.
...
solutions(predicat , X)
... so and how could I give predicat then the two inputs???? What can I do,
if I want to use the functionallity of solutions but also wanna have one ore
several input??? Is there a solution???
Thanx in advance,
Stefan
> > Stefan Hinterstoisser, Thursday, 18 March 2004:
> > > What I want to
> > > get is that the program backtracks all possible values that makes the
> > > statement come true (and gives them out).
>
> You will need to use the "solutions" predicate from the "std_util"
> library module.
>
> For an example, see the file samples/solutions/all_solutions.m (or
> samples/all_solutions.m).
>
> To output more than one variable when using the "solutions" predicate,
> you will probably need to group your variables in a tuple.
>
> --
> Fergus Henderson | "I have always known that the
> pursuit
> | of excellence is a lethal habit"
> WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
> --------------------------------------------------------------------------
> 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
> --------------------------------------------------------------------------
>
--
+++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++
100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz
--------------------------------------------------------------------------
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