diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2018-05-03 22:50:41 -0700 |
---|---|---|
committer | Andres Noetzli <andres.noetzli@gmail.com> | 2018-05-03 22:50:41 -0700 |
commit | cbfcc24f0da280e21de5118cc2c0c6a18a71a629 (patch) | |
tree | 649c5f5c49aec6565e76df2a8e9c46f04e9bb5ee /src/smt | |
parent | 8a3f9efe5856fc07fbc99b9b606397a5079ddd78 (diff) |
Refactor bv-intro-pow2 preprocessing pass. (#1851)
Diffstat (limited to 'src/smt')
-rw-r--r-- | src/smt/smt_engine.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp index c1e8596cf..10d21a66c 100644 --- a/src/smt/smt_engine.cpp +++ b/src/smt/smt_engine.cpp @@ -70,6 +70,7 @@ #include "options/uf_options.h" #include "preprocessing/passes/bool_to_bv.h" #include "preprocessing/passes/bv_gauss.h" +#include "preprocessing/passes/bv_intro_pow2.h" #include "preprocessing/passes/bv_to_bool.h" #include "preprocessing/passes/int_to_bv.h" #include "preprocessing/passes/pseudo_boolean_processor.h" @@ -95,7 +96,6 @@ #include "smt_util/nary_builder.h" #include "smt_util/node_visitor.h" #include "theory/booleans/circuit_propagator.h" -#include "theory/bv/bvintropow2.h" #include "theory/bv/theory_bv_rewriter.h" #include "theory/logic_info.h" #include "theory/quantifiers/fun_def_process.h" @@ -2603,6 +2603,10 @@ void SmtEnginePrivate::finishInit() { std::unique_ptr<BoolToBV> boolToBv( new BoolToBV(d_preprocessingPassContext.get())); d_preprocessingPassRegistry.registerPass("bool-to-bv", std::move(boolToBv)); + std::unique_ptr<BvIntroPow2> bvIntroPow2( + new BvIntroPow2(d_preprocessingPassContext.get())); + d_preprocessingPassRegistry.registerPass("bv-intro-pow2", + std::move(bvIntroPow2)); } Node SmtEnginePrivate::expandDefinitions(TNode n, unordered_map<Node, Node, NodeHashFunction>& cache, bool expandOnly) @@ -4070,8 +4074,9 @@ void SmtEnginePrivate::processAssertions() { dumpAssertions("post-unconstrained-simp", d_assertions); } - if(options::bvIntroducePow2()){ - theory::bv::BVIntroducePow2::pow2Rewrite(d_assertions.ref()); + if(options::bvIntroducePow2()) + { + d_preprocessingPassRegistry.getPass("bv-intro-pow2")->apply(&d_assertions); } Trace("smt-proc") << "SmtEnginePrivate::processAssertions() : pre-substitution" << endl; |