From 2bc4c351bbf89103577fa9f33ebb395f5d61826a Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Tue, 12 Oct 2010 20:20:24 +0000 Subject: Merge from cc-memout branch. Here are the main points * Add ContextMemoryAllocator allocator type, conforming to STL allocator requirements. * Extend the CDList<> template to take an allocator (defaults to std::allocator). * Add a specialized version of the CDList<> template (in src/context/cdlist_context_memory.h) that allocates a list in segments, in context memory. * Add "forward" headers -- cdlist_forward.h, cdmap_forward.h, and cdset_forward.h. Use these in public headers, and other places where you don't need the full header (just the forward-declaration). These types justify their own header (instead of just forward-declaring yourself), because they are complex templated types, with default template parameters, specializations, etc. * theory_engine.h no longer depends on individual theory headers. (Instead it forward-declares Theory implementations.) This is especially important now that theory .cpp files depend on TheoryEngine (to implement Theory::getValue()). Previously, any modification to any theory header file required *all* theories, and the engine, to be completely rebuilt. * Support memory cleanup for nontrivial CONSTANT kinds. This resolves an issue with arithmetic where memory leaked for each distinct Rational or Integer that was wrapped in a Node. --- src/smt/smt_engine.cpp | 1 + src/smt/smt_engine.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/smt') diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp index 594efcc35..e3c8c584c 100644 --- a/src/smt/smt_engine.cpp +++ b/src/smt/smt_engine.cpp @@ -26,6 +26,7 @@ #include "smt/no_such_function_exception.h" #include "context/context.h" #include "context/cdlist.h" +#include "context/cdset.h" #include "expr/expr.h" #include "expr/command.h" #include "expr/node_builder.h" diff --git a/src/smt/smt_engine.h b/src/smt/smt_engine.h index d6940f09f..a3116dfa9 100644 --- a/src/smt/smt_engine.h +++ b/src/smt/smt_engine.h @@ -27,6 +27,7 @@ #include "expr/expr_manager.h" #include "context/cdmap_forward.h" #include "context/cdset_forward.h" +#include "context/cdlist_forward.h" #include "util/result.h" #include "util/model.h" #include "util/sexpr.h" @@ -52,7 +53,6 @@ class DecisionEngine; namespace context { class Context; - template class CDList; }/* CVC4::context namespace */ namespace prop { -- cgit v1.2.3