This PR adds a new kind that holds RealAlgebraicNumber constants. As it can not be a constant in the sense of isConst(), it is wrapped within an operator, similar to IAND or CARDINALITY_CONSTRAINT.
"util/rational.h" \
"a multiple-precision integer constant; payload is an instance of the cvc5::Rational class"
+constant REAL_ALGEBRAIC_NUMBER_OP \
+ class \
+ RealAlgebraicNumber \
+ ::cvc5::RealAlgebraicNumberHashFunction \
+ "util/real_algebraic_number.h" \
+ "a real algebraic number constant; payload is an instance of the cvc5::RealAlgebraicNumber class"
+parameterized REAL_ALGEBRAIC_NUMBER REAL_ALGEBRAIC_NUMBER_OP 0 "a real algebraic number constant; payload is an instance of the cvc5::RealAlgebraicNumber class"
+
enumerator REAL_TYPE \
"::cvc5::theory::arith::RationalEnumerator" \
"theory/arith/type_enumerator.h"
typerule CONST_RATIONAL ::cvc5::theory::arith::ArithConstantTypeRule
typerule CONST_INTEGER ::cvc5::theory::arith::ArithConstantTypeRule
+typerule REAL_ALGEBRAIC_NUMBER_OP ::cvc5::theory::arith::ArithRealAlgebraicNumberOpTypeRule
+typerule REAL_ALGEBRAIC_NUMBER ::cvc5::theory::arith::ArithRealAlgebraicNumberTypeRule
+
typerule LT ::cvc5::theory::arith::ArithRelationTypeRule
typerule LEQ ::cvc5::theory::arith::ArithRelationTypeRule
typerule GT ::cvc5::theory::arith::ArithRelationTypeRule
}
}
+TypeNode ArithRealAlgebraicNumberOpTypeRule::computeType(
+ NodeManager* nodeManager, TNode n, bool check)
+{
+ return nodeManager->realType();
+}
+TypeNode ArithRealAlgebraicNumberTypeRule::computeType(NodeManager* nodeManager,
+ TNode n,
+ bool check)
+{
+ return nodeManager->realType();
+}
+
TypeNode ArithOperatorTypeRule::computeType(NodeManager* nodeManager,
TNode n,
bool check)
static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check);
};
+/**
+ * Type rule for real algebraic numbers.
+ * Returns `realType`.
+ */
+class ArithRealAlgebraicNumberOpTypeRule
+{
+ public:
+ static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check);
+};
+
+/**
+ * Type rule for real algebraic numbers.
+ * Returns `realType`.
+ */
+class ArithRealAlgebraicNumberTypeRule
+{
+ public:
+ static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check);
+};
+
/**
* Type rule for arithmetic relations. Returns Boolean. Throws a type error
* if the types of the children are not arithmetic or not comparable.