From luca.cia@tiscalinet.it Wed Oct  3 12:20:08 2001
Received: from mail.tiscalinet.it (mail-5.tiscalinet.it [195.130.225.151])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f93AK8v23994
	for <prolog@swi.psy.uva.nl>; Wed, 3 Oct 2001 12:20:08 +0200 (MET DST)
Received: from [195.110.154.83] by mail.tiscalinet.it with HTTP; Wed, 3 Oct 2001 12:20:00 +0200
Message-ID: <3BAC37010000F506@mail.tiscalinet.it>
Date: Wed, 3 Oct 2001 12:20:00 +0200
From: luca.cia@tiscalinet.it
To: prolog@swi.psy.uva.nl
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by swi.psy.uva.nl id f93AK8v23994
Subject: [SWIPL] =?iso-8859-1?Q?out=20of=20stack=20space=2DSWI/C=2B=2B?=

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




