PROLOG-REQUEST@SUSHI.STANFORD.EDU (Chuck Restivo, The Moderator) (06/24/87)
PROLOG Digest Wednesday, 24 Jun 1987 Volume 5 : Issue 42 Today's Topics: Query - Stack Problems & Catch ---------------------------------------------------------------------- Date: 22 Jun 87 20:35:25 GMT From: Lan See Chen <dalcs!chen@seismo.css.gov> Subject: Out of global stack problems I am implementing an Information Retrieval system in CProlog on BSD 4.3 UNIX. Could anyone tell me how to handle an "OUT OF GLOBAL/LOCAL STACK" error message while I'm running this IR program with a large number of recursions. Besides, I would also like to know if there is any limitations on the number of recursions of a procedure as well as the length of the list. Thank you. ------------------------------ Date: Tue, 23 Jun 87 11:53:34 MDT From: ted%nmsu.csnet@RELAY.CS.NET Subject: new predicate I have recently had a need to handle signals from other processes in Prolog. It seems that this need will become pervasive as people try to write interface programs of all sorts since it becomes very important to allow the user to interrupt the current process and return control to the top-level user interface (which will often not be the user interface of the underlying Prolog). The predicate that I would like to see would allow code of the following form: top :- catch(kill), loop. top :- write(escaped). loop :- loop. In this code, loop would run until the `kill' signal is received, at which time, the catch would fail, and the second clause of top would be executed. My wish list for the catch predicate includes the following: a) signals should be named, preferably in a fashion similar to naming convention for signals in the base operating system. b) catches should be nestable, so that when catch either returns, or fails due to the receipt of the signal, then the previous handler is made current again. This would allow the code in loop to catch signals if need be. What is the opinion of the Prolog community about this predicate? What similar features currently exist in available Prologs? What low level facilities are required to implement this capability? ------------------------------ End of PROLOG Digest ********************