[mercury-users] Doing input with determinism cc_multi

Ralph Becket rafe at cs.mu.OZ.AU
Wed Jan 5 10:30:32 AEDT 2005


Kral Stefan, Tuesday,  4 January 2005:
> 
> Hi All.
> 
> I have ported my prolog app successfully to mercury over the holidays,
> and I am quite pleased with the result. The mercury compiler helped
> me find two type errors that I had in the prolog version.
> 
> My main predicate is declared cc_multi, so I can do "don't care" style
> non-determinism. So one question remains... 
> How do I get some input data into my program? 
> 
> io__read looks like a very convenient way, but it only 
> works when I declare main as det (which is something I can not do).
> 
> Right now, I am using some (relatively large) fact tables, so
> I can test my program a bit -- guess my impatience shows...
> 
> Could you please give me some advise on how to solve that "input issue"?
> 
> Best Regards,
> Stefan.
> 
> PS. Most output predicates do not appear to be available when
>     called from a predicate declared cc_multi. That's not a big
>     problem, as io__write_cc offers anything I need at the moment.

You need to show us the code and the error message.  There shouldn't be
any trouble mixing IO and cc_multi code.  The only constraint you have
with cc modes is that you can never backtrack into a cc goal.

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