From: Miguel C. <mc...@de...> - 2012-05-07 19:32:52
|
I'm having nondeterministic behavior when executing a goal to a foreign predicate. in module i.P: ---- :- import foo/4 from is ... foo(....), ... ---- in is.H: ---- :- exports foo/4. ... and then the .c file. Sometimes the predicate will load and execute properly; sometimes the gcc compiler will run more than once (when it should run only once), and eventually I get a ++Error[XSB/Runtime/P]: [Existence (No procedure is : foo / 4 exists)] Is the compile step synchronous with (previous to) goal execution? And if not, is there a way to force (pre)compilation and loading of a foreign predicate? Already tried to have both the .H.xwam and .dylib files precompiled in the same directory, but with no improvement. Thanks, Miguel Calejo Declarativa mc...@de... http://www.declarativa.pt telefone: +351-22-030-1580 fax: +351-22-030-1511 UPTEC - Parque de Ciência e Tecnologia da Universidade do Porto Rua Actor Ferreira da Silva 100 4200-298 Porto Portugal |