Closed werifu closed 1 month ago
Hi
Thank you for raising this issue. The Prolog output format is somewhat of a heuristic reconstruction of the formula constructed by the grounding process. I do believe that there is a bug in this case, since some of the rules make no sense.
I have included an image of the ground formula below. Does this make more sense to you?
Thanks for your reply! The image exactly depicts what I want! Do you have any ideas about how is it caused and how to fix it?
I've written a fix and pushed it to the master branch. It is not pushed to pypi yet, but I'll let you know as soon as that has happened.
It has been pushed to pypi.
I defined a rule named
end_node(X)
meaning no out degrees in a graph.After I ran
problog ground --format pl -o output input_file
, I got:I noticed
end_node(1) :- node(1), edge(1,2).
andend_node(3) :- node(3), edge(3,1).
that are not as what I expect whileend_node(2) :- node(2), \+edge(2,3)
is in my expectation. What does it happen? I think the correct answer should beend_node(1) :- node(1), \+edge(1,2), \+edge(1,3)
Problog version: 2.2.4