summaryrefslogtreecommitdiff
path: root/src/theory/arith/arithvar.h
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2012-03-02 23:37:06 +0000
committerTim King <taking@cs.nyu.edu>2012-03-02 23:37:06 +0000
commit98b2fe2c6fefb15b57d2eae6bda505e1f41da451 (patch)
tree4124caa3d7f94aec78ff735fa766149aee86e842 /src/theory/arith/arithvar.h
parent068107e1d1f705eb9054b4309a26236230687d80 (diff)
This commit merges in the changes from branches/arithmetic/refactor0
- Improved the checks in AssertLower and AssertUpper so that redundant bounds cause less work. - Because of the above change, d_constantIntegerVariables now cannot have duplicate elements enqueued. This allows removing d_varsInDioSolver. - Fix to an assertion in CDQueue. - Implements a CDArithVarSet using a vector of booleans and CDList. - Refactored ArithVar out of arith_utilities.h. Miscellaneous cleanup of arithmetic.
Diffstat (limited to 'src/theory/arith/arithvar.h')
-rw-r--r--src/theory/arith/arithvar.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/theory/arith/arithvar.h b/src/theory/arith/arithvar.h
new file mode 100644
index 000000000..52dc9fd6a
--- /dev/null
+++ b/src/theory/arith/arithvar.h
@@ -0,0 +1,57 @@
+/********************* */
+/*! \file arithvar.h
+ ** \verbatim
+ ** Original author: taking
+ ** Major contributors: none
+ ** Minor contributors (to current version): dejan, mdeters
+ ** This file is part of the CVC4 prototype.
+ ** Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys)
+ ** Courant Institute of Mathematical Sciences
+ ** New York University
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief Defines ArithVar which is the internal representation of variables in arithmetic
+ **
+ ** This defines ArithVar which is the internal representation of variables in
+ ** arithmetic. This is a typedef from uint32_t to ArithVar.
+ ** This file also provides utilities for ArithVars.
+ **/
+
+
+#include "cvc4_private.h"
+
+#ifndef __CVC4__THEORY__ARITH__ARITHVAR_H
+#define __CVC4__THEORY__ARITH__ARITHVAR_H
+
+#include <limits>
+#include <stdint.h>
+#include <ext/hash_map>
+#include "expr/node.h"
+#include "context/cdhashset.h"
+
+namespace CVC4 {
+namespace theory {
+namespace arith {
+
+typedef uint32_t ArithVar;
+const ArithVar ARITHVAR_SENTINEL = std::numeric_limits<ArithVar>::max();
+
+//Maps from Nodes -> ArithVars, and vice versa
+typedef __gnu_cxx::hash_map<Node, ArithVar, NodeHashFunction> NodeToArithVarMap;
+typedef __gnu_cxx::hash_map<ArithVar, Node> ArithVarToNodeMap;
+
+/**
+ * ArithVarCallBack provides a mechanism for agreeing on callbacks while
+ * breaking mutual recursion inclusion order problems.
+ */
+class ArithVarCallBack {
+public:
+ virtual void callback(ArithVar x) = 0;
+};
+
+}; /* namesapce arith */
+}; /* namespace theory */
+}; /* namespace CVC4 */
+
+#endif /* __CVC4__THEORY__ARITH__ARITHVAR_H */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback