I'm using SWI-Prolog with the JPL library. I have a program written in Java that produces strings like these:
fact(1,2)
fact(2,3)
fact(1,3)
Then, there is a prolog file that needs this facts in the head of file. I do not want neither insert the code in the head of file, nor use a text file, but only java. Is there a solution for this?