Is there a way to force stop SWI-Prolog during a query? E.g., say I have a predicate (bad_foo(X)
) that goes into an infinite loop. When I query this predicate in SWI-Prolog the query runs for a while (sometimes a few minutes) and then fails with ERROR: Out of local stack
:
?- bad_foo(1).
(% and after a long wait...)
ERROR: Out of local stack
My question: How can I skip the wait and stop the query before it runs out of stack? In short, I'm looking for the equivalent of Ctrl + C from Linux.
I'm using SWI-Prolog version 7.6.4 on MacOS.