Hi everyone. I’m relatively new to Prolog and s(CASP), so apologies in advance if I’m missing something obvious with this question.
I’ve got some s(CASP) code which, while not too long, has several layers of rules involving ‘not X’ conditions. I’ve found that the computation time of this sort of code grows at an impractical rate, to the point that with a relatively small piece of code, the computation time for a query can hit the order of hours.
By using the --tree option, it seems that the bulk of this computational cost stems from the global consistency checks (‘o_nmr_check’). What seems to be happening is that for each of the ‘not X’ conditions, the code is looking at every possible combination of variables in an attempt to prove the global consistency of the program. Obviously this sort of thing is one of the key benefits of s(CASP), but in this particular case, I’d rather trade away that global consistency certainty in favour of significantly shorter computation times. Is there any way to achieve this?
I’ve tried using dynamic consistency checks (–dcc) which seemed to make a small difference, but nothing major (it also had the side effect of removing some models which should be included). I’ve also tried the the --no_nmr option, but that didn’t seem to help. Hopefully there’s a simple way to disable these checks that I’ve just missed. Thanks in advance for any assistance!