Clingo C API
C API for clingo providing high level functions to control grounding and solving.
Classes | Typedefs | Enumerations
Program Inspection

Detailed Description

Functions and data structures to inspect programs.

Classes

struct  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. More...
 

Typedefs

typedef int clingo_heuristic_type_t
 Corresponding type to clingo_heuristic_type_e.
 
typedef int clingo_external_type_t
 Corresponding type to clingo_external_type_e.
 
typedef struct clingo_ground_program_observer 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. More...
 

Enumerations

enum  clingo_heuristic_type_e {
  clingo_heuristic_type_level = 0, clingo_heuristic_type_sign = 1, clingo_heuristic_type_factor = 2, clingo_heuristic_type_init = 3,
  clingo_heuristic_type_true = 4, clingo_heuristic_type_false = 5
}
 Enumeration of different heuristic modifiers. More...
 
enum  clingo_external_type_e { clingo_external_type_free = 0, clingo_external_type_true = 1, clingo_external_type_false = 2, clingo_external_type_release = 3 }
 Enumeration of different external statements. More...
 

Typedef Documentation

◆ 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 also
clingo_control_register_observer()

Enumeration Type Documentation

◆ clingo_external_type_e

Enumeration of different external statements.

Enumerator
clingo_external_type_free 

allow an external to be assigned freely

clingo_external_type_true 

assign an external to true

clingo_external_type_false 

assign an external to false

clingo_external_type_release 

no longer treat an atom as external

◆ clingo_heuristic_type_e

Enumeration of different heuristic modifiers.

Enumerator
clingo_heuristic_type_level 

set the level of an atom

clingo_heuristic_type_sign 

configure which sign to chose for an atom

clingo_heuristic_type_factor 

modify VSIDS factor of an atom

clingo_heuristic_type_init 

modify the initial VSIDS score of an atom

clingo_heuristic_type_true 

set the level of an atom and choose a positive sign

clingo_heuristic_type_false 

set the level of an atom and choose a negative sign