summaryrefslogtreecommitdiff
path: root/src/expr/node_manager.h
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2010-08-17 22:24:26 +0000
committerMorgan Deters <mdeters@gmail.com>2010-08-17 22:24:26 +0000
commit08a57829cdd0ef4c02fee349b4b721d3e4a3f6d1 (patch)
tree9ea214ffb5a5a03e3c71c09814f17787be6d022b /src/expr/node_manager.h
parentdaf715e2ccb53bd88c6f374840b5d41e72c61c90 (diff)
Merge from "cc" branch:
CongruenceClosure implementation; CongruenceClosure white-box test. New UF theory implementation based on new CC module. This one supports predicates. The two UF implementations exist in parallel (they can be selected at runtime via the new command line option "--uf"). Added type infrastructure for TUPLE. Fixes to unit tests that failed in 16-August-2010 regressions. Needed to instantiate TheoryEngine with an Options structure, and explicitly call ->shutdown() on it before destruction (like the SMTEngine does). Fixed test makefiles to (1) perform all tests even in the presence of failures, (2) give proper summaries of subdirectory tests (e.g. regress0/uf and regress0/precedence) Other minor changes.
Diffstat (limited to 'src/expr/node_manager.h')
-rw-r--r--src/expr/node_manager.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/expr/node_manager.h b/src/expr/node_manager.h
index dcfb14b7a..baa8de5aa 100644
--- a/src/expr/node_manager.h
+++ b/src/expr/node_manager.h
@@ -523,6 +523,16 @@ public:
*/
inline TypeNode mkPredicateType(const std::vector<TypeNode>& sorts);
+ /**
+ * Make a tuple type with types from
+ * <code>types</code>. <code>types</code> must have at least two
+ * elements.
+ *
+ * @param types a vector of types
+ * @returns the tuple type (types[0], ..., types[n])
+ */
+ inline TypeNode mkTupleType(const std::vector<TypeNode>& types);
+
/** Make the type of bitvectors of size <code>size</code> */
inline TypeNode mkBitVectorType(unsigned size);
@@ -714,6 +724,15 @@ NodeManager::mkPredicateType(const std::vector<TypeNode>& sorts) {
return mkTypeNode(kind::FUNCTION_TYPE, sortNodes);
}
+inline TypeNode NodeManager::mkTupleType(const std::vector<TypeNode>& types) {
+ Assert(types.size() >= 2);
+ std::vector<TypeNode> typeNodes;
+ for (unsigned i = 0; i < types.size(); ++ i) {
+ typeNodes.push_back(types[i]);
+ }
+ return mkTypeNode(kind::TUPLE_TYPE, typeNodes);
+}
+
inline TypeNode NodeManager::mkBitVectorType(unsigned size) {
return TypeNode(mkTypeConst<BitVectorSize>(BitVectorSize(size)));
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback