[−][src]Crate clingo_sys
Structs
__fsid_t | |
clingo_application | ! This struct contains a set of functions to customize the clingo application. |
clingo_assignment | |
clingo_ast_aggregate | |
clingo_ast_aggregate_guard | |
clingo_ast_binary_operation | |
clingo_ast_body_aggregate | |
clingo_ast_body_aggregate_element | |
clingo_ast_body_literal | |
clingo_ast_comparison | |
clingo_ast_conditional_literal | |
clingo_ast_csp_guard | |
clingo_ast_csp_literal | |
clingo_ast_csp_product_term | |
clingo_ast_csp_sum_term | |
clingo_ast_defined | |
clingo_ast_definition | |
clingo_ast_disjoint | |
clingo_ast_disjoint_element | |
clingo_ast_disjunction | |
clingo_ast_edge | |
clingo_ast_external | |
clingo_ast_function | |
clingo_ast_head_aggregate | |
clingo_ast_head_aggregate_element | |
clingo_ast_head_literal | |
clingo_ast_heuristic | |
clingo_ast_id | |
clingo_ast_interval | |
clingo_ast_literal | |
clingo_ast_minimize | |
clingo_ast_pool | |
clingo_ast_program | |
clingo_ast_project | |
clingo_ast_rule | |
clingo_ast_script | |
clingo_ast_show_signature | |
clingo_ast_show_term | |
clingo_ast_statement | |
clingo_ast_term | |
clingo_ast_theory_atom | |
clingo_ast_theory_atom_definition | |
clingo_ast_theory_atom_element | |
clingo_ast_theory_definition | |
clingo_ast_theory_function | |
clingo_ast_theory_guard | |
clingo_ast_theory_guard_definition | |
clingo_ast_theory_operator_definition | |
clingo_ast_theory_term | |
clingo_ast_theory_term_array | |
clingo_ast_theory_term_definition | |
clingo_ast_theory_unparsed_term | |
clingo_ast_theory_unparsed_term_element | |
clingo_ast_unary_operation | |
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. |
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 |
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_solve_control | |
clingo_solve_handle | |
clingo_statistic | |
clingo_symbolic_atoms | |
clingo_theory_atoms | |
clingo_weighted_literal | ! A Literal with an associated weight. ! @ingroup ProgramInspection |
Constants
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. All strings ! returned from clingo API functions are internalized and must not be freed. ! ! @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_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 assignmen is total, i.e. - size == max_size. ! ! @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_max_size⚠ | ! The maximum size of the assignment (if all literals are assigned). ! ! @param[in] assignment the target ! @return the maximum size |
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 assigned literals in the assignment. ! ! @param[in] assignment the target ! @return the number of literals |
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_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_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 |
clingo_control_cleanup⚠ | ! Clean up the domains of clingo's grounding component using the solving ! component's top level assignment. ! ! This function removes atoms from domains that are false and marks atoms as ! facts that are true. With multi-shot solving, this can result in smaller ! groundings because less rules have to be instantiated and more ! simplifications can be applied. ! ! @param[in] control the target ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_bad_alloc |
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_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 |
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 |
clingo_control_program_builder⚠ | ! 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_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_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. ! ! @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_control_use_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_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_program⚠ | ! Parse the given program and return an abstract syntax tree for each statement via a callback. ! ! @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] 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_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 builder the target program builder ! @param statement the statement to add ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime for statements of invalid form ! - ::clingo_error_bad_alloc |
clingo_program_builder_begin⚠ | ! Begin building a program. ! ! @param builder the target program builder ! @return whether the call was successful |
clingo_program_builder_end⚠ | ! End building a program. ! ! @param builder the target program builder ! @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. ! ! This method sets its result to false if the clause is causing a conflict. ! ! @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 clause is conflicting ! @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_assignment⚠ | ! Get the top level assignment solver. ! ! @param[in] init the target ! @return the assignment |
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_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_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. ! ! @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_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. ! ! @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. ! ! @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. ! ! @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. ! ! @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 Definitions
__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 | |
__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 | |
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 | |
clingo_ast_aggregate_function_t | |
clingo_ast_aggregate_guard_t | |
clingo_ast_aggregate_t | |
clingo_ast_binary_operation_t | |
clingo_ast_binary_operator | |
clingo_ast_binary_operator_t | |
clingo_ast_body_aggregate_element_t | |
clingo_ast_body_aggregate_t | |
clingo_ast_body_literal_t | |
clingo_ast_body_literal_type | |
clingo_ast_body_literal_type_t | |
clingo_ast_callback_t | |
clingo_ast_comparison_operator | ! @addtogroup AST ! @{ |
clingo_ast_comparison_operator_t | |
clingo_ast_comparison_t | |
clingo_ast_conditional_literal_t | |
clingo_ast_csp_guard_t | |
clingo_ast_csp_literal_t | |
clingo_ast_csp_product_term_t | |
clingo_ast_csp_sum_term_t | |
clingo_ast_defined_t | |
clingo_ast_definition_t | |
clingo_ast_disjoint_element_t | |
clingo_ast_disjoint_t | |
clingo_ast_disjunction_t | |
clingo_ast_edge_t | |
clingo_ast_external_t | |
clingo_ast_function_t | |
clingo_ast_head_aggregate_element_t | |
clingo_ast_head_aggregate_t | |
clingo_ast_head_literal_t | |
clingo_ast_head_literal_type | |
clingo_ast_head_literal_type_t | |
clingo_ast_heuristic_t | |
clingo_ast_id_t | |
clingo_ast_interval_t | |
clingo_ast_literal_t | |
clingo_ast_literal_type | |
clingo_ast_literal_type_t | |
clingo_ast_minimize_t | |
clingo_ast_pool_t | |
clingo_ast_program_t | |
clingo_ast_project_t | |
clingo_ast_rule_t | |
clingo_ast_script_t | |
clingo_ast_script_type | |
clingo_ast_script_type_t | |
clingo_ast_show_signature_t | |
clingo_ast_show_term_t | |
clingo_ast_sign | |
clingo_ast_sign_t | |
clingo_ast_statement_t | |
clingo_ast_statement_type | |
clingo_ast_statement_type_t | |
clingo_ast_term_t | |
clingo_ast_term_type | |
clingo_ast_term_type_t | |
clingo_ast_theory_atom_definition_t | |
clingo_ast_theory_atom_definition_type | |
clingo_ast_theory_atom_definition_type_t | |
clingo_ast_theory_atom_element_t | |
clingo_ast_theory_atom_t | |
clingo_ast_theory_definition_t | |
clingo_ast_theory_function_t | |
clingo_ast_theory_guard_definition_t | |
clingo_ast_theory_guard_t | |
clingo_ast_theory_operator_definition_t | |
clingo_ast_theory_operator_type | |
clingo_ast_theory_operator_type_t | |
clingo_ast_theory_term_array_t | |
clingo_ast_theory_term_definition_t | |
clingo_ast_theory_term_t | |
clingo_ast_theory_term_type | |
clingo_ast_theory_term_type_t | |
clingo_ast_theory_unparsed_term_element_t | |
clingo_ast_theory_unparsed_term_t | |
clingo_ast_unary_operation_t | |
clingo_ast_unary_operator | |
clingo_ast_unary_operator_t | |
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 | ! 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. |
clingo_configuration_t | ! Handle for to the solver configuration. |
clingo_configuration_type | ! Enumeration for entries of the configuration. |
clingo_configuration_type_bitset_t | ! Bitset for values of type ::clingo_configuration_type. |
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 | ! 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. |
clingo_external_type | ! Enumeration of different external statements. ! @ingroup ProgramInspection |
clingo_external_type_t | ! Corresponding type to ::clingo_external_type. ! @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 | |
clingo_heuristic_type | ! Enumeration of different heuristic modifiers. ! @ingroup ProgramInspection |
clingo_heuristic_type_t | ! Corresponding type to ::clingo_heuristic_type. ! @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 | |
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 | ! Enumeration for the different model types. |
clingo_model_type_t | ! Corresponding type to ::clingo_model_type. |
clingo_options_t | ! Object to add command-line options. |
clingo_part_t | |
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 | ! Supported check modes for propagators. |
clingo_propagator_check_mode_t | ! Corresponding type to ::clingo_propagator_check_mode. |
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 | |
clingo_propagator_undo_callback_t | ! Typedef for @ref ::clingo_propagator::undo(). |
clingo_show_type | ! Enumeration of bit flags to select symbols in models. |
clingo_show_type_bitset_t | ! Corresponding type to ::clingo_show_type. |
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 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 | ! Enumeration of solve events. |
clingo_solve_event_type_t | ! Corresponding type to ::clingo_solve_event_type. |
clingo_solve_handle_t | ! Search handle to a solve call. ! ! @see clingo_control_solve() |
clingo_solve_mode | ! Enumeration of solve modes. |
clingo_solve_mode_bitset_t | ! Corresponding type to ::clingo_solve_mode. |
clingo_solve_result | |
clingo_solve_result_bitset_t | |
clingo_statistics_t | ! Handle for the solver statistics. |
clingo_statistics_type | ! 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 | ! 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_term_type | ! Enumeration of theory term types. |
clingo_theory_term_type_t | ! Corresponding type to ::clingo_theory_term_type. |
clingo_truth_value | ! Represents three-valued truth values. |
clingo_truth_value_t | ! Corresponding type to ::clingo_truth_value. |
clingo_warning | ! Enumeration of warning codes. |
clingo_warning_t | ! Corresponding type to ::clingo_warning. |
clingo_weight_t | ! Signed integer type for weights in sum aggregates and minimize constraints. |
clingo_weighted_literal_t | |
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 |