I'm using Prolog with clpd to solve boolean problems. I have rules like this one below:
:- use_module(library(clpb)).
fun(A, B, C, D, E) :-
sat(A + B + C, D),
sat(E),
labeling([A, B, C, D, E]);
Is possible to print the results in a file? How can I do?
Your code had some simple mistakes. You could try this version (changed some small things):
Now if you query:
"test1234.txt" will e created in your current working directory. The "test1234.txt" file contains: