Multi-shot step literals
MaxOstrowski opened this issue · comments
While doing some basic research about the new --single-shot
option of clingo
in this issue, I found out that not only preprocessing
and frozen
literals may have a performance influence, but also the step
literal which seems to be added to every learnt clause.
The only reason I could think of why this learnt information is tagged with the step
literal is enumeration.
I do not see any reason why information derived from non tagged clauses (or in my case, from a deterministic propagator) should be tagged with a step
literal and therefore be retractable. So the question is: would it be possible to only add the step literal to enumeration
relevant clauses? I think this could (partly) address the problem of the reported performance degradation when switching from the Application to the API.
After reading the paper about enumeration I could imagine that there is no such thing as "enumeration relevant clauses", but maybe you have an idea. Otherwise, this can simply be closed.
@MaxOstrowski
I'm not sure I understand the issue. Are you sure that the step literal is added to every learnt clause?
The step literal is an initial assumption but AFAICS, it is only explicitly added to "enumeration related clauses" and "volatile" clauses originating from a clingo propagator.
in potassco/clingcon#57 (comment) i just added debug output to the Clasp::Solver::addLearnt function that shows that the size parameter is aleays 1 bigger without the --single-shot
option for the given example and option --solve-limit=1
.
All other calls seem to be equal. I do not know if this is all "numeration related clauses" and I do not know which added clauses of the clingcon propagator would be "enumeration related". I know that this information is not much, but I lack more sophisticated knowledge about the internals of clasp to judge my observations.