summaryrefslogtreecommitdiff
path: root/src/theory/arith/arith_utilities.h
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2010-10-02 05:52:51 +0000
committerTim King <taking@cs.nyu.edu>2010-10-02 05:52:51 +0000
commit37c20e30239e8ce86e9fc7106afcf5a7b896e7c3 (patch)
treeee78b955ccfe0240d878945e7eb2baaeb5a9ed6b /src/theory/arith/arith_utilities.h
parent02c2038dca9ce3e09cac66ed3bd6f8e2832ff74b (diff)
branches/arith-indexed-variables merged into the main trunk.
Diffstat (limited to 'src/theory/arith/arith_utilities.h')
-rw-r--r--src/theory/arith/arith_utilities.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/theory/arith/arith_utilities.h b/src/theory/arith/arith_utilities.h
index d2c07900d..4ae0e44ef 100644
--- a/src/theory/arith/arith_utilities.h
+++ b/src/theory/arith/arith_utilities.h
@@ -24,11 +24,27 @@
#include "util/rational.h"
#include "expr/node.h"
+#include "expr/attribute.h"
+#include <stdint.h>
+#include <limits>
namespace CVC4 {
namespace theory {
namespace arith {
+
+typedef uint64_t ArithVar;
+//static const ArithVar ARITHVAR_SENTINEL = std::numeric_limits<ArithVar>::max();
+#define ARITHVAR_SENTINEL std::numeric_limits<ArithVar>::max()
+
+struct ArithVarAttrID{};
+typedef expr::Attribute<ArithVarAttrID,ArithVar> ArithVarAttr;
+
+inline ArithVar asArithVar(TNode x){
+ Assert(x.hasAttribute(ArithVarAttr()));
+ return x.getAttribute(ArithVarAttr());
+}
+
inline Node mkRationalNode(const Rational& q){
return NodeManager::currentNM()->mkConst<Rational>(q);
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback