Function clingo_sys::clingo_control_add
[−]
[src]
pub unsafe extern "C" fn clingo_control_add(
control: *mut clingo_control_t,
name: *const c_char,
parameters: *const *const c_char,
parameters_size: usize,
program: *const c_char
) -> bool
Extend the logic program with the given non-ground logic program in string form.
This function puts the given program into a block of form: #program name(parameters).
After extending the logic program, the corresponding program parts are typically grounded with ::clingo_control_ground.
Parameters:
control
the targetname
name of the program blockparameters
string array of parameters of the program blockparameters_size
number of parametersprogram
string representation of the program
Returns whether the call was successful; might set one of the following error codes: - ::clingo_error_bad_alloc - ::clingo_error_runtime if parsing fails