diff options
author | Morgan Deters <mdeters@gmail.com> | 2011-04-01 00:56:42 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2011-04-01 00:56:42 +0000 |
commit | 159cb7ee8b6f28f3784a3f24b371760c2ab77f86 (patch) | |
tree | d510bfa3e4977b5c532d9ab82b6cd5d9581365a3 /src/theory/theory_engine.cpp | |
parent | ceca24424da629db2e133f7864b0bac03ad44829 (diff) |
This commit is a merge from the "betterstats" branch, which:
* Makes Options an "omnipresent thread-local global" (like the notion
of the "current NodeManager" was already). Options::current() accesses
this structure.
* Removes Options from constructors and data structures everywhere
(this cleans up a lot of things).
* No longer uses StatisticsRegistry statically. An instance of the
registry is created and linked to a NodeManager.
* StatisticsRegistry::current() is similar to Options::current(), but
the pointer is stowed in the NodeManager (rather than stored)
* The static functions of StatisticsRegistry have been left, for backward
compatibility; they now use the "current" statistics registry.
* SmtEngine::getStatisticsRegistry() is a public accessor for the
registry; this is needed by main() to reach in and get the registry,
for flushing statistics at the end.
Diffstat (limited to 'src/theory/theory_engine.cpp')
-rw-r--r-- | src/theory/theory_engine.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp index 2411956f5..d1040e6fc 100644 --- a/src/theory/theory_engine.cpp +++ b/src/theory/theory_engine.cpp @@ -68,7 +68,7 @@ void TheoryEngine::EngineOutputChannel::newFact(TNode fact) { d_engine->getSharedTermManager()->addEq(fact); } - if(d_engine->d_theoryRegistration && !fact.getAttribute(RegisteredAttr())) { + if(Options::current()->theoryRegistration && !fact.getAttribute(RegisteredAttr())) { list<TNode> toReg; toReg.push_back(fact); @@ -126,17 +126,15 @@ void TheoryEngine::EngineOutputChannel::newFact(TNode fact) { d_engine->theoryOf(n)->registerTerm(n); } } - }/* d_engine->d_theoryRegistration && !fact.getAttribute(RegisteredAttr()) */ + }/* Options::current()->theoryRegistration && !fact.getAttribute(RegisteredAttr()) */ } -TheoryEngine::TheoryEngine(context::Context* ctxt, const Options& opts) : +TheoryEngine::TheoryEngine(context::Context* ctxt) : d_propEngine(NULL), d_context(ctxt), d_theoryOut(this, ctxt), - d_theoryRegistration(opts.theoryRegistration), d_hasShutDown(false), d_incomplete(ctxt, false), - d_opts(opts), d_statistics() { Rewriter::init(); |