Crate clingo_sys

Crate clingo_sys 

Source

Structs§

__fsid_t
clingo_application
! This struct contains a set of functions to customize the clingo application.
clingo_assignment
clingo_ast
clingo_ast_argument
! Struct to define an argument that consists of a name and a type.
clingo_ast_attribute_names
! Struct to map attributes to their string representation.
clingo_ast_constructor
! A lists of required attributes to construct an AST.
clingo_ast_constructors
! Struct to map AST types to lists of required attributes to construct ASTs.
clingo_backend
clingo_configuration
clingo_control
clingo_ground_program_observer
! An instance of this struct has to be registered with a solver to observe ground directives as they are passed to the solver. ! ! @note This interface is closely modeled after the aspif format. ! For more information please refer to the specification of the aspif format. ! ! Not all callbacks have to be implemented and can be set to NULL if not needed. ! If one of the callbacks in the struct fails, grounding is stopped. ! If a non-recoverable clingo API call fails, a callback must return false. ! Otherwise ::clingo_error_unknown should be set and false returned. ! ! @see clingo_control_register_observer()
clingo_location
! Represents a source code location marking its beginnig and end. ! ! @note Not all locations refer to physical files. ! By convention, such locations use a name put in angular brackets as filename. ! The string members of a location object are internalized and valid for the duration of the process.
clingo_model
clingo_options
clingo_part
! Struct used to specify the program parts that have to be grounded. ! ! Programs may be structured into parts, which can be grounded independently with ::clingo_control_ground. ! Program parts are mainly interesting for incremental grounding and multi-shot solving. ! For single-shot solving, program parts are not needed. ! ! @note Parts of a logic program without an explicit #program ! specification are by default put into a program called base without ! arguments. ! ! @see clingo_control_ground()
clingo_program_builder
clingo_propagate_control
clingo_propagate_init
clingo_propagator
! An instance of this struct has to be registered with a solver to implement a custom propagator. ! ! Not all callbacks have to be implemented and can be set to NULL if not needed. ! @see Propagator
clingo_script
! Custom scripting language to run functions during grounding.
clingo_solve_control
clingo_solve_handle
clingo_statistic
clingo_symbolic_atoms
clingo_theory_atoms
clingo_weighted_literal
! A Literal with an associated weight.

Constants§

CLINGO_VERSION
CLINGO_VERSION_MAJOR
CLINGO_VERSION_MINOR
CLINGO_VERSION_REVISION
INT8_MAX
INT8_MIN
INT16_MAX
INT16_MIN
INT32_MAX
INT32_MIN
INTPTR_MAX
INTPTR_MIN
INT_FAST8_MAX
INT_FAST8_MIN
INT_FAST16_MAX
INT_FAST16_MIN
INT_FAST32_MAX
INT_FAST32_MIN
INT_LEAST8_MAX
INT_LEAST8_MIN
INT_LEAST16_MAX
INT_LEAST16_MIN
INT_LEAST32_MAX
INT_LEAST32_MIN
PTRDIFF_MAX
PTRDIFF_MIN
SIG_ATOMIC_MAX
SIG_ATOMIC_MIN
SIZE_MAX
UINT8_MAX
UINT16_MAX
UINT32_MAX
UINTPTR_MAX
UINT_FAST8_MAX
UINT_FAST16_MAX
UINT_FAST32_MAX
UINT_LEAST8_MAX
UINT_LEAST16_MAX
UINT_LEAST32_MAX
WINT_MAX
WINT_MIN
_ATFILE_SOURCE
_BITS_STDINT_INTN_H
_BITS_STDINT_UINTN_H
_BITS_TIME64_H
_BITS_TYPESIZES_H
_BITS_TYPES_H
_BITS_WCHAR_H
_DEFAULT_SOURCE
_FEATURES_H
_POSIX_C_SOURCE
_POSIX_SOURCE
_STDC_PREDEF_H
_STDINT_H
_SYS_CDEFS_H
__FD_SETSIZE
__GLIBC_MINOR__
__GLIBC_USE_C2X_STRTOL
__GLIBC_USE_DEPRECATED_GETS
__GLIBC_USE_DEPRECATED_SCANF
__GLIBC_USE_IEC_60559_BFP_EXT
__GLIBC_USE_IEC_60559_BFP_EXT_C2X
__GLIBC_USE_IEC_60559_EXT
__GLIBC_USE_IEC_60559_FUNCS_EXT
__GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
__GLIBC_USE_IEC_60559_TYPES_EXT
__GLIBC_USE_ISOC2X
__GLIBC_USE_LIB_EXT2
__GLIBC__
__GNU_LIBRARY__
__HAVE_GENERIC_SELECTION
__INO_T_MATCHES_INO64_T
__KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64
__LDOUBLE_REDIRECTS_TO_FLOAT128_ABI
__OFF_T_MATCHES_OFF64_T
__RLIM_T_MATCHES_RLIM64_T
__STATFS_MATCHES_STATFS64
__STDC_IEC_559_COMPLEX__
__STDC_IEC_559__
__STDC_IEC_60559_BFP__
__STDC_IEC_60559_COMPLEX__
__STDC_ISO_10646__
__SYSCALL_WORDSIZE
__TIMESIZE
__USE_ATFILE
__USE_FORTIFY_LEVEL
__USE_ISOC11
__USE_ISOC95
__USE_ISOC99
__USE_MISC
__USE_POSIX
__USE_POSIX2
__USE_POSIX199309
__USE_POSIX199506
__USE_POSIX_IMPLICITLY
__USE_XOPEN2K
__USE_XOPEN2K8
__WORDSIZE
__WORDSIZE_TIME64_COMPAT32
__bool_true_false_are_defined
__glibc_c99_flexarr_available
clingo_ast_aggregate_function_e_clingo_ast_aggregate_function_count
!< Operator “^”.
clingo_ast_aggregate_function_e_clingo_ast_aggregate_function_max
!< Operator “-”.
clingo_ast_aggregate_function_e_clingo_ast_aggregate_function_min
!< Operator “+”.
clingo_ast_aggregate_function_e_clingo_ast_aggregate_function_sum
!< Operator “?”.
clingo_ast_aggregate_function_e_clingo_ast_aggregate_function_sump
!< Operator “&”.
clingo_ast_attribute_e_clingo_ast_attribute_argument
clingo_ast_attribute_e_clingo_ast_attribute_arguments
clingo_ast_attribute_e_clingo_ast_attribute_arity
clingo_ast_attribute_e_clingo_ast_attribute_atom
clingo_ast_attribute_e_clingo_ast_attribute_atom_type
clingo_ast_attribute_e_clingo_ast_attribute_atoms
clingo_ast_attribute_e_clingo_ast_attribute_bias
clingo_ast_attribute_e_clingo_ast_attribute_body
clingo_ast_attribute_e_clingo_ast_attribute_code
clingo_ast_attribute_e_clingo_ast_attribute_coefficient
clingo_ast_attribute_e_clingo_ast_attribute_comparison
clingo_ast_attribute_e_clingo_ast_attribute_condition
clingo_ast_attribute_e_clingo_ast_attribute_elements
clingo_ast_attribute_e_clingo_ast_attribute_external
clingo_ast_attribute_e_clingo_ast_attribute_external_type
clingo_ast_attribute_e_clingo_ast_attribute_function
clingo_ast_attribute_e_clingo_ast_attribute_guard
clingo_ast_attribute_e_clingo_ast_attribute_guards
clingo_ast_attribute_e_clingo_ast_attribute_head
clingo_ast_attribute_e_clingo_ast_attribute_is_default
clingo_ast_attribute_e_clingo_ast_attribute_left
clingo_ast_attribute_e_clingo_ast_attribute_left_guard
clingo_ast_attribute_e_clingo_ast_attribute_literal
clingo_ast_attribute_e_clingo_ast_attribute_location
clingo_ast_attribute_e_clingo_ast_attribute_modifier
clingo_ast_attribute_e_clingo_ast_attribute_name
clingo_ast_attribute_e_clingo_ast_attribute_node_u
clingo_ast_attribute_e_clingo_ast_attribute_node_v
clingo_ast_attribute_e_clingo_ast_attribute_operator_name
clingo_ast_attribute_e_clingo_ast_attribute_operator_type
clingo_ast_attribute_e_clingo_ast_attribute_operators
clingo_ast_attribute_e_clingo_ast_attribute_parameters
clingo_ast_attribute_e_clingo_ast_attribute_positive
clingo_ast_attribute_e_clingo_ast_attribute_priority
clingo_ast_attribute_e_clingo_ast_attribute_right
clingo_ast_attribute_e_clingo_ast_attribute_right_guard
clingo_ast_attribute_e_clingo_ast_attribute_sequence_type
clingo_ast_attribute_e_clingo_ast_attribute_sign
clingo_ast_attribute_e_clingo_ast_attribute_symbol
clingo_ast_attribute_e_clingo_ast_attribute_term
clingo_ast_attribute_e_clingo_ast_attribute_terms
clingo_ast_attribute_e_clingo_ast_attribute_value
clingo_ast_attribute_e_clingo_ast_attribute_variable
clingo_ast_attribute_e_clingo_ast_attribute_weight
clingo_ast_attribute_type_e_clingo_ast_attribute_type_ast
!< For an attribute of type “clingo_ast_t *”.
clingo_ast_attribute_type_e_clingo_ast_attribute_type_ast_array
!< For an attribute of type “clingo_ast_t **”.
clingo_ast_attribute_type_e_clingo_ast_attribute_type_location
!< For an attribute of type “clingo_location_t”.
clingo_ast_attribute_type_e_clingo_ast_attribute_type_number
!< For an attribute of type “int”.
clingo_ast_attribute_type_e_clingo_ast_attribute_type_optional_ast
!< For an attribute of type “clingo_ast_t *” that can be NULL.
clingo_ast_attribute_type_e_clingo_ast_attribute_type_string
!< For an attribute of type “char const *”.
clingo_ast_attribute_type_e_clingo_ast_attribute_type_string_array
!< For an attribute of type “char const **”.
clingo_ast_attribute_type_e_clingo_ast_attribute_type_symbol
!< For an attribute of type “clingo_ast_symbol_t”.
clingo_ast_binary_operator_e_clingo_ast_binary_operator_and
!< Operator “&”.
clingo_ast_binary_operator_e_clingo_ast_binary_operator_division
!< Operator “/”.
clingo_ast_binary_operator_e_clingo_ast_binary_operator_minus
!< Operator “-”.
clingo_ast_binary_operator_e_clingo_ast_binary_operator_modulo
!< Operator “".
clingo_ast_binary_operator_e_clingo_ast_binary_operator_multiplication
!< Operator “*”.
clingo_ast_binary_operator_e_clingo_ast_binary_operator_or
!< Operator “?”.
clingo_ast_binary_operator_e_clingo_ast_binary_operator_plus
!< Operator “+”.
clingo_ast_binary_operator_e_clingo_ast_binary_operator_power
!< Operator “**”.
clingo_ast_binary_operator_e_clingo_ast_binary_operator_xor
!< Operator “^”.
clingo_ast_comparison_operator_e_clingo_ast_comparison_operator_equal
!< Operator “==”.
clingo_ast_comparison_operator_e_clingo_ast_comparison_operator_greater_equal
!< Operator “>=”.
clingo_ast_comparison_operator_e_clingo_ast_comparison_operator_greater_than
!< Operator “>”.
clingo_ast_comparison_operator_e_clingo_ast_comparison_operator_less_equal
!< Operator “<=”.
clingo_ast_comparison_operator_e_clingo_ast_comparison_operator_less_than
!< Operator “<”.
clingo_ast_comparison_operator_e_clingo_ast_comparison_operator_not_equal
!< Operator “!=”.
clingo_ast_sign_e_clingo_ast_sign_double_negation
!< For double negated literals (prefix “not not”).
clingo_ast_sign_e_clingo_ast_sign_negation
!< For negative literals (prefix “not”).
clingo_ast_sign_e_clingo_ast_sign_no_sign
!< For positive literals.
clingo_ast_theory_atom_definition_type_e_clingo_ast_theory_atom_definition_type_any
!< For theory atoms that can appear in both head and body.
clingo_ast_theory_atom_definition_type_e_clingo_ast_theory_atom_definition_type_body
!< For theory atoms that can appear in the body.
clingo_ast_theory_atom_definition_type_e_clingo_ast_theory_atom_definition_type_directive
!< For theory atoms that must not have a body.
clingo_ast_theory_atom_definition_type_e_clingo_ast_theory_atom_definition_type_head
!< For theory atoms that can appear in the head.
clingo_ast_theory_operator_type_e_clingo_ast_theory_operator_type_binary_left
!< A left associative binary operator.
clingo_ast_theory_operator_type_e_clingo_ast_theory_operator_type_binary_right
!< A right associative binary operator.
clingo_ast_theory_operator_type_e_clingo_ast_theory_operator_type_unary
!< An unary theory operator.
clingo_ast_theory_sequence_type_e_clingo_ast_theory_sequence_type_list
!< Theory lists “[t1,…,tn]”.
clingo_ast_theory_sequence_type_e_clingo_ast_theory_sequence_type_set
!< Theory sets “{t1,…,tn}”.
clingo_ast_theory_sequence_type_e_clingo_ast_theory_sequence_type_tuple
!< Theory tuples “(t1,…,tn)”.
clingo_ast_type_e_clingo_ast_type_aggregate
clingo_ast_type_e_clingo_ast_type_binary_operation
clingo_ast_type_e_clingo_ast_type_body_aggregate
clingo_ast_type_e_clingo_ast_type_body_aggregate_element
clingo_ast_type_e_clingo_ast_type_boolean_constant
clingo_ast_type_e_clingo_ast_type_comparison
clingo_ast_type_e_clingo_ast_type_conditional_literal
clingo_ast_type_e_clingo_ast_type_defined
clingo_ast_type_e_clingo_ast_type_definition
clingo_ast_type_e_clingo_ast_type_disjunction
clingo_ast_type_e_clingo_ast_type_edge
clingo_ast_type_e_clingo_ast_type_external
clingo_ast_type_e_clingo_ast_type_function
clingo_ast_type_e_clingo_ast_type_guard
clingo_ast_type_e_clingo_ast_type_head_aggregate
clingo_ast_type_e_clingo_ast_type_head_aggregate_element
clingo_ast_type_e_clingo_ast_type_heuristic
clingo_ast_type_e_clingo_ast_type_id
clingo_ast_type_e_clingo_ast_type_interval
clingo_ast_type_e_clingo_ast_type_literal
clingo_ast_type_e_clingo_ast_type_minimize
clingo_ast_type_e_clingo_ast_type_pool
clingo_ast_type_e_clingo_ast_type_program
clingo_ast_type_e_clingo_ast_type_project_atom
clingo_ast_type_e_clingo_ast_type_project_signature
clingo_ast_type_e_clingo_ast_type_rule
clingo_ast_type_e_clingo_ast_type_script
clingo_ast_type_e_clingo_ast_type_show_signature
clingo_ast_type_e_clingo_ast_type_show_term
clingo_ast_type_e_clingo_ast_type_symbolic_atom
clingo_ast_type_e_clingo_ast_type_symbolic_term
clingo_ast_type_e_clingo_ast_type_theory_atom
clingo_ast_type_e_clingo_ast_type_theory_atom_definition
clingo_ast_type_e_clingo_ast_type_theory_atom_element
clingo_ast_type_e_clingo_ast_type_theory_definition
clingo_ast_type_e_clingo_ast_type_theory_function
clingo_ast_type_e_clingo_ast_type_theory_guard
clingo_ast_type_e_clingo_ast_type_theory_guard_definition
clingo_ast_type_e_clingo_ast_type_theory_operator_definition
clingo_ast_type_e_clingo_ast_type_theory_sequence
clingo_ast_type_e_clingo_ast_type_theory_term_definition
clingo_ast_type_e_clingo_ast_type_theory_unparsed_term
clingo_ast_type_e_clingo_ast_type_theory_unparsed_term_element
clingo_ast_type_e_clingo_ast_type_unary_operation
clingo_ast_type_e_clingo_ast_type_variable
clingo_ast_unary_operator_e_clingo_ast_unary_operator_absolute
!< Operator “|.|”.
clingo_ast_unary_operator_e_clingo_ast_unary_operator_minus
!< Operator “-”.
clingo_ast_unary_operator_e_clingo_ast_unary_operator_negation
!< Operator “~”.
clingo_ast_unpool_type_e_clingo_ast_unpool_type_all
!< To unpool everything.
clingo_ast_unpool_type_e_clingo_ast_unpool_type_condition
!< To only unpool conditions of conditional literals.
clingo_ast_unpool_type_e_clingo_ast_unpool_type_other
!< To unpool everything except conditions of conditional literals.
clingo_clause_type_e_clingo_clause_type_learnt
!< clause is subject to the solvers deletion policy
clingo_clause_type_e_clingo_clause_type_static
!< clause is not subject to the solvers deletion policy
clingo_clause_type_e_clingo_clause_type_volatile
!< like ::clingo_clause_type_learnt but the clause is deleted after a solving step
clingo_clause_type_e_clingo_clause_type_volatile_static
!< like ::clingo_clause_type_static but the clause is deleted after a solving step
clingo_configuration_type_e_clingo_configuration_type_array
!< the entry is an array
clingo_configuration_type_e_clingo_configuration_type_map
!< the entry is a map
clingo_configuration_type_e_clingo_configuration_type_value
!< the entry is a (string) value
clingo_error_e_clingo_error_bad_alloc
!< memory could not be allocated
clingo_error_e_clingo_error_logic
!< wrong usage of the clingo API
clingo_error_e_clingo_error_runtime
!< errors only detectable at runtime like invalid input
clingo_error_e_clingo_error_success
!< successful API calls
clingo_error_e_clingo_error_unknown
!< errors unrelated to clingo
clingo_external_type_e_clingo_external_type_false
!< assign an external to false
clingo_external_type_e_clingo_external_type_free
!< allow an external to be assigned freely
clingo_external_type_e_clingo_external_type_release
!< no longer treat an atom as external
clingo_external_type_e_clingo_external_type_true
!< assign an external to true
clingo_heuristic_type_e_clingo_heuristic_type_factor
!< modify VSIDS factor of an atom
clingo_heuristic_type_e_clingo_heuristic_type_false
!< set the level of an atom and choose a negative sign
clingo_heuristic_type_e_clingo_heuristic_type_init
!< modify the initial VSIDS score of an atom
clingo_heuristic_type_e_clingo_heuristic_type_level
!< set the level of an atom
clingo_heuristic_type_e_clingo_heuristic_type_sign
!< configure which sign to chose for an atom
clingo_heuristic_type_e_clingo_heuristic_type_true
!< set the level of an atom and choose a positive sign
clingo_model_type_e_clingo_model_type_brave_consequences
!< The model represents a set of brave consequences.
clingo_model_type_e_clingo_model_type_cautious_consequences
!< The model represents a set of cautious consequences.
clingo_model_type_e_clingo_model_type_stable_model
!< The model represents a stable model.
clingo_propagator_check_mode_e_clingo_propagator_check_mode_both
!< call @ref ::clingo_propagator::check() on propagation fixpoints and total assignments
clingo_propagator_check_mode_e_clingo_propagator_check_mode_fixpoint
!< call @ref ::clingo_propagator::check() on propagation fixpoints
clingo_propagator_check_mode_e_clingo_propagator_check_mode_none
!< do not call @ref ::clingo_propagator::check() at all
clingo_propagator_check_mode_e_clingo_propagator_check_mode_total
!< call @ref ::clingo_propagator::check() on total assignments
clingo_show_type_e_clingo_show_type_all
!< Select everything.
clingo_show_type_e_clingo_show_type_atoms
!< Select all atoms.
clingo_show_type_e_clingo_show_type_complement
!< Select false instead of true atoms (::clingo_show_type_atoms) or terms (::clingo_show_type_terms).
clingo_show_type_e_clingo_show_type_shown
!< Select shown atoms and terms.
clingo_show_type_e_clingo_show_type_terms
!< Select all terms.
clingo_show_type_e_clingo_show_type_theory
!< Select symbols added by theory.
clingo_solve_event_type_e_clingo_solve_event_type_finish
!< Issued if the search has completed.
clingo_solve_event_type_e_clingo_solve_event_type_model
!< Issued if a model is found.
clingo_solve_event_type_e_clingo_solve_event_type_statistics
!< Issued when the statistics can be updated.
clingo_solve_event_type_e_clingo_solve_event_type_unsat
!< Issued if an optimization problem is found unsatisfiable.
clingo_solve_mode_e_clingo_solve_mode_async
!< Enable non-blocking search.
clingo_solve_mode_e_clingo_solve_mode_yield
!< Yield models in calls to clingo_solve_handle_model.
clingo_solve_result_e_clingo_solve_result_exhausted
clingo_solve_result_e_clingo_solve_result_interrupted
clingo_solve_result_e_clingo_solve_result_satisfiable
clingo_solve_result_e_clingo_solve_result_unsatisfiable
clingo_statistics_type_e_clingo_statistics_type_array
!< the entry is an array
clingo_statistics_type_e_clingo_statistics_type_empty
!< the entry is invalid (has neither of the types below)
clingo_statistics_type_e_clingo_statistics_type_map
!< the entry is a map
clingo_statistics_type_e_clingo_statistics_type_value
!< the entry is a (double) value
clingo_symbol_type_e_clingo_symbol_type_function
!< a numeric symbol, e.g., c, (1, "a"), or f(1,"a")
clingo_symbol_type_e_clingo_symbol_type_infimum
!< the #inf symbol
clingo_symbol_type_e_clingo_symbol_type_number
!< a numeric symbol, e.g., 1
clingo_symbol_type_e_clingo_symbol_type_string
!< a string symbol, e.g., "a"
clingo_symbol_type_e_clingo_symbol_type_supremum
!< the #sup symbol
clingo_theory_sequence_type_e_clingo_theory_sequence_type_list
!< Theory lists “[t1,…,tn]”.
clingo_theory_sequence_type_e_clingo_theory_sequence_type_set
!< Theory sets “{t1,…,tn}”.
clingo_theory_sequence_type_e_clingo_theory_sequence_type_tuple
!< Theory tuples “(t1,…,tn)”.
clingo_theory_term_type_e_clingo_theory_term_type_function
!< a function term, e.g., f(1,2,3)
clingo_theory_term_type_e_clingo_theory_term_type_list
!< a list term, e.g., [1,2,3]
clingo_theory_term_type_e_clingo_theory_term_type_number
!< a number term, e.g., 42
clingo_theory_term_type_e_clingo_theory_term_type_set
!< a set term, e.g., {1,2,3}
clingo_theory_term_type_e_clingo_theory_term_type_symbol
!< a symbol term, e.g., c
clingo_theory_term_type_e_clingo_theory_term_type_tuple
!< a tuple term, e.g., (1,2,3)
clingo_truth_value_e_clingo_truth_value_false
!< false
clingo_truth_value_e_clingo_truth_value_free
!< no truth value
clingo_truth_value_e_clingo_truth_value_true
!< true
clingo_warning_e_clingo_warning_atom_undefined
!< undefined atom in program
clingo_warning_e_clingo_warning_file_included
!< same file included multiple times
clingo_warning_e_clingo_warning_global_variable
!< global variable in tuple of aggregate element
clingo_warning_e_clingo_warning_operation_undefined
!< undefined arithmetic operation or weight of aggregate
clingo_warning_e_clingo_warning_other
!< other kinds of warnings
clingo_warning_e_clingo_warning_runtime_error
!< to report multiple errors; a corresponding runtime error is raised later
clingo_warning_e_clingo_warning_variable_unbounded
!< CSP variable with unbounded domain
clingo_weight_constraint_type_e_clingo_weight_constraint_type_equivalence
!< the weight constraint is equivalent to the literal
clingo_weight_constraint_type_e_clingo_weight_constraint_type_implication_left
!< the weight constraint implies the literal
clingo_weight_constraint_type_e_clingo_weight_constraint_type_implication_right
!< the literal implies the weight constraint
false_
true_

Statics§

g_clingo_ast_attribute_names
! A map from attributes to their string representation.
g_clingo_ast_constructors
! A map from AST types to their constructors. ! ! @note The idea of this variable is to provide enough information to auto-generate code for language bindings.

Functions§

clingo_add_string
! Internalize a string. ! ! This functions takes a string as input and returns an equal unique string ! that is (at the moment) not freed until the program is closed. ! ! @param[in] string the string to internalize ! @param[out] result the internalized string ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_assignment_at
! The (positive) literal at the given offset in the assignment. ! ! @param[in] assignment the target ! @param[in] offset the offset of the literal ! @param[out] literal the literal ! @return whether the call was successful
clingo_assignment_decision
! Determine the decision literal given a decision level. ! ! @param[in] assignment the target assignment ! @param[in] level the level ! @param[out] literal the resulting literal ! @return whether the call was successful
clingo_assignment_decision_level
! Get the current decision level. ! ! @param[in] assignment the target assignment ! @return the decision level
clingo_assignment_has_conflict
! Check if the given assignment is conflicting. ! ! @param[in] assignment the target assignment ! @return whether the assignment is conflicting
clingo_assignment_has_literal
! Check if the given literal is part of a (partial) assignment. ! ! @param[in] assignment the target assignment ! @param[in] literal the literal ! @return whether the literal is valid
clingo_assignment_is_false
! Check if a literal has a fixed truth value. ! ! @param[in] assignment the target assignment ! @param[in] literal the literal ! @param[out] is_false whether the literal is false ! @return whether the call was successful ! @see clingo_assignment_truth_value()
clingo_assignment_is_fixed
! Check if a literal has a fixed truth value. ! ! @param[in] assignment the target assignment ! @param[in] literal the literal ! @param[out] is_fixed whether the literal is fixed ! @return whether the call was successful
clingo_assignment_is_total
! Check if the assignment is total, i.e. there are no free literal. ! ! @param[in] assignment the target ! @return wheather the assignment is total
clingo_assignment_is_true
! Check if a literal is true. ! ! @param[in] assignment the target assignment ! @param[in] literal the literal ! @param[out] is_true whether the literal is true ! @return whether the call was successful ! @see clingo_assignment_truth_value()
clingo_assignment_level
! Determine the decision level of a given literal. ! ! @param[in] assignment the target assignment ! @param[in] literal the literal ! @param[out] level the resulting level ! @return whether the call was successful
clingo_assignment_root_level
! Get the current root level. ! ! Decisions levels smaller or equal to the root level are not backtracked during solving. ! ! @param[in] assignment the target assignment ! @return the decision level
clingo_assignment_size
! The number of (positive) literals in the assignment. ! ! @param[in] assignment the target ! @return the number of literals
clingo_assignment_trail_at
! Returns the literal at the given position in the trail. ! ! @param[in] assignment the target ! @param[in] offset the offset of the literal ! @param[out] literal the literal ! @return whether the call was successful
clingo_assignment_trail_begin
! Returns the offset of the decision literal with the given decision level in ! the trail. ! ! @note Literals in the trail are ordered by decision levels, where the first ! literal with a larger level than the previous literals is a decision; the ! following literals with same level are implied by this decision literal. ! Each decision level up to and including the current decision level has a ! valid offset in the trail. ! ! @param[in] assignment the target ! @param[in] level the decision level ! @param[out] offset the offset of the decision literal ! @return whether the call was successful
clingo_assignment_trail_end
! Returns the offset following the last literal with the given decision level. ! ! @note This function is the counter part to clingo_assignment_trail_begin(). ! ! @param[in] assignment the target ! @param[in] level the decision level ! @param[out] offset the offset ! @return whether the call was successful
clingo_assignment_trail_size
! Returns the number of literals in the trail, i.e., the number of assigned literals. ! ! @param[in] assignment the target ! @param[out] size the number of literals in the trail ! @return whether the call was successful
clingo_assignment_truth_value
! Determine the truth value of a given literal. ! ! @param[in] assignment the target assignment ! @param[in] literal the literal ! @param[out] value the resulting truth value ! @return whether the call was successful
clingo_ast_acquire
! Increment the reference count of an AST node. ! ! @note All functions that return AST nodes already increment the reference count. ! The reference count of callback arguments is not incremented. ! ! @param[in] ast the target AST
clingo_ast_attribute_delete_ast_at
! Remove an element from an attribute of type “clingo_ast_attribute_type_ast_array” at the given index. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[in] index the target index ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_attribute_delete_string_at
! Remove an element from an attribute of type “clingo_ast_attribute_type_string_array” at the given index. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[in] index the target index ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_attribute_get_ast
! Get the value of an attribute of type “clingo_ast_attribute_type_ast”. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[out] value the resulting value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_attribute_get_ast_at
! Get the value of an attribute of type “clingo_ast_attribute_type_ast_array” at the given index. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[in] index the target index ! @param[out] value the resulting value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_attribute_get_location
! Get the value of an attribute of type “clingo_ast_attribute_type_location”. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[out] value the resulting value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_attribute_get_number
! Get the value of an attribute of type “clingo_ast_attribute_type_number”. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[out] value the resulting value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_attribute_get_optional_ast
! Get the value of an attribute of type “clingo_ast_attribute_type_optional_ast”. ! ! @note The value might be “NULL”. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[out] value the resulting value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_attribute_get_string
! Get the value of an attribute of type “clingo_ast_attribute_type_string”. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[out] value the resulting value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_attribute_get_string_at
! Get the value of an attribute of type “clingo_ast_attribute_type_string_array” at the given index. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[in] index the target index ! @param[out] value the resulting value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_attribute_get_symbol
! Get the value of an attribute of type “clingo_ast_attribute_type_symbol”. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[out] value the resulting value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_attribute_insert_ast_at
! Insert a value into an attribute of type “clingo_ast_attribute_type_ast_array” at the given index. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[in] index the target index ! @param[in] value the value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime ! - ::clingo_error_bad_alloc
clingo_ast_attribute_insert_string_at
! Insert a value into an attribute of type “clingo_ast_attribute_type_string_array” at the given index. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[in] index the target index ! @param[in] value the value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime ! - ::clingo_error_bad_alloc
clingo_ast_attribute_set_ast
! Set the value of an attribute of type “clingo_ast_attribute_type_ast”. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[in] value the value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_attribute_set_ast_at
! Set the value of an attribute of type “clingo_ast_attribute_type_ast_array” at the given index. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[in] index the target index ! @param[in] value the value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime ! - ::clingo_error_bad_alloc
clingo_ast_attribute_set_location
! Set the value of an attribute of type “clingo_ast_attribute_type_location”. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[in] value the value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_attribute_set_number
! Set the value of an attribute of type “clingo_ast_attribute_type_number”. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[in] value the value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_attribute_set_optional_ast
! Set the value of an attribute of type “clingo_ast_attribute_type_optional_ast”. ! ! @note The value might be “NULL”. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[in] value the value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_attribute_set_string
! Set the value of an attribute of type “clingo_ast_attribute_type_string”. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[in] value the value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_attribute_set_string_at
! Set the value of an attribute of type “clingo_ast_attribute_type_string_array” at the given index. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[in] index the target index ! @param[in] value the value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime ! - ::clingo_error_bad_alloc
clingo_ast_attribute_set_symbol
! Set the value of an attribute of type “clingo_ast_attribute_type_symbol”. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[in] value the value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_attribute_size_ast_array
! Get the size of an attribute of type “clingo_ast_attribute_type_ast_array”. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[out] size the resulting size ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_attribute_size_string_array
! Get the size of an attribute of type “clingo_ast_attribute_type_string_array”. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[out] size the resulting size ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_attribute_type
! Get the type of the given AST. ! ! @param[in] ast the target AST ! @param[in] attribute the target attribute ! @param[out] type the resulting type ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_build
! Construct an AST of the given type. ! ! @note The arguments corresponding to the given type can be inspected using “g_clingo_ast_constructors.constructors[type]”. ! ! @param[in] type the type of AST to construct ! @param[out] ast the resulting AST ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! - ::clingo_error_runtime if one of the arguments is incompatible with the type
clingo_ast_copy
! Create a shallow copy of an AST node. ! ! @param[in] ast the AST to copy ! @param[out] copy the resulting AST ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_ast_deep_copy
! Create a deep copy of an AST node. ! ! @param[in] ast the AST to copy ! @param[out] copy the resulting AST ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_ast_equal
! Equality compare two AST nodes. ! ! @param[in] a the left-hand-side AST ! @param[in] b the right-hand-side AST ! @return the result of the comparison
clingo_ast_get_type
! Get the type of an AST node. ! ! @param[in] ast the target AST ! @param[out] type the resulting type ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_has_attribute
! Check if an AST has the given attribute. ! ! @param[in] ast the target AST ! @param[in] attribute the attribute to check ! @param[out] has_attribute the result ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_hash
! Compute a hash for an AST node. ! ! @param[in] ast the target AST ! @return the resulting hash code
clingo_ast_less_than
! Less than compare two AST nodes. ! ! @param[in] a the left-hand-side AST ! @param[in] b the right-hand-side AST ! @return the result of the comparison
clingo_ast_parse_files
! Parse the programs in the given list of files and return an abstract syntax tree for each statement via a callback. ! ! The function follows clingo’s handling of files on the command line. ! Filename “-” is treated as “STDIN” and if an empty list is given, then the parser will read from “STDIN”. ! ! @note The control object can be set to a NULL to disable reading input in aspif format. ! ! @param[in] files the beginning of the file name array ! @param[in] size the number of file names ! @param[in] callback the callback reporting statements ! @param[in] callback_data user data for the callback ! @param[in] control object to add ground statements to ! @param[in] logger callback to report messages during parsing ! @param[in] logger_data user data for the logger ! @param[in] message_limit the maximum number of times the logger is called ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime if parsing fails ! - ::clingo_error_bad_alloc
clingo_ast_parse_string
! Parse the given program and return an abstract syntax tree for each statement via a callback. ! ! @note The control object can be set to a NULL to disable reading input in aspif format. ! ! @param[in] program the program in gringo syntax ! @param[in] callback the callback reporting statements ! @param[in] callback_data user data for the callback ! @param[in] control object to add ground statements to ! @param[in] logger callback to report messages during parsing ! @param[in] logger_data user data for the logger ! @param[in] message_limit the maximum number of times the logger is called ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime if parsing fails ! - ::clingo_error_bad_alloc
clingo_ast_release
! Decrement the reference count of an AST node. ! ! @note The node is deleted if the reference count reaches zero. ! ! @param[in] ast the target AST
clingo_ast_to_string
! Get the string representation of an AST node. ! ! @param[in] ast the target AST ! @param[out] string the string representation ! @param[out] size the size of the string representation ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_to_string_size
! Get the size of the string representation of an AST node. ! ! @param[in] ast the target AST ! @param[out] size the size of the string representation ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime
clingo_ast_unpool
! Unpool the given AST. ! ! @param[in] ast the target AST ! @param[in] unpool_type what to unpool ! @param[in] callback the callback to report ASTs ! @param[in] callback_data user data for the callback ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_backend_acyc_edge
! Add an edge directive. ! ! @param[in] backend the target backend ! @param[in] node_u the start vertex of the edge ! @param[in] node_v the end vertex of the edge ! @param[in] condition the condition under which the edge is part of the graph ! @param[in] size the number of atoms in the condition ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_backend_add_atom
! Get a fresh atom to be used in aspif directives. ! ! @param[in] backend the target backend ! @param[in] symbol optional symbol to associate the atom with ! @param[out] atom the resulting atom ! @return whether the call was successful
clingo_backend_assume
! Add an assumption directive. ! ! @param[in] backend the target backend ! @param[in] literals the literals to assume (positive literals are true and negative literals false for the next solve call) ! @param[in] size the number of atoms ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_backend_begin
! Prepare the backend for usage. ! ! @param[in] backend the target backend ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! - ::clingo_error_runtime
clingo_backend_end
! Finalize the backend after using it. ! ! @param[in] backend the target backend ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! - ::clingo_error_runtime
clingo_backend_external
! Add an external statement. ! ! @param[in] backend the target backend ! @param[in] atom the external atom ! @param[in] type the type of the external statement ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_backend_heuristic
! Add an heuristic directive. ! ! @param[in] backend the target backend ! @param[in] atom the target atom ! @param[in] type the type of the heuristic modification ! @param[in] bias the heuristic bias ! @param[in] priority the heuristic priority ! @param[in] condition the condition under which to apply the heuristic modification ! @param[in] size the number of atoms in the condition ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_backend_minimize
! Add a minimize constraint (or weak constraint) to the program. ! ! @param[in] backend the target backend ! @param[in] priority the priority of the constraint ! @param[in] literals the weighted literals whose sum to minimize ! @param[in] size the number of weighted literals ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_backend_project
! Add a projection directive. ! ! @param[in] backend the target backend ! @param[in] atoms the atoms to project on ! @param[in] size the number of atoms ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_backend_rule
! Add a rule to the program. ! ! @param[in] backend the target backend ! @param[in] choice determines if the head is a choice or a disjunction ! @param[in] head the head atoms ! @param[in] head_size the number of atoms in the head ! @param[in] body the body literals ! @param[in] body_size the number of literals in the body ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_backend_theory_atom
! Add a theory atom without a guard. ! ! @param[in] backend the target backend ! @param[in] atom_id_or_zero a program atom or zero for theory directives ! @param[in] term_id the term id of the term associated with the theory atom ! @param[in] elements an array of element ids for the theory atoms’s elements ! @param[in] size the number of elements ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_backend_theory_atom_with_guard
! Add a theory atom with a guard. ! ! @param[in] backend the target backend ! @param[in] atom_id_or_zero a program atom or zero for theory directives ! @param[in] term_id the term id of the term associated with the theory atom ! @param[in] elements an array of element ids for the theory atoms’s elements ! @param[in] size the number of elements ! @param[in] operator_name the string representation of a theory operator ! @param[in] right_hand_side_id the term id of the right hand side term ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_backend_theory_element
! Add a theory atom element. ! ! @param[in] backend the target backend ! @param[in] tuple the array of term ids represeting the tuple ! @param[in] tuple_size the size of the tuple ! @param[in] condition an array of program literals represeting the condition ! @param[in] condition_size the size of the condition ! @param[out] element_id the resulting element id ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_backend_theory_term_function
! Add a theory term representing a function. ! ! @param[in] backend the target backend ! @param[in] name the name of the function ! @param[in] arguments an array of term ids for the theory terms in the arguments ! @param[in] size the number of arguments ! @param[out] term_id the resulting term id ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_backend_theory_term_number
! Add a numeric theory term. ! ! @param[in] backend the target backend ! @param[in] number the value of the term ! @param[out] term_id the resulting term id ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_backend_theory_term_sequence
! Add a theory term representing a sequence of theory terms. ! ! @param[in] backend the target backend ! @param[in] type the type of the sequence ! @param[in] arguments the term ids of the terms in the sequence ! @param[in] size the number of elements of the sequence ! @param[out] term_id the resulting term id ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_backend_theory_term_string
! Add a theory term representing a string. ! ! @param[in] backend the target backend ! @param[in] string the value of the term ! @param[out] term_id the resulting term id ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_backend_theory_term_symbol
! Convert the given symbol into a theory term. ! ! @param[in] backend the target backend ! @param[in] symbol the symbol to convert ! @param[out] term_id the resulting term id ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_backend_weight_rule
! Add a weight rule to the program. ! ! @attention All weights and the lower bound must be positive. ! @param[in] backend the target backend ! @param[in] choice determines if the head is a choice or a disjunction ! @param[in] head the head atoms ! @param[in] head_size the number of atoms in the head ! @param[in] lower_bound the lower bound of the weight rule ! @param[in] body the weighted body literals ! @param[in] body_size the number of weighted literals in the body ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_configuration_array_at
! Get the subkey at the given offset of an array entry. ! ! @note Some array entries, like fore example the solver configuration, can be accessed past there actual size to add subentries. ! @pre The @link clingo_configuration_type() type@endlink of the entry must be @ref ::clingo_configuration_type_array. ! @param[in] configuration the target configuration ! @param[in] key the key ! @param[in] offset the offset in the array ! @param[out] subkey the resulting subkey ! @return whether the call was successful
clingo_configuration_array_size
! Get the size of an array entry. ! ! @pre The @link clingo_configuration_type() type@endlink of the entry must be @ref ::clingo_configuration_type_array. ! @param[in] configuration the target configuration ! @param[in] key the key ! @param[out] size the resulting size ! @return whether the call was successful
clingo_configuration_description
! Get the description of an entry. ! ! @param[in] configuration the target configuration ! @param[in] key the key ! @param[out] description the description ! @return whether the call was successful
clingo_configuration_map_at
! Lookup a subkey under the given name. ! ! @pre The @link clingo_configuration_type() type@endlink of the entry must be @ref ::clingo_configuration_type_map. ! @note Multiple levels can be looked up by concatenating keys with a period. ! @param[in] configuration the target configuration ! @param[in] key the key ! @param[in] name the name to lookup the subkey ! @param[out] subkey the resulting subkey ! @return whether the call was successful
clingo_configuration_map_has_subkey
! Query whether the map has a key. ! ! @pre The @link clingo_configuration_type() type@endlink of the entry must be @ref ::clingo_configuration_type_map. ! @note Multiple levels can be looked up by concatenating keys with a period. ! @param[in] configuration the target configuration ! @param[in] key the key ! @param[in] name the name to lookup the subkey ! @param[out] result whether the key is in the map ! @return whether the call was successful
clingo_configuration_map_size
! Get the number of subkeys of a map entry. ! ! @pre The @link clingo_configuration_type() type@endlink of the entry must be @ref ::clingo_configuration_type_map. ! @param[in] configuration the target configuration ! @param[in] key the key ! @param[out] size the resulting number ! @return whether the call was successful
clingo_configuration_map_subkey_name
! Get the name associated with the offset-th subkey. ! ! @pre The @link clingo_configuration_type() type@endlink of the entry must be @ref ::clingo_configuration_type_map. ! @param[in] configuration the target configuration ! @param[in] key the key ! @param[in] offset the offset of the name ! @param[out] name the resulting name ! @return whether the call was successful
clingo_configuration_root
! Get the root key of the configuration. ! ! @param[in] configuration the target configuration ! @param[out] key the root key ! @return whether the call was successful
clingo_configuration_type
! Get the type of a key. ! ! @note The type is bitset, an entry can have multiple (but at least one) type. ! ! @param[in] configuration the target configuration ! @param[in] key the key ! @param[out] type the resulting type ! @return whether the call was successful
clingo_configuration_value_get
! Get the string value of the given entry. ! ! @pre The @link clingo_configuration_type() type@endlink of the entry must be @ref ::clingo_configuration_type_value. ! @pre The given size must be larger or equal to size of the value. ! @param[in] configuration the target configuration ! @param[in] key the key ! @param[out] value the resulting string value ! @param[in] size the size of the given char array ! @return whether the call was successful
clingo_configuration_value_get_size
! Get the size of the string value of the given entry. ! ! @pre The @link clingo_configuration_type() type@endlink of the entry must be @ref ::clingo_configuration_type_value. ! @param[in] configuration the target configuration ! @param[in] key the key ! @param[out] size the resulting size ! @return whether the call was successful
clingo_configuration_value_is_assigned
! Check whether a entry has a value. ! ! @pre The @link clingo_configuration_type() type@endlink of the entry must be @ref ::clingo_configuration_type_value. ! @param[in] configuration the target configuration ! @param[in] key the key ! @param[out] assigned whether the entry has a value ! @return whether the call was successful
clingo_configuration_value_set
! Set the value of an entry. ! ! @pre The @link clingo_configuration_type() type@endlink of the entry must be @ref ::clingo_configuration_type_value. ! @param[in] configuration the target configuration ! @param[in] key the key ! @param[in] value the value to set ! @return whether the call was successful
clingo_control_add
! Extend the logic program with the given non-ground logic program in string form. ! ! This function puts the given program into a block of form: #program name(parameters). ! ! After extending the logic program, the corresponding program parts are typically grounded with ::clingo_control_ground. ! ! @param[in] control the target ! @param[in] name name of the program block ! @param[in] parameters string array of parameters of the program block ! @param[in] parameters_size number of parameters ! @param[in] program string representation of the program ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! - ::clingo_error_runtime if parsing fails
clingo_control_assign_external
! Assign a truth value to an external atom. ! ! If a negative literal is passed, the corresponding atom is assigned the ! inverted truth value. ! ! If the atom does not exist or is not external, this is a noop. ! ! @param[in] control the target ! @param[in] literal literal to assign ! @param[in] value the truth value ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_control_backend
! Get an object to add ground directives to the program. ! ! See the @ref ProgramBuilder module for more information. ! ! @param[in] control the target ! @param[out] backend the backend object ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_control_clasp_facade
! Get low-level access to clasp. ! ! @attention ! This function is intended for experimental use only and not part of the stable API. ! ! This function may return a nullptr. ! Otherwise, the returned pointer can be casted to a ClaspFacade pointer. ! ! @param[in] control the target ! @param[out] clasp pointer to the ClaspFacade object (may be nullptr) ! @return whether the call was successful
clingo_control_cleanup
! @param[in] control the target ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! ! @see clingo_control_get_enable_cleanup() ! @see clingo_control_set_enable_cleanup()
clingo_control_configuration
! Get a configuration object to change the solver configuration. ! ! See the @ref Configuration module for more information. ! ! @param[in] control the target ! @param[out] configuration the configuration object ! @return whether the call was successful
clingo_control_free
! Free a control object created with clingo_control_new(). ! @param[in] control the target
clingo_control_get_const
! Return the symbol for a constant definition of form: #const name = symbol. ! ! @param[in] control the target ! @param[in] name the name of the constant ! @param[out] symbol the resulting symbol ! @return whether the call was successful
clingo_control_get_enable_cleanup
! Check whether automatic cleanup is enabled. ! ! See ::clingo_control_set_enable_cleanup(). ! ! @param[in] control the target ! ! @see clingo_control_cleanup() ! @see clingo_control_set_enable_cleanup()
clingo_control_get_enable_enumeration_assumption
! Check whether the enumeration assumption is enabled. ! ! See ::clingo_control_set_enable_enumeration_assumption(). ! @param[in] control the target ! @return whether using the enumeration assumption is enabled
clingo_control_ground
! 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. ! ! @param[in] control the target ! @param[in] parts array of parts to ground ! @param[in] parts_size size of the parts array ! @param[in] ground_callback callback to implement external functions ! @param[in] ground_callback_data user data for ground_callback ! @return 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
clingo_control_has_const
! Check if there is a constant definition for the given constant. ! ! @param[in] control the target ! @param[in] name the name of the constant ! @param[out] exists whether a matching constant definition exists ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime if constant definition does not exist ! ! @see clingo_control_get_const()
clingo_control_interrupt
! Interrupt the active solve call (or the following solve call right at the beginning). ! ! @param[in] control the target
clingo_control_is_conflicting
! Check if the solver has determined that the internal program representation is conflicting. ! ! If this function returns true, solve calls will return immediately with an unsatisfiable solve result. ! Note that conflicts first have to be detected, e.g. - ! initial unit propagation results in an empty clause, ! or later if an empty clause is resolved during solving. ! Hence, the function might return false even if the problem is unsatisfiable. ! ! @param[in] control the target ! @return whether the program representation is conflicting
clingo_control_load
! Extend the logic program with a program in a file. ! ! @param[in] control the target ! @param[in] file path to the file ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! - ::clingo_error_runtime if parsing or checking fails
clingo_control_new
! 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
clingo_control_register_observer
! Register a program observer with the control object. ! ! @param[in] control the target ! @param[in] observer the observer to register ! @param[in] replace just pass the grounding to the observer but not the solver ! @param[in] data user data passed to the observer functions ! @return whether the call was successful
clingo_control_register_propagator
! Register a custom propagator with the control object. ! ! If the sequential flag is set to true, the propagator is called ! sequentially when solving with multiple threads. ! ! See the @ref Propagator module for more information. ! ! @param[in] control the target ! @param[in] propagator the propagator ! @param[in] data user data passed to the propagator functions ! @param[in] sequential whether the propagator should be called sequentially ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_control_release_external
! Release an external atom. ! ! If a negative literal is passed, the corresponding atom is released. ! ! After this call, an external atom is no longer external and subject to ! program simplifications. If the atom does not exist or is not external, ! this is a noop. ! ! @param[in] control the target ! @param[in] literal literal to release ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_control_set_enable_cleanup
! Enable automatic cleanup after solving. ! ! @note Cleanup is enabled by default. ! ! @param[in] control the target ! @param[in] enable whether to enable cleanups ! @return whether the call was successful ! ! @see clingo_control_cleanup() ! @see clingo_control_get_enable_cleanup()
clingo_control_set_enable_enumeration_assumption
! Configure how learnt constraints are handled during enumeration. ! ! If the enumeration assumption is enabled, then all information learnt from ! the solver’s various enumeration modes is removed after a solve call. This ! includes enumeration of cautious or brave consequences, enumeration of ! answer sets with or without projection, or finding optimal models, as well ! as clauses added with clingo_solve_control_add_clause(). ! ! @attention For practical purposes, this option is only interesting for single-shot solving ! or before the last solve call to squeeze out a tiny bit of performance. ! Initially, the enumeration assumption is enabled. ! ! @param[in] control the target ! @param[in] enable whether to enable the assumption ! @return whether the call was successful
clingo_control_solve
! Solve the currently @link ::clingo_control_ground grounded @endlink logic program enumerating its models. ! ! See the @ref SolveHandle module for more information. ! ! @param[in] control the target ! @param[in] mode configures the search mode ! @param[in] assumptions array of assumptions to solve under ! @param[in] assumptions_size number of assumptions ! @param[in] notify the event handler to register ! @param[in] data the user data for the event handler ! @param[out] handle handle to the current search to enumerate models ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! - ::clingo_error_runtime if solving could not be started
clingo_control_statistics
! Get a statistics object to inspect solver statistics. ! ! Statistics are updated after a solve call. ! ! See the @ref Statistics module for more information. ! ! @attention ! The level of detail of the statistics depends on the stats option ! (which can be set using @ref Configuration module or passed as an option when @link clingo_control_new creating the control object@endlink). ! The default level zero only provides basic statistics, ! level one provides extended and accumulated statistics, ! and level two provides per-thread statistics. ! Furthermore, the statistics object is best accessed right after solving. ! Otherwise, not all of its entries have valid values. ! ! @param[in] control the target ! @param[out] statistics the statistics object ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_control_symbolic_atoms
! Get an object to inspect symbolic atoms (the relevant Herbrand base) used ! for grounding. ! ! See the @ref SymbolicAtoms module for more information. ! ! @param[in] control the target ! @param[out] atoms the symbolic atoms object ! @return whether the call was successful
clingo_control_theory_atoms
! Get an object to inspect theory atoms that occur in the grounding. ! ! See the @ref TheoryAtoms module for more information. ! ! @param[in] control the target ! @param[out] atoms the theory atoms object ! @return whether the call was successful
clingo_error_code
! Get the last error code set by a clingo API call. ! @note Each thread has its own local error code. ! @return error code
clingo_error_message
! Get the last error message set if an API call fails. ! @note Each thread has its own local error message. ! @return error message or NULL
clingo_error_string
! Convert error code into string.
clingo_main
! Run clingo with a customized main function (similar to python and lua embedding). ! ! @param[in] application struct with callbacks to override default clingo functionality ! @param[in] arguments command line arguments ! @param[in] size number of arguments ! @param[in] data user data to pass to callbacks in application ! @return exit code to return from main function
clingo_model_contains
! Constant time lookup to test whether an atom is in a model. ! ! @param[in] model the target ! @param[in] atom the atom to lookup ! @param[out] contained whether the atom is contained ! @return whether the call was successful
clingo_model_context
! Get the associated solve control object of a model. ! ! This object allows for adding clauses during model enumeration. ! @param[in] model the target ! @param[out] control the resulting solve control object ! @return whether the call was successful
clingo_model_cost
! Get the cost vector of a model. ! ! @param[in] model the target ! @param[out] costs the resulting costs ! @param[in] size the number of costs ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! - ::clingo_error_runtime if the size is too small ! ! @see clingo_model_cost_size() ! @see clingo_model_optimality_proven()
clingo_model_cost_size
! Get the number of cost values of a model. ! ! @param[in] model the target ! @param[out] size the number of costs ! @return whether the call was successful
clingo_model_extend
! Add symbols to the model. ! ! These symbols will appear in clingo’s output, which means that this ! function is only meaningful if there is an underlying clingo application. ! Only models passed to the ::clingo_solve_event_callback_t are extendable. ! ! @param[in] model the target ! @param[in] symbols the symbols to add ! @param[in] size the number of symbols to add ! @return whether the call was successful
clingo_model_is_true
! Check if a program literal is true in a model. ! ! @param[in] model the target ! @param[in] literal the literal to lookup ! @param[out] result whether the literal is true ! @return whether the call was successful
clingo_model_number
! Get the running number of the model. ! ! @param[in] model the target ! @param[out] number the number of the model ! @return whether the call was successful
clingo_model_optimality_proven
! Whether the optimality of a model has been proven. ! ! @param[in] model the target ! @param[out] proven whether the optimality has been proven ! @return whether the call was successful ! ! @see clingo_model_cost()
clingo_model_symbols
! Get the symbols of the selected types in the model. ! ! @note CSP assignments are represented using functions with name “$” ! where the first argument is the name of the CSP variable and the second one its ! value. ! ! @param[in] model the target ! @param[in] show which symbols to select ! @param[out] symbols the resulting symbols ! @param[in] size the number of selected symbols ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! - ::clingo_error_runtime if the size is too small ! ! @see clingo_model_symbols_size()
clingo_model_symbols_size
! Get the number of symbols of the selected types in the model. ! ! @param[in] model the target ! @param[in] show which symbols to select ! @param[out] size the number symbols ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_model_thread_id
! Get the id of the solver thread that found the model. ! ! @param[in] model the target ! @param[out] id the resulting thread id ! @return whether the call was successful
clingo_model_type
! Get the type of the model. ! ! @param[in] model the target ! @param[out] type the type of the model ! @return whether the call was successful
clingo_options_add
! Add an option that is processed with a custom parser. ! ! Note that the parser also has to take care of storing the semantic value of ! the option somewhere. ! ! Parameter option specifies the name(s) of the option. ! For example, “ping,p” adds the short option “-p” and its long form “–ping”. ! It is also possible to associate an option with a help level by adding “,@l” to the option specification. ! Options with a level greater than zero are only shown if the argument to help is greater or equal to l. ! ! @param[in] options object to register the option with ! @param[in] group options are grouped into sections as given by this string ! @param[in] option specifies the command line option ! @param[in] description the description of the option ! @param[in] parse callback to parse the value of the option ! @param[in] data user data for the callback ! @param[in] multi whether the option can appear multiple times on the command-line ! @param[in] argument optional string to change the value name in the generated help output ! @return whether the call was successful
clingo_options_add_flag
! Add an option that is a simple flag. ! ! This function is similar to @ref clingo_options_add() but simpler because it only supports flags, which do not have values. ! If a flag is passed via the command-line the parameter target is set to true. ! ! @param[in] options object to register the option with ! @param[in] group options are grouped into sections as given by this string ! @param[in] option specifies the command line option ! @param[in] description the description of the option ! @param[in] target boolean set to true if the flag is given on the command-line ! @return whether the call was successful
clingo_parse_term
! Parse a term in string form. ! ! The result of this function is a symbol. The input term can contain ! unevaluated functions, which are evaluated during parsing. ! ! @param[in] string the string to parse ! @param[in] logger optional logger to report warnings during parsing ! @param[in] logger_data user data for the logger ! @param[in] message_limit maximum number of times to call the logger ! @param[out] symbol the resulting symbol ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! - ::clingo_error_runtime if parsing fails
clingo_program_builder_add
! Adds a statement to the program. ! ! @attention @ref clingo_program_builder_begin() must be called before adding statements and @ref clingo_program_builder_end() must be called after all statements have been added. ! @param[in] builder the target program builder ! @param[in] ast the AST node to add ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime for statements of invalid form or AST nodes that do not represent statements ! - ::clingo_error_bad_alloc
clingo_program_builder_begin
! Begin building a program. ! ! @param[in] builder the target program builder ! @return whether the call was successful
clingo_program_builder_end
! End building a program. ! ! @param[in] builder the target program builder ! @return whether the call was successful
clingo_program_builder_init
! Get an object to add non-ground directives to the program. ! ! See the @ref ProgramBuilder module for more information. ! ! @param[in] control the target ! @param[out] builder the program builder object ! @return whether the call was successful
clingo_propagate_control_add_clause
! Add the given clause to the solver. ! ! This method sets its result to false if the current propagation must be stopped for the solver to backtrack. ! ! @attention No further calls on the control object or functions on the assignment should be called when the result of this method is false. ! ! @param[in] control the target ! @param[in] clause the clause to add ! @param[in] size the size of the clause ! @param[in] type the clause type determining its lifetime ! @param[out] result result indicating whether propagation has to be stopped ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_propagate_control_add_literal
! Adds a new volatile literal to the underlying solver thread. ! ! @attention The literal is only valid within the current solving step and solver thread. ! All volatile literals and clauses involving a volatile literal are deleted after the current search. ! ! @param[in] control the target ! @param[out] result the (positive) solver literal ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! - ::clingo_error_logic if the assignment is conflicting
clingo_propagate_control_add_watch
! Add a watch for the solver literal in the given phase. ! ! @note Unlike @ref clingo_propagate_init_add_watch() this does not add a watch to all solver threads but just the current one. ! ! @param[in] control the target ! @param[in] literal the literal to watch ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! - ::clingo_error_logic if the literal is invalid ! @see clingo_propagate_control_remove_watch()
clingo_propagate_control_assignment
! Get the assignment associated with the underlying solver. ! ! @param[in] control the target ! @return the assignment
clingo_propagate_control_has_watch
! Check whether a literal is watched in the current solver thread. ! ! @param[in] control the target ! @param[in] literal the literal to check ! ! @return whether the literal is watched
clingo_propagate_control_propagate
! Propagate implied literals (resulting from added clauses). ! ! This method sets its result to false if the current propagation must be stopped for the solver to backtrack. ! ! @attention No further calls on the control object or functions on the assignment should be called when the result of this method is false. ! ! @param[in] control the target ! @param[out] result result indicating whether propagation has to be stopped ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_propagate_control_remove_watch
! Removes the watch (if any) for the given solver literal. ! ! @note Similar to @ref clingo_propagate_init_add_watch() this just removes the watch in the current solver thread. ! ! @param[in] control the target ! @param[in] literal the literal to remove
clingo_propagate_control_thread_id
! Get the id of the underlying solver thread. ! ! Thread ids are consecutive numbers starting with zero. ! ! @param[in] control the target ! @return the thread id
clingo_propagate_init_add_clause
! Add the given clause to the solver. ! ! @attention No further calls on the init object or functions on the assignment should be called when the result of this method is false. ! ! @param[in] init the target ! @param[in] clause the clause to add ! @param[in] size the size of the clause ! @param[out] result result indicating whether the problem became unsatisfiable ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_propagate_init_add_literal
! Add a literal to the solver. ! ! To be able to use the variable in clauses during propagation or add watches to it, it has to be frozen. ! Otherwise, it might be removed during preprocessing. ! ! @attention If varibales were added, subsequent calls to functions adding constraints or ::clingo_propagate_init_propagate() are expensive. ! It is best to add varables in batches. ! ! @param[in] init the target ! @param[in] freeze whether to freeze the literal ! @param[out] result the added literal ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_propagate_init_add_minimize
! Add the given literal to minimize to the solver. ! ! This corresponds to a weak constraint of form :~ literal. [weight@priority]. ! ! @param[in] init the target ! @param[in] literal the literal to minimize ! @param[in] weight the weight of the literal ! @param[in] priority the priority of the literal ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_propagate_init_add_watch
! Add a watch for the solver literal in the given phase. ! ! @param[in] init the target ! @param[in] solver_literal the solver literal ! @return whether the call was successful
clingo_propagate_init_add_watch_to_thread
! Add a watch for the solver literal in the given phase to the given solver thread. ! ! @param[in] init the target ! @param[in] solver_literal the solver literal ! @param[in] thread_id the id of the solver thread ! @return whether the call was successful
clingo_propagate_init_add_weight_constraint
! Add the given weight constraint to the solver. ! ! This function adds a constraint of form literal <=> { lit=weight | (lit, weight) in literals } >= bound to the solver. ! Depending on the type the <=> connective can be either a left implication, right implication, or equivalence. ! ! @attention No further calls on the init object or functions on the assignment should be called when the result of this method is false. ! ! @param[in] init the target ! @param[in] literal the literal of the constraint ! @param[in] literals the weighted literals ! @param[in] size the number of weighted literals ! @param[in] bound the bound of the constraint ! @param[in] type the type of the weight constraint ! @param[in] compare_equal if true compare equal instead of less than equal ! @param[out] result result indicating whether the problem became unsatisfiable ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_propagate_init_assignment
! Get the top level assignment solver. ! ! @param[in] init the target ! @return the assignment
clingo_propagate_init_freeze_literal
! Freeze the given solver literal. ! ! Any solver literal that is not frozen is subject to simplification and might be removed in a preprocessing step after propagator initialization. ! A propagator should freeze all literals over which it might add clauses during propagation. ! Note that any watched literal is automatically frozen and that it does not matter which phase of the literal is frozen. ! ! @param[in] init the target ! @param[in] solver_literal the solver literal ! @return whether the call was successful
clingo_propagate_init_get_check_mode
! Get the current check mode of the propagator. ! ! @param[in] init the target ! @return bitmask when to call the propagator ! @see clingo_propagate_init_set_check_mode()
clingo_propagate_init_number_of_threads
! Get the number of threads used in subsequent solving. ! ! @param[in] init the target ! @return the number of threads ! @see clingo_propagate_control_thread_id()
clingo_propagate_init_propagate
! Propagates consequences of the underlying problem excluding registered propagators. ! ! @note The function has no effect if SAT-preprocessing is enabled. ! @attention No further calls on the init object or functions on the assignment should be called when the result of this method is false. ! ! @param[in] init the target ! @param[out] result result indicating whether the problem became unsatisfiable ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_propagate_init_remove_watch
! Remove the watch for the solver literal in the given phase. ! ! @param[in] init the target ! @param[in] solver_literal the solver literal ! @return whether the call was successful
clingo_propagate_init_remove_watch_from_thread
! Remove the watch for the solver literal in the given phase from the given solver thread. ! ! @param[in] init the target ! @param[in] solver_literal the solver literal ! @param[in] thread_id the id of the solver thread ! @return whether the call was successful
clingo_propagate_init_set_check_mode
! Configure when to call the check method of the propagator. ! ! @param[in] init the target ! @param[in] mode bitmask when to call the propagator ! @see @ref ::clingo_propagator::check()
clingo_propagate_init_solver_literal
! Map the given program literal or condition id to its solver literal. ! ! @param[in] init the target ! @param[in] aspif_literal the aspif literal to map ! @param[out] solver_literal the resulting solver literal ! @return whether the call was successful
clingo_propagate_init_symbolic_atoms
! Get an object to inspect the symbolic atoms. ! ! @param[in] init the target ! @param[out] atoms the resulting object ! @return whether the call was successful
clingo_propagate_init_theory_atoms
! Get an object to inspect the theory atoms. ! ! @param[in] init the target ! @param[out] atoms the resulting object ! @return whether the call was successful
clingo_register_script
! Add a custom scripting language to clingo. ! ! @param[in] name the name of the scripting language ! @param[in] script struct with functions implementing the language ! @param[in] data user data to pass to callbacks in the script ! @return whether the call was successful
clingo_script_version
! Get the version of the registered scripting language. ! ! @param[in] name the name of the scripting language ! @return the version
clingo_set_error
! Set a custom error code and message in the active thread. ! @param[in] code the error code ! @param[in] message the error message
clingo_signature_arity
! Get the arity of a signature. ! ! @param[in] signature the target signature ! @return the arity of the signature
clingo_signature_create
! Create a new signature. ! ! @param[in] name name of the signature ! @param[in] arity arity of the signature ! @param[in] positive false if the signature has a classical negation sign ! @param[out] signature the resulting signature ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_signature_hash
! Calculate a hash code of a signature. ! ! @param[in] signature the target signature ! @return the hash code of the signature
clingo_signature_is_equal_to
! Check if two signatures are equal. ! ! @param[in] a first signature ! @param[in] b second signature ! @return whether a == b
clingo_signature_is_less_than
! Check if a signature is less than another signature. ! ! Signatures are compared first by sign (unsigned < signed), then by arity, ! then by name. ! ! @param[in] a first signature ! @param[in] b second signature ! @return whether a < b
clingo_signature_is_negative
! Whether the signature is negative (is classically negated). ! ! @param[in] signature the target signature ! @return whether the signature has a sign
clingo_signature_is_positive
! Whether the signature is positive (is not classically negated). ! ! @param[in] signature the target signature ! @return whether the signature has no sign
clingo_signature_name
! Get the name of a signature. ! ! @note ! The string is internalized and valid for the duration of the process. ! ! @param[in] signature the target signature ! @return the name of the signature
clingo_solve_control_add_clause
! Add a clause that applies to the current solving step during model ! enumeration. ! ! @note The @ref Propagator module provides a more sophisticated ! interface to add clauses - even on partial assignments. ! ! @param[in] control the target ! @param[in] clause array of literals representing the clause ! @param[in] size the size of the literal array ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! - ::clingo_error_runtime if adding the clause fails
clingo_solve_control_symbolic_atoms
! Get an object to inspect the symbolic atoms. ! ! @param[in] control the target ! @param[out] atoms the resulting object ! @return whether the call was successful
clingo_solve_handle_cancel
! Stop the running search and block until done. ! ! @param[in] handle the target ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! - ::clingo_error_runtime if solving fails
clingo_solve_handle_close
! Stops the running search and releases the handle. ! ! Blocks until the search is stopped (as if an implicit cancel was called before the handle is released). ! ! @param[in] handle the target ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! - ::clingo_error_runtime if solving fails
clingo_solve_handle_core
! When a problem is unsatisfiable, get a subset of the assumptions that made the problem unsatisfiable. ! ! If the program is not unsatisfiable, core is set to NULL and size to zero. ! ! @param[in] handle the target ! @param[out] core pointer where to store the core ! @param[out] size size of the given array ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_solve_handle_get
! Get the next solve result. ! ! Blocks until the result is ready. ! When yielding partial solve results can be obtained, i.e., ! when a model is ready, the result will be satisfiable but neither the search exhausted nor the optimality proven. ! ! @param[in] handle the target ! @param[out] result the solve result ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! - ::clingo_error_runtime if solving fails
clingo_solve_handle_model
! Get the next model (or zero if there are no more models). ! ! @param[in] handle the target ! @param[out] model the model (it is NULL if there are no more models) ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! - ::clingo_error_runtime if solving fails
clingo_solve_handle_resume
! Discards the last model and starts the search for the next one. ! ! If the search has been started asynchronously, this function continues the search in the background. ! ! @note This function does not block. ! ! @param[in] handle the target ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! - ::clingo_error_runtime if solving fails
clingo_solve_handle_wait
! Wait for the specified amount of time to check if the next result is ready. ! ! If the time is set to zero, this function can be used to poll if the search is still active. ! If the time is negative, the function blocks until the search is finished. ! ! @param[in] handle the target ! @param[in] timeout the maximum time to wait ! @param[out] result whether the search has finished
clingo_statistics_array_at
! Get the subkey at the given offset of an array entry. ! ! @pre The @link clingo_statistics_type() type@endlink of the entry must be @ref ::clingo_statistics_type_array. ! @param[in] statistics the target statistics ! @param[in] key the key ! @param[in] offset the offset in the array ! @param[out] subkey the resulting subkey ! @return whether the call was successful
clingo_statistics_array_push
! Create the subkey at the end of an array entry. ! ! @pre The @link clingo_statistics_type() type@endlink of the entry must be @ref ::clingo_statistics_type_array. ! @param[in] statistics the target statistics ! @param[in] key the key ! @param[in] type the type of the new subkey ! @param[out] subkey the resulting subkey ! @return whether the call was successful
clingo_statistics_array_size
! Get the size of an array entry. ! ! @pre The @link clingo_statistics_type() type@endlink of the entry must be @ref ::clingo_statistics_type_array. ! @param[in] statistics the target statistics ! @param[in] key the key ! @param[out] size the resulting size ! @return whether the call was successful
clingo_statistics_map_add_subkey
! Add a subkey with the given name. ! ! @pre The @link clingo_statistics_type() type@endlink of the entry must be @ref ::clingo_statistics_type_map. ! @param[in] statistics the target statistics ! @param[in] key the key ! @param[in] name the name of the new subkey ! @param[in] type the type of the new subkey ! @param[out] subkey the index of the resulting subkey ! @return whether the call was successful
clingo_statistics_map_at
! Lookup a subkey under the given name. ! ! @pre The @link clingo_statistics_type() type@endlink of the entry must be @ref ::clingo_statistics_type_map. ! @note Multiple levels can be looked up by concatenating keys with a period. ! @param[in] statistics the target statistics ! @param[in] key the key ! @param[in] name the name to lookup the subkey ! @param[out] subkey the resulting subkey ! @return whether the call was successful
clingo_statistics_map_has_subkey
! Test if the given map contains a specific subkey. ! ! @pre The @link clingo_statistics_type() type@endlink of the entry must be @ref ::clingo_statistics_type_map. ! @param[in] statistics the target statistics ! @param[in] key the key ! @param[in] name name of the subkey ! @param[out] result true if the map has a subkey with the given name ! @return whether the call was successful
clingo_statistics_map_size
! Get the number of subkeys of a map entry. ! ! @pre The @link clingo_statistics_type() type@endlink of the entry must be @ref ::clingo_statistics_type_map. ! @param[in] statistics the target statistics ! @param[in] key the key ! @param[out] size the resulting number ! @return whether the call was successful
clingo_statistics_map_subkey_name
! Get the name associated with the offset-th subkey. ! ! @pre The @link clingo_statistics_type() type@endlink of the entry must be @ref ::clingo_statistics_type_map. ! @param[in] statistics the target statistics ! @param[in] key the key ! @param[in] offset the offset of the name ! @param[out] name the resulting name ! @return whether the call was successful
clingo_statistics_root
! Get the root key of the statistics. ! ! @param[in] statistics the target statistics ! @param[out] key the root key ! @return whether the call was successful
clingo_statistics_type
! Get the type of a key. ! ! @param[in] statistics the target statistics ! @param[in] key the key ! @param[out] type the resulting type ! @return whether the call was successful
clingo_statistics_value_get
! Get the value of the given entry. ! ! @pre The @link clingo_statistics_type() type@endlink of the entry must be @ref ::clingo_statistics_type_value. ! @param[in] statistics the target statistics ! @param[in] key the key ! @param[out] value the resulting value ! @return whether the call was successful
clingo_statistics_value_set
! Set the value of the given entry. ! ! @pre The @link clingo_statistics_type() type@endlink of the entry must be @ref ::clingo_statistics_type_value. ! @param[in] statistics the target statistics ! @param[in] key the key ! @param[out] value the new value ! @return whether the call was successful
clingo_symbol_arguments
! Get the arguments of a symbol. ! ! @param[in] symbol the target symbol ! @param[out] arguments the resulting arguments ! @param[out] arguments_size the number of arguments ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime if symbol is not of type ::clingo_symbol_type_function
clingo_symbol_create_function
! Construct a symbol representing a function or tuple. ! ! @note To create tuples, the empty string has to be used as name. ! ! @param[in] name the name of the function ! @param[in] arguments the arguments of the function ! @param[in] arguments_size the number of arguments ! @param[in] positive whether the symbol has a classical negation sign ! @param[out] symbol the resulting symbol ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_symbol_create_id
! Construct a symbol representing an id. ! ! @note This is just a shortcut for clingo_symbol_create_function() with ! empty arguments. ! ! @param[in] name the name ! @param[in] positive whether the symbol has a classical negation sign ! @param[out] symbol the resulting symbol ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_symbol_create_infimum
! Construct a symbol representing #inf. ! ! @param[out] symbol the resulting symbol
clingo_symbol_create_number
! Construct a symbol representing a number. ! ! @param[in] number the number ! @param[out] symbol the resulting symbol
clingo_symbol_create_string
! Construct a symbol representing a string. ! ! @param[in] string the string ! @param[out] symbol the resulting symbol ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_symbol_create_supremum
! Construct a symbol representing #sup. ! ! @param[out] symbol the resulting symbol
clingo_symbol_hash
! Calculate a hash code of a symbol. ! ! @param[in] symbol the target symbol ! @return the hash code of the symbol
clingo_symbol_is_equal_to
! Check if two symbols are equal. ! ! @param[in] a first symbol ! @param[in] b second symbol ! @return whether a == b
clingo_symbol_is_less_than
! Check if a symbol is less than another symbol. ! ! Symbols are first compared by type. If the types are equal, the values are ! compared (where strings are compared using strcmp). Functions are first ! compared by signature and then lexicographically by arguments. ! ! @param[in] a first symbol ! @param[in] b second symbol ! @return whether a < b
clingo_symbol_is_negative
! Check if a function is negative (has a sign). ! ! @param[in] symbol the target symbol ! @param[out] negative the result ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime if symbol is not of type ::clingo_symbol_type_function
clingo_symbol_is_positive
! Check if a function is positive (does not have a sign). ! ! @param[in] symbol the target symbol ! @param[out] positive the result ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime if symbol is not of type ::clingo_symbol_type_function
clingo_symbol_name
! Get the name of a symbol. ! ! @note ! The string is internalized and valid for the duration of the process. ! ! @param[in] symbol the target symbol ! @param[out] name the resulting name ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime if symbol is not of type ::clingo_symbol_type_function
clingo_symbol_number
! Get the number of a symbol. ! ! @param[in] symbol the target symbol ! @param[out] number the resulting number ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime if symbol is not of type ::clingo_symbol_type_number
clingo_symbol_string
! Get the string of a symbol. ! ! @note ! The string is internalized and valid for the duration of the process. ! ! @param[in] symbol the target symbol ! @param[out] string the resulting string ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime if symbol is not of type ::clingo_symbol_type_string
clingo_symbol_to_string
! Get the string representation of a symbol. ! ! @param[in] symbol the target symbol ! @param[out] string the resulting string ! @param[in] size the size of the string ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! ! @see clingo_symbol_to_string_size()
clingo_symbol_to_string_size
! Get the size of the string representation of a symbol (including the terminating 0). ! ! @param[in] symbol the target symbol ! @param[out] size the resulting size ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_symbol_type
! Get the type of a symbol. ! ! @param[in] symbol the target symbol ! @return the type of the symbol
clingo_symbolic_atoms_begin
! Get a forward iterator to the beginning of the sequence of all symbolic ! atoms optionally restricted to a given signature. ! ! @param[in] atoms the target ! @param[in] signature optional signature ! @param[out] iterator the resulting iterator ! @return whether the call was successful
clingo_symbolic_atoms_end
! Iterator pointing to the end of the sequence of symbolic atoms. ! ! @param[in] atoms the target ! @param[out] iterator the resulting iterator ! @return whether the call was successful
clingo_symbolic_atoms_find
! Find a symbolic atom given its symbolic representation. ! ! @param[in] atoms the target ! @param[in] symbol the symbol to lookup ! @param[out] iterator iterator pointing to the symbolic atom or to the end ! of the sequence if no corresponding atom is found ! @return whether the call was successful
clingo_symbolic_atoms_is_external
! Check whether an atom is external. ! ! An atom is external if it has been defined using an external directive and ! has not been released or defined by a rule. ! ! @param[in] atoms the target ! @param[in] iterator iterator to the atom ! @param[out] external whether the atom is a external ! @return whether the call was successful
clingo_symbolic_atoms_is_fact
! Check whether an atom is a fact. ! ! @note This does not determine if an atom is a cautious consequence. The ! grounding or solving component’s simplifications can only detect this in ! some cases. ! ! @param[in] atoms the target ! @param[in] iterator iterator to the atom ! @param[out] fact whether the atom is a fact ! @return whether the call was successful
clingo_symbolic_atoms_is_valid
! Check whether the given iterator points to some element with the sequence ! of symbolic atoms or to the end of the sequence. ! ! @param[in] atoms the target ! @param[in] iterator the iterator ! @param[out] valid whether the iterator points to some element within the ! sequence ! @return whether the call was successful
clingo_symbolic_atoms_iterator_is_equal_to
! Check if two iterators point to the same element (or end of the sequence). ! ! @param[in] atoms the target ! @param[in] a the first iterator ! @param[in] b the second iterator ! @param[out] equal whether the two iterators are equal ! @return whether the call was successful
clingo_symbolic_atoms_literal
! Returns the (numeric) aspif literal corresponding to the given symbolic atom. ! ! Such a literal can be mapped to a solver literal (see the \ref Propagator ! module) or be used in rules in aspif format (see the \ref ProgramBuilder ! module). ! ! @param[in] atoms the target ! @param[in] iterator iterator to the atom ! @param[out] literal the associated literal ! @return whether the call was successful
clingo_symbolic_atoms_next
! Get an iterator to the next element in the sequence of symbolic atoms. ! ! @param[in] atoms the target ! @param[in] iterator the current iterator ! @param[out] next the succeeding iterator ! @return whether the call was successful
clingo_symbolic_atoms_signatures
! Get the predicate signatures occurring in a logic program. ! ! @param[in] atoms the target ! @param[out] signatures the resulting signatures ! @param[in] size the number of signatures ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! - ::clingo_error_runtime if the size is too small ! ! @see clingo_symbolic_atoms_signatures_size()
clingo_symbolic_atoms_signatures_size
! Get the number of different predicate signatures used in the program. ! ! @param[in] atoms the target ! @param[out] size the number of signatures ! @return whether the call was successful
clingo_symbolic_atoms_size
! Get the number of different atoms occurring in a logic program. ! ! @param[in] atoms the target ! @param[out] size the number of atoms ! @return whether the call was successful
clingo_symbolic_atoms_symbol
! Get the symbolic representation of an atom. ! ! @param[in] atoms the target ! @param[in] iterator iterator to the atom ! @param[out] symbol the resulting symbol ! @return whether the call was successful
clingo_theory_atoms_atom_elements
! Get the theory elements associated with the theory atom. ! ! @param[in] atoms container where the atom is stored ! @param[in] atom id of the atom ! @param[out] elements the resulting array of elements ! @param[out] size the number of elements ! @return whether the call was successful
clingo_theory_atoms_atom_guard
! Get the guard consisting of a theory operator and a theory term of the given theory atom. ! ! @note ! The lifetime of the string is tied to the current solve step. ! ! @param[in] atoms container where the atom is stored ! @param[in] atom id of the atom ! @param[out] connective the resulting theory operator ! @param[out] term the resulting term ! @return whether the call was successful
clingo_theory_atoms_atom_has_guard
! Whether the theory atom has a guard. ! ! @param[in] atoms container where the atom is stored ! @param[in] atom id of the atom ! @param[out] has_guard whether the theory atom has a guard ! @return whether the call was successful
clingo_theory_atoms_atom_literal
! Get the aspif literal associated with the given theory atom. ! ! @param[in] atoms container where the atom is stored ! @param[in] atom id of the atom ! @param[out] literal the resulting literal ! @return whether the call was successful
clingo_theory_atoms_atom_term
! Get the theory term associated with the theory atom. ! ! @param[in] atoms container where the atom is stored ! @param[in] atom id of the atom ! @param[out] term the resulting term id ! @return whether the call was successful
clingo_theory_atoms_atom_to_string
! Get the string representation of the given theory atom. ! ! @param[in] atoms container where the atom is stored ! @param[in] atom id of the element ! @param[out] string the resulting string ! @param[in] size the size of the string ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime if the size is too small ! - ::clingo_error_bad_alloc
clingo_theory_atoms_atom_to_string_size
! Get the size of the string representation of the given theory atom (including the terminating 0). ! ! @param[in] atoms container where the atom is stored ! @param[in] atom id of the element ! @param[out] size the resulting size ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_theory_atoms_element_condition
! Get the condition (array of aspif literals) of the given theory element. ! ! @param[in] atoms container where the element is stored ! @param[in] element id of the element ! @param[out] condition the resulting array of aspif literals ! @param[out] size the number of term literals ! @return whether the call was successful
clingo_theory_atoms_element_condition_id
! Get the id of the condition of the given theory element. ! ! @note ! This id can be mapped to a solver literal using clingo_propagate_init_solver_literal(). ! This id is not (necessarily) an aspif literal; ! to get aspif literals use clingo_theory_atoms_element_condition(). ! ! @param[in] atoms container where the element is stored ! @param[in] element id of the element ! @param[out] condition the resulting condition id ! @return whether the call was successful
clingo_theory_atoms_element_to_string
! Get the string representation of the given theory element. ! ! @param[in] atoms container where the element is stored ! @param[in] element id of the element ! @param[out] string the resulting string ! @param[in] size the size of the string ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime if the size is too small ! - ::clingo_error_bad_alloc
clingo_theory_atoms_element_to_string_size
! Get the size of the string representation of the given theory element (including the terminating 0). ! ! @param[in] atoms container where the element is stored ! @param[in] element id of the element ! @param[out] size the resulting size ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_theory_atoms_element_tuple
! Get the tuple (array of theory terms) of the given theory element. ! ! @param[in] atoms container where the element is stored ! @param[in] element id of the element ! @param[out] tuple the resulting array of term ids ! @param[out] size the number of term ids ! @return whether the call was successful
clingo_theory_atoms_size
! Get the total number of theory atoms. ! ! @param[in] atoms the target ! @param[out] size the resulting number ! @return whether the call was successful
clingo_theory_atoms_term_arguments
! Get the arguments of the given function theory term. ! ! @pre The term must be of type ::clingo_theory_term_type_function. ! @param[in] atoms container where the term is stored ! @param[in] term id of the term ! @param[out] arguments the resulting arguments in form of an array of term ids ! @param[out] size the number of arguments ! @return whether the call was successful
clingo_theory_atoms_term_name
! Get the name of the given constant or function theory term. ! ! @note ! The lifetime of the string is tied to the current solve step. ! ! @pre The term must be of type ::clingo_theory_term_type_function or ::clingo_theory_term_type_symbol. ! @param[in] atoms container where the term is stored ! @param[in] term id of the term ! @param[out] name the resulting name ! @return whether the call was successful
clingo_theory_atoms_term_number
! Get the number of the given numeric theory term. ! ! @pre The term must be of type ::clingo_theory_term_type_number. ! @param[in] atoms container where the term is stored ! @param[in] term id of the term ! @param[out] number the resulting number ! @return whether the call was successful
clingo_theory_atoms_term_to_string
! Get the string representation of the given theory term. ! ! @param[in] atoms container where the term is stored ! @param[in] term id of the term ! @param[out] string the resulting string ! @param[in] size the size of the string ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime if the size is too small ! - ::clingo_error_bad_alloc ! ! @see clingo_theory_atoms_term_to_string_size()
clingo_theory_atoms_term_to_string_size
! Get the size of the string representation of the given theory term (including the terminating 0). ! ! @param[in] atoms container where the term is stored ! @param[in] term id of the term ! @param[out] size the resulting size ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc
clingo_theory_atoms_term_type
! Get the type of the given theory term. ! ! @param[in] atoms container where the term is stored ! @param[in] term id of the term ! @param[out] type the resulting type ! @return whether the call was successful
clingo_version
! Obtain the clingo version. ! ! @param[out] major major version number ! @param[out] minor minor version number ! @param[out] revision revision number
clingo_warning_string
! Convert warning code into string.

