Clingo
Loading...
Searching...
No Matches

Functions to evaluate expressions. More...

Functions

auto CppClingo::Input::evaluate (SymbolStore &store, UnaryOperator op, Symbol rhs) -> std::optional< Symbol >
 Evaluate the unary operator.
 
auto CppClingo::Input::evaluate (SymbolStore &store, Symbol lhs, BinaryOperator op, Symbol rhs) -> std::optional< Symbol >
 Evaluate the binary operator.
 
auto CppClingo::Input::evaluate (Logger &log, SymbolStore &store, ConstMap const &map, Term const &term) -> std::optional< Symbol >
 Evaluate the term.
 
void CppClingo::Input::evaluate_const (Logger &log, SymbolStore &store, std::vector< StmConst > const &stms, ConstMap &res)
 Evaluate the given const statements storing the result in the given map.
 

Detailed Description

Functions to evaluate expressions.

Function Documentation

◆ evaluate()

auto CppClingo::Input::evaluate ( Logger log,
SymbolStore store,
ConstMap const &  map,
Term const &  term 
) -> std::optional< Symbol >

Evaluate the term.

Note that this will fail if the term contains variables or external functions.

◆ evaluate_const()

void CppClingo::Input::evaluate_const ( Logger log,
SymbolStore store,
std::vector< StmConst > const &  stms,
ConstMap res 
)

Evaluate the given const statements storing the result in the given map.

Note that this will fail if the const statements contain variables or external functions.