10 namespace arithmetic {
11 using OperatorType = boost::variant<Poly::ConstructorOperation, carl::Relation>;
19 std::map<std::string, arithmetic::OperatorType>
ops;
20 std::map<carl::Variable, std::tuple<FormulaT, Poly, Poly>>
mITEs;
void sort(T *array, int size, LessThan lt)
boost::variant< Poly::ConstructorOperation, carl::Relation > OperatorType
carl::mpl_variant_of< TermTypes >::type TermType
Variant type for all terms.
carl::mpl_variant_of< VariableTypes >::type VariableType
Variant type for all variables.
QuantifierType type(const std::pair< QuantifierType, std::vector< carl::Variable >> &p)
std::vector< carl::Variable > vars(const std::pair< QuantifierType, std::vector< carl::Variable >> &p)
Class to create the formulas for axioms.
carl::Formula< Poly > FormulaT
carl::MultivariatePolynomial< Rational > Poly
Base class for all theories.
Implements the theory of arithmetic, including LRA, LIA, NRA and NIA.
bool handleDistinct(const std::vector< types::TermType > &arguments, types::TermType &result, TheoryError &errors)
Resolve a distinct operator.
std::map< carl::Variable, std::tuple< FormulaT, Poly, Poly > > mITEs
bool instantiate(const types::VariableType &var, const types::TermType &replacement, types::TermType &result, TheoryError &errors)
Instantiate a variable within a term.
void addQuantifierToFormula(FormulaT &f)
std::map< carl::Variable, std::tuple< Poly, Poly > > mKnownDivisions
bool functionCall(const Identifier &identifier, const std::vector< types::TermType > &arguments, types::TermType &result, TheoryError &errors)
Resolve another unknown function call.
std::map< FormulaT, carl::Variable > mappedFormulas
bool convertTerm(const types::TermType &term, Poly &result, bool allow_bool=false)
ArithmeticTheory(ParserState *state)
bool declareVariable(const std::string &name, const carl::Sort &sort, types::VariableType &result, TheoryError &errors)
Declare a new variable with the given name and the given sort.
bool convertArguments(const arithmetic::OperatorType &op, const std::vector< types::TermType > &arguments, std::vector< Poly > &result, TheoryError &errors)
std::map< std::string, arithmetic::OperatorType > ops
bool declareQuantifiedTerm(const std::vector< std::pair< std::string, carl::Sort >> &vars, const carl::FormulaType &type, const types::TermType &term, types::TermType &result, TheoryError &errors)
Resolve a quantified term.
bool handleITE(const FormulaT &ifterm, const types::TermType &thenterm, const types::TermType &elseterm, types::TermType &result, TheoryError &errors)
Resolve an if-then-else operator.
std::map< carl::Variable, std::tuple< Poly, Poly > > mNewDivisions
static void addSimpleSorts(qi::symbols< char, carl::Sort > &sorts)