return currNM->mkSkolem(name, functionType);
}
-/**
- * (For the moment) the type hierarchy goes as:
- * Integer <: Real
- * The type number of a variable is an integer representing the most specific
- * type of the variable. The possible values of type number are:
- */
-enum ArithType {
- ATReal = 0,
- ATInteger = 1
-};
-
-inline ArithType nodeToArithType(TNode x) {
- return (x.getType().isInteger() ? ATInteger : ATReal);
-}
-
/** \f$ k \in {LT, LEQ, EQ, GEQ, GT} \f$ */
inline bool isRelationOperator(Kind k){
using namespace kind;
return var_iterator(&d_vars, d_vars.end());
}
bool ArithVariables::isInteger(ArithVar x) const {
- return d_vars[x].d_type >= ATInteger;
+ return d_vars[x].d_type >= ArithType::Integer;
}
/** Is the assignment to x integral? */
}
ArithVariables::VarInfo::VarInfo()
- : d_var(ARITHVAR_SENTINEL),
- d_assignment(0),
- d_lb(NullConstraint),
- d_ub(NullConstraint),
- d_cmpAssignmentLB(1),
- d_cmpAssignmentUB(-1),
- d_pushCount(0),
- d_node(Node::null()),
- d_auxiliary(false)
-{ }
+ : d_var(ARITHVAR_SENTINEL),
+ d_assignment(0),
+ d_lb(NullConstraint),
+ d_ub(NullConstraint),
+ d_cmpAssignmentLB(1),
+ d_cmpAssignmentUB(-1),
+ d_pushCount(0),
+ d_type(ArithType::Unset),
+ d_node(Node::null()),
+ d_auxiliary(false) {}
bool ArithVariables::VarInfo::initialized() const {
return d_var != ARITHVAR_SENTINEL;
//integral.
//We'll use the isIntegral check from the polynomial package instead.
Polynomial p = Polynomial::parsePolynomial(n);
- d_type = p.isIntegral() ? ATInteger : ATReal;
+ d_type = p.isIntegral() ? ArithType::Integer : ArithType::Real;
}else{
- d_type = nodeToArithType(n);
+ d_type = n.getType().isInteger() ? ArithType::Integer : ArithType::Real;
}
Assert(initialized());
}
+
void ArithVariables::VarInfo::uninitialize(){
d_var = ARITHVAR_SENTINEL;
d_node = Node::null();
#include "cvc4_private.h"
-#include "expr/node.h"
-
-#include "context/context.h"
-#include "context/cdlist.h"
+#ifndef __CVC4__THEORY__ARITH__PARTIAL_MODEL_H
+#define __CVC4__THEORY__ARITH__PARTIAL_MODEL_H
+#include <list>
+#include <vector>
-#include "theory/arith/arithvar.h"
+#include "context/cdlist.h"
+#include "context/context.h"
+#include "expr/node.h"
#include "theory/arith/arith_utilities.h"
-#include "theory/arith/delta_rational.h"
-#include "theory/arith/constraint_forward.h"
-#include "theory/arith/callbacks.h"
+#include "theory/arith/arithvar.h"
#include "theory/arith/bound_counts.h"
-
-
-#include <vector>
-#include <list>
-
-#pragma once
+#include "theory/arith/callbacks.h"
+#include "theory/arith/constraint_forward.h"
+#include "theory/arith/delta_rational.h"
namespace CVC4 {
namespace theory {
namespace arith {
-
+/**
+ * (For the moment) the type hierarchy goes as:
+ * Integer <: Real
+ * The type number of a variable is an integer representing the most specific
+ * type of the variable. The possible values of type number are:
+ */
+enum class ArithType {
+ Unset,
+ Real,
+ Integer,
+};
class ArithVariables {
private:
}/* CVC4::theory namespace */
}/* CVC4 namespace */
+#endif /* __CVC4__THEORY__ARITH__PARTIAL_MODEL_H */