Subject: [SWIPL] out of stack space-SWI/C++

From: [email-masked]
Date: Wed, 3 Oct 2001 12:20:00 +0200

Hi,

I'm using the SWI-Prolog C++ interface, o.s. Win2k, MSVC++ 6.0.

I'm using SWI-Prolog like a Logic Engine,
so I load my_algo.pl in the engine, 
then I make some "assert()" and 
at the very end I ask for 
a query(PlQuery q("expand", termv);):

 PlEngine e("my_algo.pl");
 
 //I add some PlCall("assert(.....)") like below:
 PlCall ("assert(autof(X1, cognomeproprietario(X1), nomeproprietario(X1),
            marca(X1), modello(X1)) :- denf(_, X1))" );
 PlCall ("assert(autof(T, C, N, M, M) :- auto(T, C,N, M, M))" );
 PlCall ("assert(denf(D, T) :- den(D, T))" );
 //...or more, it's just an example!

 //then I add the following clause (or more):
 PlCall ("assert(expand(Ris) :- reform(h(X),[autf(X,_,_,_,_),
                                denf(_,X)]],Ris)  )" );

And here there's a PlException that says:
    "OUT OF STACK SPACE"

I think it depends from the number of PlCall() and length of 
its argument, infact writing the last PlCall() in a shorter way
it works properly!(without denf(...))

I changed the "Prolog Stack Limit" (SWI-Prolog registry preferences), 
using the ?- manpce. ...but the result remains the same!

Can you help me, please?

Thanks 

luca cianfarani

__________________________________________________________________
Abbonati a Tiscali!
Con VoceViva puoi anche ascoltare ed inviare email al telefono.
Chiama VoceViva all' 892 800        http://voceviva.tiscali.it