I’m using: SWI-Prolog version 8.1.26
I am compiling the code with > swipl --goal=main -o tester4 -c tester.pl
I want the code to:
Behave the same if executed multiple times with exactly the same input data
But what I’m getting is:
The compiled program sometimes hangs and sometimes (with exactly the same input) does not hang. (I assume it is a memory leak in the generate C-Code.)
This error occurred multiple times when using SWI-Prolog version 8.1.26 under macOS version Mojave 10.14.6. But I could not reproduce the error, when using SWI-Prolog version 8.1.26 under Parallels desktop Windows on the same Mac computer, i.e., compiled under Parallels Windows the code produces always the same correct results.
My code looks like this:
As my code contains the solutions to the assignments for my students, pIease ask for the code via email to firstname.lastname@example.org.