diff --git a/clinguin/server/application/backends/clingo_backend.py b/clinguin/server/application/backends/clingo_backend.py index 4622be9a..c9fc171d 100644 --- a/clinguin/server/application/backends/clingo_backend.py +++ b/clinguin/server/application/backends/clingo_backend.py @@ -394,6 +394,7 @@ def _domain_state(self): """ ds = "" for f in self._domain_state_constructors: + ds += f"\n%%%%%%%% {f} %%%%%%%\n" ds += getattr(self, f) return ds @@ -459,7 +460,7 @@ def _ds_brave(self): It uses a cache that is erased after an operation makes changes in the control. """ if not self._ui_uses_predicate("_any", 1): - return "" + return "% NOT USED\n" return self._call_solver_with_cache("_ds_brave", "_any", 0, "ignore", "brave") @@ -471,7 +472,7 @@ def _ds_cautious(self): It uses a cache that is erased after an operation makes changes in the control. """ if not self._ui_uses_predicate("_all", 1): - return "" + return "% NOT USED\n" return self._call_solver_with_cache( "_ds_cautious", "_all", 0, "ignore", "cautious" @@ -485,7 +486,7 @@ def _ds_brave_optimal(self): It uses a cache that is erased after an operation makes changes in the control. """ if not self._ui_uses_predicate("_any_opt", 1): - return "" + return "% NOT USED\n" return self._call_solver_with_cache( "_ds_brave_optimal", "_any_opt", 0, "optN", "brave" @@ -499,7 +500,7 @@ def _ds_cautious_optimal(self): It uses a cache that is erased after an operation makes changes in the control. """ if not self._ui_uses_predicate("_all_opt", 1): - return "" + return "% NOT USED\n" return self._call_solver_with_cache( "_ds_cautious_optimal", "_all_opt", 0, "optN", "cautious" diff --git a/clinguin/server/application/backends/clingodl_backend.py b/clinguin/server/application/backends/clingodl_backend.py index 690a713d..0f140c9f 100644 --- a/clinguin/server/application/backends/clingodl_backend.py +++ b/clinguin/server/application/backends/clingodl_backend.py @@ -112,7 +112,8 @@ def _ds_assign(self): Additional program to pass to the UI computation with assignments """ if not self._ui_uses_predicate("_clinguin_assign", 2): - return "" + return "% NOT USED\n" + prg = "" for key, val in self._assignment: prg += f"_clinguin_assign({key},{val})."