mirror of
https://github.com/Z3Prover/z3
synced 2025-04-30 04:15:51 +00:00
avoid creating full tables when negated variables are unitary, add lazy table infrastructure, fix coi_filter for relations, reduce dependencies on fixedpoing_parameters.hpp header file
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
0f9160a738
commit
716663b04a
40 changed files with 1221 additions and 126 deletions
|
@ -77,9 +77,9 @@ namespace pdr {
|
|||
pred_transformer::pred_transformer(context& ctx, manager& pm, func_decl* head):
|
||||
pm(pm), m(pm.get_manager()),
|
||||
ctx(ctx), m_head(head, m),
|
||||
m_sig(m), m_solver(pm, head->get_name()),
|
||||
m_sig(m), m_solver(pm, ctx.get_params(), head->get_name()),
|
||||
m_invariants(m), m_transition(m), m_initial_state(m),
|
||||
m_reachable(pm, pm.get_params()) {}
|
||||
m_reachable(pm, (datalog::PDR_CACHE_MODE)ctx.get_params().cache_mode()) {}
|
||||
|
||||
pred_transformer::~pred_transformer() {
|
||||
rule2inst::iterator it2 = m_rule2inst.begin(), end2 = m_rule2inst.end();
|
||||
|
@ -1239,7 +1239,7 @@ namespace pdr {
|
|||
m_params(params),
|
||||
m(m),
|
||||
m_context(0),
|
||||
m_pm(m_fparams, params, m),
|
||||
m_pm(m_fparams, params.max_num_contexts(), m),
|
||||
m_query_pred(m),
|
||||
m_query(0),
|
||||
m_search(m_params.bfs_model_search()),
|
||||
|
|
|
@ -28,6 +28,7 @@ Revision History:
|
|||
#include "pdr_manager.h"
|
||||
#include "pdr_prop_solver.h"
|
||||
#include "pdr_reachable_cache.h"
|
||||
#include "fixedpoint_params.hpp"
|
||||
|
||||
|
||||
namespace datalog {
|
||||
|
|
|
@ -166,14 +166,13 @@ namespace pdr {
|
|||
return res;
|
||||
}
|
||||
|
||||
manager::manager(smt_params& fparams, fixedpoint_params const& params, ast_manager& manager) :
|
||||
manager::manager(smt_params& fparams, unsigned max_num_contexts, ast_manager& manager) :
|
||||
m(manager),
|
||||
m_fparams(fparams),
|
||||
m_params(params),
|
||||
m_brwr(m),
|
||||
m_mux(m, get_state_suffixes()),
|
||||
m_background(m.mk_true(), m),
|
||||
m_contexts(fparams, params, m),
|
||||
m_contexts(fparams, max_num_contexts, m),
|
||||
m_next_unique_num(0)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -78,7 +78,6 @@ namespace pdr {
|
|||
{
|
||||
ast_manager& m;
|
||||
smt_params& m_fparams;
|
||||
fixedpoint_params const& m_params;
|
||||
|
||||
mutable bool_rewriter m_brwr;
|
||||
|
||||
|
@ -99,12 +98,10 @@ namespace pdr {
|
|||
void add_new_state(func_decl * s);
|
||||
|
||||
public:
|
||||
manager(smt_params& fparams, fixedpoint_params const& params,
|
||||
ast_manager & manager);
|
||||
manager(smt_params& fparams, unsigned max_num_contexts, ast_manager & manager);
|
||||
|
||||
ast_manager& get_manager() const { return m; }
|
||||
smt_params& get_fparams() const { return m_fparams; }
|
||||
fixedpoint_params const& get_params() const { return m_params; }
|
||||
bool_rewriter& get_brwr() const { return m_brwr; }
|
||||
|
||||
expr_ref mk_and(unsigned sz, expr* const* exprs);
|
||||
|
|
|
@ -30,6 +30,7 @@ Revision History:
|
|||
#include "pdr_farkas_learner.h"
|
||||
#include "ast_smt2_pp.h"
|
||||
#include "expr_replacer.h"
|
||||
#include "fixedpoint_params.hpp"
|
||||
|
||||
//
|
||||
// Auxiliary structure to introduce propositional names for assumptions that are not
|
||||
|
@ -225,12 +226,12 @@ namespace pdr {
|
|||
};
|
||||
|
||||
|
||||
prop_solver::prop_solver(manager& pm, symbol const& name) :
|
||||
prop_solver::prop_solver(manager& pm, fixedpoint_params const& p, symbol const& name) :
|
||||
m_fparams(pm.get_fparams()),
|
||||
m(pm.get_manager()),
|
||||
m_pm(pm),
|
||||
m_name(name),
|
||||
m_try_minimize_core(pm.get_params().try_minimize_core()),
|
||||
m_try_minimize_core(p.try_minimize_core()),
|
||||
m_ctx(pm.mk_fresh()),
|
||||
m_pos_level_atoms(m),
|
||||
m_neg_level_atoms(m),
|
||||
|
|
|
@ -31,6 +31,8 @@ Revision History:
|
|||
#include "pdr_manager.h"
|
||||
#include "pdr_smt_context_manager.h"
|
||||
|
||||
struct fixedpoint_params;
|
||||
|
||||
namespace pdr {
|
||||
class prop_solver {
|
||||
|
||||
|
@ -73,7 +75,7 @@ namespace pdr {
|
|||
|
||||
|
||||
public:
|
||||
prop_solver(pdr::manager& pm, symbol const& name);
|
||||
prop_solver(pdr::manager& pm, fixedpoint_params const& p, symbol const& name);
|
||||
|
||||
/** return true is s is a symbol introduced by prop_solver */
|
||||
bool is_aux_symbol(func_decl * s) const {
|
||||
|
|
|
@ -21,13 +21,13 @@ Revision History:
|
|||
|
||||
namespace pdr {
|
||||
|
||||
reachable_cache::reachable_cache(pdr::manager & pm, fixedpoint_params const& params)
|
||||
reachable_cache::reachable_cache(pdr::manager & pm, datalog::PDR_CACHE_MODE cm)
|
||||
: m(pm.get_manager()),
|
||||
m_pm(pm),
|
||||
m_ctx(0),
|
||||
m_ref_holder(m),
|
||||
m_disj_connector(m),
|
||||
m_cache_mode((datalog::PDR_CACHE_MODE)params.cache_mode()) {
|
||||
m_cache_mode(cm) {
|
||||
if (m_cache_mode == datalog::CONSTRAINT_CACHE) {
|
||||
m_ctx = pm.mk_fresh();
|
||||
m_ctx->assert_expr(m_pm.get_background());
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace pdr {
|
|||
void add_disjuncted_formula(expr * f);
|
||||
|
||||
public:
|
||||
reachable_cache(pdr::manager & pm, fixedpoint_params const& params);
|
||||
reachable_cache(pdr::manager & pm, datalog::PDR_CACHE_MODE cm);
|
||||
|
||||
void add_init(app * f) { add_disjuncted_formula(f); }
|
||||
|
||||
|
|
|
@ -113,10 +113,10 @@ namespace pdr {
|
|||
return m_context.get_proof();
|
||||
}
|
||||
|
||||
smt_context_manager::smt_context_manager(smt_params& fp, fixedpoint_params const& p, ast_manager& m):
|
||||
smt_context_manager::smt_context_manager(smt_params& fp, unsigned max_num_contexts, ast_manager& m):
|
||||
m_fparams(fp),
|
||||
m(m),
|
||||
m_max_num_contexts(p.max_num_contexts()),
|
||||
m_max_num_contexts(max_num_contexts),
|
||||
m_num_contexts(0),
|
||||
m_predicate_list(m) {
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ namespace pdr {
|
|||
app_ref_vector m_predicate_list;
|
||||
func_decl_set m_predicate_set;
|
||||
public:
|
||||
smt_context_manager(smt_params& fp, fixedpoint_params const& p, ast_manager& m);
|
||||
smt_context_manager(smt_params& fp, unsigned max_num_contexts, ast_manager& m);
|
||||
~smt_context_manager();
|
||||
smt_context* mk_fresh();
|
||||
void collect_statistics(statistics& st) const;
|
||||
|
|
|
@ -37,7 +37,6 @@ Notes:
|
|||
#include "rewriter_def.h"
|
||||
#include "util.h"
|
||||
#include "pdr_manager.h"
|
||||
#include "pdr_prop_solver.h"
|
||||
#include "pdr_util.h"
|
||||
#include "arith_decl_plugin.h"
|
||||
#include "expr_replacer.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue