summaryrefslogtreecommitdiff
path: root/src/theory/substitutions.h
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2011-09-02 17:56:43 +0000
committerMorgan Deters <mdeters@gmail.com>2011-09-02 17:56:43 +0000
commit487e610b88f2a634e3285886ff96717c103338de (patch)
tree7f034b5c9f537195df72ac9ecd7666226dc2ed9f /src/theory/substitutions.h
parent90267f8729799f44c6fb33ace11b971a16e78dff (diff)
Partial merge of integers work; this is simple B&B and some pseudoboolean
infrastructure, and takes care not to affect CVC4's performance on LRA benchmarks.
Diffstat (limited to 'src/theory/substitutions.h')
-rw-r--r--src/theory/substitutions.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/theory/substitutions.h b/src/theory/substitutions.h
index 513300a32..f59c17dc0 100644
--- a/src/theory/substitutions.h
+++ b/src/theory/substitutions.h
@@ -23,6 +23,7 @@
#include <utility>
#include <vector>
+#include <algorithm>
#include "expr/node.h"
namespace CVC4 {
@@ -77,6 +78,25 @@ public:
}
/**
+ * Clear out the accumulated substitutions, resetting this
+ * SubstitutionMap to the way it was when first constructed.
+ */
+ void clear() {
+ d_substitutions.clear();
+ d_substitutionCache.clear();
+ d_cacheInvalidated = true;
+ }
+
+ /**
+ * Swap the contents of this SubstitutionMap with those of another.
+ */
+ void swap(SubstitutionMap& map) {
+ d_substitutions.swap(map.d_substitutions);
+ d_substitutionCache.swap(map.d_substitutionCache);
+ std::swap(d_cacheInvalidated, map.d_cacheInvalidated);
+ }
+
+ /**
* Print to the output stream
*/
void print(std::ostream& out) const;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback