Function clingo_sys::clingo_control_ground [] [src]

pub unsafe extern "C" fn clingo_control_ground(
    control: *mut clingo_control_t,
    parts: *const clingo_part_t,
    parts_size: usize,
    ground_callback: clingo_ground_callback_t,
    ground_callback_data: *mut c_void
) -> bool

Ground the selected @link ::clingo_part parts @endlink of the current (non-ground) logic program.

After grounding, logic programs can be solved with ::clingo_control_solve().

Note: Parts of a logic program without an explicit #program specification are by default put into a program called base - without arguments.

Parameters:

  • control - the target
  • parts - array of parts to ground
  • parts_size - size of the parts array
  • ground_callback - callback to implement external functions
  • ground_callback_data - user data for ground_callback

Returns whether the call was successful; might set one of the following error codes:

  • ::clingo_error_bad_alloc
  • error code of ground callback

@see clingo_part