8#include <clingo/core.h>
222 size_t *arguments_size);
struct clingo_lib clingo_lib_t
A library object storing global information.
Definition core.h:176
struct clingo_string_builder clingo_string_builder_t
A builder for strings.
Definition core.h:257
CLINGO_VISIBILITY_DEFAULT bool clingo_symbol_name(clingo_symbol_t symbol, clingo_string_t *name)
Get the name of a symbol.
CLINGO_VISIBILITY_DEFAULT int clingo_symbol_compare(clingo_symbol_t a, clingo_symbol_t b)
Check if a symbol is less than another symbol.
CLINGO_VISIBILITY_DEFAULT clingo_symbol_t clingo_symbol_create_supremum(void)
Construct a symbol representing #sup.
CLINGO_VISIBILITY_DEFAULT bool clingo_symbol_create_tuple(clingo_lib_t *lib, clingo_symbol_t const *arguments, size_t arguments_size, clingo_symbol_t *symbol)
Construct a symbol representing a tuple.
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
CLINGO_VISIBILITY_DEFAULT bool clingo_symbol_to_string(clingo_symbol_t symbol, clingo_string_builder_t *builder)
Get the string representation of a symbol.
CLINGO_VISIBILITY_DEFAULT size_t clingo_symbol_hash(clingo_symbol_t symbol)
Calculate a hash code of a symbol.
CLINGO_VISIBILITY_DEFAULT bool clingo_symbol_create_string(clingo_lib_t *lib, char const *string, size_t size, clingo_symbol_t *symbol)
Construct a symbol representing a string.
CLINGO_VISIBILITY_DEFAULT bool clingo_symbol_create_id(clingo_lib_t *lib, char const *name, size_t size, bool is_positive, clingo_symbol_t *symbol)
Construct a symbol representing an id.
clingo_symbol_type_e
Enumeration of available symbol types.
Definition symbol.h:36
uint64_t clingo_symbol_t
Type to represent a symbol.
Definition symbol.h:51
CLINGO_VISIBILITY_DEFAULT bool clingo_symbol_create_function(clingo_lib_t *lib, char const *name, size_t name_size, clingo_symbol_t const *arguments, size_t arguments_size, bool is_positive, clingo_symbol_t *symbol)
Construct a symbol representing a function.
CLINGO_VISIBILITY_DEFAULT void clingo_symbol_acquire(clingo_symbol_t symbol)
Acquire ownership of the given symbol.
CLINGO_VISIBILITY_DEFAULT clingo_symbol_type_t clingo_symbol_type(clingo_symbol_t symbol)
Get the type of a symbol.
CLINGO_VISIBILITY_DEFAULT bool clingo_parse_term(clingo_lib_t *lib, char const *string, size_t size, clingo_symbol_t *symbol)
Parse a term in string form.
int clingo_symbol_type_t
Corresponding type to clingo_symbol_type.
Definition symbol.h:45
CLINGO_VISIBILITY_DEFAULT void clingo_symbol_release(clingo_symbol_t symbol)
Release ownership of the given symbol.
CLINGO_VISIBILITY_DEFAULT bool clingo_symbol_create_number_str(clingo_lib_t *lib, char const *number, size_t size, clingo_symbol_t *symbol)
Construct a symbol representing a number.
CLINGO_VISIBILITY_DEFAULT bool clingo_symbol_is_positive(clingo_symbol_t symbol, bool *is_positive)
Check whether a function or number is positive.
CLINGO_VISIBILITY_DEFAULT bool clingo_symbol_arguments(clingo_symbol_t symbol, clingo_symbol_t const **arguments, size_t *arguments_size)
Get the arguments of a symbol.
CLINGO_VISIBILITY_DEFAULT bool clingo_symbol_equal(clingo_symbol_t a, clingo_symbol_t b)
Check if two symbols are equal.
CLINGO_VISIBILITY_DEFAULT bool clingo_symbol_string(clingo_symbol_t symbol, clingo_string_t *string)
Get the string of a symbol.
CLINGO_VISIBILITY_DEFAULT clingo_symbol_t clingo_symbol_create_number(int32_t number)
Construct a symbol representing a number.
CLINGO_VISIBILITY_DEFAULT clingo_symbol_t clingo_symbol_create_infimum(void)
Construct a symbol representing #inf.
CLINGO_VISIBILITY_DEFAULT bool clingo_symbol_number(clingo_symbol_t symbol, int32_t *number)
Get the number of a symbol.
@ clingo_symbol_type_number
a numeric symbol, e.g., 1
Definition symbol.h:37
@ clingo_symbol_type_string
a string symbol, e.g., "a"
Definition symbol.h:40
@ clingo_symbol_type_function
a function symbol, e.g., c, -c, or f(1,"a")
Definition symbol.h:42
@ clingo_symbol_type_supremum
the #sup symbol
Definition symbol.h:38
@ clingo_symbol_type_tuple
a tuple symbol, e.g., (1, "a")`
Definition symbol.h:41
@ clingo_symbol_type_infimum
the #inf symbol
Definition symbol.h:39
Struct to capture strings that are not null-terminated.
Definition core.h:91