You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for the tip with external. It hadn't occurred to me and it is a little bit more elegant than using false-choice rules.
Regarding preserve-facts only affecting facts directly occuring in the body, wouldn't that mean that q/2 would be simplified away but p/1 would be preserved in the example? So that the output could be something like
Regarding preserve-facts only affecting facts directly occuring in the body, wouldn't that mean that q/2 would be simplified away but p/1 would be preserved in the example? So that the output could be something like
The feature has been implemented on top of the existing system design. What you describe is certainly possible - just not implemented. I am also not sure whether it is worth to spend any time here. Maybe I'll add an option that treats facts as externals for the next major release...
An option to treat facts as externals would be perfect for my use-cases (in teaching and in my own debugging). Both these needs can be met with manually writing #external, so this option is certainly low priority.
Consider the following input file:
I expect grounding while preserving facts to output something like
instead, I get
We can contrast the grounding of
t/1
inecho "p(a). p(b). q(a,c). q(b,d). r(c). r(d). t(Y) :- r(Y), p(X) : q(X,Y)." | clingo --text --preserve-facts=all -
and inecho "1 {p(a)}. 1 {p(b)}. 1 {q(a,c)}. 1 {q(b,d)}. r(c). r(d). t(Y) :- r(Y), p(X) : q(X,Y)." | clingo --text --preserve-facts=all -
.The text was updated successfully, but these errors were encountered: