mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 16:45:31 +00:00
move model and proof converters to self-contained module
This commit is contained in:
parent
7b12a5c5a8
commit
1dca6402fb
88 changed files with 170 additions and 134 deletions
|
@ -50,6 +50,7 @@ add_subdirectory(ast/normal_forms)
|
|||
add_subdirectory(ast/macros)
|
||||
add_subdirectory(model)
|
||||
add_subdirectory(ast/euf)
|
||||
add_subdirectory(ast/converters)
|
||||
add_subdirectory(ast/simplifiers)
|
||||
add_subdirectory(tactic)
|
||||
add_subdirectory(ast/substitution)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
--*/
|
||||
#pragma once
|
||||
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
#include "ackermannization/ackr_info.h"
|
||||
|
||||
model_converter * mk_ackermannize_bv_model_converter(ast_manager & m, const ackr_info_ref& info);
|
||||
|
|
|
@ -15,7 +15,7 @@ Revision History:
|
|||
--*/
|
||||
#pragma once
|
||||
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
#include "ackermannization/ackr_info.h"
|
||||
|
||||
model_converter * mk_ackr_model_converter(ast_manager & m, const ackr_info_ref & info, model_ref & abstr_model);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
--*/
|
||||
#pragma once
|
||||
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
#include "ackermannization/ackr_info.h"
|
||||
|
||||
model_converter * mk_lackr_model_converter_lazy(ast_manager & m, const ackr_info_ref& info, model_ref& abstr_model);
|
||||
|
|
8
src/ast/converters/CMakeLists.txt
Normal file
8
src/ast/converters/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
z3_add_component(converters
|
||||
SOURCES
|
||||
model_converter.cpp
|
||||
proof_converter.cpp
|
||||
generic_model_converter.cpp
|
||||
COMPONENT_DEPENDENCIES
|
||||
model
|
||||
)
|
|
@ -24,7 +24,7 @@ Notes:
|
|||
#include "ast/occurs.h"
|
||||
#include "ast/rewriter/expr_safe_replace.h"
|
||||
#include "ast/rewriter/th_rewriter.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "model/model_v2_pp.h"
|
||||
#include "model/model_evaluator.h"
|
||||
|
|
@ -19,7 +19,7 @@ Notes:
|
|||
--*/
|
||||
#pragma once
|
||||
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
|
||||
class generic_model_converter : public model_converter {
|
||||
enum instruction { HIDE, ADD };
|
|
@ -16,7 +16,7 @@ Author:
|
|||
Notes:
|
||||
|
||||
--*/
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
#include "model/model_v2_pp.h"
|
||||
#include "ast/ast_smt2_pp.h"
|
||||
|
|
@ -57,7 +57,7 @@ Notes:
|
|||
#include "util/ref.h"
|
||||
#include "ast/ast_pp_util.h"
|
||||
#include "model/model.h"
|
||||
#include "tactic/converter.h"
|
||||
#include "ast/converters/converter.h"
|
||||
|
||||
class labels_vec : public svector<symbol> {};
|
||||
class smt2_pp_environment;
|
|
@ -16,8 +16,7 @@ Author:
|
|||
Notes:
|
||||
|
||||
--*/
|
||||
#include "tactic/proof_converter.h"
|
||||
#include "tactic/goal.h"
|
||||
#include "ast/converters/proof_converter.h"
|
||||
#include "ast/ast_smt2_pp.h"
|
||||
|
||||
class concat_proof_converter : public concat_converter<proof_converter> {
|
||||
|
@ -46,41 +45,6 @@ proof_converter * concat(proof_converter * pc1, proof_converter * pc2) {
|
|||
return alloc(concat_proof_converter, pc1, pc2);
|
||||
}
|
||||
|
||||
class subgoal_proof_converter : public proof_converter {
|
||||
proof_converter_ref m_pc;
|
||||
goal_ref_buffer m_goals;
|
||||
public:
|
||||
subgoal_proof_converter(proof_converter* pc, unsigned n, goal * const* goals):
|
||||
m_pc(pc)
|
||||
{
|
||||
for (unsigned i = 0; i < n; ++i) m_goals.push_back(goals[i]);
|
||||
}
|
||||
|
||||
proof_ref operator()(ast_manager & m, unsigned num_source, proof * const * source) override {
|
||||
// ignore the proofs from the arguments, instead obtain the proofs fromt he subgoals.
|
||||
SASSERT(num_source == 0);
|
||||
proof_converter_ref_buffer pc_buffer;
|
||||
for (goal_ref g : m_goals) {
|
||||
pc_buffer.push_back(g->pc());
|
||||
|
||||
}
|
||||
return apply(m, m_pc, pc_buffer);
|
||||
}
|
||||
|
||||
proof_converter* translate(ast_translation& tr) override {
|
||||
proof_converter_ref pc1 = m_pc->translate(tr);
|
||||
goal_ref_buffer goals;
|
||||
for (goal_ref g : m_goals) goals.push_back(g->translate(tr));
|
||||
return alloc(subgoal_proof_converter, pc1.get(), goals.size(), goals.data());
|
||||
}
|
||||
|
||||
void display(std::ostream& out) override {}
|
||||
|
||||
};
|
||||
|
||||
proof_converter * concat(proof_converter *pc, unsigned n, goal* const* goals) {
|
||||
return alloc(subgoal_proof_converter, pc, n, goals);
|
||||
}
|
||||
|
||||
class proof2pc : public proof_converter {
|
||||
proof_ref m_pr;
|
|
@ -20,8 +20,7 @@ Notes:
|
|||
|
||||
#include "ast/ast.h"
|
||||
#include "util/ref.h"
|
||||
#include "tactic/converter.h"
|
||||
class goal;
|
||||
#include "ast/converters/converter.h"
|
||||
|
||||
class proof_converter : public converter {
|
||||
public:
|
||||
|
@ -36,12 +35,6 @@ typedef sref_buffer<proof_converter> proof_converter_ref_buffer;
|
|||
|
||||
proof_converter * concat(proof_converter * pc1, proof_converter * pc2);
|
||||
|
||||
/**
|
||||
\brief create a proof converter that takes a set of subgoals and converts their proofs to a proof of
|
||||
the goal they were derived from.
|
||||
*/
|
||||
proof_converter * concat(proof_converter *pc1, unsigned n, goal* const* goals);
|
||||
|
||||
proof_converter * proof2proof_converter(ast_manager & m, proof * pr);
|
||||
|
||||
void apply(ast_manager & m, proof_converter * pc, proof_ref & pr);
|
|
@ -33,6 +33,7 @@ Author:
|
|||
#include "util/statistics.h"
|
||||
#include "util/params.h"
|
||||
#include "ast/simplifiers/dependent_expr.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
|
||||
/**
|
||||
abstract interface to state updated by simplifiers.
|
||||
|
@ -66,6 +67,7 @@ public:
|
|||
virtual void collect_statistics(statistics& st) const {}
|
||||
virtual void reset_statistics() {}
|
||||
virtual void updt_params(params_ref const& p) {}
|
||||
virtual model_converter_ref get_model_converter() { return model_converter_ref(); }
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,6 +23,7 @@ Author:
|
|||
#include "ast/recfun_decl_plugin.h"
|
||||
#include "ast/rewriter/expr_replacer.h"
|
||||
#include "ast/simplifiers/solve_eqs.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
|
||||
|
||||
namespace euf {
|
||||
|
@ -183,14 +184,16 @@ namespace euf {
|
|||
m_unsafe_vars.mark(term);
|
||||
}
|
||||
|
||||
#if 0
|
||||
typedef generic_model_converter gmc;
|
||||
|
||||
model_converter_ref solve_eqs::get_model_converter() {
|
||||
model_converter_ref mc = alloc(gmc, m, "solve-eqs");
|
||||
for (unsigned id : m_subst_ids)
|
||||
static_cast<gmc*>(mc.get())->add(id2var(id), m_subst->find(v));
|
||||
for (unsigned id : m_subst_ids) {
|
||||
auto* v = m_id2var[id];
|
||||
static_cast<gmc*>(mc.get())->add(v, m_subst->find(v));
|
||||
}
|
||||
return mc;
|
||||
}
|
||||
#endif
|
||||
|
||||
solve_eqs::solve_eqs(ast_manager& m, dependent_expr_state& fmls) :
|
||||
dependent_expr_simplifier(m, fmls), m_rewriter(m) {
|
||||
|
|
|
@ -18,9 +18,9 @@ Author:
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "ast/rewriter/th_rewriter.h"
|
||||
#include "ast/expr_substitution.h"
|
||||
#include "util/scoped_ptr_vector.h"
|
||||
#include "ast/expr_substitution.h"
|
||||
#include "ast/rewriter/th_rewriter.h"
|
||||
#include "ast/simplifiers/extract_eqs.h"
|
||||
|
||||
namespace euf {
|
||||
|
@ -74,6 +74,6 @@ namespace euf {
|
|||
void updt_params(params_ref const& p) override;
|
||||
void collect_statistics(statistics& st) const override;
|
||||
|
||||
// model_converter_ref get_model_converter();
|
||||
model_converter_ref get_model_converter() override;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ Notes:
|
|||
#include "model/model_v2_pp.h"
|
||||
#include "model/model_params.hpp"
|
||||
#include "tactic/tactic_exception.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "solver/smt_logics.h"
|
||||
#include "cmd_context/basic_cmds.h"
|
||||
#include "cmd_context/cmd_context.h"
|
||||
|
|
|
@ -33,7 +33,7 @@ Notes:
|
|||
#include "ast/datatype_decl_plugin.h"
|
||||
#include "ast/recfun_decl_plugin.h"
|
||||
#include "ast/rewriter/seq_rewriter.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "solver/solver.h"
|
||||
#include "solver/check_logic.h"
|
||||
#include "solver/progress_callback.h"
|
||||
|
|
|
@ -30,7 +30,7 @@ Revision History:
|
|||
#include "util/statistics.h"
|
||||
#include "util/params.h"
|
||||
#include "util/trail.h"
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
#include "model/model2expr.h"
|
||||
#include "smt/params/smt_params.h"
|
||||
#include "muz/base/dl_rule_transformer.h"
|
||||
|
|
|
@ -41,7 +41,7 @@ Revision History:
|
|||
#include "ast/rewriter/expr_replacer.h"
|
||||
#include "ast/rewriter/bool_rewriter.h"
|
||||
#include "ast/rewriter/expr_safe_replace.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ast/scoped_proof.h"
|
||||
#include "ast/datatype_decl_plugin.h"
|
||||
#include "ast/ast_util.h"
|
||||
|
|
|
@ -23,8 +23,8 @@ Revision History:
|
|||
#include "muz/base/dl_costs.h"
|
||||
#include "muz/base/dl_util.h"
|
||||
#include "ast/used_vars.h"
|
||||
#include "tactic/proof_converter.h"
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/proof_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
#include "ast/rewriter/ast_counter.h"
|
||||
#include "ast/rewriter/rewriter.h"
|
||||
#include "muz/base/hnf.h"
|
||||
|
|
|
@ -27,7 +27,7 @@ Copyright (c) 2015 Microsoft Corporation
|
|||
#include "ast/ast.h"
|
||||
#include "util/params.h"
|
||||
#include "ast/normal_forms/defined_names.h"
|
||||
#include "tactic/proof_converter.h"
|
||||
#include "ast/converters/proof_converter.h"
|
||||
|
||||
class hnf {
|
||||
class imp;
|
||||
|
|
|
@ -20,9 +20,9 @@ Revision History:
|
|||
#include "ast/rewriter/var_subst.h"
|
||||
#include "ast/rewriter/expr_replacer.h"
|
||||
#include "tactic/tactical.h"
|
||||
#include "tactic/model_converter.h"
|
||||
#include "tactic/proof_converter.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
#include "ast/converters/proof_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "muz/fp/horn_tactic.h"
|
||||
#include "muz/base/dl_context.h"
|
||||
#include "muz/fp/dl_register_engine.h"
|
||||
|
|
|
@ -28,7 +28,7 @@ Revision History:
|
|||
#include "ast/expr_abstract.h"
|
||||
#include "model/model2expr.h"
|
||||
#include "model/model_smt2_pp.h"
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
|
||||
#include "smt/smt_solver.h"
|
||||
namespace spacer {
|
||||
|
|
|
@ -22,7 +22,7 @@ Revision History:
|
|||
#include "ast/rewriter/rewriter_def.h"
|
||||
#include "ast/ast_pp.h"
|
||||
#include "ast/rewriter/expr_safe_replace.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "muz/transforms/dl_mk_interp_tail_simplifier.h"
|
||||
#include "muz/base/fp_params.hpp"
|
||||
#include "ast/scoped_proof.h"
|
||||
|
|
|
@ -21,7 +21,7 @@ Author:
|
|||
#include "muz/dataflow/dataflow.h"
|
||||
#include "muz/dataflow/reachability.h"
|
||||
#include "ast/ast_pp.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ast/ast_util.h"
|
||||
|
||||
namespace datalog {
|
||||
|
|
|
@ -25,7 +25,7 @@ Revision History:
|
|||
#include "ast/rewriter/rewriter_def.h"
|
||||
#include "muz/transforms/dl_mk_subsumption_checker.h"
|
||||
#include "muz/base/fp_params.hpp"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
|
||||
|
||||
namespace datalog {
|
||||
|
|
|
@ -24,7 +24,7 @@ Notes:
|
|||
#pragma once
|
||||
|
||||
#include "nlsat/nlsat_types.h"
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
|
||||
class goal;
|
||||
class expr2var;
|
||||
|
|
|
@ -39,7 +39,7 @@ Notes:
|
|||
#include "tactic/arith/card2bv_tactic.h"
|
||||
#include "tactic/arith/eq2bv_tactic.h"
|
||||
#include "tactic/bv/dt2bv_tactic.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ackermannization/ackermannize_bv_tactic.h"
|
||||
#include "sat/sat_solver/inc_sat_solver.h"
|
||||
#include "sat/sat_params.hpp"
|
||||
|
|
|
@ -20,7 +20,7 @@ Notes:
|
|||
#include "ast/ast.h"
|
||||
#include "ast/arith_decl_plugin.h"
|
||||
#include "ast/bv_decl_plugin.h"
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
#include "tactic/tactic.h"
|
||||
#include "qe/qsat.h"
|
||||
#include "opt/opt_solver.h"
|
||||
|
|
|
@ -29,7 +29,7 @@ Notes:
|
|||
#include "smt/params/smt_params.h"
|
||||
#include "smt/smt_types.h"
|
||||
#include "smt/theory_opt.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
|
||||
namespace opt {
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ Notes:
|
|||
#include "smt/smt_context.h"
|
||||
#include "opt/opt_context.h"
|
||||
#include "util/sorting_network.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
|
||||
namespace opt {
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ Revision History:
|
|||
#pragma once
|
||||
|
||||
#include "tactic/tactic.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "qe/qe_mbp.h"
|
||||
|
||||
namespace qe {
|
||||
|
|
|
@ -22,7 +22,7 @@ Author:
|
|||
#include "ast/ast_util.h"
|
||||
#include "ast/euf/euf_egraph.h"
|
||||
#include "ast/rewriter/th_rewriter.h"
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
#include "sat/sat_extension.h"
|
||||
#include "sat/smt/atom2bool_var.h"
|
||||
#include "sat/smt/sat_th.h"
|
||||
|
|
|
@ -37,7 +37,7 @@ Notes:
|
|||
#include "model/model_evaluator.h"
|
||||
#include "model/model_v2_pp.h"
|
||||
#include "tactic/tactic.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "sat/sat_cut_simplifier.h"
|
||||
#include "sat/sat_drat.h"
|
||||
#include "sat/tactic/goal2sat.h"
|
||||
|
|
|
@ -37,7 +37,7 @@ Notes:
|
|||
#include "model/model_evaluator.h"
|
||||
#include "model/model_v2_pp.h"
|
||||
#include "tactic/tactic.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "sat/sat_cut_simplifier.h"
|
||||
#include "sat/sat_drat.h"
|
||||
#include "sat/tactic/sat2goal.h"
|
||||
|
|
|
@ -31,7 +31,7 @@ Notes:
|
|||
#include "tactic/goal.h"
|
||||
#include "sat/sat_model_converter.h"
|
||||
#include "sat/sat_solver.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "sat/smt/atom2bool_var.h"
|
||||
|
||||
class sat2goal {
|
||||
|
|
|
@ -26,7 +26,7 @@ Notes:
|
|||
#include "smt/smt_solver.h"
|
||||
#include "tactic/tactic.h"
|
||||
#include "tactic/tactical.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "solver/solver2tactic.h"
|
||||
#include "solver/solver.h"
|
||||
#include "solver/mus.h"
|
||||
|
|
|
@ -22,7 +22,7 @@ Revision History:
|
|||
#include "smt/theory_arith.h"
|
||||
#include "smt/smt_farkas_util.h"
|
||||
#include "ast/rewriter/th_rewriter.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
|
||||
namespace smt {
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include "smt/smt_model_generator.h"
|
||||
#include "smt/arith_eq_adapter.h"
|
||||
#include "util/nat_set.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ast/ast_pp.h"
|
||||
#include "ast/ast_ll_pp.h"
|
||||
#include "util/cancel_eh.h"
|
||||
|
|
|
@ -21,7 +21,7 @@ Notes:
|
|||
|
||||
#include "smt/smt_theory.h"
|
||||
#include "smt/smt_clause.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
|
||||
namespace smt {
|
||||
class theory_wmaxsat : public theory {
|
||||
|
|
|
@ -23,7 +23,7 @@ Notes:
|
|||
#include "util/statistics.h"
|
||||
#include "util/event_handler.h"
|
||||
#include "util/timer.h"
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
|
||||
/**
|
||||
\brief Abstract interface for the result of a (check-sat) like command.
|
||||
|
|
|
@ -22,7 +22,7 @@ Notes:
|
|||
#include "ast/ast_pp.h"
|
||||
#include "ast/ast_pp_util.h"
|
||||
#include "ast/display_dimacs.h"
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
#include "solver/solver.h"
|
||||
#include "params/solver_params.hpp"
|
||||
#include "model/model_evaluator.h"
|
||||
|
|
|
@ -19,7 +19,7 @@ Notes:
|
|||
|
||||
#include "solver/solver.h"
|
||||
#include "tactic/tactic.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "solver/solver2tactic.h"
|
||||
#include "ast/ast_util.h"
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Notes:
|
|||
#pragma once
|
||||
|
||||
#include "tactic/tactic.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
class solver;
|
||||
|
||||
tactic * mk_solver2tactic(solver* s);
|
||||
|
|
|
@ -2,15 +2,12 @@ z3_add_component(tactic
|
|||
SOURCES
|
||||
dependency_converter.cpp
|
||||
equiv_proof_converter.cpp
|
||||
generic_model_converter.cpp
|
||||
goal.cpp
|
||||
goal_num_occurs.cpp
|
||||
goal_shared_occs.cpp
|
||||
goal_util.cpp
|
||||
horn_subsume_model_converter.cpp
|
||||
model_converter.cpp
|
||||
probe.cpp
|
||||
proof_converter.cpp
|
||||
replace_proof_converter.cpp
|
||||
tactical.cpp
|
||||
tactic.cpp
|
||||
|
@ -18,6 +15,7 @@ z3_add_component(tactic
|
|||
ast
|
||||
model
|
||||
simplifiers
|
||||
converters
|
||||
TACTIC_HEADERS
|
||||
probe.h
|
||||
tactic.h
|
||||
|
|
|
@ -22,7 +22,7 @@ Notes:
|
|||
#include "ast/rewriter/pb2bv_rewriter.h"
|
||||
#include "ast/ast_util.h"
|
||||
#include "ast/ast_pp.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
|
||||
class card2bv_tactic : public tactic {
|
||||
ast_manager & m;
|
||||
|
|
|
@ -20,7 +20,7 @@ Revision History:
|
|||
|
||||
--*/
|
||||
#include "tactic/tactical.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ast/arith_decl_plugin.h"
|
||||
#include "tactic/core/simplify_tactic.h"
|
||||
#include "ast/ast_smt2_pp.h"
|
||||
|
|
|
@ -23,7 +23,7 @@ Revision History:
|
|||
--*/
|
||||
#include "tactic/tactical.h"
|
||||
#include "ast/rewriter/th_rewriter.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ast/arith_decl_plugin.h"
|
||||
#include "ast/expr_substitution.h"
|
||||
#include "ast/ast_smt2_pp.h"
|
||||
|
|
|
@ -25,7 +25,7 @@ Notes:
|
|||
#include "ast/ast_pp_util.h"
|
||||
#include "tactic/tactical.h"
|
||||
#include "tactic/arith/bound_manager.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
|
||||
class lia2card_tactic : public tactic {
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ Revision History:
|
|||
#include "tactic/arith/bound_manager.h"
|
||||
#include "ast/rewriter/th_rewriter.h"
|
||||
#include "ast/for_each_expr.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ast/arith_decl_plugin.h"
|
||||
#include "ast/expr_substitution.h"
|
||||
#include "ast/ast_smt2_pp.h"
|
||||
|
|
|
@ -27,7 +27,7 @@ Notes:
|
|||
#include "util/optional.h"
|
||||
#include "tactic/arith/bv2int_rewriter.h"
|
||||
#include "tactic/arith/bv2real_rewriter.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "tactic/arith/bound_manager.h"
|
||||
#include "util/obj_pair_hashtable.h"
|
||||
#include "ast/ast_smt2_pp.h"
|
||||
|
|
|
@ -21,7 +21,7 @@ Revision History:
|
|||
#include "tactic/tactical.h"
|
||||
#include "tactic/arith/bound_manager.h"
|
||||
#include "ast/rewriter/th_rewriter.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ast/arith_decl_plugin.h"
|
||||
#include "ast/expr_substitution.h"
|
||||
#include "ast/ast_smt2_pp.h"
|
||||
|
|
|
@ -18,7 +18,7 @@ Notes:
|
|||
--*/
|
||||
#pragma once
|
||||
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
#include "tactic/arith/bound_manager.h"
|
||||
|
||||
class pb2bv_model_converter : public model_converter {
|
||||
|
|
|
@ -29,7 +29,7 @@ Notes:
|
|||
#include "ast/rewriter/pb2bv_rewriter.h"
|
||||
#include "tactic/tactical.h"
|
||||
#include "tactic/arith/bound_manager.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "tactic/arith/pb2bv_model_converter.h"
|
||||
#include "tactic/arith/pb2bv_tactic.h"
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Revision History:
|
|||
#include "tactic/core/nnf_tactic.h"
|
||||
#include "tactic/core/simplify_tactic.h"
|
||||
#include "ast/rewriter/th_rewriter.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ast/ast_smt2_pp.h"
|
||||
#include "ast/ast_pp.h"
|
||||
#include "ast/rewriter/expr_replacer.h"
|
||||
|
|
|
@ -57,7 +57,7 @@ Revision History:
|
|||
--*/
|
||||
#include "tactic/tactical.h"
|
||||
#include "ast/rewriter/th_rewriter.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ast/arith_decl_plugin.h"
|
||||
#include "ast/expr_substitution.h"
|
||||
#include "util/dec_ref_util.h"
|
||||
|
|
|
@ -18,7 +18,7 @@ Notes:
|
|||
--*/
|
||||
#include "model/model.h"
|
||||
#include "model/model_pp.h"
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
#include "ast/bv_decl_plugin.h"
|
||||
#include "ast/ast_smt2_pp.h"
|
||||
#include "ast/ast_pp.h"
|
||||
|
|
|
@ -18,7 +18,7 @@ Notes:
|
|||
--*/
|
||||
#pragma once
|
||||
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
|
||||
model_converter * mk_bit_blaster_model_converter(ast_manager & m, obj_map<func_decl, expr*> const & const2bits, ptr_vector<func_decl> const& newbits);
|
||||
model_converter * mk_bv1_blaster_model_converter(ast_manager & m, obj_map<func_decl, expr*> const & const2bits, ptr_vector<func_decl> const& newbits);
|
||||
|
|
|
@ -24,7 +24,7 @@ Notes:
|
|||
#include "tactic/tactical.h"
|
||||
#include "ast/bv_decl_plugin.h"
|
||||
#include "ast/rewriter/expr_replacer.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ast/ast_smt2_pp.h"
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -20,7 +20,7 @@ Notes:
|
|||
#pragma once
|
||||
|
||||
#include "ast/rewriter/rewriter.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
|
||||
class bvarray2uf_rewriter_cfg : public default_rewriter_cfg {
|
||||
ast_manager & m_manager;
|
||||
|
|
|
@ -20,7 +20,7 @@ Notes:
|
|||
#include "tactic/tactical.h"
|
||||
#include "ast/bv_decl_plugin.h"
|
||||
#include "ast/rewriter/expr_replacer.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ast/ast_smt2_pp.h"
|
||||
|
||||
#include "tactic/bv/bvarray2uf_tactic.h"
|
||||
|
|
|
@ -21,7 +21,7 @@ Revision History:
|
|||
|
||||
#include "tactic/bv/dt2bv_tactic.h"
|
||||
#include "tactic/tactical.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ast/datatype_decl_plugin.h"
|
||||
#include "ast/bv_decl_plugin.h"
|
||||
#include "ast/rewriter/rewriter_def.h"
|
||||
|
|
|
@ -18,7 +18,7 @@ Revision History:
|
|||
--*/
|
||||
#include "tactic/tactical.h"
|
||||
#include "ast/rewriter/rewriter_def.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ast/bv_decl_plugin.h"
|
||||
#include "ast/used_vars.h"
|
||||
#include "ast/well_sorted.h"
|
||||
|
|
|
@ -20,7 +20,7 @@ Notes:
|
|||
#include "tactic/tactical.h"
|
||||
#include "ast/normal_forms/defined_names.h"
|
||||
#include "ast/rewriter/rewriter_def.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
|
||||
class elim_term_ite_tactic : public tactic {
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ Notes:
|
|||
|
||||
--*/
|
||||
#include "tactic/tactical.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ast/rewriter/rewriter_def.h"
|
||||
#include "ast/arith_decl_plugin.h"
|
||||
#include "ast/bv_decl_plugin.h"
|
||||
|
|
|
@ -18,7 +18,7 @@ Revision History:
|
|||
--*/
|
||||
#include "ast/normal_forms/nnf.h"
|
||||
#include "tactic/tactical.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
|
||||
class nnf_tactic : public tactic {
|
||||
params_ref m_params;
|
||||
|
|
|
@ -23,7 +23,7 @@ Revision History:
|
|||
--*/
|
||||
#include "tactic/tactical.h"
|
||||
#include "tactic/core/occf_tactic.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
|
||||
class occf_tactic : public tactic {
|
||||
struct imp {
|
||||
|
|
|
@ -33,7 +33,7 @@ Notes:
|
|||
--*/
|
||||
#include "tactic/core/pb_preprocess_tactic.h"
|
||||
#include "tactic/tactical.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ast/for_each_expr.h"
|
||||
#include "ast/pb_decl_plugin.h"
|
||||
#include "ast/rewriter/th_rewriter.h"
|
||||
|
|
|
@ -22,7 +22,7 @@ Notes:
|
|||
#include "ast/has_free_vars.h"
|
||||
#include "util/map.h"
|
||||
#include "ast/rewriter/rewriter_def.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
|
||||
/**
|
||||
\brief Reduce the number of arguments in function applications.
|
||||
|
|
|
@ -29,7 +29,7 @@ Notes:
|
|||
#include "tactic/tactic.h"
|
||||
#include "tactic/core/reduce_invertible_tactic.h"
|
||||
#include "tactic/core/collect_occs.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include <cstdint>
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -27,7 +27,7 @@ Revision History:
|
|||
#include "ast/rewriter/hoist_rewriter.h"
|
||||
#include "tactic/goal_shared_occs.h"
|
||||
#include "tactic/tactical.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "tactic/tactic_params.hpp"
|
||||
|
||||
class solve_eqs_tactic : public tactic {
|
||||
|
|
|
@ -18,6 +18,7 @@ Notes:
|
|||
|
||||
--*/
|
||||
#include "tactic/tactical.h"
|
||||
#include "tactic/goal_proof_converter.h"
|
||||
#include "tactic/core/split_clause_tactic.h"
|
||||
|
||||
class split_clause_tactic : public tactic {
|
||||
|
|
|
@ -52,7 +52,7 @@ Notes:
|
|||
#include "ast/ast_pp.h"
|
||||
#include "tactic/tactical.h"
|
||||
#include "tactic/goal_shared_occs.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ast/rewriter/bool_rewriter.h"
|
||||
#include "tactic/core/simplify_tactic.h"
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ Notes:
|
|||
#include "util/ref.h"
|
||||
#include "ast/ast_pp_util.h"
|
||||
#include "model/model.h"
|
||||
#include "tactic/converter.h"
|
||||
#include "ast/converters/converter.h"
|
||||
|
||||
class goal;
|
||||
|
||||
|
|
|
@ -82,6 +82,8 @@ public:
|
|||
m_goal = in.get();
|
||||
m_simp->reduce();
|
||||
m_goal->inc_depth();
|
||||
if (in->models_enabled())
|
||||
in->set(m_simp->get_model_converter());
|
||||
result.push_back(in.get());
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ Notes:
|
|||
#include "solver/solver_na2as.h"
|
||||
#include "tactic/tactic.h"
|
||||
#include "ast/rewriter/pb2bv_rewriter.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ast/ast_pp.h"
|
||||
#include "model/model_smt2_pp.h"
|
||||
#include "tactic/arith/bound_manager.h"
|
||||
|
|
|
@ -26,7 +26,7 @@ Notes:
|
|||
#include "ast/rewriter/enum2bv_rewriter.h"
|
||||
#include "model/model_smt2_pp.h"
|
||||
#include "tactic/tactic.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "tactic/fd_solver/enum2bv_solver.h"
|
||||
#include "solver/solver_na2as.h"
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ Notes:
|
|||
#include "ast/rewriter/th_rewriter.h"
|
||||
#include "model/model_smt2_pp.h"
|
||||
#include "tactic/tactic.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "solver/solver_na2as.h"
|
||||
#include "tactic/fd_solver/pb2bv_solver.h"
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Notes:
|
|||
#pragma once
|
||||
|
||||
#include "ast/fpa/fpa2bv_converter.h"
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
#include "ast/fpa/bv2fpa_converter.h"
|
||||
|
||||
class fpa2bv_model_converter : public model_converter {
|
||||
|
|
|
@ -34,8 +34,8 @@ Revision History:
|
|||
#include "util/ref.h"
|
||||
#include "util/ref_vector.h"
|
||||
#include "util/ref_buffer.h"
|
||||
#include "tactic/model_converter.h"
|
||||
#include "tactic/proof_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
#include "ast/converters/proof_converter.h"
|
||||
#include "tactic/dependency_converter.h"
|
||||
|
||||
class goal {
|
||||
|
|
63
src/tactic/goal_proof_converter.h
Normal file
63
src/tactic/goal_proof_converter.h
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*++
|
||||
Copyright (c) 2012 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
goal_proof_converter.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Proof converter for goals
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2012-11-23
|
||||
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ast/converters/proof_converter.h"
|
||||
class goal;
|
||||
|
||||
/**
|
||||
\brief create a proof converter that takes a set of subgoals and converts their proofs to a proof of
|
||||
the goal they were derived from.
|
||||
*/
|
||||
proof_converter * concat(proof_converter *pc1, unsigned n, goal* const* goals);
|
||||
|
||||
class subgoal_proof_converter : public proof_converter {
|
||||
proof_converter_ref m_pc;
|
||||
goal_ref_buffer m_goals;
|
||||
public:
|
||||
subgoal_proof_converter(proof_converter* pc, unsigned n, goal * const* goals):
|
||||
m_pc(pc)
|
||||
{
|
||||
for (unsigned i = 0; i < n; ++i) m_goals.push_back(goals[i]);
|
||||
}
|
||||
|
||||
proof_ref operator()(ast_manager & m, unsigned num_source, proof * const * source) override {
|
||||
// ignore the proofs from the arguments, instead obtain the proofs fromt he subgoals.
|
||||
SASSERT(num_source == 0);
|
||||
proof_converter_ref_buffer pc_buffer;
|
||||
for (goal_ref g : m_goals) {
|
||||
pc_buffer.push_back(g->pc());
|
||||
|
||||
}
|
||||
return apply(m, m_pc, pc_buffer);
|
||||
}
|
||||
|
||||
proof_converter* translate(ast_translation& tr) override {
|
||||
proof_converter_ref pc1 = m_pc->translate(tr);
|
||||
goal_ref_buffer goals;
|
||||
for (goal_ref g : m_goals) goals.push_back(g->translate(tr));
|
||||
return alloc(subgoal_proof_converter, pc1.get(), goals.size(), goals.data());
|
||||
}
|
||||
|
||||
void display(std::ostream& out) override {}
|
||||
|
||||
};
|
||||
|
||||
inline proof_converter * concat(proof_converter *pc, unsigned n, goal* const* goals) {
|
||||
return alloc(subgoal_proof_converter, pc, n, goals);
|
||||
}
|
|
@ -34,7 +34,7 @@ Subsumption transformation (remove Horn clause):
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
#include "ast/rewriter/th_rewriter.h"
|
||||
|
||||
class horn_subsume_model_converter : public model_converter {
|
||||
|
|
|
@ -22,7 +22,7 @@ Revision History:
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "tactic/proof_converter.h"
|
||||
#include "ast/converters/proof_converter.h"
|
||||
|
||||
class replace_proof_converter : public proof_converter {
|
||||
ast_manager& m;
|
||||
|
|
|
@ -20,7 +20,7 @@ Notes:
|
|||
|
||||
#include "util/stopwatch.h"
|
||||
#include "util/lbool.h"
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
#include "tactic/goal.h"
|
||||
|
||||
#include "tactic/sls/sls_tracker.h"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
--*/
|
||||
#pragma once
|
||||
|
||||
#include "tactic/model_converter.h"
|
||||
#include "ast/converters/model_converter.h"
|
||||
#include "ackermannization/ackr_info.h"
|
||||
|
||||
model_converter * mk_qfufbv_ackr_model_converter(ast_manager & m, const ackr_info_ref& info, model_ref& abstr_model);
|
||||
|
|
|
@ -20,6 +20,7 @@ Notes:
|
|||
#include "util/cancel_eh.h"
|
||||
#include "util/scoped_ptr_vector.h"
|
||||
#include "tactic/tactical.h"
|
||||
#include "tactic/goal_proof_converter.h"
|
||||
#ifndef SINGLE_THREAD
|
||||
#include <thread>
|
||||
#endif
|
||||
|
|
|
@ -20,7 +20,7 @@ Notes:
|
|||
#include "ast/recfun_decl_plugin.h"
|
||||
#include "ast/macros/macro_manager.h"
|
||||
#include "ast/macros/macro_finder.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "tactic/ufbv/macro_finder_tactic.h"
|
||||
|
||||
class macro_finder_tactic : public tactic {
|
||||
|
|
|
@ -17,7 +17,7 @@ Notes:
|
|||
|
||||
--*/
|
||||
#include "tactic/tactical.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/converters/generic_model_converter.h"
|
||||
#include "ast/macros/macro_manager.h"
|
||||
#include "ast/macros/macro_finder.h"
|
||||
#include "ast/macros/quasi_macros.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue