Clingo
|
A handle to control a running search. More...
#include <solver.hh>
Public Member Functions | |
virtual | ~SolveHandle ()=default |
The default destructor. | |
auto | get () -> SolveResult |
Get the result of a search. | |
void | cancel () |
Cancel the current search. | |
void | resume () |
Resume search after a model has been found to start search for the next one. | |
auto | model () -> Model const * |
Get the current model or a nullptr if there is none. | |
auto | last () -> Model const * |
Get the last model after the search has finished. | |
auto | core () -> PrgLitSpan |
Get a subset of the assumptions that made the problem unsatisfiable. | |
auto | wait (double timeout) -> bool |
Wait for the given amount of time or until the next result is ready. | |
A handle to control a running search.
|
inline |
Cancel the current search.
This call blocks until search has stopped.
|
inline |
Get a subset of the assumptions that made the problem unsatisfiable.
The subset is called an unsatisfiable core and is not necessarily subset minimal.
|
inline |
Get the result of a search.
This call blocks until search has completed.
|
inline |
Get the last model after the search has finished.
Returns null if the problem is unsatisfiable.
|
inline |
Get the current model or a nullptr if there is none.
The function blocks until a model is ready or the search space has been exhausted.
The function returns null if the search space has been exhausted or the search was not started in yield mode.
|
inline |
Resume search after a model has been found to start search for the next one.
To ease writing while loops, this function can also be called initially.
|
inline |
Wait for the given amount of time or until the next result is ready.
The next result is either a model (if yielding was enabled) or a solve result.
The function blocks for at most the given amount of time and returns whether the next result is ready. If the timeout is zero, it can be used for polling for a result. If the timeout is negative, it blocks until the next result is ready.