Clingo
Loading...
Searching...
No Matches
Grounding and Solving

Functions to control the grounding and solving process. More...

Modules

 Atom, Term, and Theory Base Inspection
 Inspection of atoms occurring in ground logic programs.
 
 Ground Program Inspection
 Functions and data structures to inspect ground programs.
 
 Ground Program Extension
 Extend the logic program with ground statements (in aspif-like format).
 
 Solving
 Intercept models and interact with a running search.
 
 Solver Configuration
 Configuration of search and enumeration algorithms.
 
 Statistics
 Inspect search and problem stats.
 
 Theory Propagation
 Extend the search with propagators for arbitrary theories.
 

Classes

struct  Clingo::Part
 A program part to provide inputs to program directives. More...
 
class  Clingo::ConstMap
 Class to providing a view on the const directives in a logic program. More...
 
class  Clingo::Control
 The main control class for grounding and solving logic programs. More...
 

Typedefs

using Clingo::PartSpan = std::span< Part const >
 A span of program parts.
 
using Clingo::PartList = std::initializer_list< Part >
 An initializer list of program parts.
 
using Clingo::PartVector = std::vector< Part >
 A vector of program parts.
 

Enumerations

enum class  Clingo::ControlMode : clingo_mode_t { ControlMode::parse = clingo_mode_parse , ControlMode::rewrite = clingo_mode_rewrite , ControlMode::ground = clingo_mode_ground , ControlMode::solve = clingo_mode_solve }
 Enumeration of the control modes. More...
 
enum class  Clingo::WriteAspifFlags : clingo_write_aspif_mode_t {
  WriteAspifFlags::none = 0 , WriteAspifFlags::preamble = clingo_write_aspif_mode_preamble , WriteAspifFlags::preamble_auto = clingo_write_aspif_mode_preamble_auto , WriteAspifFlags::append = clingo_write_aspif_mode_append ,
  WriteAspifFlags::preprocess = clingo_write_aspif_mode_preprocess , WriteAspifFlags::symbols = clingo_write_aspif_mode_symbols
}
 Enumeration of the flags for writing ASPIF files. More...
 
enum class  Clingo::SolveFlags : clingo_solve_mode_bitset_t { SolveFlags::empty = 0 , SolveFlags::yield = clingo_solve_mode_yield , SolveFlags::async = clingo_solve_mode_async }
 Enumeration of the flags for solving a logic program. More...
 
enum class  Clingo::DiscardType { DiscardType::minimize = clingo_discard_type_e::minimize , DiscardType::project = clingo_discard_type_e::project }
 Enumeration of the types of statements that can be discarded. More...
 

Functions

 Clingo::CLINGO_ENABLE_BITSET_ENUM (WriteAspifFlags)
 Enable bitset operations for the WriteAspifFlags enumeration.
 
 Clingo::CLINGO_ENABLE_BITSET_ENUM (SolveFlags)
 Enable bitset operations for the SolveFlags enumeration.
 

Detailed Description

Functions to control the grounding and solving process.

Enumeration Type Documentation

◆ ControlMode

Enumeration of the control modes.

This controls how the main function of the control object proceeds.

Enumerator
parse 

Parse only.

rewrite 

Parse and rewrite.

ground 

Parse, rewrite, ground.

solve 

Parse, rewrite, ground, and solve.

◆ DiscardType

Enumeration of the types of statements that can be discarded.

Enumerator
minimize 

Discard minimize statements.

project 

Discard project statements.

◆ SolveFlags

Enumeration of the flags for solving a logic program.

Enumerator
empty 

Standard event-based solving.

yield 

Yield models as they are found.

async 

Asynchronously solve in the background.

◆ WriteAspifFlags

Enumeration of the flags for writing ASPIF files.

Enumerator
none 

No flags.

preamble 

Write preamble.

preamble_auto 

Write preamble for newly created files.

append 

Append to an existing file (or create it).

preprocess 

Whether to preprocess the program before writing.

symbols 

Whether to write symbols in a structured format.