Closed light-and-salt closed 1 year ago
clingo first grounds a program by replacing all variables with variable-free terms. This means you have to limit the maximum number of steps by some finite bound.
If you add something like
inconsistent(Ti) :- inconsistent_qdomain(_, _, _, _, Ti), Ti<42.
then the problem should have a finite grounding.
Wow, this works! Thank you, @rkaminsk for the timely reply! It solves my problem!
inconsistent(Ti) :- inconsistent_qdomain(_, _, _, _, Ti), Ti<42.
This is the culprit in my original non-working code... I thought the following lines would bound Ti
, but :- is_step(Ti), Ti > 12.
depends on inconsistent(Ti)
in the first place... 😅
% if there is a partial revision at Ti
% then Ti is a step
is_step(Ti+1) :- inconsistent(Ti).
% search for 12 steps ahead (at most)
:- is_step(Ti), Ti > 12.
Many thanks! 🙏
I'm trying to write some ASP to model the relationship between multiple charts in a dashboard... The following ASP leaves clingo hanging forever (looks like an infinite loop to me).
When I try to manually declare the results I want, it's SATISFIABLE:
However, whenever I try to infer
inconsistent(Ti)
, I get the infinite loop:What did I do wrong? Here is the code that hangs...