Clingo
Loading...
Searching...
No Matches

Data structures and functions to represent bases for atoms, aggregate atoms, and similar. More...

Classes

struct  CppClingo::Ground::AtomInfo
 Capture the state of an atom. More...
 
class  CppClingo::Ground::GenerationCounts
 Helper class to manage generation counts. More...
 
class  CppClingo::Ground::BaseContext
 A context object. More...
 
class  CppClingo::Ground::BaseImpl< KeyType, BaseType >
 The base implementation of an atom base. More...
 
class  CppClingo::Ground::AtomBase
 An atom base used to store derivable atoms and associated state. More...
 
class  CppClingo::Ground::ProjectState
 The state capturing the base of a projection. More...
 
class  CppClingo::Ground::Bases
 The base for all atoms and terms. More...
 
class  CppClingo::Ground::State
 Class to store state for grounding. More...
 

Typedefs

using CppClingo::Ground::VariableSet = Util::ordered_set< size_t >
 A set of variables.
 
using CppClingo::Ground::VariableVec = VariableSet::values_container_type
 A vector of variables.
 
using CppClingo::Ground::SymbolicAtom = std::pair< Symbol, AtomInfo >
 An atom consisting of a symbol and its (mutable) state.
 
using CppClingo::Ground::UAtomBase = std::unique_ptr< AtomBase >
 A unique pointer holding a base.
 
using CppClingo::Ground::UProjectState = std::unique_ptr< ProjectState >
 Unique pointer for ProjectState.
 
using CppClingo::Ground::ProjectMap = Util::ordered_map< Ground::UTerm, UProjectState >
 A map from a terms with projections associated state used during grounding.
 
using CppClingo::Ground::BaseMap = Util::ordered_map< std::tuple< String, size_t, bool >, UAtomBase >
 A map from signatures to atom bases.
 
using CppClingo::Ground::UState = std::unique_ptr< State >
 A unique pointer to a state.
 
using CppClingo::Ground::UStateVec = std::vector< UState >
 A vector of states.
 

Enumerations

enum class  CppClingo::Ground::StateAtom : uint64_t { StateAtom::fact = 0 , StateAtom::derived = 1 , StateAtom::unknown = 2 }
 Enumeration to capture the state of an atom. More...
 
enum class  CppClingo::Ground::AtomUpdate : uint8_t { AtomUpdate::added = 0 , AtomUpdate::changed = 1 , AtomUpdate::unchanged = 2 }
 Enumeration indicating state updates of atoms. More...
 

Detailed Description

Data structures and functions to represent bases for atoms, aggregate atoms, and similar.

Typedef Documentation

◆ ProjectMap

A map from a terms with projections associated state used during grounding.

The terms represent a class of similar terms that can reuse the same projection state.

Enumeration Type Documentation

◆ AtomUpdate

enum class CppClingo::Ground::AtomUpdate : uint8_t
strong

Enumeration indicating state updates of atoms.

Enumerator
added 

A freshly added atom.

changed 

An update atom.

unchanged 

An atom whose state did not change.

◆ StateAtom

enum class CppClingo::Ground::StateAtom : uint64_t
strong

Enumeration to capture the state of an atom.

Enumerator
fact 

Indicates that the atom is derived by a fact.

derived 

Indicates that the atom is derived by some rule but not a fact.

unknown 

Indicates that the atom has not yet been derived by a rule.

At the time rule (1) is grounded, atom x is not yet defined.
Once (2) has been grounded, there is a definition for it.

  a :- not x. (1)
  x :- a.     (2)

The flag indicates atoms that have neither been derived by facts, rules, or externals.