Clingo
Loading...
Searching...
No Matches

Data structures and functions to ground terms. More...

Classes

class  CppClingo::Ground::Term
 Term interface. More...
 
class  CppClingo::Ground::TermProjection
 A term capturing a projection. More...
 
class  CppClingo::Ground::TermSymbol
 A term capturing a symbol. More...
 
class  CppClingo::Ground::TermVariable
 A term capturing a variable. More...
 
class  CppClingo::Ground::TermLinear
 A term capturing a linear term. More...
 
class  CppClingo::Ground::TermUnary
 A term capturing a unary term. More...
 
class  CppClingo::Ground::TermBinary
 A term capturing a binary term. More...
 
class  CppClingo::Ground::TermTuple
 A term capturing a tuple. More...
 
class  CppClingo::Ground::TermFunction
 A term capturing a tuple. More...
 

Typedefs

using CppClingo::Ground::UTerm = std::unique_ptr< Term >
 A unique pointer holding a term.
 
using CppClingo::Ground::UTermVec = std::vector< UTerm >
 A vector of terms.
 
using CppClingo::Ground::GuardVec = std::vector< std::pair< Relation, UTerm > >
 A vector of guards.
 

Enumerations

enum class  CppClingo::Ground::RenameMode : uint8_t { RenameMode::rename_vars , RenameMode::rename_projection , RenameMode::drop_projection }
 Modes determining how to handle variables in terms. More...
 
enum class  CppClingo::Ground::UnaryOperator : uint8_t { UnaryOperator::minus = 0 , UnaryOperator::negate = 1 , UnaryOperator::abs = 2 }
 Available unary operations. More...
 
enum class  CppClingo::Ground::BinaryOperator : uint8_t {
  BinaryOperator::and_ , BinaryOperator::div , BinaryOperator::minus , BinaryOperator::mod ,
  BinaryOperator::times , BinaryOperator::or_ , BinaryOperator::plus , BinaryOperator::pow ,
  BinaryOperator::xor_
}
 Available binary operations. More...
 

Functions

template<class T >
requires requires(T x) { { x.copy() } -> std::convertible_to<std::unique_ptr<T>>; }
auto CppClingo::Ground::copy_uvec (std::vector< std::unique_ptr< T > > const &vec)
 Helper to copy vectors with copyable elements.
 
template<class T >
requires requires(T x) { { x.copy() } -> std::convertible_to<std::unique_ptr<T>>; }
auto CppClingo::Ground::copy_uvec (std::vector< std::vector< std::unique_ptr< T > > > const &vec)
 Helper to copy vectors with copyable elements.
 
template<class... T>
auto CppClingo::Ground::expect (EvalContext const &ctx, Location const &loc, bool &logged, T &&...args) -> bool
 Helper to report a message only once.
 

Detailed Description

Data structures and functions to ground terms.

Enumeration Type Documentation

◆ BinaryOperator

enum class CppClingo::Ground::BinaryOperator : uint8_t
strong

Available binary operations.

Enumerator
and_ 

The AND bit operation.

div 

The (integer) divide arithmetic operation.

minus 

The minus arithmetic operation.

mod 

The modulo arithmetic operation.

times 

The multiply arithmetic operation.

or_ 

The OR bit operation.

plus 

The plus arithmetic operation.

pow 

The exponentiation arithmetic operation.

xor_ 

The XOR bit operation.

◆ RenameMode

enum class CppClingo::Ground::RenameMode : uint8_t
strong

Modes determining how to handle variables in terms.

Enumerator
rename_vars 

Successively rename variables in order of traversal.

rename_projection 

Successively introduce variables for projections in order of traversal.

drop_projection 

Drop projections from tuples and functions.

◆ UnaryOperator

enum class CppClingo::Ground::UnaryOperator : uint8_t
strong

Available unary operations.

Enumerator
minus 

The unary arithmetic minus operation.

negate 

The bitwise negation operation.

abs 

The arithmetic absolute operation.