Function clingo_sys::clingo_propagate_control_add_clause
[−]
[src]
pub unsafe extern "C" fn clingo_propagate_control_add_clause(
control: *mut clingo_propagate_control_t,
clause: *const clingo_literal_t,
size: usize,
type_: clingo_clause_type_t,
result: *mut bool
) -> bool
Add the given clause to the solver.
This method sets its result to false if the current propagation must be stopped for the solver to backtrack.
@attention No further calls on the control object or functions on the assignment should be called when the result of this method is false.
Parameters:
control
- the targetclause
- the clause to addsize
- the size of the clausetype
- the clause type determining its lifetimeresult
- result indicating whether propagation has to be stopped
Returns whether the call was successful; might set one of the following error codes:
- ::clingo_error_bad_alloc