{
if (n.getKind() != kind::IAND_OP)
{
- InternalError() << "IAND_OP typerule invoked for IAND_OP kind";
+ InternalError() << "IAND_OP typerule invoked for " << n << " instead of IAND_OP kind";
}
TypeNode iType = nodeManager->integerType();
std::vector<TypeNode> argTypes;
{
if (n.getKind() != kind::IAND)
{
- InternalError() << "IAND typerule invoked for IAND kind";
+ InternalError() << "IAND typerule invoked for " << n << " instead of IAND kind";
}
if (check)
{
{
if (n.getKind() != kind::POW2)
{
- InternalError() << "POW2 typerule invoked for POW2 kind";
+ InternalError() << "POW2 typerule invoked for " << n << " instead of POW2 kind";
}
if (check)
{
namespace theory {
namespace arith {
+/**
+ * Type rule for arithmetic values.
+ * Returns `integerType` or `realType` depending on the value.
+ */
class ArithConstantTypeRule
{
public:
static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check);
};
+/**
+ * Type rule for arithmetic operators.
+ * Takes care of mixed-integer operators, cases and (total) division.
+ */
class ArithOperatorTypeRule
{
public:
static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check);
};
+/** Type rule for nullary real operators. */
class RealNullaryOperatorTypeRule
{
public:
static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check);
};
+/**
+ * Type rule for the IAND operator kind.
+ * Always returns (integerType, integerType) -> integerType.
+ */
class IAndOpTypeRule
{
public:
static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check);
};
+/**
+ * Type rule for the IAND kind.
+ * Always returns integerType.
+ */
class IAndTypeRule
{
public:
static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check);
};
+/**
+ * Type rule for the POW2 operator.
+ * Always returns integerType.
+ */
class Pow2TypeRule
{
public:
static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check);
};
+/**
+ * Type rule for the IndexedRootPredicate operator.
+ * Checks that the two arguments are booleanType and realType, always returns
+ * booleanType.
+ */
class IndexedRootPredicateTypeRule
{
public: