[][src]Function clingo_sys::clingo_control_new

pub unsafe extern "C" fn clingo_control_new(
    arguments: *const *const c_char,
    arguments_size: usize,
    logger: clingo_logger_t,
    logger_data: *mut c_void,
    message_limit: c_uint,
    control: *mut *mut clingo_control_t
) -> bool

Create a new control object.

A control object has to be freed using clingo_control_free().

@note Only gringo options (without --output) and clasp's options are supported as arguments, except basic options such as --help. Furthermore, a control object is blocked while a search call is active; you must not call any member function during search.

If the logger is NULL, messages are printed to stderr.

@param[in] arguments C string array of command line arguments @param[in] arguments_size size of the arguments array @param[in] logger callback functions for warnings and info messages @param[in] logger_data user data for the logger callback @param[in] message_limit maximum number of times the logger callback is called @param[out] control resulting control object @return whether the call was successful; might set one of the following error codes:

  • ::clingo_error_bad_alloc
  • ::clingo_error_runtime if argument parsing fails