8#include <clingo/core.h>
9#include <clingo/symbol.h>
11typedef struct clingo_control clingo_control_t;
286 size_t const **sizes,
CLINGO_VISIBILITY_DEFAULT bool clingo_base_atoms_size(clingo_base_t const *base, size_t *size)
Get the number of atom bases in the program.
CLINGO_VISIBILITY_DEFAULT bool clingo_base_is_shown(clingo_base_t const *atoms, clingo_literal_t literal, bool *is_shown)
Check whether an literal is shown.
CLINGO_VISIBILITY_DEFAULT bool clingo_theory_base_term_type(clingo_theory_base_t const *theory, clingo_id_t term, clingo_theory_term_type_t *type)
Get the type of the given theory term.
CLINGO_VISIBILITY_DEFAULT bool clingo_theory_base_element_condition_id(clingo_theory_base_t const *theory, clingo_id_t element, clingo_literal_t *condition)
Get the id of the condition of the given theory element.
CLINGO_VISIBILITY_DEFAULT bool clingo_theory_base_element_to_string(clingo_theory_base_t const *theory, clingo_id_t element, clingo_string_builder_t *builder)
Get the string representation of the given theory element.
struct clingo_signature clingo_signature_t
Represents a predicate signature.
CLINGO_VISIBILITY_DEFAULT bool clingo_theory_base_atom_elements(clingo_theory_base_t const *theory, clingo_id_t atom, clingo_id_t const **elements, size_t *size)
Get the theory elements associated with the theory atom.
CLINGO_VISIBILITY_DEFAULT bool clingo_base_is_fact(clingo_base_t const *atoms, clingo_literal_t literal, bool *is_fact)
Check whether the given literal is a fact.
CLINGO_VISIBILITY_DEFAULT bool clingo_theory_base_atom_has_guard(clingo_theory_base_t const *theory, clingo_id_t atom, bool *has_guard)
Whether the theory atom has a guard.
CLINGO_VISIBILITY_DEFAULT bool clingo_base_is_current(clingo_base_t const *atoms, clingo_literal_t literal, bool *is_current)
Check whether a literal has been introduced in the current step.
CLINGO_VISIBILITY_DEFAULT bool clingo_term_base_symbol(clingo_term_base_t const *terms, size_t index, clingo_symbol_t *term)
Get the symbol of the show directive with the given index.
CLINGO_VISIBILITY_DEFAULT bool clingo_theory_base_atom_literal(clingo_theory_base_t const *theory, clingo_id_t atom, clingo_literal_t *literal)
Get the aspif literal associated with the given theory atom.
struct clingo_theory_base clingo_theory_base_t
Object to inspect theory atoms.
Definition base.h:93
struct clingo_atom_base clingo_atom_base_t
Object to inspect the symbolic atoms in a program.
Definition base.h:75
CLINGO_VISIBILITY_DEFAULT bool clingo_theory_base_atom_to_string(clingo_theory_base_t const *theory, clingo_id_t atom, clingo_string_builder_t *builder)
Get the string representation of the given theory atom.
CLINGO_VISIBILITY_DEFAULT bool clingo_theory_base_term_number(clingo_theory_base_t const *theory, clingo_id_t term, int *number)
Get the number of the given numeric theory term.
CLINGO_VISIBILITY_DEFAULT bool clingo_theory_base_atom_guard(clingo_theory_base_t const *theory, clingo_id_t atom, clingo_string_t *connective, clingo_id_t *term)
Get the guard consisting of a theory operator and a theory term of the given theory atom.
CLINGO_VISIBILITY_DEFAULT bool clingo_theory_base_size(clingo_theory_base_t const *theory, size_t *size)
Get the total number of theory theory.
CLINGO_VISIBILITY_DEFAULT bool clingo_atom_base_find(clingo_atom_base_t const *atoms, clingo_symbol_t symbol, size_t *index)
Find the index of the atom with the given symbol in the atom base.
CLINGO_VISIBILITY_DEFAULT bool clingo_base_is_projected(clingo_base_t const *atoms, clingo_literal_t literal, bool *is_projected)
Check whether a literal is subject to projection.
clingo_theory_term_type_e
Enumeration of theory term types.
Definition base.h:81
CLINGO_VISIBILITY_DEFAULT bool clingo_base_atoms_find(clingo_base_t const *base, clingo_signature_t const *signature, clingo_atom_base_t const **atoms, bool *found)
Find the atom base wit the given signature.
CLINGO_VISIBILITY_DEFAULT bool clingo_base_theory(clingo_base_t const *base, clingo_theory_base_t const **theory)
Get the theory base capturing theory terms, elements, and atoms.
CLINGO_VISIBILITY_DEFAULT bool clingo_theory_base_term_arguments(clingo_theory_base_t const *theory, clingo_id_t term, clingo_id_t const **arguments, size_t *size)
Get the arguments of the given function theory term.
CLINGO_VISIBILITY_DEFAULT bool clingo_base_is_external(clingo_base_t const *atoms, clingo_literal_t literal, bool *is_external)
Check whether an literal is external.
CLINGO_VISIBILITY_DEFAULT bool clingo_atom_base_size(clingo_atom_base_t const *atoms, size_t *size)
Get the size of the given atom base.
CLINGO_VISIBILITY_DEFAULT bool clingo_theory_base_term_to_string(clingo_theory_base_t const *theory, clingo_id_t term, clingo_string_builder_t *builder)
Get the string representation of the given theory term.
struct clingo_term_base clingo_term_base_t
Object to inspect the shown terms in a program.
Definition base.h:78
CLINGO_VISIBILITY_DEFAULT bool clingo_base_atoms_at(clingo_base_t const *base, size_t index, clingo_signature_t *signature, clingo_atom_base_t const **atoms)
Get the signature and atom base at the given index.
CLINGO_VISIBILITY_DEFAULT bool clingo_atom_base_symbol(clingo_atom_base_t const *atoms, size_t index, clingo_symbol_t *symbol)
Get the symbolic representation of an atom.
CLINGO_VISIBILITY_DEFAULT bool clingo_theory_base_atom_term(clingo_theory_base_t const *theory, clingo_id_t atom, clingo_id_t *term)
Get the theory term associated with the theory atom.
CLINGO_VISIBILITY_DEFAULT bool clingo_base_terms(clingo_base_t const *base, clingo_term_base_t const **terms)
Get the term base capturing show term directives.
CLINGO_VISIBILITY_DEFAULT bool clingo_control_base(clingo_control_t const *control, clingo_base_t const **base)
Get the base associated with the control object.
CLINGO_VISIBILITY_DEFAULT bool clingo_term_base_find(clingo_term_base_t const *terms, clingo_symbol_t symbol, size_t *index)
Get the index of the given symbol.
CLINGO_VISIBILITY_DEFAULT bool clingo_term_base_size(clingo_term_base_t const *terms, size_t *size)
During grounding, theory atoms get consecutive numbers starting with zero.
CLINGO_VISIBILITY_DEFAULT bool clingo_atom_base_literal(clingo_atom_base_t const *atoms, size_t index, clingo_literal_t *literal)
Returns the (numeric) program literal corresponding to the given symbolic atom.
CLINGO_VISIBILITY_DEFAULT bool clingo_theory_base_element_tuple(clingo_theory_base_t const *theory, clingo_id_t element, clingo_id_t const **tuple, size_t *size)
Get the tuple (array of theory terms) of the given theory element.
int clingo_theory_term_type_t
Corresponding type to clingo_theory_term_type_e.
Definition base.h:90
struct clingo_base clingo_base_t
Object to inspect symbolic atoms in a program—the relevant Herbrand base gringo uses to instantiate p...
Definition base.h:70
CLINGO_VISIBILITY_DEFAULT bool clingo_term_base_condition(clingo_term_base_t const *terms, size_t index, size_t const **sizes, clingo_literal_t const *const **literals, size_t *size)
Get the conditions of a show directive.
CLINGO_VISIBILITY_DEFAULT bool clingo_theory_base_term_name(clingo_theory_base_t const *theory, clingo_id_t term, clingo_string_t *name)
Get the name of the given constant or function theory term.
CLINGO_VISIBILITY_DEFAULT bool clingo_theory_base_element_condition(clingo_theory_base_t const *theory, clingo_id_t element, clingo_literal_t const **condition, size_t *size)
Get the condition (array of aspif literals) of the given theory element.
@ clingo_theory_term_type_symbol
a symbol term, e.g., c
Definition base.h:87
@ clingo_theory_term_type_set
a set term, e.g., {1,2,3}
Definition base.h:84
@ clingo_theory_term_type_list
a list term, e.g., [1,2,3]
Definition base.h:83
@ clingo_theory_term_type_number
a number term, e.g., 42
Definition base.h:86
@ clingo_theory_term_type_function
a function term, e.g., f(1,2,3)
Definition base.h:85
@ clingo_theory_term_type_tuple
a tuple term, e.g., (1,2,3)
Definition base.h:82
struct clingo_string_builder clingo_string_builder_t
A builder for strings.
Definition core.h:257
int32_t clingo_literal_t
Signed integer type used for aspif and solver literals.
Definition core.h:78
uint32_t clingo_id_t
Unsigned integer type used in various places.
Definition core.h:82
uint64_t clingo_symbol_t
Type to represent a symbol.
Definition symbol.h:51
Represents a predicate signature.
Definition base.h:58
bool is_positive
whether the signature is positive
Definition base.h:62
char const * name
the name
Definition base.h:59
size_t arity
the arity
Definition base.h:61
size_t size
the size of the name
Definition base.h:60
Struct to capture strings that are not null-terminated.
Definition core.h:91