-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
opt-mode #78
Comments
Everything but
the user should be able to do:
Something like this could certainly be achieved with a changed |
Enumerating all optimal models can only reasonably be implemented using multi-shot solving with the current API. This still holds true even with your completely unrelated suggestion to register callbacks earlier. We would have to provide clasp's enumerator interface via the API to implement advanced reasoning modes. This would require a lot of thinking and the help of Benjamin. It is not going to happen anytime soon. Now regarding your second proposal. I will not implement this. It is true that the current version is more verbose when theories are used but it gives the user full control about what happens when. PS: If the callbacks bother you, then you can implement an extended Control object that takes care of this. |
This was just meant as some brainstorming to identify missing features in the API. |
I could start with implementing all other "opt-modes", as they can easily be done. |
You were describing something completely different than you are describing now. 😉 We could hand over solving (and also grounding) to the theory by simply adding another function. This is straightforward as long as just one theory wants to change how solving is done. Or we do something like asking the theory if another pass is needed. Developers would then have to call solve again. From a user's perspective, the Using the idea with the passes, this could be something like: thy.prepare(ctl)
ctl.ground(...)
while theory.step(ctl):
ctl.solve(...) Multi-shot solving related information could be initialized/reset in |
What about
This would mean that the theory has its own solve method (with the same interface as the Control::solve) and can do whatever it wants. If you want to combine different theories also maybe:
is suitable. Then |
This falls into the "handing the solving to the theory" part of my comment. I think that the user will always have to know how to combine theories. Especially, in view of multi-shot solving, returning a Handle class from the solve function will be difficult; it would probably have to be something different than the existing |
Current idea to handle optN and other cases for any theory would be:
Each theory has a
TODO: have a look at clasp enumeration to maybe have a different interface idea. |
--opt-mode=<arg>
also forclingcon
to:<arg>: <mode {opt|enum|optN|ignore}>[,<bound>...]
opt
: Find optimal model (default behaviour, as before)enum
: Find models with costs <=bound
(Set minimize statement once in the init and never touch it again)optN
: Find optimum, then enumerate optimal models (This requires multi-shot solving, unsure If i can provide this behaviour consistently with the current API)ignore
: Ignore optimize statements (do noop in minimize statement)<bound>
: Set initial bound for objective function(s)Either the
clingo
option can be reused, as it is currently not well defined how to combine Boolean and Integer optimization, or a new "similar" option will be introduced.Extra: think about how to combine
clingo
optimization withclingcon
optimization.The text was updated successfully, but these errors were encountered: