Skip to content

Commit

Permalink
enable incremental sat for QF_BV
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <[email protected]>
  • Loading branch information
NikolajBjorner authored and Christoph M. Wintersteiger committed Jun 24, 2015
1 parent 0518e69 commit 5aee077
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scripts/mk_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def init_project_def():
add_lib('smtlogic_tactics', ['arith_tactics', 'bv_tactics', 'nlsat_tactic', 'smt_tactic', 'aig_tactic', 'fp', 'muz','qe','nlsat_smt_tactic'], 'tactic/smtlogics')
add_lib('fpa_tactics', ['fpa', 'core_tactics', 'bv_tactics', 'sat_tactic', 'smt_tactic', 'arith_tactics', 'smtlogic_tactics'], 'tactic/fpa')
add_lib('ufbv_tactic', ['normal_forms', 'core_tactics', 'macros', 'smt_tactic', 'rewriter'], 'tactic/ufbv')
add_lib('portfolio', ['smtlogic_tactics', 'ufbv_tactic', 'fpa_tactics', 'aig_tactic', 'fp', 'qe','sls_tactic', 'subpaving_tactic'], 'tactic/portfolio')
add_lib('smtparser', ['portfolio'], 'parsers/smt')
add_lib('sat_solver', ['solver', 'core_tactics', 'aig_tactic', 'bv_tactics', 'arith_tactics', 'sat_tactic'], 'sat/sat_solver')
add_lib('portfolio', ['smtlogic_tactics', 'sat_solver', 'ufbv_tactic', 'fpa_tactics', 'aig_tactic', 'fp', 'qe','sls_tactic', 'subpaving_tactic'], 'tactic/portfolio')
add_lib('smtparser', ['portfolio'], 'parsers/smt')
add_lib('opt', ['smt', 'smtlogic_tactics', 'sls_tactic', 'sat_solver'], 'opt')
API_files = ['z3_api.h', 'z3_algebraic.h', 'z3_polynomial.h', 'z3_rcf.h', 'z3_interp.h', 'z3_fpa.h']
add_lib('api', ['portfolio', 'user_plugin', 'smtparser', 'realclosure', 'interp', 'opt'],
Expand Down
2 changes: 1 addition & 1 deletion src/sat/sat_solver/inc_sat_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ class inc_sat_solver : public solver {
};


solver* mk_inc_sat_solver(ast_manager& m, params_ref& p) {
solver* mk_inc_sat_solver(ast_manager& m, params_ref const& p) {
return alloc(inc_sat_solver, m, p);
}

Expand Down
2 changes: 1 addition & 1 deletion src/sat/sat_solver/inc_sat_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Module Name:

#include "solver.h"

solver* mk_inc_sat_solver(ast_manager& m, params_ref& p);
solver* mk_inc_sat_solver(ast_manager& m, params_ref const& p);

void set_soft_inc_sat(solver* s, unsigned sz, expr*const* soft, rational const* weights);

Expand Down
1 change: 1 addition & 0 deletions src/solver/combined_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ class solver_factory;
solver * mk_combined_solver(solver * s1, solver * s2, params_ref const & p);
solver_factory * mk_combined_solver_factory(solver_factory * f1, solver_factory * f2);


#endif
10 changes: 9 additions & 1 deletion src/tactic/portfolio/smt_strategic_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Module Name:
#include"qfufnra_tactic.h"
#include"horn_tactic.h"
#include"smt_solver.h"
#include"inc_sat_solver.h"

tactic * mk_tactic_for_logic(ast_manager & m, params_ref const & p, symbol const & logic) {
if (logic=="QF_UF")
Expand Down Expand Up @@ -91,6 +92,12 @@ tactic * mk_tactic_for_logic(ast_manager & m, params_ref const & p, symbol const
return mk_default_tactic(m, p);
}

solver* mk_solver_for_logic(ast_manager & m, params_ref const & p, symbol const& logic) {
if (logic == "QF_BV")
return mk_inc_sat_solver(m, p);
return mk_smt_solver(m, p, logic);
}

class smt_strategic_solver_factory : public solver_factory {
symbol m_logic;
public:
Expand All @@ -105,7 +112,8 @@ class smt_strategic_solver_factory : public solver_factory {
l = logic;
tactic * t = mk_tactic_for_logic(m, p, l);
return mk_combined_solver(mk_tactic2solver(m, t, p, proofs_enabled, models_enabled, unsat_core_enabled, l),
mk_smt_solver(m, p, l),
mk_solver_for_logic(m, p, l),
//mk_smt_solver(m, p, l),
p);
}
};
Expand Down

0 comments on commit 5aee077

Please sign in to comment.