Skip to content

Possible memory leak in :solve-classic & possible efficiency problem

Assuming

java -Xmx8g -jar 2p-repl-0.16.1-redist.jar -T … al lot of files here …  --timeout 10000000

the query

?- findall(X, simple_experiments(2), Y), length(Y, Z).

(expected value of Z is 900) produces

Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
        at kotlin.LazyKt__LazyJVMKt.lazy(LazyJVM.kt:21)
        at it.unibo.tuprolog.core.impl.StructImpl.<init>(StructImpl.kt:19)

after ~15 min, whereas SWI-Prolog succeeds in ~1 second