I'm trying to port some Prolog code I wrote some time ago to Ciao and I'm having trouble figuring out the right way to use the Ciao module system. I have some path searching modules which have the following interface; % Requires: % successor( Given state, Successor state ). % Provides: % path( Given start state, Given goal state, Path from start to goal ).
That is, they import successor/2 from the domain code (the client module) and provide path/3 back.
I'm not figuring out how to write these mutually dependent modules. What am I missing?
Can't you just write them as the samples below (and please correct me if I misunderstood anything):
File a.pl: ___________________________________________________________________________ :- module(a, [whatever/0]).
:- use_module(b).
whatever:- whichever. ___________________________________________________________________________
File b.pl: ___________________________________________________________________________ :- module(b, [whichever/0]).
:- use_module(a).
whichever:- whatever. ___________________________________________________________________________
These above are accepted by Ciao Prolog, even if mutually dependent.