Type Aliases§

__blkcnt64_t
__blkcnt_t
__blksize_t
__caddr_t
__clock_t
__clockid_t
__daddr_t
__dev_t
__fsblkcnt64_t
__fsblkcnt_t
__fsfilcnt64_t
__fsfilcnt_t
__fsword_t
__gid_t
__id_t
__ino64_t
__ino_t
__int8_t
__int16_t
__int32_t
__int64_t
__int_least8_t
__int_least16_t
__int_least32_t
__int_least64_t
__intmax_t
__intptr_t
__key_t
__loff_t
__mode_t
__nlink_t
__off64_t
__off_t
__pid_t
__quad_t
__rlim64_t
__rlim_t
__sig_atomic_t
__socklen_t
__ssize_t
__suseconds64_t
__suseconds_t
__syscall_slong_t
__syscall_ulong_t
__time_t
__timer_t
__u_char
__u_int
__u_long
__u_quad_t
__u_short
__uid_t
__uint8_t
__uint16_t
__uint32_t
__uint64_t
__uint_least8_t
__uint_least16_t
__uint_least32_t
__uint_least64_t
__uintmax_t
__useconds_t
clingo_application_t
! This struct contains a set of functions to customize the clingo application.
clingo_assignment_t
! Represents a (partial) assignment of a particular solver. ! ! An assignment assigns truth values to a set of literals. ! A literal is assigned to either @link clingo_assignment_truth_value() true or false, or is unassigned@endlink. ! Furthermore, each assigned literal is associated with a @link clingo_assignment_level() decision level@endlink. ! There is exactly one @link clingo_assignment_decision() decision literal@endlink for each decision level greater than zero. ! Assignments to all other literals on the same level are consequences implied by the current and possibly previous decisions. ! Assignments on level zero are immediate consequences of the current program. ! Decision levels are consecutive numbers starting with zero up to and including the @link clingo_assignment_decision_level() current decision level@endlink.
clingo_ast_aggregate_function_e
! Enumeration of aggregate functions.
clingo_ast_aggregate_function_t
! Corresponding type to ::clingo_ast_aggregate_function_e.
clingo_ast_argument_t
! Struct to define an argument that consists of a name and a type.
clingo_ast_attribute_e
! Enumeration of attributes used by the AST.
clingo_ast_attribute_names_t
! Struct to map attributes to their string representation.
clingo_ast_attribute_t
! Corresponding type to ::clingo_ast_attribute_e.
clingo_ast_attribute_type_e
! Enumeration of attributes types used by the AST.
clingo_ast_attribute_type_t
! Corresponding type to ::clingo_ast_attribute_type.
clingo_ast_binary_operator_e
! Enumeration of binary operators.
clingo_ast_binary_operator_t
! Corresponding type to ::clingo_ast_binary_operator_e.
clingo_ast_callback_t
! Callback function to intercept AST nodes. ! ! @param[in] ast the AST ! @param[in] data a user data pointer ! @return whether the call was successful
clingo_ast_comparison_operator_e
! Enumeration of comparison relations.
clingo_ast_comparison_operator_t
! Corresponding type to ::clingo_ast_comparison_operator_e.
clingo_ast_constructor_t
! A lists of required attributes to construct an AST.
clingo_ast_constructors_t
! Struct to map AST types to lists of required attributes to construct ASTs.
clingo_ast_sign_e
! Enumeration of signs.
clingo_ast_sign_t
! Corresponding type to ::clingo_ast_sign_t.
clingo_ast_t
! This struct provides a view to nodes in the AST.
clingo_ast_theory_atom_definition_type_e
! Enumeration of the theory atom types.
clingo_ast_theory_atom_definition_type_t
! Corresponding type to ::clingo_ast_theory_atom_definition_type_e.
clingo_ast_theory_operator_type_e
! Enumeration of theory operators.
clingo_ast_theory_operator_type_t
! Corresponding type to ::clingo_ast_theory_operator_type_e.
clingo_ast_theory_sequence_type_e
! Enumeration of theory sequence types. ! ! Same as clingo_theory_sequence_type_e but kept for backward compatibility.
clingo_ast_theory_sequence_type_t
! Corresponding type to ::clingo_ast_theory_sequence_type_e.
clingo_ast_type_e
! Enumeration of AST types.
clingo_ast_type_t
! Corresponding type to ::clingo_ast_type_e.
clingo_ast_unary_operator_e
! Enumeration of unary operators.
clingo_ast_unary_operator_t
! Corresponding type to ::clingo_ast_unary_operator_e.
clingo_ast_unpool_type_bitset_t
! Corresponding type to ::clingo_ast_unpool_type_e.
clingo_ast_unpool_type_e
! Enum to configure unpooling.
clingo_atom_t
! Unsigned integer type used for aspif atoms.
clingo_backend_t
! Handle to the backend to add directives in aspif format.
clingo_clause_type_e
! Enumeration of clause types determining the lifetime of a clause. ! ! Clauses in the solver are either cleaned up based on a configurable deletion policy or at the end of a solving step. ! The values of this enumeration determine if a clause is subject to one of the above deletion strategies.
clingo_clause_type_t
! Corresponding type to ::clingo_clause_type_e.
clingo_configuration_t
! Handle for to the solver configuration.
clingo_configuration_type_bitset_t
! Bitset for values of type ::clingo_configuration_type_e.
clingo_configuration_type_e
! Enumeration for entries of the configuration.
clingo_control_t
! Control object holding grounding and solving state.
clingo_default_model_printer_t
! Callback to print a model in default format. ! ! @param[in] data user data for the callback ! ! @return whether the call was successful
clingo_error_e
! Enumeration of error codes. ! ! @note Errors can only be recovered from if explicitly mentioned; most ! functions do not provide strong exception guarantees. This means that in ! case of errors associated objects cannot be used further. If such an ! object has a free function, this function can and should still be called.
clingo_error_t
! Corresponding type to ::clingo_error_e.
clingo_external_type_e
! Enumeration of different external statements. ! @ingroup ProgramInspection
clingo_external_type_t
! Corresponding type to ::clingo_external_type_e. ! @ingroup ProgramInspection
clingo_ground_callback_t
! Callback function to implement external functions. ! ! If an external function of form @name(parameters) occurs in a logic program, ! then this function is called with its location, name, parameters, and a callback to inject symbols as arguments. ! The callback can be called multiple times; all symbols passed are injected. ! ! If a (non-recoverable) clingo API function fails in this callback, for example, the symbol callback, the callback must return false. ! In case of errors not related to clingo, this function can set error ::clingo_error_unknown and return false to stop grounding with an error. ! ! @param[in] location location from which the external function was called ! @param[in] name name of the called external function ! @param[in] arguments arguments of the called external function ! @param[in] arguments_size number of arguments ! @param[in] data user data of the callback ! @param[in] symbol_callback function to inject symbols ! @param[in] symbol_callback_data user data for the symbol callback ! (must be passed untouched) ! @return whether the call was successful ! @see clingo_control_ground() ! ! The following example implements the external function @f() returning 42. ! ~~~~~~~~~~~~~~~{.c} ! bool ! ground_callback(clingo_location_t const *location, ! char const *name, ! clingo_symbol_t const *arguments, ! size_t arguments_size, ! void *data, ! clingo_symbol_callback_t symbol_callback, ! void *symbol_callback_data) { ! if (strcmp(name, “f”) == 0 && arguments_size == 0) { ! clingo_symbol_t sym; ! clingo_symbol_create_number(42, &sym); ! return symbol_callback(&sym, 1, symbol_callback_data); ! } ! clingo_set_error(clingo_error_runtime, “function not found”); ! return false; ! } ! ~~~~~~~~~~~~~~~
clingo_ground_program_observer_t
! An instance of this struct has to be registered with a solver to observe ground directives as they are passed to the solver. ! ! @note This interface is closely modeled after the aspif format. ! For more information please refer to the specification of the aspif format. ! ! Not all callbacks have to be implemented and can be set to NULL if not needed. ! If one of the callbacks in the struct fails, grounding is stopped. ! If a non-recoverable clingo API call fails, a callback must return false. ! Otherwise ::clingo_error_unknown should be set and false returned. ! ! @see clingo_control_register_observer()
clingo_heuristic_type_e
! Enumeration of different heuristic modifiers. ! @ingroup ProgramInspection
clingo_heuristic_type_t
! Corresponding type to ::clingo_heuristic_type_e. ! @ingroup ProgramInspection
clingo_id_t
! Unsigned integer type used in various places.
clingo_literal_t
! Signed integer type used for aspif and solver literals.
clingo_location_t
! Represents a source code location marking its beginnig and end. ! ! @note Not all locations refer to physical files. ! By convention, such locations use a name put in angular brackets as filename. ! The string members of a location object are internalized and valid for the duration of the process.
clingo_logger_t
! Callback to intercept warning messages. ! ! @param[in] code associated warning code ! @param[in] message warning message ! @param[in] data user data for callback ! ! @see clingo_control_new() ! @see clingo_parse_term() ! @see clingo_parse_program()
clingo_main_function_t
! Callback to customize clingo main function. ! ! @param[in] control corresponding control object ! @param[in] files files passed via command line arguments ! @param[in] size number of files ! @param[in] data user data for the callback ! ! @return whether the call was successful
clingo_model_printer_t
! Callback to customize model printing. ! ! @param[in] model the model ! @param[in] printer the default model printer ! @param[in] printer_data user data for the printer ! @param[in] data user data for the callback ! ! @return whether the call was successful
clingo_model_t
! Object representing a model.
clingo_model_type_e
! Enumeration for the different model types.
clingo_model_type_t
! Corresponding type to ::clingo_model_type_e.
clingo_options_t
! Object to add command-line options.
clingo_part_t
! Struct used to specify the program parts that have to be grounded. ! ! Programs may be structured into parts, which can be grounded independently with ::clingo_control_ground. ! Program parts are mainly interesting for incremental grounding and multi-shot solving. ! For single-shot solving, program parts are not needed. ! ! @note Parts of a logic program without an explicit #program ! specification are by default put into a program called base without ! arguments. ! ! @see clingo_control_ground()
clingo_program_builder_t
! Object to build non-ground programs.
clingo_propagate_control_t
! This object can be used to add clauses and propagate literals while solving.
clingo_propagate_init_t
! Object to initialize a user-defined propagator before each solving step. ! ! Each @link SymbolicAtoms symbolic@endlink or @link TheoryAtoms theory atom@endlink is uniquely associated with an aspif atom in form of a positive integer (@ref ::clingo_literal_t). ! Aspif literals additionally are signed to represent default negation. ! Furthermore, there are non-zero integer solver literals (also represented using @ref ::clingo_literal_t). ! There is a surjective mapping from program atoms to solver literals. ! ! All methods called during propagation use solver literals whereas clingo_symbolic_atoms_literal() and clingo_theory_atoms_atom_literal() return program literals. ! The function clingo_propagate_init_solver_literal() can be used to map program literals or @link clingo_theory_atoms_element_condition_id() condition ids@endlink to solver literals.
clingo_propagator_check_callback_t
! Typedef for @ref ::clingo_propagator::check().
clingo_propagator_check_mode_e
! Supported check modes for propagators. ! ! Note that total checks are subject to the lock when a model is found. ! This means that information from previously found models can be used to discard assignments in check calls.
clingo_propagator_check_mode_t
! Corresponding type to ::clingo_propagator_check_mode_e.
clingo_propagator_init_callback_t
! Typedef for @ref ::clingo_propagator::init().
clingo_propagator_propagate_callback_t
! Typedef for @ref ::clingo_propagator::propagate().
clingo_propagator_t
! An instance of this struct has to be registered with a solver to implement a custom propagator. ! ! Not all callbacks have to be implemented and can be set to NULL if not needed. ! @see Propagator
clingo_propagator_undo_callback_t
! Typedef for @ref ::clingo_propagator::undo().
clingo_script_t
! Custom scripting language to run functions during grounding.
clingo_show_type_bitset_t
! Corresponding type to ::clingo_show_type_e.
clingo_show_type_e
! Enumeration of bit flags to select symbols in models.
clingo_signature_t
! Represents a predicate signature. ! ! Signatures have a name and an arity, and can be positive or negative (to ! represent classical negation).
clingo_solve_control_t
! Object to add clauses during search.
clingo_solve_event_callback_t
! Callback function called during search to notify when the search is finished or a model is ready. ! ! If a (non-recoverable) clingo API function fails in this callback, it must return false. ! In case of errors not related to clingo, set error code ::clingo_error_unknown and return false to stop solving with an error. ! ! The event is either a pointer to a model, a pointer to an int64_t* and a size_t, a pointer to two statistics objects (per step and accumulated statistics), or a solve result. ! @attention If the search is finished, the model is NULL. ! ! @param[in] event the current event. ! @param[in] data user data of the callback ! @param[out] goon can be set to false to stop solving ! @return whether the call was successful ! ! @see clingo_control_solve()
clingo_solve_event_type_e
! Enumeration of solve events.
clingo_solve_event_type_t
! Corresponding type to ::clingo_solve_event_type_e.
clingo_solve_handle_t
! Search handle to a solve call. ! ! @see clingo_control_solve()
clingo_solve_mode_bitset_t
! Corresponding type to ::clingo_solve_mode_e.
clingo_solve_mode_e
! Enumeration of solve modes.
clingo_solve_result_bitset_t
clingo_solve_result_e
clingo_statistics_t
! Handle for the solver statistics.
clingo_statistics_type_e
! Enumeration for entries of the statistics.
clingo_statistics_type_t
! Corresponding type to ::clingo_statistics_type.
clingo_symbol_callback_t
! Callback function to inject symbols. ! ! @param symbols array of symbols ! @param symbols_size size of the symbol array ! @param data user data of the callback ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc ! @see ::clingo_ground_callback_t
clingo_symbol_t
! Represents a symbol. ! ! This includes numbers, strings, functions (including constants when ! arguments are empty and tuples when the name is empty), #inf and #sup.
clingo_symbol_type_e
! Enumeration of available symbol types.
clingo_symbol_type_t
! Corresponding type to ::clingo_symbol_type.
clingo_symbolic_atom_iterator_t
! Object to iterate over symbolic atoms. ! ! Such an iterator either points to a symbolic atom within a sequence of ! symbolic atoms or to the end of the sequence. ! ! @note Iterators are valid as long as the underlying sequence is not modified. ! Operations that can change this sequence are ::clingo_control_ground(), ! ::clingo_control_cleanup(), and functions that modify the underlying ! non-ground program.
clingo_symbolic_atoms_t
! Object to inspect symbolic atoms in a program—the relevant Herbrand base ! gringo uses to instantiate programs. ! ! @see clingo_control_symbolic_atoms()
clingo_theory_atoms_t
! Container that stores theory atoms, elements, and terms (see @ref clingo_control_theory_atoms()).
clingo_theory_sequence_type_e
! Enumeration of theory sequence types.
clingo_theory_sequence_type_t
! Corresponding type to ::clingo_theory_sequence_type_e.
clingo_theory_term_type_e
! Enumeration of theory term types.
clingo_theory_term_type_t
! Corresponding type to ::clingo_theory_term_type_e.
clingo_truth_value_e
! Represents three-valued truth values.
clingo_truth_value_t
! Corresponding type to ::clingo_truth_value_e.
clingo_warning_e
! Enumeration of warning codes.
clingo_warning_t
! Corresponding type to ::clingo_warning_e.
clingo_weight_constraint_type_e
! Enumeration of weight_constraint_types.
clingo_weight_constraint_type_t
! Corresponding type to ::clingo_weight_constraint_type_e.
clingo_weight_t
! Signed integer type for weights in sum aggregates and minimize constraints.
clingo_weighted_literal_t
! A Literal with an associated weight.
int_fast8_t
int_fast16_t
int_fast32_t
int_fast64_t
int_least8_t
int_least16_t
int_least32_t
int_least64_t
intmax_t
uint_fast8_t
uint_fast16_t
uint_fast32_t
uint_fast64_t
uint_least8_t
uint_least16_t
uint_least32_t
uint_least64_t
uintmax_t
wchar_t