summaryrefslogtreecommitdiff
path: root/src/theory/rewriter_tables_template.h
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2013-11-14 11:56:34 -0500
committerTim King <taking@cs.nyu.edu>2013-11-21 10:43:44 -0500
commit91424455840a7365a328cbcc3d02ec453fe9d0ea (patch)
treee8072eb0c7dda81feafb1c5f9a4ca2f0fcbc0399 /src/theory/rewriter_tables_template.h
parentbd8e9319aab69db90692f72bc52288329879eefc (diff)
Adding the changes needed to delete rewriter attributes. This includes being able to list attributes. Additionally, added debugging hooks to node manager and attribute manager.
Diffstat (limited to 'src/theory/rewriter_tables_template.h')
-rw-r--r--src/theory/rewriter_tables_template.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/theory/rewriter_tables_template.h b/src/theory/rewriter_tables_template.h
index 408bdec1a..17aed4e42 100644
--- a/src/theory/rewriter_tables_template.h
+++ b/src/theory/rewriter_tables_template.h
@@ -21,6 +21,8 @@
#include "theory/rewriter.h"
#include "theory/rewriter_attributes.h"
+#include "expr/attribute_unique_id.h"
+#include "expr/attribute.h"
${rewriter_includes}
@@ -83,5 +85,23 @@ void Rewriter::shutdown() {
${rewrite_shutdown}
}
+void Rewriter::garbageCollect() {
+ typedef CVC4::expr::attr::AttributeUniqueId AttributeUniqueId;
+ std::vector<AttributeUniqueId> preids;
+ ${pre_rewrite_attribute_ids}
+
+ std::vector<AttributeUniqueId> postids;
+ ${post_rewrite_attribute_ids}
+
+ std::vector<const AttributeUniqueId*> allids;
+ for(unsigned i = 0; i < preids.size(); ++i){
+ allids.push_back(&preids[i]);
+ }
+ for(unsigned i = 0; i < postids.size(); ++i){
+ allids.push_back(&postids[i]);
+ }
+ NodeManager::currentNM()->deleteAttributes(allids);
+}
+
}/* CVC4::theory namespace */
}/* CVC4 namespace */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback