4#include <clingo/core.h>
5#include <clingo/model.h>
6#include <clingo/stats.h>
71 bool (*
callable)(
char const *name,
size_t name_size,
size_t arguments_size,
void *data,
bool *result);
struct clingo_lib clingo_lib_t
A library object storing global information.
Definition core.h:171
struct clingo_location clingo_location_t
Represents a source code location marking its beginning and end.
Definition core.h:354
struct clingo_ground_handle clingo_ground_handle_t
Handle to an asynchronous ground call.
Definition ground.h:136
CLINGO_VISIBILITY_DEFAULT bool clingo_ground_handle_get(clingo_ground_handle_t *handle, clingo_ground_result_t *result)
Get the ground result.
struct clingo_ground_event_handler clingo_ground_event_handler_t
The ground event handler interface.
struct clingo_part clingo_part_t
Struct used to specify the program parts that have to be grounded.
unsigned clingo_ground_result_t
Corresponding type to clingo_ground_result_e.
Definition ground.h:59
CLINGO_VISIBILITY_DEFAULT void clingo_ground_handle_close(clingo_ground_handle_t *handle)
Release the ground handle.
CLINGO_VISIBILITY_DEFAULT bool clingo_ground_handle_cancel(clingo_ground_handle_t *handle)
Stop the running ground call and block until done.
clingo_ground_result_e
Enumeration of ground call results.
Definition ground.h:53
CLINGO_VISIBILITY_DEFAULT bool clingo_ground_handle_wait(clingo_ground_handle_t *handle, double timeout, bool *result)
Wait for the specified amount of time to check if the result is ready.
@ clingo_ground_result_ok
Grounding completed successfully.
Definition ground.h:54
@ clingo_ground_result_unsatisfiable
Grounding detected unsatisfiability.
Definition ground.h:55
@ clingo_ground_result_interrupted
Grounding was interrupted.
Definition ground.h:56
bool(* clingo_symbol_callback_t)(clingo_symbol_t const *symbols, size_t symbols_size, void *data)
Callback function to inject symbols.
Definition symbol.h:60
uint64_t clingo_symbol_t
Type to represent a symbol.
Definition symbol.h:51
The ground event handler interface.
Definition ground.h:62
bool(* call)(clingo_lib_t *lib, clingo_location_t const *location, char const *name, size_t name_size, clingo_symbol_t const *arguments, size_t arguments_size, void *data, clingo_symbol_callback_t symbol_callback, void *symbol_callback_data)
Callback function to implement external functions.
Definition ground.h:116
bool(* callable)(char const *name, size_t name_size, size_t arguments_size, void *data, bool *result)
Check if the function with the given name and number of arguments is callable.
Definition ground.h:71
void(* finish)(clingo_ground_result_t result, void *data)
Callback to notify that the grounding has finished.
Definition ground.h:126
void(* free)(void *data)
Callback to free the userdata of the handler.
Definition ground.h:130
Struct used to specify the program parts that have to be grounded.
Definition ground.h:44
char const * name
name of the program part
Definition ground.h:45
clingo_symbol_t const * params
array of parameters
Definition ground.h:47
size_t params_size
number of parameters
Definition ground.h:48
size_t name_size
the size of the name
Definition ground.h:46