Clingo
Loading...
Searching...
No Matches
evaluate.hh
1#include <clingo/input/program.hh>
2
3#include <clingo/core/logger.hh>
4
5#include <clingo/util/unordered_map.hh>
6
7namespace CppClingo::Input {
8
11
13[[nodiscard]] auto evaluate(SymbolStore &store, UnaryOperator op, Symbol rhs) -> std::optional<Symbol>;
15[[nodiscard]] auto evaluate(SymbolStore &store, Symbol lhs, BinaryOperator op, Symbol rhs) -> std::optional<Symbol>;
19[[nodiscard]] auto evaluate(Logger &log, SymbolStore &store, ConstMap const &map, Term const &term)
20 -> std::optional<Symbol>;
21
25void evaluate_const(Logger &log, SymbolStore &store, std::vector<StmConst> const &stms, ConstMap &res);
26
28
29} // namespace CppClingo::Input
Simple logger to report message to stderr or via a callback.
Definition logger.hh:63
A store for symbols.
Definition symbol.hh:454
Variant-like class to store symbols stored in a symbol store.
Definition symbol.hh:225
auto evaluate(SymbolStore &store, UnaryOperator op, Symbol rhs) -> std::optional< Symbol >
Evaluate the unary operator.
void 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.
Util::ordered_map< SharedString, std::pair< StmConst, SharedSymbol > > ConstMap
Map from identifiers to constants.
Definition program.hh:34
std::variant< TermVariable, TermSymbol, TermTuple, TermFunction, TermAbs, TermUnary, TermBinary > Term
Variant holding the different term types.
Definition term.hh:45
BinaryOperator
Enumeration of available binary operators.
Definition term.hh:258
UnaryOperator
Enumeration of available unary operators.
Definition term.hh:226