[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TYPOL stack
- Subject: Re: TYPOL stack
- From: td@almeria.inria.fr (Thierry Despeyroux)
- Date: 13 Oct 93 13:01:01 GMT
- No-Reply-To: Thierry.Despeyroux@sophia.inria.fr
In article <58618@sophia.inria.fr>, jperez@lsi.upc.es (Javier Perez) writes:
|> A question about the stack: is it possible to save some TYPOL stack by
|> calling a TYPOL judgement from a PROLOG predicate and then using the cut
|> operator:
|>
|> p(X, Y, Z):-
|> 'test$test$0|-2:1'(X, Y, Z, '$PSP$nil', '$PSP$nil',_), !.
|>
|> This is a call to a judgement of the set "test" in the program "test".
|>
|> If this saves some stack it could be a solution to the heavy stack problems
|> of TYPOL.
Yes, it is possible. But with MU-Prolog it will not save anything. There is
no garbage collection in MU-Prolog, and the only way to save space is to
backtrack. This is what "once" does (cut+backtrack).
--
Send contributions and compliments to centaur@sophia.inria.fr. Registration
and administrative matters should be sent to centaur-request@sophia.inria.fr.
+---------------------------------------------------------------------------+
| Thierry Despeyroux | email: Thierry.Despeyroux@sophia.inria.fr |
| I.N.R.I.A. Sophia-Antipolis | phone: +33 93 65 77 07 fax: +33 93 65 77 66 |
+---------------------------------------------------------------------------+