3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-14 21:08:46 +00:00

Cleanup fixedpoint options

Replace pdr options with spacer
Repace fixedpoint module with fp
This commit is contained in:
Arie Gurfinkel 2018-06-13 15:29:34 -07:00
parent 619f681d28
commit 9109968e55
23 changed files with 344 additions and 353 deletions

View file

@ -18,5 +18,5 @@ z3_add_component(muz
smt smt
smt2parser smt2parser
PYG_FILES PYG_FILES
fixedpoint_params.pyg fp_params.pyg
) )

View file

@ -27,7 +27,7 @@ Revision History:
#include "ast/ast_smt2_pp.h" #include "ast/ast_smt2_pp.h"
#include "ast/datatype_decl_plugin.h" #include "ast/datatype_decl_plugin.h"
#include "ast/scoped_proof.h" #include "ast/scoped_proof.h"
#include "muz/base/fixedpoint_params.hpp" #include "muz/base/fp_params.hpp"
#include "ast/ast_pp_util.h" #include "ast/ast_pp_util.h"
@ -203,7 +203,7 @@ namespace datalog {
m_register_engine(re), m_register_engine(re),
m_fparams(fp), m_fparams(fp),
m_params_ref(pa), m_params_ref(pa),
m_params(alloc(fixedpoint_params, m_params_ref)), m_params(alloc(fp_params, m_params_ref)),
m_decl_util(m), m_decl_util(m),
m_rewriter(m), m_rewriter(m),
m_var_subst(m), m_var_subst(m),
@ -724,7 +724,7 @@ namespace datalog {
} }
void context::collect_params(param_descrs& p) { void context::collect_params(param_descrs& p) {
fixedpoint_params::collect_param_descrs(p); fp_params::collect_param_descrs(p);
insert_timeout(p); insert_timeout(p);
} }
@ -1299,4 +1299,3 @@ namespace datalog {
}; };

View file

