You can subscribe to this list here.
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(8) |
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2011 |
Jan
|
Feb
|
Mar
(5) |
Apr
(4) |
May
(2) |
Jun
|
Jul
(7) |
Aug
(34) |
Sep
(11) |
Oct
(25) |
Nov
(9) |
Dec
(19) |
| 2012 |
Jan
(3) |
Feb
|
Mar
(7) |
Apr
(13) |
May
(13) |
Jun
(24) |
Jul
(16) |
Aug
(2) |
Sep
|
Oct
(14) |
Nov
(34) |
Dec
(9) |
| 2013 |
Jan
(38) |
Feb
(18) |
Mar
(17) |
Apr
(17) |
May
(36) |
Jun
(3) |
Jul
(4) |
Aug
(25) |
Sep
(25) |
Oct
(15) |
Nov
(29) |
Dec
(9) |
| 2014 |
Jan
(40) |
Feb
(84) |
Mar
(25) |
Apr
(47) |
May
(28) |
Jun
(21) |
Jul
(19) |
Aug
(27) |
Sep
(16) |
Oct
(68) |
Nov
(33) |
Dec
(15) |
| 2015 |
Jan
(15) |
Feb
(16) |
Mar
(2) |
Apr
(11) |
May
(16) |
Jun
(65) |
Jul
(26) |
Aug
(22) |
Sep
(18) |
Oct
(40) |
Nov
(14) |
Dec
(18) |
| 2016 |
Jan
(8) |
Feb
(38) |
Mar
(11) |
Apr
(47) |
May
(12) |
Jun
(5) |
Jul
(10) |
Aug
(3) |
Sep
(30) |
Oct
(32) |
Nov
(29) |
Dec
(10) |
| 2017 |
Jan
(5) |
Feb
(9) |
Mar
(38) |
Apr
(6) |
May
(2) |
Jun
(10) |
Jul
(26) |
Aug
(14) |
Sep
(5) |
Oct
(26) |
Nov
(15) |
Dec
(3) |
| 2018 |
Jan
(12) |
Feb
(4) |
Mar
(11) |
Apr
|
May
(11) |
Jun
(7) |
Jul
(7) |
Aug
(13) |
Sep
(10) |
Oct
(16) |
Nov
(21) |
Dec
(1) |
| 2019 |
Jan
(7) |
Feb
(12) |
Mar
(8) |
Apr
(17) |
May
(37) |
Jun
(19) |
Jul
(5) |
Aug
(10) |
Sep
(6) |
Oct
(6) |
Nov
(17) |
Dec
(12) |
| 2020 |
Jan
(10) |
Feb
(13) |
Mar
(25) |
Apr
(10) |
May
(13) |
Jun
(4) |
Jul
(11) |
Aug
(62) |
Sep
(2) |
Oct
(10) |
Nov
(9) |
Dec
(46) |
| 2021 |
Jan
(42) |
Feb
(28) |
Mar
(29) |
Apr
(28) |
May
(14) |
Jun
(14) |
Jul
(3) |
Aug
(29) |
Sep
(24) |
Oct
(36) |
Nov
(57) |
Dec
(18) |
| 2022 |
Jan
(5) |
Feb
(59) |
Mar
(13) |
Apr
(22) |
May
(60) |
Jun
(21) |
Jul
(35) |
Aug
(4) |
Sep
(5) |
Oct
(9) |
Nov
(13) |
Dec
(18) |
| 2023 |
Jan
(47) |
Feb
(26) |
Mar
(4) |
Apr
(29) |
May
(19) |
Jun
(9) |
Jul
(35) |
Aug
(13) |
Sep
(27) |
Oct
(10) |
Nov
(17) |
Dec
(7) |
| 2024 |
Jan
(14) |
Feb
(11) |
Mar
(9) |
Apr
(5) |
May
(6) |
Jun
(21) |
Jul
|
Aug
(3) |
Sep
(8) |
Oct
(15) |
Nov
(18) |
Dec
(6) |
| 2025 |
Jan
(5) |
Feb
(2) |
Mar
(10) |
Apr
(4) |
May
(12) |
Jun
(2) |
Jul
(30) |
Aug
(1) |
Sep
(2) |
Oct
(2) |
Nov
(7) |
Dec
(5) |
| 2026 |
Jan
(15) |
Feb
(6) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Amiskatonic <ami...@gm...> - 2026-03-02 13:38:59
|
Hello, You may find this link useful : https://web.archive.org/web/20190830103646/http://www.hakank.org/answer_set_programming/ Have a nice day Le lun. 2 mars 2026 à 12:53, Roland Kaminski <kam...@cs...> a écrit : > Hi, the asparagus website no longer exists. > > I always recommend Vladimir Lifschitz' ASP book to get started: > > - https://www.cs.utexas.edu/~vl/teaching/378/ASP.pdf > > You could have a look at Torsten's APSP course material: > > - https://github.com/potassco-asp-course > > Maybe the ASP competitions: > > - https://sites.google.com/view/aspcomp2019 > - https://dtai.cs.kuleuven.be/events/ASP-competition/Results.shtml > - https://www.mat.unical.it/aspcomp2013 > - https://www.mat.unical.it/aspcomp2011 > - There were more but the links start to disappear. > > -R > > On Mon, 2026-03-02 at 02:27 -0500, Na wrote: > > hi all, > > > > asparagus doesn't seem to be accessible, at least at the two urls i > > can find for it, and according to archive.org hasn't been since 2024. > > is it hosted somewhere else nowadays? or has it been discontinued? my > > searching didn't turn up results for either option. > > > > currently, http://asp.haiti.cs.uni-potsdam.de > > and http://asparagus.cs.uni-potsdam.de both seem to time out > > > > i'm learning ASP, and while i understand the basics of actually > > writing programs (generate and filter, basic syntax, etc), i'm still > > working on improving my grasp of how to go about modelling problems. > > i was hoping i'd be able to look at examples on asparagus, but if > > it's not being run any more, pointers to other resources (especially > > with good modelling examples) would be much appreciated. > > > > Thanks! > > _______________________________________________ > Potassco-users mailing list > Pot...@li... > https://lists.sourceforge.net/lists/listinfo/potassco-users > |
|
From: Roland K. <kam...@cs...> - 2026-03-02 11:52:59
|
Hi, the asparagus website no longer exists. I always recommend Vladimir Lifschitz' ASP book to get started: - https://www.cs.utexas.edu/~vl/teaching/378/ASP.pdf You could have a look at Torsten's APSP course material: - https://github.com/potassco-asp-course Maybe the ASP competitions: - https://sites.google.com/view/aspcomp2019 - https://dtai.cs.kuleuven.be/events/ASP-competition/Results.shtml - https://www.mat.unical.it/aspcomp2013 - https://www.mat.unical.it/aspcomp2011 - There were more but the links start to disappear. -R On Mon, 2026-03-02 at 02:27 -0500, Na wrote: > hi all, > > asparagus doesn't seem to be accessible, at least at the two urls i > can find for it, and according to archive.org hasn't been since 2024. > is it hosted somewhere else nowadays? or has it been discontinued? my > searching didn't turn up results for either option. > > currently, http://asp.haiti.cs.uni-potsdam.de > and http://asparagus.cs.uni-potsdam.de both seem to time out > > i'm learning ASP, and while i understand the basics of actually > writing programs (generate and filter, basic syntax, etc), i'm still > working on improving my grasp of how to go about modelling problems. > i was hoping i'd be able to look at examples on asparagus, but if > it's not being run any more, pointers to other resources (especially > with good modelling examples) would be much appreciated. > > Thanks! |
|
From: Na <ama...@gm...> - 2026-03-02 07:27:43
|
hi all, asparagus doesn't seem to be accessible, at least at the two urls i can find for it, and according to archive.org hasn't been since 2024. is it hosted somewhere else nowadays? or has it been discontinued? my searching didn't turn up results for either option. currently, http://asp.haiti.cs.uni-potsdam.de and http://asparagus.cs.uni-potsdam.de both seem to time out i'm learning ASP, and while i understand the basics of actually writing programs (generate and filter, basic syntax, etc), i'm still working on improving my grasp of how to go about modelling problems. i was hoping i'd be able to look at examples on asparagus, but if it's not being run any more, pointers to other resources (especially with good modelling examples) would be much appreciated. Thanks! |
|
From: Salvatore F. <sal...@un...> - 2026-02-25 15:04:00
|
Hi everyone, I am currently working on a new propagator to handle disjunctive programs. >From what I have read, Clingo internally uses auxiliary atoms for bodies with more than two elements and, if I understand correctly, this rewriting is performed by the solver. Using Clingo’s C API, I am able to access and inspect the program, but I cannot find a way to access these special auxiliary atoms introduced by the solver. Is there a way to do so? Additionally, I was wondering whether there is a method to prevent component-wise shifting from being applied, so that the shifting process can be controlled manually during the completion. Thank you. Best regards, Salvatore |
|
From: Roland K. <kam...@cs...> - 2026-02-23 21:36:14
|
Hi, it is hard to tell you what the problem might be from the info you
provide. Can you provide some more info? Is this a long running process
that continuously creates control objects? Ideally, you would provide
some code to reproduce the example. -R
On Mon, 2026-02-23 at 18:18 +0000, Zhiliang Xiang wrote:
>
>
> Dear community,
>
> I’m running a program using the Clingo Python API (version 5.8.0). In
> my code, aControl object is created during class initialisation:
> if self.settings.single_solve: solver = clingo.Control(['--
> heuristic=Domain','-Wnone'])
>
> I then call solve(yield_=True) once to enumerate models, and each
> time myget_prog() function is called, it retrieves the next model:
> def start_solving(self): self.settings.logger.debug('*** start sol
> ving') if self.handle is not None: self.handle = None se
> lf.handle = self.solver.solve(yield_=True) def get_prog(self): if
> self.handle is None: self.start_solving() self.settings.log
> ger.debug('*** get next model') self.handle.resume() model = se
> lf.handle.model() self.settings.logger.debug('*** model obtained')
> if model is None: self.settings.logger.debug('*** no more
> new model') # close handle self.handle.cancel()
> self.settings.logger.debug('*** handle closed') self.settings.
> logger.debug(self.solver.statistics) return None self.model
> = model return self.parse_model_single_rule(self.model.symbols(sh
> own=True))
>
> I observed a significant memory surge, eating up 135 GB of RAM, even
> after the handle iscancel and no more models are available.
>
> Below is the statistics output after model exhaustion:
>
> 82.2 s DEBUG: {'problem': {'lp': {'atoms': 42027.0, 'atoms_aux': 0.0,
> 'disjunctions': 0.0, 'disjunctions_non_hcf': 0.0, 'bodies': 134081.0,
> 'bodies_tr': 134083.0, 'sum_bodies': 10.0, 'sum_bodies_tr': 10.0,
> 'count_bodies': 72.0, 'count_bodies_tr': 64.0, 'sccs': 0.0,
> 'sccs_non_hcf': 0.0, 'gammas': 0.0, 'ufs_nodes': 0.0, 'rules':
> 311261.0, 'rules_normal': 281683.0, 'rules_choice': 29568.0,
> 'rules_minimize': 0.0, 'rules_acyc': 0.0, 'rules_heuristic': 10.0,
> 'rules_tr': 311997.0, 'rules_tr_normal': 282419.0, 'rules_tr_choice':
> 29568.0, 'rules_tr_minimize': 0.0, 'rules_tr_acyc': 0.0,
> 'rules_tr_heuristic': 10.0, 'eqs': 69640.0, 'eqs_atom': 13707.0,
> 'eqs_body': 7095.0, 'eqs_other': 48838.0}, 'lpStep': {'atoms':
> 42027.0, 'atoms_aux': 0.0, 'disjunctions': 0.0,
> 'disjunctions_non_hcf': 0.0, 'bodies': 134081.0, 'bodies_tr':
> 134083.0, 'sum_bodies': 10.0, 'sum_bodies_tr': 10.0, 'count_bodies':
> 72.0, 'count_bodies_tr': 64.0, 'sccs': 0.0, 'sccs_non_hcf': 0.0,
> 'gammas': 0.0, 'ufs_nodes': 0.0, 'rules': 311261.0, 'rules_normal':
> 281683.0, 'rules_choice': 29568.0, 'rules_minimize': 0.0,
> 'rules_acyc': 0.0, 'rules_heuristic': 10.0, 'rules_tr': 311997.0,
> 'rules_tr_normal': 282419.0, 'rules_tr_choice': 29568.0,
> 'rules_tr_minimize': 0.0, 'rules_tr_acyc': 0.0, 'rules_tr_heuristic':
> 10.0, 'eqs': 69640.0, 'eqs_atom': 13707.0, 'eqs_body': 7095.0,
> 'eqs_other': 48838.0}, 'generator': {'vars': 62658.0,
> 'vars_eliminated': 0.0, 'vars_frozen': 11962.0, 'constraints':
> 12571.0, 'constraints_binary': 52112.0, 'constraints_ternary':
> 4003.0, 'acyc_edges': 0.0, 'complexity': 68866.0}}, 'solving':
> {'solvers': {'choices': 56360.0, 'conflicts': 24844.0,
> 'conflicts_analyzed': 23964.0, 'restarts': 253.0, 'restarts_last':
> 23914.0, 'restarts_blocked': 0.0}}, 'summary': {'call': 0.0,
> 'result': 1.0, 'signal': 0.0, 'exhausted': 1.0, 'costs': [], 'lower':
> [], 'concurrency': 1.0, 'winner': 0.0, 'times': {'total':
> 80.62033605575562, 'cpu': 80.61346599999999, 'solve':
> 79.54740595817566, 'unsat': 0.004194021224975586, 'sat':
> 0.051251888275146484}, 'models': {'enumerated': 10246.0, 'optimal':
> 0.0}}, 'user_step': {}, 'user_accu': {}}
> Does anyone know what might be causing this ?
> Many thanks,
> Leon
>
>
|
|
From: Zhiliang X. <Xi...@ca...> - 2026-02-23 18:51:47
|
Dear community,
I’m running a program using the Clingo Python API (version 5.8.0). In my code, a Control object is created during class initialisation:
if self.settings.single_solve:
solver = clingo.Control(['--heuristic=Domain','-Wnone'])
I then call solve(yield_=True) once to enumerate models, and each time my get_prog() function is called, it retrieves the next model:
def start_solving(self):
self.settings.logger.debug('*** start solving')
if self.handle is not None:
self.handle = None
self.handle = self.solver.solve(yield_=True)
def get_prog(self):
if self.handle is None:
self.start_solving()
self.settings.logger.debug('*** get next model')
self.handle.resume()
model = self.handle.model()
self.settings.logger.debug('*** model obtained')
if model is None:
self.settings.logger.debug('*** no more new model')
# close handle
self.handle.cancel()
self.settings.logger.debug('*** handle closed')
self.settings.logger.debug(self.solver.statistics)
return None
self.model = model
return self.parse_model_single_rule(self.model.symbols(shown=True))
I observed a significant memory surge, eating up 135 GB of RAM, even after the handle is cancel and no more models are available.
Below is the statistics output after model exhaustion:
82.2 s DEBUG: {'problem': {'lp': {'atoms': 42027.0, 'atoms_aux': 0.0, 'disjunctions': 0.0, 'disjunctions_non_hcf': 0.0, 'bodies': 134081.0, 'bodies_tr': 134083.0, 'sum_bodies': 10.0, 'sum_bodies_tr': 10.0, 'count_bodies': 72.0, 'count_bodies_tr': 64.0, 'sccs': 0.0, 'sccs_non_hcf': 0.0, 'gammas': 0.0, 'ufs_nodes': 0.0, 'rules': 311261.0, 'rules_normal': 281683.0, 'rules_choice': 29568.0, 'rules_minimize': 0.0, 'rules_acyc': 0.0, 'rules_heuristic': 10.0, 'rules_tr': 311997.0, 'rules_tr_normal': 282419.0, 'rules_tr_choice': 29568.0, 'rules_tr_minimize': 0.0, 'rules_tr_acyc': 0.0, 'rules_tr_heuristic': 10.0, 'eqs': 69640.0, 'eqs_atom': 13707.0, 'eqs_body': 7095.0, 'eqs_other': 48838.0}, 'lpStep': {'atoms': 42027.0, 'atoms_aux': 0.0, 'disjunctions': 0.0, 'disjunctions_non_hcf': 0.0, 'bodies': 134081.0, 'bodies_tr': 134083.0, 'sum_bodies': 10.0, 'sum_bodies_tr': 10.0, 'count_bodies': 72.0, 'count_bodies_tr': 64.0, 'sccs': 0.0, 'sccs_non_hcf': 0.0, 'gammas': 0.0, 'ufs_nodes': 0.0, 'rules': 311261.0, 'rules_normal': 281683.0, 'rules_choice': 29568.0, 'rules_minimize': 0.0, 'rules_acyc': 0.0, 'rules_heuristic': 10.0, 'rules_tr': 311997.0, 'rules_tr_normal': 282419.0, 'rules_tr_choice': 29568.0, 'rules_tr_minimize': 0.0, 'rules_tr_acyc': 0.0, 'rules_tr_heuristic': 10.0, 'eqs': 69640.0, 'eqs_atom': 13707.0, 'eqs_body': 7095.0, 'eqs_other': 48838.0}, 'generator': {'vars': 62658.0, 'vars_eliminated': 0.0, 'vars_frozen': 11962.0, 'constraints': 12571.0, 'constraints_binary': 52112.0, 'constraints_ternary': 4003.0, 'acyc_edges': 0.0, 'complexity': 68866.0}}, 'solving': {'solvers': {'choices': 56360.0, 'conflicts': 24844.0, 'conflicts_analyzed': 23964.0, 'restarts': 253.0, 'restarts_last': 23914.0, 'restarts_blocked': 0.0}}, 'summary': {'call': 0.0, 'result': 1.0, 'signal': 0.0, 'exhausted': 1.0, 'costs': [], 'lower': [], 'concurrency': 1.0, 'winner': 0.0, 'times': {'total': 80.62033605575562, 'cpu': 80.61346599999999, 'solve': 79.54740595817566, 'unsat': 0.004194021224975586, 'sat': 0.051251888275146484}, 'models': {'enumerated': 10246.0, 'optimal': 0.0}}, 'user_step': {}, 'user_accu': {}}
Does anyone know what might be causing this ?
Many thanks,
Leon
|
|
From: Roland K. <kam...@cs...> - 2026-02-12 09:31:07
|
Hi, you forgot to give the type of the guard:
#theory lp {
linear_term {
+ : 5, unary;
- : 5, unary;
* : 4, binary, left;
/ : 4, binary, left;
+ : 3, binary, left;
- : 3, binary, left
};
&sum/0 : linear_term, {<=,>=,>,<,=:}, linear_term, head
}.
-R
On Wed, 2026-02-11 at 11:43 +0300, v-a...@ya... wrote:
> Dear Clingo developers,
>
> I am developing a converter from clingo-lpx to SMT-LIB v2 using the
> Clingo Python API. I encountered a strict syntax error regarding
> theory definitions.
>
> Specifically, when adding a theory definition via Control.add, the
> parser fails with:
> error: syntax error, unexpected }, expecting ","
>
> This happens even with a standard definition of linear constraints.
> It appears that Clingo 5.8.0 is more restrictive about how
> linear_term and &sum guards are defined.
> Minimal Reproducible Example (Python):
>
> import clingo
>
> # This definition causes: error: syntax error, unexpected },
> expecting ","
> LP_THEORY = """
> #theory lp {
> linear_term {
> + : 5, unary;
> - : 5, unary;
> * : 4, binary, left;
> / : 4, binary, left;
> + : 3, binary, left;
> - : 3, binary, left
> };
> &sum/0 : linear_term, {<=,>=,>,<,=:}, head
> }.
> """
>
> ctl = clingo.Control()
> try:
> ctl.add("base", [], LP_THEORY)
> ctl.ground([("base", [])])
> except RuntimeError as e:
> print(f"Theory Parsing Error: {e}")
>
> Observations:
> The error occurs at the closing brace of the &sum/0 definition or the
> linear_term block.
> It seems the parser now requires explicit term types (like number,
> constant) to be registered or specified within the theory scope to
> avoid ambiguity.
> Could you provide guidance on the "correct" minimal theory string for
> Clingo 5.8.0 that supports linear arithmetic (multiplication and
> addition) to remain compatible with the new parser requirements?
>
> Best regards,
> Vitalii Koshelev
>
|
|
From: <v-a...@ya...> - 2026-02-11 08:43:48
|
<div style="background-color:rgb( 255 , 255 , 255 );color:rgb( 10 , 10 , 10 );font-family:'google sans' , 'arial' , sans-serif;font-size:14px;font-style:normal;font-weight:400;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div>Dear Clingo developers,</div><div> </div><div>I am developing a converter from clingo-lpx to SMT-LIB v2 using the Clingo Python API. I encountered a strict syntax error regarding theory definitions.</div><div> </div><div>Specifically, when adding a theory definition via Control.add, the parser fails with:</div><div>error: syntax error, unexpected }, expecting ","</div><div> </div><div>This happens even with a standard definition of linear constraints. It appears that Clingo 5.8.0 is more restrictive about how linear_term and &sum guards are defined.</div><div>Minimal Reproducible Example (Python):</div><div> </div><div>import clingo</div><div> </div><div># This definition causes: error: syntax error, unexpected }, expecting ","</div><div>LP_THEORY = """</div><div>#theory lp {<!-- --></div><div> linear_term {<!-- --></div><div> + : 5, unary;</div><div> - : 5, unary;</div><div> * : 4, binary, left;</div><div> / : 4, binary, left;</div><div> + : 3, binary, left;</div><div> - : 3, binary, left</div><div> };</div><div> &sum/0 : linear_term, {<=,>=,>,<,=:}, head</div><div>}.</div><div>"""</div><div> </div><div>ctl = clingo.Control()</div><div>try:</div><div> ctl.add("base", [], LP_THEORY)</div><div> ctl.ground([("base", [])])</div><div>except RuntimeError as e:</div><div> print(f"Theory Parsing Error: {e}")</div><div> </div><div>Observations:</div><div>The error occurs at the closing brace of the &sum/0 definition or the linear_term block.</div><div>It seems the parser now requires explicit term types (like number, constant) to be registered or specified within the theory scope to avoid ambiguity.</div><div>Could you provide guidance on the "correct" minimal theory string for Clingo 5.8.0 that supports linear arithmetic (multiplication and addition) to remain compatible with the new parser requirements?</div><div><br />Best regards,</div><div>Vitalii Koshelev</div><div> </div></div> |
|
From: Robert G. <rpg...@si...> - 2026-02-09 18:13:29
|
I'm having a bit of trouble using the AssumptionProcessor: my attempts to use a FilterPattern are unexpectedly creating no assumptions. It's possible that I'm just using the wrong notation, but I am also wondering how the Assumption Processor interacts with grounding. Is there any chance that the patterns I am supplying, which are ground literals, are failing to create any assumptions because Clingo has not yet generated them through grounding? Is there any more documentation (beyond the README) for clingo-explaid? |
|
From: Robert G. <rpg...@si...> - 2026-01-27 15:43:20
|
Thank you. A quick follow-up question -- looking at [existing code in Popper](https://github.com/logic-and-learning-lab/Popper/blob/6a1b2e570a3d04c750764071a4ebfc61ffe68c51/popper/gen3.py#L206-L265), there is a place where the `backend()` of a `clingo.Control` object is retrieved, `Backend.add_rule()` is invoked on the returned object, and then a new `SolveHandle` is created using `Control.solve(yield_True)`. Will that work correctly, or will the added rules be cleared, as they would be if one called `Model.context.add_clause()`? There is no caution in the documentation for `Backend.add_rule()` the way there is for `SolveControl.add_clause()`. Thank you! On 27 Jan 2026, at 3:22, Roland Kaminski wrote: > Hi, > > a propagator would add quite some complexity and is harder to wrap your > head around than the simple solution you had before. > > If it is just about some nogoods, I would try to stick to the variant > you have for now: > > - add nogoods during model enumeration and store them in a list > - when you have to restart the solve call because you want to change > the assumptions > - stop the current search > - add the recorded nogoods via the control's backend > - clear the nogood list > - restart the search under the modified assumptions > > If you really want to use the propagator for this, you would have to > set tag to false and lock to true. > > Hope this helps, -R > > > > > On Mon, 2026-01-26 at 19:41 -0600, Robert Goldman wrote: >> >> So I need to set tag=False, but what about lock? The docs say >>> If true, exclude clause from the solver's regular clause deletion >>> policy. >> >> But I don't know how to find out what the clause deletion policy is. >> Thanks for any advice! >> On 26 Jan 2026, at 17:36, Abdallah Saffidine wrote: >>> >>> Hi, >>> >>> Have you looked at the propagator >>> module? https://potassco.org/clingo/python-api/current/clingo/propa >>> gator.html The PropagateControl.add_nogood (to add them during >>> solving; you can control whether they remain in future invocations >>> of solve with the tag parameter) and PropagateInit.add_clause (to >>> add them at the start of a solving step) sound relevant based on >>> your description. If they aren't what you're looking for, maybe you >>> can give a bit more details about the obstacles to using them for >>> your situation. >>> >>> Good luck! >>> >>> >>> Le mar. 27 janv. 2026 à 09:59, Robert Goldman <rpg...@si...> >>> a écrit : >>>> >>>> >>>> >>>> We have an ASP-based application where we >>>> 1. >>>> generate an answer set under a set of assumptions >>>> 2. >>>> Examine the model object and based on its contents compute >>>> nogoods using external information >>>> After step 2, we would like to add the nogoods and find a new >>>> answer set under a different set of assumptions. >>>> I am not sure how to do this. >>>> As far as I can tell, to add nogoods, we use the SolveControl >>>> from the search in (1). >>>> But to change the set of assumptions, we need to re-invoke >>>> Control.solve() with a different set of assumptions, we cannot >>>> continue the existing solve. But if we do that, we lose the >>>> nogoods we added, because they are valid only in the current >>>> search. >>>> Is there some way to create new nogoods and retain them over >>>> multiple invocations of solve? >>>> Thank you for any advice >>>> _______________________________________________ >>>> Potassco-users mailing list >>>> Pot...@li... >>>> https://lists.sourceforge.net/lists/listinfo/potassco-users >>>> >> >>> _______________________________________________ >>> Potassco-users mailing list >>> Pot...@li... >>> https://lists.sourceforge.net/lists/listinfo/potassco-users > > > _______________________________________________ > Potassco-users mailing list > Pot...@li... > https://lists.sourceforge.net/lists/listinfo/potassco-users |
|
From: Roland K. <kam...@cs...> - 2026-01-27 09:23:01
|
Hi, a propagator would add quite some complexity and is harder to wrap your head around than the simple solution you had before. If it is just about some nogoods, I would try to stick to the variant you have for now: - add nogoods during model enumeration and store them in a list - when you have to restart the solve call because you want to change the assumptions - stop the current search - add the recorded nogoods via the control's backend - clear the nogood list - restart the search under the modified assumptions If you really want to use the propagator for this, you would have to set tag to false and lock to true. Hope this helps, -R On Mon, 2026-01-26 at 19:41 -0600, Robert Goldman wrote: > > So I need to set tag=False, but what about lock? The docs say > > If true, exclude clause from the solver's regular clause deletion > > policy. > > But I don't know how to find out what the clause deletion policy is. > Thanks for any advice! > On 26 Jan 2026, at 17:36, Abdallah Saffidine wrote: > > > > Hi, > > > > Have you looked at the propagator > > module? https://potassco.org/clingo/python-api/current/clingo/propa > > gator.html The PropagateControl.add_nogood (to add them during > > solving; you can control whether they remain in future invocations > > of solve with the tag parameter) and PropagateInit.add_clause (to > > add them at the start of a solving step) sound relevant based on > > your description. If they aren't what you're looking for, maybe you > > can give a bit more details about the obstacles to using them for > > your situation. > > > > Good luck! > > > > > > Le mar. 27 janv. 2026 à 09:59, Robert Goldman <rpg...@si...> > > a écrit : > > > > > > > > > > > > We have an ASP-based application where we > > > 1. > > > generate an answer set under a set of assumptions > > > 2. > > > Examine the model object and based on its contents compute > > > nogoods using external information > > > After step 2, we would like to add the nogoods and find a new > > > answer set under a different set of assumptions. > > > I am not sure how to do this. > > > As far as I can tell, to add nogoods, we use the SolveControl > > > from the search in (1). > > > But to change the set of assumptions, we need to re-invoke > > > Control.solve() with a different set of assumptions, we cannot > > > continue the existing solve. But if we do that, we lose the > > > nogoods we added, because they are valid only in the current > > > search. > > > Is there some way to create new nogoods and retain them over > > > multiple invocations of solve? > > > Thank you for any advice > > > _______________________________________________ > > > Potassco-users mailing list > > > Pot...@li... > > > https://lists.sourceforge.net/lists/listinfo/potassco-users > > > > > > _______________________________________________ > > Potassco-users mailing list > > Pot...@li... > > https://lists.sourceforge.net/lists/listinfo/potassco-users |
|
From: Robert G. <rpg...@si...> - 2026-01-27 01:41:37
|
So I need to set `tag=False`, but what about `lock`? The docs say > If true, exclude clause from the solver's regular clause deletion > policy. But I don't know how to find out what the clause deletion policy is. Thanks for any advice! On 26 Jan 2026, at 17:36, Abdallah Saffidine wrote: > Hi, > > Have you looked at the propagator module? > https://potassco.org/clingo/python-api/current/clingo/propagator.html > The > PropagateControl.add_nogood (to add them during solving; you can > control > whether they remain in future invocations of solve with the tag > parameter) > and PropagateInit.add_clause (to add them at the start of a solving > step) > sound relevant based on your description. If they aren't what you're > looking for, maybe you can give a bit more details about the obstacles > to > using them for your situation. > > Good luck! > > Le mar. 27 janv. 2026 à 09:59, Robert Goldman <rpg...@si...> a > écrit : > >> We have an ASP-based application where we >> >> 1. >> >> generate an answer set under a set of assumptions >> 2. >> >> Examine the model object and based on its contents compute nogoods >> using external information >> >> After step 2, we would like to add the nogoods and find a new answer >> set >> under a different set of assumptions. >> >> I am not sure how to do this. >> >> As far as I can tell, to add nogoods, we use the SolveControl from >> the >> search in (1). >> >> But to change the set of assumptions, we need to re-invoke >> Control.solve() >> with a different set of assumptions, we cannot continue the existing >> solve. >> But if we do that, we lose the nogoods we added, because they are >> valid >> only in the current search. >> >> Is there some way to create new nogoods and retain them over multiple >> invocations of solve? >> >> Thank you for any advice >> _______________________________________________ >> Potassco-users mailing list >> Pot...@li... >> https://lists.sourceforge.net/lists/listinfo/potassco-users >> > _______________________________________________ > Potassco-users mailing list > Pot...@li... > https://lists.sourceforge.net/lists/listinfo/potassco-users |
|
From: Robert G. <rpg...@si...> - 2026-01-27 01:39:28
|
Thank you very much! It never occurred to me to look at the Propagator documentation for this! On 26 Jan 2026, at 17:36, Abdallah Saffidine wrote: > Hi, > > Have you looked at the propagator module? > https://potassco.org/clingo/python-api/current/clingo/propagator.html > The > PropagateControl.add_nogood (to add them during solving; you can > control > whether they remain in future invocations of solve with the tag > parameter) > and PropagateInit.add_clause (to add them at the start of a solving > step) > sound relevant based on your description. If they aren't what you're > looking for, maybe you can give a bit more details about the obstacles > to > using them for your situation. > > Good luck! > > Le mar. 27 janv. 2026 à 09:59, Robert Goldman <rpg...@si...> a > écrit : > >> We have an ASP-based application where we >> >> 1. >> >> generate an answer set under a set of assumptions >> 2. >> >> Examine the model object and based on its contents compute nogoods >> using external information >> >> After step 2, we would like to add the nogoods and find a new answer >> set >> under a different set of assumptions. >> >> I am not sure how to do this. >> >> As far as I can tell, to add nogoods, we use the SolveControl from >> the >> search in (1). >> >> But to change the set of assumptions, we need to re-invoke >> Control.solve() >> with a different set of assumptions, we cannot continue the existing >> solve. >> But if we do that, we lose the nogoods we added, because they are >> valid >> only in the current search. >> >> Is there some way to create new nogoods and retain them over multiple >> invocations of solve? >> >> Thank you for any advice >> _______________________________________________ >> Potassco-users mailing list >> Pot...@li... >> https://lists.sourceforge.net/lists/listinfo/potassco-users >> > _______________________________________________ > Potassco-users mailing list > Pot...@li... > https://lists.sourceforge.net/lists/listinfo/potassco-users |
|
From: Abdallah S. <abd...@gm...> - 2026-01-26 23:36:44
|
Hi, Have you looked at the propagator module? https://potassco.org/clingo/python-api/current/clingo/propagator.html The PropagateControl.add_nogood (to add them during solving; you can control whether they remain in future invocations of solve with the tag parameter) and PropagateInit.add_clause (to add them at the start of a solving step) sound relevant based on your description. If they aren't what you're looking for, maybe you can give a bit more details about the obstacles to using them for your situation. Good luck! Le mar. 27 janv. 2026 à 09:59, Robert Goldman <rpg...@si...> a écrit : > We have an ASP-based application where we > > 1. > > generate an answer set under a set of assumptions > 2. > > Examine the model object and based on its contents compute nogoods > using external information > > After step 2, we would like to add the nogoods and find a new answer set > under a different set of assumptions. > > I am not sure how to do this. > > As far as I can tell, to add nogoods, we use the SolveControl from the > search in (1). > > But to change the set of assumptions, we need to re-invoke Control.solve() > with a different set of assumptions, we cannot continue the existing solve. > But if we do that, we lose the nogoods we added, because they are valid > only in the current search. > > Is there some way to create new nogoods and retain them over multiple > invocations of solve? > > Thank you for any advice > _______________________________________________ > Potassco-users mailing list > Pot...@li... > https://lists.sourceforge.net/lists/listinfo/potassco-users > |
|
From: Robert G. <rpg...@si...> - 2026-01-26 22:58:54
|
We have an ASP-based application where we 1. generate an answer set under a set of assumptions 2. Examine the model object and based on its contents compute nogoods using external information After step 2, we would like to add the nogoods and find a new answer set under a different set of assumptions. I am not sure how to do this. As far as I can tell, to add nogoods, we use the `SolveControl` from the search in (1). But to change the set of assumptions, we need to re-invoke `Control.solve()` with a different set of assumptions, we cannot continue the existing solve. But if we do that, we lose the nogoods we added, because they are valid only in the current search. Is there some way to create new nogoods and retain them over multiple invocations of `solve`? Thank you for any advice |
|
From: Max O. <ost...@cs...> - 2026-01-23 09:13:11
|
I'm sorry, but I can't follow your emails. Your implementation looks
right, except for the J=6, as I thought you want to have the global
makespan.
&sum { makespan } >= do(J,B) :- job(J), bath(B).
Means that makespan is at least the maximum of all do(i,j), or even higher.
Then you simply minimze this maximum.
> This is not the desired output.
What else would you expect?
> I tried to obtain the maximum value by assigning the result to a
variable, but I get an error.
Without knowing your code nor the error how should I help you here.
> Nesting minimize and maximize does not work, but this is also not
what you want. You want to minimize the maximum. These are two different
things.
The maximum is just the aggregation over all values (local, within one
answer set), while minimize is a global statement that searches within
all answer sets for the answer set with the least makespan.
The code:
&dom{0..2000} = makespan.
&sum { makespan } >= do(J,B) :- job(J), bath(B).
&minimize { makespan }.
works and mimimizes the maximum of all do(i,j)
If you want to achieve something else, you need to adjust the code.
Best,
Max
On 1/22/26 17:44, Carmen Leticia Garcia Mata wrote:
> Hello Max Ostrowski,
>
> I have been trying with that approach, specifically with the instructions
>
> &dom{0..2000} = makespan.
> &sum { makespan } >= do(J,B) :- job(J), bath(B), J=6.
> &minimize { makespan }.
>
> But what I get is the minimum value from do(i,6)=k for each Answer
> Set. One of those Answer Set is the next:
>
> Answer: 310
>
> Assignment:
> makespan=300 do(1,1)=152 do(1,2)=207 do(1,3)=372 do(1,4)=493
> do(1,5)=573 do(1,6)=602 do(2,1)=208 do(2,2)=278 do(2,3)=538
> do(2,4)=628 do(2,5)=706 do(2,6)=759 do(3,1)=412 do(3,2)=530
> do(3,3)=661 do(3,4)=695 do(3,5)=794 do(3,6)=825 do(4,1)=98 do(4,2)=137
> do(4,3)=214 do(4,4)=291 do(4,5)=386 do(4,6)=425 do(5,1)=588
> do(5,2)=641 do(5,3)=720 do(5,4)=838 do(5,5)=1003 do(5,6)=1081
> do(6,1)=0 do(6,2)=49 do(6,3)=124 do(6,4)=157 do(6,5)=231 do(6,6)=300
>
> Cost: 300
> SATISFIABLE
>
> Models : 310
> Calls : 1
> Time : 5.034s (Solving: 4.71s 1st Model: 0.08s Unsat: 0.03s)
> CPU Time : 4.859s
>
> This is not the desired output. What else can I try?
>
> Thanks for your help
>
> Carmen García M.
>
> ------------------------------------------------------------------------
> *De:* Max Ostrowski <ost...@cs...>
> *Enviado:* jueves, 22 de enero de 2026 2:05
> *Para:* pot...@li...
> <pot...@li...>
> *Asunto:* Re: [Potassco-users] [Extern] Minimization in Clingcon
>
> *ADVERTENCIA, ESTE REMITENTE ES EXTERNO*
> ESTE MENSAJE DE CORREO ELECTRÓNICO SE ORIGINÓ FUERA DE LOS SERVICIOS
> INSTITUCIONALES DEL TECNM. POR SU SEGURIDAD NO ABRA ARCHIVOS ADJUNTOS,
> NI HAGA CLIC EN ENLACES. NUNCA PROPORCIONE INFORMACION NI DATOS
> SENSIBLES, A MENOS QUE RECONOZCA AL REMITENTE Y TENGA LA CERTEZA DE
> QUE EL CONTENIDO ES SEGURO.
>
>
> Yes, what your minimize statement is doing is minimizing the sum of
> all k's.
> What you want to do is to minimize the maximum of all k's.
> Just introduce an additional variable "makespan" with domain 0..1200,
> post constraints that makespan >= do(i,j) for all i,j and minimize
> only the makespan.
>
> I hope this helps to get the right idea?
>
> Best,
> Max
>
> PS: For flow shop you might want to look into clingo-dl, it is very
> good at it and has very similar syntax.
>
>
>
> On 1/21/26 19:04, Carmen Leticia Garcia Mata wrote:
>> Hello,
>>
>> I'm having trouble finding the makespan minimization in clingcon for
>> a scheduling problem under the Flow Shop (FSP) production model.
>> Assuming the processing data is represented by do(i,j)=d, where i
>> represents jobs, job(i), j represents machines, and k is the value
>> Clingcon calculates for the start of each job. Aassuming
>> deadline=1200, i=6, and j=6, the makespan minimum is the answer set
>> of all ASs with the minimum k. I'm solving this problem with CASP and
>> the Clingcon solver version 5.2.0. I've tried the expression:
>>
>> &minimize {do(P,Nb) : duration(P,Nb,D), Nb=6, numBaths(Nb)}.
>>
>> However, instead of obtaining the makespan minimum, I get the sum of
>> all k values with respect to do(i,j) = k for each answer set.
>>
>> What do you recommend to solve my problem?
>>
>> Thanks in advance por your hel
>>
>> Carmen García M.
>>
>>
>> _______________________________________________
>> Potassco-users mailing list
>> Pot...@li... <mailto:Pot...@li...>
>> https://lists.sourceforge.net/lists/listinfo/potassco-users <https://lists.sourceforge.net/lists/listinfo/potassco-users>
>
>
> _______________________________________________
> Potassco-users mailing list
> Pot...@li...
> https://lists.sourceforge.net/lists/listinfo/potassco-users |
|
From: Carmen L. G. M. <car...@ch...> - 2026-01-22 23:23:22
|
Hello Max Ostrowski,
Regarding the makespan minimization problem, I just want to clarify that the minimum makespan consists in finding the maximum value of each Answer Set, and among these maximum values, I need to find the minimum value across all Answer Sets. I tried to obtain the maximum value by assigning the result to a variable, but I get an error. I also tried nesting the expressions in the form `&minimize &maximize{makespan}}`, where I also get a syntax error. Thanks for your help. Carmen García M.
________________________________
De: Max Ostrowski <ost...@cs...>
Enviado: jueves, 22 de enero de 2026 2:05
Para: pot...@li... <pot...@li...>
Asunto: Re: [Potassco-users] [Extern] Minimization in Clingcon
ADVERTENCIA, ESTE REMITENTE ES EXTERNO
ESTE MENSAJE DE CORREO ELECTRÓNICO SE ORIGINÓ FUERA DE LOS SERVICIOS INSTITUCIONALES DEL TECNM. POR SU SEGURIDAD NO ABRA ARCHIVOS ADJUNTOS, NI HAGA CLIC EN ENLACES. NUNCA PROPORCIONE INFORMACION NI DATOS SENSIBLES, A MENOS QUE RECONOZCA AL REMITENTE Y TENGA LA CERTEZA DE QUE EL CONTENIDO ES SEGURO.
Yes, what your minimize statement is doing is minimizing the sum of all k's.
What you want to do is to minimize the maximum of all k's.
Just introduce an additional variable "makespan" with domain 0..1200,
post constraints that makespan >= do(i,j) for all i,j and minimize only the makespan.
I hope this helps to get the right idea?
Best,
Max
PS: For flow shop you might want to look into clingo-dl, it is very good at it and has very similar syntax.
On 1/21/26 19:04, Carmen Leticia Garcia Mata wrote:
Hello,
I'm having trouble finding the makespan minimization in clingcon for a scheduling problem under the Flow Shop (FSP) production model. Assuming the processing data is represented by do(i,j)=d, where i represents jobs, job(i), j represents machines, and k is the value Clingcon calculates for the start of each job. Aassuming deadline=1200, i=6, and j=6, the makespan minimum is the answer set of all ASs with the minimum k. I'm solving this problem with CASP and the Clingcon solver version 5.2.0. I've tried the expression:
&minimize {do(P,Nb) : duration(P,Nb,D), Nb=6, numBaths(Nb)}.
However, instead of obtaining the makespan minimum, I get the sum of all k values with respect to do(i,j) = k for each answer set.
What do you recommend to solve my problem?
Thanks in advance por your hel
Carmen García M.
_______________________________________________
Potassco-users mailing list
Pot...@li...<mailto:Pot...@li...>
https://lists.sourceforge.net/lists/listinfo/potassco-users
|
|
From: Carmen L. G. M. <car...@ch...> - 2026-01-22 17:00:41
|
Hello Max Ostrowski,
I have been trying with that approach, specifically with the instructions
&dom{0..2000} = makespan.
&sum { makespan } >= do(J,B) :- job(J), bath(B), J=6.
&minimize { makespan }.
But what I get is the minimum value from do(i,6)=k for each Answer Set. One of those Answer Set is the next:
Answer: 310
Assignment:
makespan=300 do(1,1)=152 do(1,2)=207 do(1,3)=372 do(1,4)=493 do(1,5)=573 do(1,6)=602 do(2,1)=208 do(2,2)=278 do(2,3)=538 do(2,4)=628 do(2,5)=706 do(2,6)=759 do(3,1)=412 do(3,2)=530 do(3,3)=661 do(3,4)=695 do(3,5)=794 do(3,6)=825 do(4,1)=98 do(4,2)=137 do(4,3)=214 do(4,4)=291 do(4,5)=386 do(4,6)=425 do(5,1)=588 do(5,2)=641 do(5,3)=720 do(5,4)=838 do(5,5)=1003 do(5,6)=1081 do(6,1)=0 do(6,2)=49 do(6,3)=124 do(6,4)=157 do(6,5)=231 do(6,6)=300
Cost: 300
SATISFIABLE
Models : 310
Calls : 1
Time : 5.034s (Solving: 4.71s 1st Model: 0.08s Unsat: 0.03s)
CPU Time : 4.859s
This is not the desired output. What else can I try?
Thanks for your help
Carmen García M.
________________________________
De: Max Ostrowski <ost...@cs...>
Enviado: jueves, 22 de enero de 2026 2:05
Para: pot...@li... <pot...@li...>
Asunto: Re: [Potassco-users] [Extern] Minimization in Clingcon
ADVERTENCIA, ESTE REMITENTE ES EXTERNO
ESTE MENSAJE DE CORREO ELECTRÓNICO SE ORIGINÓ FUERA DE LOS SERVICIOS INSTITUCIONALES DEL TECNM. POR SU SEGURIDAD NO ABRA ARCHIVOS ADJUNTOS, NI HAGA CLIC EN ENLACES. NUNCA PROPORCIONE INFORMACION NI DATOS SENSIBLES, A MENOS QUE RECONOZCA AL REMITENTE Y TENGA LA CERTEZA DE QUE EL CONTENIDO ES SEGURO.
Yes, what your minimize statement is doing is minimizing the sum of all k's.
What you want to do is to minimize the maximum of all k's.
Just introduce an additional variable "makespan" with domain 0..1200,
post constraints that makespan >= do(i,j) for all i,j and minimize only the makespan.
I hope this helps to get the right idea?
Best,
Max
PS: For flow shop you might want to look into clingo-dl, it is very good at it and has very similar syntax.
On 1/21/26 19:04, Carmen Leticia Garcia Mata wrote:
Hello,
I'm having trouble finding the makespan minimization in clingcon for a scheduling problem under the Flow Shop (FSP) production model. Assuming the processing data is represented by do(i,j)=d, where i represents jobs, job(i), j represents machines, and k is the value Clingcon calculates for the start of each job. Aassuming deadline=1200, i=6, and j=6, the makespan minimum is the answer set of all ASs with the minimum k. I'm solving this problem with CASP and the Clingcon solver version 5.2.0. I've tried the expression:
&minimize {do(P,Nb) : duration(P,Nb,D), Nb=6, numBaths(Nb)}.
However, instead of obtaining the makespan minimum, I get the sum of all k values with respect to do(i,j) = k for each answer set.
What do you recommend to solve my problem?
Thanks in advance por your hel
Carmen García M.
_______________________________________________
Potassco-users mailing list
Pot...@li...<mailto:Pot...@li...>
https://lists.sourceforge.net/lists/listinfo/potassco-users
|
|
From: Max O. <ost...@cs...> - 2026-01-22 09:06:25
|
Yes, what your minimize statement is doing is minimizing the sum of all k's.
What you want to do is to minimize the maximum of all k's.
Just introduce an additional variable "makespan" with domain 0..1200,
post constraints that makespan >= do(i,j) for all i,j and minimize only
the makespan.
I hope this helps to get the right idea?
Best,
Max
PS: For flow shop you might want to look into clingo-dl, it is very good
at it and has very similar syntax.
On 1/21/26 19:04, Carmen Leticia Garcia Mata wrote:
> Hello,
>
> I'm having trouble finding the makespan minimization in clingcon for a
> scheduling problem under the Flow Shop (FSP) production model.
> Assuming the processing data is represented by do(i,j)=d, where i
> represents jobs, job(i), j represents machines, and k is the value
> Clingcon calculates for the start of each job. Aassuming
> deadline=1200, i=6, and j=6, the makespan minimum is the answer set of
> all ASs with the minimum k. I'm solving this problem with CASP and the
> Clingcon solver version 5.2.0. I've tried the expression:
>
> &minimize {do(P,Nb) : duration(P,Nb,D), Nb=6, numBaths(Nb)}.
>
> However, instead of obtaining the makespan minimum, I get the sum of
> all k values with respect to do(i,j) = k for each answer set.
>
> What do you recommend to solve my problem?
>
> Thanks in advance por your hel
>
> Carmen García M.
>
>
> _______________________________________________
> Potassco-users mailing list
> Pot...@li...
> https://lists.sourceforge.net/lists/listinfo/potassco-users |
|
From: Carmen L. G. M. <car...@ch...> - 2026-01-21 23:41:01
|
Hello,
I'm having trouble finding the makespan minimization in clingcon for a scheduling problem under the Flow Shop (FSP) production model. Assuming the processing data is represented by do(i,j)=d, where i represents jobs, job(i), j represents machines, and k is the value Clingcon calculates for the start of each job. Aassuming deadline=1200, i=6, and j=6, the makespan minimum is the answer set of all ASs with the minimum k. I'm solving this problem with CASP and the Clingcon solver version 5.2.0. I've tried the expression:
&minimize {do(P,Nb) : duration(P,Nb,D), Nb=6, numBaths(Nb)}.
However, instead of obtaining the makespan minimum, I get the sum of all k values with respect to do(i,j) = k for each answer set.
What do you recommend to solve my problem?
Thanks in advance por your hel
Carmen García M.
|
|
From: Roland K. <kam...@cs...> - 2026-01-10 10:51:45
|
Hi Robert,
if you see the message that program updates not supported, then either
you have created a control object in single-shot solving mode or the
solver is in a state where updates are not supported. It is important
to note that the backend cannot be used while a search is active. You
can use cancel to stop the active search. A loop of the following shape
should work:
some loop:
with ctl.backend() as bck:
add rules
with ctl.solve(async_=True) as hnd:
# do something that does not use the control object
hnd.cancel()
print(hnd.get())
Cancel is a blocking operation. It stops the search and the handle can
be closed afterward.
When using the backend make sure to ensure program updates are modular:
- do not redefine atoms (leads to an error)
- do not introduce cycles involving atoms from previous steps
It is generally safe to add constraints.
I can of course not rule out bugs in clingo. Ideally, provide us with a
small example so that we can look into the problem.
-R
On Fri, 2026-01-09 at 17:37 -0600, Robert Goldman wrote:
>
>
> P.S. I have checked, and invoking interrupt() on the Control instance
> does not fix the problem. That said, this code is extracted from the
> working ILP program and invoked elsewhere, so I am at a loss to know
> what are the preconditions -- in terms of the clingo solver -- for
> adding new rules, and when they are forbidden. Also, I believe I
> remember that perhaps constraints (headless rules) are permitted
> under some circumstances when normal Horn clauses are not.
> Finally, the difference between my use of clingo and that of the
> original program is that I add assumptions to the search, in order to
> control it more tightly, and am adding nogoods/constraints after
> solving with assumptions in place. Does assumption addition change
> the state of the solver in some way that makes it impossible for me
> to add constraints?
> As always, thanks for any assistance.
> On 6 Jan 2026, at 17:21, Robert Goldman wrote:
> > I'm working with the Popper ILP system, a Python program which uses
> > Clingo's ASP solver to generate new rule hypotheses. As part of
> > its search, it evaluates hypotheses and based on the results of
> > this evaluation, adds new constraints to the solver.
> > These new constraints are added by calling the add_rule method on
> > the Backend object, extracted from the Control object.
> > Our code intervenes in an unusual way, and I have found that
> > sometimes I get the error message "Program updates not supported!"
> > I suspect this means that I have interrupted the solver while it is
> > still in progress. Is there a method I can call on the SolveHandle
> > or the Control to tell if the search is in progress?
> > And if the search is still in progress, should I call
> > SolveHandle.cancel() and then proceed to invoke add_atom and
> > add_rule?
> > Do I need to extract the Backend from the Control after canceling
> > the search, or does that ordering not matter?
> > Thank you for any assistance
|
|
From: Roland K. <kam...@cs...> - 2026-01-10 10:48:07
|
Hi Robert, if you see the message that program updates not supported, then either you have created a control object in single-shot solving mode or the solver is in a state where updates are not supported. It is important to note that the backend cannot be used while a search is active. You can use cancel to stop the active search. A loop of the following shape should work: some loop: with ctl.backend() as bck: add rules with ctl.solve(async_=True) as hnd: # do something that does not use the control object hnd.cancel() print(hnd.get()) Cancel is a blocking operation. It stops the search and the handle can be closed afterward. When using the backend make sure to ensure program updates are modular: - do not redefine atoms (leads to an error) - do not introduce cycles involving atoms from previous steps It is generally safe to add constraints. I can of course not rule out bugs in clingo. Ideally, provide us with a small example so that we can look into the problem. -R On Fri, 2026-01-09 at 17:37 -0600, Robert Goldman wrote: > > > P.S. I have checked, and invoking interrupt() on the Control instance > does not fix the problem. That said, this code is extracted from the > working ILP program and invoked elsewhere, so I am at a loss to know > what are the preconditions -- in terms of the clingo solver -- for > adding new rules, and when they are forbidden. Also, I believe I > remember that perhaps constraints (headless rules) are permitted > under some circumstances when normal Horn clauses are not. > Finally, the difference between my use of clingo and that of the > original program is that I add assumptions to the search, in order to > control it more tightly, and am adding nogoods/constraints after > solving with assumptions in place. Does assumption addition change > the state of the solver in some way that makes it impossible for me > to add constraints? > As always, thanks for any assistance. > On 6 Jan 2026, at 17:21, Robert Goldman wrote: > > I'm working with the Popper ILP system, a Python program which uses > > Clingo's ASP solver to generate new rule hypotheses. As part of > > its search, it evaluates hypotheses and based on the results of > > this evaluation, adds new constraints to the solver. > > These new constraints are added by calling the add_rule method on > > the Backend object, extracted from the Control object. > > Our code intervenes in an unusual way, and I have found that > > sometimes I get the error message "Program updates not supported!" > > I suspect this means that I have interrupted the solver while it is > > still in progress. Is there a method I can call on the SolveHandle > > or the Control to tell if the search is in progress? > > And if the search is still in progress, should I call > > SolveHandle.cancel() and then proceed to invoke add_atom and > > add_rule? > > Do I need to extract the Backend from the Control after canceling > > the search, or does that ordering not matter? > > Thank you for any assistance |
|
From: Robert G. <rpg...@si...> - 2026-01-09 23:38:11
|
P.S. I have checked, and invoking `interrupt()` on the `Control` instance does not fix the problem. That said, this code is extracted from the working ILP program and invoked elsewhere, so I am at a loss to know what are the preconditions -- in terms of the clingo solver -- for adding new rules, and when they are forbidden. Also, I believe I remember that perhaps constraints (headless rules) are permitted under some circumstances when normal Horn clauses are not. Finally, the difference between my use of clingo and that of the original program is that I add assumptions to the search, in order to control it more tightly, and am adding nogoods/constraints after solving with assumptions in place. Does assumption addition change the state of the solver in some way that makes it impossible for me to add constraints? As always, thanks for any assistance. On 6 Jan 2026, at 17:21, Robert Goldman wrote: > I'm working with the [Popper ILP system](https://github.com/logic-and-learning-lab/Popper), a Python program which uses Clingo's ASP solver to generate new rule hypotheses. As part of its search, it evaluates hypotheses and based on the results of this evaluation, adds new constraints to the solver. > > These new constraints are added by calling the `add_rule` method on the `Backend` object, extracted from the `Control` object. > > Our code intervenes in an unusual way, and I have found that sometimes I get the error message "Program updates not supported!" > > I suspect this means that I have interrupted the solver while it is still in progress. Is there a method I can call on the `SolveHandle` or the `Control` to tell if the search is in progress? > > And if the search is still in progress, should I call `SolveHandle.cancel()` and then proceed to invoke `add_atom` and `add_rule`? > > Do I need to extract the `Backend` from the `Control` *after* canceling the search, or does that ordering not matter? > > Thank you for any assistance |
|
From: Robert G. <rpg...@si...> - 2026-01-06 23:21:56
|
I'm working with the [Popper ILP system](https://github.com/logic-and-learning-lab/Popper), a Python program which uses Clingo's ASP solver to generate new rule hypotheses. As part of its search, it evaluates hypotheses and based on the results of this evaluation, adds new constraints to the solver. These new constraints are added by calling the `add_rule` method on the `Backend` object, extracted from the `Control` object. Our code intervenes in an unusual way, and I have found that sometimes I get the error message "Program updates not supported!" I suspect this means that I have interrupted the solver while it is still in progress. Is there a method I can call on the `SolveHandle` or the `Control` to tell if the search is in progress? And if the search is still in progress, should I call `SolveHandle.cancel()` and then proceed to invoke `add_atom` and `add_rule`? Do I need to extract the `Backend` from the `Control` *after* canceling the search, or does that ordering not matter? Thank you for any assistance |
|
From: Robert G. <rpg...@si...> - 2025-12-18 21:43:01
|
I have been running clingo from python, in the context of the Popper ILP system, and trying to solve an ASP under a set of assumptions that are unsatisfiable.
I was surprised to get a `-1` (negative one) in the unsat core from doing this. What does this mean?
Also, I was looking at some discussions about how to decode an unsat core which suggested using this method:
ctl.symbolic_atoms.by_literal(literal).symbol
But as far as I can determine from the online docs, there is no `SymbolicAtoms.by_literal()`.
For now I have been making a lookup table by hand by scanning the symbolic atoms, but it feels like I probably shouldn't have to do that, and I am missing something.
Thanks! |