3#include <clingo/core/symbol.hh>
5#include <clingo/util/algorithm.hh>
113 case AggregateFunction::count: {
114 throw std::invalid_argument(
"count function has no neutral value");
133 case AggregateFunction::count: {
134 throw std::invalid_argument(
"count function has no neutral value");
144 return sym.type() != SymbolType::sup;
147 return sym.type() != SymbolType::inf;
150 return sym.type() == SymbolType::number && sym.num() != 0;
153 return sym.type() == SymbolType::number && sym.num() > 0;
155 case AggregateFunction::count: {
172enum class HeuristicType : uint8_t { level = 0, sign = 1, factor = 2, init = 3, true_ = 4, false_ = 5 };
177enum class ExternalType : uint8_t { free = 0, true_ = 1, false_ = 2, release = 3 };
An arbitrary precision integer.
Definition number.hh:27
static auto inf() noexcept -> Symbol
Construct the supremum constant (#sup).
auto num_ref(Number num) noexcept -> Symbol
Construct a number (e.g., 42).
static auto sup() noexcept -> Symbol
Construct the infimum constant (#inf).
Variant-like class to store symbols stored in a symbol store.
Definition symbol.hh:225
Create an output buffer that bears some similarities with C++'s iostreams.
Definition print.hh:24
auto neutral_num(AggregateFunction fun) -> std::variant< Number, Symbol >
Get the neutral value or number for the given aggregate function.
Definition core.hh:121
auto complement(Relation rel) -> Relation
Return the complement of the given relation.
std::tuple< String, size_t > TheorySig
A signature of a theory atom.
Definition core.hh:182
auto evaluate(auto const &lhs, Relation rel, auto const &rhs) -> bool
Evaluate the comparison.
Definition core.hh:50
auto operator<<(std::ostream &out, Sign sign) -> std::ostream &
Output the given sign.
auto relevant_val(AggregateFunction fun, Symbol sym) -> bool
Check if the symbol is relevant for the given aggregate function.
Definition core.hh:141
TheoryTermTupleType
Enumeration of theory term tuple types.
Definition core.hh:165
HeuristicType
Available heuristic types.
Definition core.hh:172
auto flip(Relation rel) -> Relation
Return the equivalent relation when arguments are flipped.
Relation
Enumeration of supported relations.
Definition core.hh:35
auto neutral_val(AggregateFunction fun) -> Symbol
Get the neutral value for the given aggregate function.
Definition core.hh:101
ExternalType
Available external types.
Definition core.hh:177
Sign
Enumeration of signs (default negation).
Definition core.hh:16
auto operator+(Sign a, Sign b) -> Sign
Combine two signs.
auto operator+=(Sign &a, Sign b) -> Sign &
Combine two signs.
std::vector< TheorySig > TheorySigVec
A vector of theory atom signatures.
Definition core.hh:184
TruthValue
Truth values for expressions.
Definition core.hh:80
AggregateFunction
Enumeration of aggregate functions.
Definition core.hh:87
auto operator-(Sign a) -> Sign
Negate the sign.
@ equal
The equal to symbol (=).
@ greater_equal
The greater than or equal to symbol (>=).
@ less_equal
The less than or equal to symbol (<=).
@ greater
The greater than symbol (>).
@ not_equal
The not equal to symbol (!=).
@ less
The less than symbol (<).
@ twice
Two signs (not not).
@ unknown
Indicate an expression with an unknown truth value.
@ top
Indicate a true expression.
@ bot
Indicate a false expression.
@ sum
The #count function.
void unreachable()
C++23's std::unreachable.
Definition algorithm.hh:96