Вопрос

I'm running a Prolog program that I wrote (a proof tester in natural deduction), and when I run the program (run_all_tests('proof_tester.pl').) the program runs, prints stuff from my program in the console(I barely have time to see what), and then closes SWI Prolog. It just disappears, without a warning or error message or anything. What could this possibly be?

Это было полезно?

Решение

When the console closes due to halt being invoked, it is not a "crash".

If you run the program swipl -s proof_tester.pl from a command line rather than the console, then if the code executes halt, your output will still be in the "terminal" window.

You may prefer to redirect messages from SWI-Prolog to a text file (Windows, Linux), which you can then read at your leisure, using a text editor or other means.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top