@ -44,7 +44,7 @@ Revision History:
#include "muz/base/bind_variables.h" #include "muz/base/bind_variables.h"
#include "muz/base/rule_properties.h" #include "muz/base/rule_properties.h"
struct fixedpoint_params; struct fp_params;
namespace datalog { namespace datalog {
@ -170,7 +170,7 @@ namespace datalog {
register_engine_base& m_register_engine; register_engine_base& m_register_engine;
smt_params & m_fparams; smt_params & m_fparams;
params_ref m_params_ref; params_ref m_params_ref;
fixedpoint_params* m_params; fp_params* m_params;
bool m_generate_proof_trace; // cached configuration parameter bool m_generate_proof_trace; // cached configuration parameter
bool m_unbound_compressor; // cached configuration parameter bool m_unbound_compressor; // cached configuration parameter
symbol m_default_relation; // cached configuration parameter symbol m_default_relation; // cached configuration parameter
@ -236,7 +236,7 @@ namespace datalog {
ast_manager & get_manager() const { return m; } ast_manager & get_manager() const { return m; }
rule_manager & get_rule_manager() { return m_rule_manager; } rule_manager & get_rule_manager() { return m_rule_manager; }
smt_params & get_fparams() const { return m_fparams; } smt_params & get_fparams() const { return m_fparams; }
fixedpoint_params const& get_params() const { return *m_params; } fp_params const& get_params() const { return *m_params; }
DL_ENGINE get_engine() { configure_engine(); return m_engine_type; } DL_ENGINE get_engine() { configure_engine(); return m_engine_type; }
register_engine_base& get_register_engine() { return m_register_engine; } register_engine_base& get_register_engine() { return m_register_engine; }
th_rewriter& get_rewriter() { return m_rewriter; } th_rewriter& get_rewriter() { return m_rewriter; }
@ -627,4 +627,3 @@ namespace datalog {
}; };
#endif /* DL_CONTEXT_H_ */ #endif /* DL_CONTEXT_H_ */

View file

@ -1,4 +1,4 @@
def_module_params('fixedpoint', def_module_params('fp',
description='fixedpoint parameters', description='fixedpoint parameters',
export=True, export=True,
params=(('timeout', UINT, UINT_MAX, 'set timeout'), params=(('timeout', UINT, UINT_MAX, 'set timeout'),

View file

@ -33,7 +33,7 @@ Revision History:
#include "muz/transforms/dl_mk_rule_inliner.h" #include "muz/transforms/dl_mk_rule_inliner.h"
#include "ast/scoped_proof.h" #include "ast/scoped_proof.h"
#include "muz/base/fixedpoint_params.hpp" #include "muz/base/fp_params.hpp"
namespace datalog { namespace datalog {

View file

@ -30,14 +30,14 @@ Notes:
#include "util/scoped_ctrl_c.h" #include "util/scoped_ctrl_c.h"
#include "util/scoped_timer.h" #include "util/scoped_timer.h"
#include "util/trail.h" #include "util/trail.h"
#include "muz/base/fixedpoint_params.hpp" #include "muz/base/fp_params.hpp"
#include<iomanip> #include<iomanip>
struct dl_context { struct dl_context {
smt_params m_fparams; smt_params m_fparams;
params_ref m_params_ref; params_ref m_params_ref;
fixedpoint_params m_params; fp_params m_params;
cmd_context & m_cmd; cmd_context & m_cmd;
datalog::register_engine m_register_engine; datalog::register_engine m_register_engine;
dl_collected_cmds* m_collected_cmds; dl_collected_cmds* m_collected_cmds;
@ -46,7 +46,7 @@ struct dl_context {
scoped_ptr<datalog::context> m_context; scoped_ptr<datalog::context> m_context;
trail_stack<dl_context> m_trail; trail_stack<dl_context> m_trail;
fixedpoint_params const& get_params() { fp_params const& get_params() {
init(); init();
return m_context->get_params(); return m_context->get_params();
} }

View file

@ -27,7 +27,7 @@ Revision History:
#include "muz/transforms/dl_mk_slice.h" #include "muz/transforms/dl_mk_slice.h"
#include "tactic/generic_model_converter.h" #include "tactic/generic_model_converter.h"
#include "muz/transforms/dl_transforms.h" #include "muz/transforms/dl_transforms.h"
#include "muz/base/fixedpoint_params.hpp" #include "muz/base/fp_params.hpp"
#include "ast/ast_util.h" #include "ast/ast_util.h"
#include "ast/rewriter/var_subst.h" #include "ast/rewriter/var_subst.h"
@ -416,4 +416,3 @@ tactic * mk_horn_tactic(ast_manager & m, params_ref const & p) {
tactic * mk_horn_simplify_tactic(ast_manager & m, params_ref const & p) { tactic * mk_horn_simplify_tactic(ast_manager & m, params_ref const & p) {
return clean(alloc(horn_tactic, true, m, p)); return clean(alloc(horn_tactic, true, m, p));
} }

View file

@ -2175,8 +2175,7 @@ pob* pred_transformer::pobs::mk_pob(pob *parent,
// ---------------- // ----------------
// context // context
context::context(fixedpoint_params const& params, context::context(fp_params const& params, ast_manager& m) :
ast_manager& m) :
m_params(params), m_params(params),
m(m), m(m),
m_context(nullptr), m_context(nullptr),

View file

@ -33,7 +33,7 @@ Notes:
#include "muz/spacer/spacer_prop_solver.h" #include "muz/spacer/spacer_prop_solver.h"
#include "muz/spacer/spacer_json.h" #include "muz/spacer/spacer_json.h"
#include "muz/base/fixedpoint_params.hpp" #include "muz/base/fp_params.hpp"
namespace datalog { namespace datalog {
class rule_set; class rule_set;
@ -877,7 +877,7 @@ class context {
stopwatch m_create_children_watch; stopwatch m_create_children_watch;
stopwatch m_init_rules_watch; stopwatch m_init_rules_watch;
fixedpoint_params const& m_params; fp_params const& m_params;
ast_manager& m; ast_manager& m;
datalog::context* m_context; datalog::context* m_context;
manager m_pm; manager m_pm;
@ -993,11 +993,11 @@ public:
Initial values of predicates are stored in corresponding relations in dctx. Initial values of predicates are stored in corresponding relations in dctx.
We check whether there is some reachable state of the relation checked_relation. We check whether there is some reachable state of the relation checked_relation.
*/ */
context(fixedpoint_params const& params, ast_manager& m); context(fp_params const& params, ast_manager& m);
~context(); ~context();
const fixedpoint_params &get_params() const { return m_params; } const fp_params &get_params() const { return m_params; }
bool use_native_mbp () {return m_use_native_mbp;} bool use_native_mbp () {return m_use_native_mbp;}
bool use_ground_pob () {return m_ground_pob;} bool use_ground_pob () {return m_ground_pob;}
bool use_instantiate () {return m_instantiate;} bool use_instantiate () {return m_instantiate;}

View file

@ -65,7 +65,7 @@ private:
bool m_print_farkas_stats; bool m_print_farkas_stats;
bool m_old_hyp_reducer; bool m_old_hyp_reducer;
bool is_proxy(expr *e, app_ref &def); bool is_proxy(expr *e, app_ref &def);
void undo_proxies_in_core(ptr_vector<expr> &v); void undo_proxies_in_core(expr_ref_vector &v);
app* mk_proxy(expr *v); app* mk_proxy(expr *v);
app* fresh_proxy(); app* fresh_proxy();
void elim_proxies(expr_ref_vector &v); void elim_proxies(expr_ref_vector &v);

View file

@ -36,13 +36,13 @@ Revision History:
#include "muz/spacer/spacer_prop_solver.h" #include "muz/spacer/spacer_prop_solver.h"
#include "model/model_evaluator.h" #include "model/model_evaluator.h"
#include "muz/base/fixedpoint_params.hpp" #include "muz/base/fp_params.hpp"
namespace spacer { namespace spacer {
prop_solver::prop_solver(ast_manager &m, prop_solver::prop_solver(ast_manager &m,
solver *solver0, solver *solver1, solver *solver0, solver *solver1,
fixedpoint_params const& p, symbol const& name) : fp_params const& p, symbol const& name) :
m(m), m(m),
m_name(name), m_name(name),
m_ctx(nullptr), m_ctx(nullptr),
@ -329,13 +329,14 @@ lbool prop_solver::internal_check_assumptions(expr_ref_vector &hard_atoms,
} }
if (result == l_false && m_core && m.proofs_enabled() && !m_subset_based_core) { if (result == l_false && m_core && m.proofs_enabled() && !m_subset_based_core) {
TRACE("spacer", tout << "theory core\n";); TRACE("spacer", tout << "Using IUC core\n";);
m_core->reset(); m_core->reset();
m_ctx->get_iuc(*m_core); m_ctx->get_iuc(*m_core);
} else if (result == l_false && m_core) { } else if (result == l_false && m_core) {
m_core->reset(); m_core->reset();
m_ctx->get_unsat_core(*m_core); m_ctx->get_unsat_core(*m_core);
// manually undo proxies because maxsmt() call above manually adds proxies // manually undo proxies because maxsmt() call above manually adds proxies
// AG: don't think this is needed. maxsmt() undoes the proxies already
m_ctx->undo_proxies(*m_core); m_ctx->undo_proxies(*m_core);
} }

View file

@ -33,7 +33,7 @@ Revision History:
#include "muz/spacer/spacer_iuc_solver.h" #include "muz/spacer/spacer_iuc_solver.h"
#include "muz/spacer/spacer_util.h" #include "muz/spacer/spacer_util.h"
struct fixedpoint_params; struct fp_params;
namespace spacer { namespace spacer {
typedef ptr_vector<func_decl> decl_vector; typedef ptr_vector<func_decl> decl_vector;
@ -76,7 +76,7 @@ private:
public: public:
prop_solver(ast_manager &m, solver *solver0, solver* solver1, prop_solver(ast_manager &m, solver *solver0, solver* solver1,
fixedpoint_params const& p, symbol const& name); fp_params const& p, symbol const& name);
void set_core(expr_ref_vector* core) { m_core = core; } void set_core(expr_ref_vector* core) { m_core = core; }

View file

@ -30,7 +30,7 @@ Revision History:
#include "ast/for_each_expr.h" #include "ast/for_each_expr.h"
#include "ast/substitution/matcher.h" #include "ast/substitution/matcher.h"
#include "ast/scoped_proof.h" #include "ast/scoped_proof.h"
#include "muz/base/fixedpoint_params.hpp" #include "muz/base/fp_params.hpp"
#include "ast/ast_util.h" #include "ast/ast_util.h"
namespace tb { namespace tb {

View file

@ -20,7 +20,7 @@ Revision History:
#include "ast/expr_abstract.h" #include "ast/expr_abstract.h"
#include "muz/base/dl_context.h" #include "muz/base/dl_context.h"
#include "muz/base/dl_context.h" #include "muz/base/dl_context.h"
#include "muz/base/fixedpoint_params.hpp" #include "muz/base/fp_params.hpp"
#include "muz/transforms/dl_mk_array_eq_rewrite.h" #include "muz/transforms/dl_mk_array_eq_rewrite.h"
#include "ast/factor_equivs.h" #include "ast/factor_equivs.h"

View file

@ -23,7 +23,7 @@ Revision History:
#include "muz/base/dl_context.h" #include "muz/base/dl_context.h"
#include "ast/rewriter/expr_safe_replace.h" #include "ast/rewriter/expr_safe_replace.h"
#include "ast/expr_abstract.h" #include "ast/expr_abstract.h"
#include "muz/base/fixedpoint_params.hpp" #include "muz/base/fp_params.hpp"
namespace datalog { namespace datalog {

View file

@ -24,7 +24,7 @@ Revision History:
#include "ast/rewriter/expr_safe_replace.h" #include "ast/rewriter/expr_safe_replace.h"
#include "tactic/generic_model_converter.h" #include "tactic/generic_model_converter.h"
#include "muz/transforms/dl_mk_interp_tail_simplifier.h" #include "muz/transforms/dl_mk_interp_tail_simplifier.h"
#include "muz/base/fixedpoint_params.hpp" #include "muz/base/fp_params.hpp"
#include "ast/scoped_proof.h" #include "ast/scoped_proof.h"
#include "model/model_v2_pp.h" #include "model/model_v2_pp.h"

View file

@ -27,7 +27,7 @@ Revision History:
#include "muz/transforms/dl_mk_interp_tail_simplifier.h" #include "muz/transforms/dl_mk_interp_tail_simplifier.h"
#include "ast/ast_util.h" #include "ast/ast_util.h"
#include "muz/base/fixedpoint_params.hpp" #include "muz/base/fp_params.hpp"
namespace datalog { namespace datalog {
// ----------------------------------- // -----------------------------------
@ -618,4 +618,3 @@ namespace datalog {
} }
}; };

View file

@ -23,7 +23,6 @@ Revision History:
#include "muz/base/dl_context.h" #include "muz/base/dl_context.h"
#include "ast/rewriter/expr_safe_replace.h" #include "ast/rewriter/expr_safe_replace.h"
#include "ast/expr_abstract.h" #include "ast/expr_abstract.h"
#include "muz/base/fixedpoint_params.hpp"
namespace datalog { namespace datalog {
@ -371,5 +370,3 @@ namespace datalog {
}; };

View file

@ -52,7 +52,7 @@ Subsumption transformation (remove rule):
#include "ast/rewriter/rewriter.h" #include "ast/rewriter/rewriter.h"
#include "ast/rewriter/rewriter_def.h" #include "ast/rewriter/rewriter_def.h"
#include "muz/transforms/dl_mk_rule_inliner.h" #include "muz/transforms/dl_mk_rule_inliner.h"
#include "muz/base/fixedpoint_params.hpp" #include "muz/base/fp_params.hpp"
namespace datalog { namespace datalog {
@ -872,4 +872,3 @@ namespace datalog {
} }
}; };

View file

@ -18,7 +18,7 @@ Revision History:
#include "muz/transforms/dl_mk_scale.h" #include "muz/transforms/dl_mk_scale.h"
#include "muz/base/dl_context.h" #include "muz/base/dl_context.h"
#include "muz/base/fixedpoint_params.hpp" #include "muz/base/fp_params.hpp"
namespace datalog { namespace datalog {

View file

@ -24,7 +24,7 @@ Revision History:
#include "ast/rewriter/rewriter.h" #include "ast/rewriter/rewriter.h"
#include "ast/rewriter/rewriter_def.h" #include "ast/rewriter/rewriter_def.h"
#include "muz/transforms/dl_mk_subsumption_checker.h" #include "muz/transforms/dl_mk_subsumption_checker.h"
#include "muz/base/fixedpoint_params.hpp" #include "muz/base/fp_params.hpp"
#include "tactic/generic_model_converter.h" #include "tactic/generic_model_converter.h"
@ -368,4 +368,3 @@ namespace datalog {
} }
}; };

View file

@ -35,7 +35,7 @@ Revision History:
#include "muz/transforms/dl_mk_scale.h" #include "muz/transforms/dl_mk_scale.h"
#include "muz/transforms/dl_mk_array_eq_rewrite.h" #include "muz/transforms/dl_mk_array_eq_rewrite.h"
#include "muz/transforms/dl_mk_array_instantiation.h" #include "muz/transforms/dl_mk_array_instantiation.h"
#include "muz/base/fixedpoint_params.hpp" #include "muz/base/fp_params.hpp"
namespace datalog { namespace datalog {