summaryrefslogtreecommitdiff
path: root/src/smt
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-08-15 13:02:46 -0500
committerGitHub <noreply@github.com>2018-08-15 13:02:46 -0500
commit4748af3ee298ce5aae36a8ab8cad4426d1398c17 (patch)
tree94ce5eb140a1f5898b9145a9ecc1ebe92b0ced0e /src/smt
parente09be1045fc6cc8c5373f9eb96137add66b8d5d5 (diff)
Make sort inference a preprocessing pass (#2309)
Diffstat (limited to 'src/smt')
-rw-r--r--src/smt/smt_engine.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp
index 38f6a2d5e..cc6f09801 100644
--- a/src/smt/smt_engine.cpp
+++ b/src/smt/smt_engine.cpp
@@ -80,6 +80,7 @@
#include "preprocessing/passes/real_to_int.h"
#include "preprocessing/passes/rewrite.h"
#include "preprocessing/passes/sep_skolem_emp.h"
+#include "preprocessing/passes/sort_infer.h"
#include "preprocessing/passes/static_learning.h"
#include "preprocessing/passes/symmetry_breaker.h"
#include "preprocessing/passes/symmetry_detect.h"
@@ -2735,15 +2736,18 @@ void SmtEnginePrivate::finishInit()
new RealToInt(d_preprocessingPassContext.get()));
std::unique_ptr<Rewrite> rewrite(
new Rewrite(d_preprocessingPassContext.get()));
+ std::unique_ptr<SortInferencePass> sortInfer(
+ new SortInferencePass(d_preprocessingPassContext.get(),
+ d_smt.d_theoryEngine->getSortInference()));
std::unique_ptr<StaticLearning> staticLearning(
new StaticLearning(d_preprocessingPassContext.get()));
std::unique_ptr<SymBreakerPass> sbProc(
new SymBreakerPass(d_preprocessingPassContext.get()));
std::unique_ptr<SynthRewRulesPass> srrProc(
new SynthRewRulesPass(d_preprocessingPassContext.get()));
- std::unique_ptr<SepSkolemEmp> sepSkolemEmp(
+ std::unique_ptr<SepSkolemEmp> sepSkolemEmp(
new SepSkolemEmp(d_preprocessingPassContext.get()));
- d_preprocessingPassRegistry.registerPass("apply-substs",
+ d_preprocessingPassRegistry.registerPass("apply-substs",
std::move(applySubsts));
d_preprocessingPassRegistry.registerPass("bool-to-bv", std::move(boolToBv));
d_preprocessingPassRegistry.registerPass("bv-abstraction",
@@ -2761,6 +2765,8 @@ void SmtEnginePrivate::finishInit()
d_preprocessingPassRegistry.registerPass("rewrite", std::move(rewrite));
d_preprocessingPassRegistry.registerPass("sep-skolem-emp",
std::move(sepSkolemEmp));
+ d_preprocessingPassRegistry.registerPass("sort-inference",
+ std::move(sortInfer));
d_preprocessingPassRegistry.registerPass("static-learning",
std::move(staticLearning));
d_preprocessingPassRegistry.registerPass("sym-break", std::move(sbProc));
@@ -4332,13 +4338,7 @@ void SmtEnginePrivate::processAssertions() {
}
if( options::sortInference() || options::ufssFairnessMonotone() ){
- //sort inference technique
- SortInference * si = d_smt.d_theoryEngine->getSortInference();
- si->simplify( d_assertions.ref(), options::sortInference(), options::ufssFairnessMonotone() );
- for( std::map< Node, Node >::iterator it = si->d_model_replace_f.begin(); it != si->d_model_replace_f.end(); ++it ){
- d_smt.setPrintFuncInModel( it->first.toExpr(), false );
- d_smt.setPrintFuncInModel( it->second.toExpr(), true );
- }
+ d_preprocessingPassRegistry.getPass("sort-inference")->apply(&d_assertions);
}
if( options::pbRewrites() ){
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback