7 #include <boost/spirit/include/qi_symbols.hpp>
12 namespace qi = boost::spirit::qi;
46 errors.
next() <<
"Variable declaration is not supported.";
54 errors.
next() <<
"Custom symbols are not supported.";
61 errors.
next() <<
"ITEs are not supported.";
68 errors.
next() <<
"Distinct is not supported.";
71 template<
typename T,
typename Builder>
74 for (std::size_t i = 0; i < values.size() - 1; i++) {
75 for (std::size_t j = i + 1; j < values.size(); j++) {
76 subformulas.emplace_back(neqBuilder(values[i], values[j]));
85 errors.
next() <<
"Instantiation of arguments is not supported.";
89 errors.
next() <<
"Refreshing variables is not supported.";
96 errors.
next() <<
"Functions are not supported.";
104 errors.
next() <<
"Quantified terms are not supported.";
carl::mpl_variant_of< TermTypes >::type TermType
Variant type for all terms.
carl::mpl_variant_of< VariableTypes >::type VariableType
Variant type for all variables.
Class to create the formulas for axioms.
carl::Formula< Poly > FormulaT
carl::Formulas< Poly > FormulasT
Base class for all theories.
virtual bool handleDistinct(const std::vector< types::TermType > &, types::TermType &, TheoryError &errors)
Resolve a distinct operator.
AbstractTheory(ParserState *state)
virtual bool declareVariable(const std::string &, const carl::Sort &, types::VariableType &, TheoryError &errors)
Declare a new variable with the given name and the given sort.
virtual bool resolveSymbol(const Identifier &, types::TermType &, TheoryError &errors)
Resolve a symbol that was not declared within the ParserState.
virtual bool functionCall(const Identifier &, const std::vector< types::TermType > &, types::TermType &, TheoryError &errors)
Resolve another unknown function call.
virtual ~AbstractTheory()
virtual bool refreshVariable(const types::VariableType &, types::VariableType &, TheoryError &errors)
virtual bool handleITE(const FormulaT &, const types::TermType &, const types::TermType &, types::TermType &, TheoryError &errors)
Resolve an if-then-else operator.
static void addSimpleSorts(qi::symbols< char, carl::Sort > &)
Initialize the global symbol table for simple sorts.
FormulaT expandDistinct(const std::vector< T > &values, const Builder &neqBuilder)
static void addConstants(qi::symbols< char, types::ConstType > &)
Initialize the global symbol table for constants.
virtual bool declareQuantifiedTerm(const std::vector< std::pair< std::string, carl::Sort >> &, const carl::FormulaType &, const types::TermType &, types::TermType &, TheoryError &errors)
Resolve a quantified term.
virtual bool instantiate(const types::VariableType &, const types::TermType &, types::TermType &, TheoryError &errors)
Instantiate a variable within a term.