mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
checkpoint
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
adb6d05805
commit
cadd35bf7a
38 changed files with 185 additions and 177 deletions
|
@ -7,7 +7,7 @@ Module Name:
|
|||
|
||||
Abstract:
|
||||
|
||||
Wrapps smt::solver as a solver for cmd_context
|
||||
Wrapps smt::kernel as a solver for cmd_context
|
||||
|
||||
Author:
|
||||
|
||||
|
@ -17,13 +17,13 @@ Notes:
|
|||
|
||||
--*/
|
||||
#include"solver.h"
|
||||
#include"smt_solver.h"
|
||||
#include"smt_kernel.h"
|
||||
#include"reg_decl_plugins.h"
|
||||
#include"front_end_params.h"
|
||||
|
||||
class default_solver : public solver {
|
||||
front_end_params * m_params;
|
||||
smt::solver * m_context;
|
||||
smt::kernel * m_context;
|
||||
public:
|
||||
default_solver():m_params(0), m_context(0) {}
|
||||
|
||||
|
@ -47,7 +47,7 @@ public:
|
|||
ast_manager m;
|
||||
reg_decl_plugins(m);
|
||||
front_end_params p;
|
||||
smt::solver s(m, p);
|
||||
smt::kernel s(m, p);
|
||||
s.collect_param_descrs(r);
|
||||
}
|
||||
else {
|
||||
|
@ -60,7 +60,7 @@ public:
|
|||
reset();
|
||||
#pragma omp critical (solver)
|
||||
{
|
||||
m_context = alloc(smt::solver, m, *m_params);
|
||||
m_context = alloc(smt::kernel, m, *m_params);
|
||||
}
|
||||
if (logic != symbol::null)
|
||||
m_context->set_logic(logic);
|
||||
|
|
|
@ -7,7 +7,7 @@ Module Name:
|
|||
|
||||
Abstract:
|
||||
|
||||
Wrapps smt::solver as a solver for cmd_context
|
||||
Wrapps smt::kernel as a solver for cmd_context and external API
|
||||
|
||||
Author:
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ Revision History:
|
|||
#include "expr_context_simplifier.h"
|
||||
#include "ast_pp.h"
|
||||
#include "obj_hashtable.h"
|
||||
#include "smt_solver.h"
|
||||
#include "smt_kernel.h"
|
||||
#include "for_each_expr.h"
|
||||
|
||||
// table lookup before/after simplification.
|
||||
|
|
|
@ -23,7 +23,7 @@ Revision History:
|
|||
#include "obj_hashtable.h"
|
||||
#include "basic_simplifier_plugin.h"
|
||||
#include "front_end_params.h"
|
||||
#include "smt_solver.h"
|
||||
#include "smt_kernel.h"
|
||||
#include "arith_decl_plugin.h"
|
||||
|
||||
class expr_context_simplifier {
|
||||
|
@ -61,7 +61,7 @@ class expr_strong_context_simplifier {
|
|||
arith_util m_arith;
|
||||
unsigned m_id;
|
||||
func_decl_ref m_fn;
|
||||
smt::solver m_solver;
|
||||
smt::kernel m_solver;
|
||||
|
||||
void simplify(expr* e, expr_ref& result) { simplify_model_based(e, result); }
|
||||
void simplify_basic(expr* fml, expr_ref& result);
|
||||
|
|
|
@ -6,7 +6,7 @@ Module Name:
|
|||
ni_solver.cpp
|
||||
|
||||
Abstract:
|
||||
Wrappers for smt::solver that are non-incremental & (quasi-incremental).
|
||||
Wrappers for smt::kernel that are non-incremental & (quasi-incremental).
|
||||
|
||||
Author:
|
||||
|
||||
|
@ -16,13 +16,13 @@ Notes:
|
|||
|
||||
--*/
|
||||
#include"ni_solver.h"
|
||||
#include"smt_solver.h"
|
||||
#include"smt_kernel.h"
|
||||
#include"cmd_context.h"
|
||||
|
||||
class ni_smt_solver : public solver {
|
||||
protected:
|
||||
cmd_context & m_cmd_ctx;
|
||||
smt::solver * m_context;
|
||||
smt::kernel * m_context;
|
||||
progress_callback * m_callback;
|
||||
public:
|
||||
ni_smt_solver(cmd_context & ctx):m_cmd_ctx(ctx), m_context(0), m_callback(0) {}
|
||||
|
@ -83,7 +83,7 @@ public:
|
|||
reset();
|
||||
#pragma omp critical (ni_solver)
|
||||
{
|
||||
m_context = alloc(smt::solver, m_cmd_ctx.m(), m_cmd_ctx.params());
|
||||
m_context = alloc(smt::kernel, m_cmd_ctx.m(), m_cmd_ctx.params());
|
||||
}
|
||||
if (m_cmd_ctx.has_logic())
|
||||
m_context->set_logic(m_cmd_ctx.get_logic());
|
||||
|
@ -149,7 +149,7 @@ public:
|
|||
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
smt::solver::collect_param_descrs(r);
|
||||
smt::kernel::collect_param_descrs(r);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace smt {
|
|||
class get_implied_equalities_impl {
|
||||
|
||||
ast_manager& m;
|
||||
smt::solver& m_solver;
|
||||
smt::kernel& m_solver;
|
||||
union_find_default_ctx m_df;
|
||||
union_find<union_find_default_ctx> m_uf;
|
||||
array_util m_array_util;
|
||||
|
@ -357,7 +357,7 @@ namespace smt {
|
|||
|
||||
public:
|
||||
|
||||
get_implied_equalities_impl(smt::solver& s) : m(s.m()), m_solver(s), m_uf(m_df), m_array_util(m), m_stats_calls(0) {}
|
||||
get_implied_equalities_impl(smt::kernel& s) : m(s.m()), m_solver(s), m_uf(m_df), m_array_util(m), m_stats_calls(0) {}
|
||||
|
||||
lbool operator()(unsigned num_terms, expr* const* terms, unsigned* class_ids) {
|
||||
params_ref p;
|
||||
|
@ -410,7 +410,7 @@ namespace smt {
|
|||
stopwatch get_implied_equalities_impl::s_timer;
|
||||
stopwatch get_implied_equalities_impl::s_stats_val_eq_timer;
|
||||
|
||||
lbool implied_equalities(smt::solver& solver, unsigned num_terms, expr* const* terms, unsigned* class_ids) {
|
||||
lbool implied_equalities(smt::kernel& solver, unsigned num_terms, expr* const* terms, unsigned* class_ids) {
|
||||
get_implied_equalities_impl gi(solver);
|
||||
return gi(num_terms, terms, class_ids);
|
||||
}
|
||||
|
|
|
@ -23,13 +23,13 @@ Revision History:
|
|||
#ifndef __SMT_IMPLIED_EQUALITIES_H__
|
||||
#define __SMT_IMPLIED_EQUALITIES_H__
|
||||
|
||||
#include"smt_solver.h"
|
||||
#include"smt_kernel.h"
|
||||
|
||||
|
||||
namespace smt {
|
||||
|
||||
lbool implied_equalities(
|
||||
solver& solver,
|
||||
kernel & solver,
|
||||
unsigned num_terms, expr* const* terms,
|
||||
unsigned* class_ids);
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@ Copyright (c) 2012 Microsoft Corporation
|
|||
|
||||
Module Name:
|
||||
|
||||
smt_solver.h
|
||||
smt_kernel.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
New frontend for the incremental solver.
|
||||
New frontend for smt::context.
|
||||
|
||||
Author:
|
||||
|
||||
|
@ -16,14 +16,14 @@ Author:
|
|||
Revision History:
|
||||
|
||||
--*/
|
||||
#include"smt_solver.h"
|
||||
#include"smt_kernel.h"
|
||||
#include"smt_context.h"
|
||||
#include"ast_smt2_pp.h"
|
||||
#include"params2front_end_params.h"
|
||||
|
||||
namespace smt {
|
||||
|
||||
struct solver::imp {
|
||||
struct kernel::imp {
|
||||
smt::context m_kernel;
|
||||
params_ref m_params;
|
||||
|
||||
|
@ -53,7 +53,7 @@ namespace smt {
|
|||
}
|
||||
|
||||
void assert_expr(expr * e) {
|
||||
TRACE("smt_solver", tout << "assert:\n" << mk_ismt2_pp(e, m()) << "\n";);
|
||||
TRACE("smt_kernel", tout << "assert:\n" << mk_ismt2_pp(e, m()) << "\n";);
|
||||
m_kernel.assert_expr(e);
|
||||
}
|
||||
|
||||
|
@ -74,12 +74,12 @@ namespace smt {
|
|||
}
|
||||
|
||||
void push() {
|
||||
TRACE("smt_solver", tout << "push()\n";);
|
||||
TRACE("smt_kernel", tout << "push()\n";);
|
||||
m_kernel.push();
|
||||
}
|
||||
|
||||
void pop(unsigned num_scopes) {
|
||||
TRACE("smt_solver", tout << "pop()\n";);
|
||||
TRACE("smt_kernel", tout << "pop()\n";);
|
||||
m_kernel.pop(num_scopes);
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ namespace smt {
|
|||
// TODO: it will be replaced with assertion_stack.display
|
||||
unsigned num = m_kernel.get_num_asserted_formulas();
|
||||
expr * const * fms = m_kernel.get_asserted_formulas();
|
||||
out << "(solver";
|
||||
out << "(kernel";
|
||||
for (unsigned i = 0; i < num; i++) {
|
||||
out << "\n " << mk_ismt2_pp(fms[i], m(), 2);
|
||||
}
|
||||
|
@ -183,170 +183,170 @@ namespace smt {
|
|||
}
|
||||
};
|
||||
|
||||
solver::solver(ast_manager & m, front_end_params & fp, params_ref const & p) {
|
||||
kernel::kernel(ast_manager & m, front_end_params & fp, params_ref const & p) {
|
||||
m_imp = alloc(imp, m, fp, p);
|
||||
}
|
||||
|
||||
solver::~solver() {
|
||||
kernel::~kernel() {
|
||||
dealloc(m_imp);
|
||||
}
|
||||
|
||||
ast_manager & solver::m() const {
|
||||
ast_manager & kernel::m() const {
|
||||
return m_imp->m();
|
||||
}
|
||||
|
||||
bool solver::set_logic(symbol logic) {
|
||||
bool kernel::set_logic(symbol logic) {
|
||||
return m_imp->set_logic(logic);
|
||||
}
|
||||
|
||||
void solver::set_progress_callback(progress_callback * callback) {
|
||||
void kernel::set_progress_callback(progress_callback * callback) {
|
||||
m_imp->set_progress_callback(callback);
|
||||
}
|
||||
|
||||
void solver::assert_expr(expr * e) {
|
||||
void kernel::assert_expr(expr * e) {
|
||||
m_imp->assert_expr(e);
|
||||
}
|
||||
|
||||
void solver::assert_expr(expr * e, proof * pr) {
|
||||
void kernel::assert_expr(expr * e, proof * pr) {
|
||||
m_imp->assert_expr(e, pr);
|
||||
}
|
||||
|
||||
unsigned solver::size() const {
|
||||
unsigned kernel::size() const {
|
||||
return m_imp->size();
|
||||
}
|
||||
|
||||
expr * const * solver::get_formulas() const {
|
||||
expr * const * kernel::get_formulas() const {
|
||||
return m_imp->get_formulas();
|
||||
}
|
||||
|
||||
bool solver::reduce() {
|
||||
bool kernel::reduce() {
|
||||
return m_imp->reduce();
|
||||
}
|
||||
|
||||
void solver::push() {
|
||||
void kernel::push() {
|
||||
m_imp->push();
|
||||
}
|
||||
|
||||
void solver::pop(unsigned num_scopes) {
|
||||
void kernel::pop(unsigned num_scopes) {
|
||||
m_imp->pop(num_scopes);
|
||||
}
|
||||
|
||||
unsigned solver::get_scope_level() const {
|
||||
unsigned kernel::get_scope_level() const {
|
||||
return m_imp->get_scope_level();
|
||||
}
|
||||
|
||||
void solver::reset() {
|
||||
void kernel::reset() {
|
||||
ast_manager & _m = m();
|
||||
front_end_params & fps = m_imp->fparams();
|
||||
params_ref ps = m_imp->params();
|
||||
#pragma omp critical (smt_solver)
|
||||
#pragma omp critical (smt_kernel)
|
||||
{
|
||||
dealloc(m_imp);
|
||||
m_imp = alloc(imp, _m, fps, ps);
|
||||
}
|
||||
}
|
||||
|
||||
bool solver::inconsistent() {
|
||||
bool kernel::inconsistent() {
|
||||
return m_imp->inconsistent();
|
||||
}
|
||||
|
||||
lbool solver::setup_and_check() {
|
||||
lbool kernel::setup_and_check() {
|
||||
set_cancel(false);
|
||||
return m_imp->setup_and_check();
|
||||
}
|
||||
|
||||
lbool solver::check(unsigned num_assumptions, expr * const * assumptions) {
|
||||
lbool kernel::check(unsigned num_assumptions, expr * const * assumptions) {
|
||||
set_cancel(false);
|
||||
lbool r = m_imp->check(num_assumptions, assumptions);
|
||||
TRACE("smt_solver", tout << "check result: " << r << "\n";);
|
||||
TRACE("smt_kernel", tout << "check result: " << r << "\n";);
|
||||
return r;
|
||||
}
|
||||
|
||||
void solver::get_model(model_ref & m) const {
|
||||
void kernel::get_model(model_ref & m) const {
|
||||
m_imp->get_model(m);
|
||||
}
|
||||
|
||||
proof * solver::get_proof() {
|
||||
proof * kernel::get_proof() {
|
||||
return m_imp->get_proof();
|
||||
}
|
||||
|
||||
unsigned solver::get_unsat_core_size() const {
|
||||
unsigned kernel::get_unsat_core_size() const {
|
||||
return m_imp->get_unsat_core_size();
|
||||
}
|
||||
|
||||
expr * solver::get_unsat_core_expr(unsigned idx) const {
|
||||
expr * kernel::get_unsat_core_expr(unsigned idx) const {
|
||||
return m_imp->get_unsat_core_expr(idx);
|
||||
}
|
||||
|
||||
failure solver::last_failure() const {
|
||||
failure kernel::last_failure() const {
|
||||
return m_imp->last_failure();
|
||||
}
|
||||
|
||||
std::string solver::last_failure_as_string() const {
|
||||
std::string kernel::last_failure_as_string() const {
|
||||
return m_imp->last_failure_as_string();
|
||||
}
|
||||
|
||||
void solver::get_assignments(expr_ref_vector & result) {
|
||||
void kernel::get_assignments(expr_ref_vector & result) {
|
||||
m_imp->get_assignments(result);
|
||||
}
|
||||
|
||||
void solver::get_relevant_labels(expr * cnstr, buffer<symbol> & result) {
|
||||
void kernel::get_relevant_labels(expr * cnstr, buffer<symbol> & result) {
|
||||
m_imp->get_relevant_labels(cnstr, result);
|
||||
}
|
||||
|
||||
void solver::get_relevant_labeled_literals(bool at_lbls, expr_ref_vector & result) {
|
||||
void kernel::get_relevant_labeled_literals(bool at_lbls, expr_ref_vector & result) {
|
||||
m_imp->get_relevant_labeled_literals(at_lbls, result);
|
||||
}
|
||||
|
||||
void solver::get_relevant_literals(expr_ref_vector & result) {
|
||||
void kernel::get_relevant_literals(expr_ref_vector & result) {
|
||||
m_imp->get_relevant_literals(result);
|
||||
}
|
||||
|
||||
void solver::get_guessed_literals(expr_ref_vector & result) {
|
||||
void kernel::get_guessed_literals(expr_ref_vector & result) {
|
||||
m_imp->get_guessed_literals(result);
|
||||
}
|
||||
|
||||
void solver::display(std::ostream & out) const {
|
||||
void kernel::display(std::ostream & out) const {
|
||||
m_imp->display(out);
|
||||
}
|
||||
|
||||
void solver::collect_statistics(::statistics & st) const {
|
||||
void kernel::collect_statistics(::statistics & st) const {
|
||||
m_imp->collect_statistics(st);
|
||||
}
|
||||
|
||||
void solver::reset_statistics() {
|
||||
void kernel::reset_statistics() {
|
||||
m_imp->reset_statistics();
|
||||
}
|
||||
|
||||
void solver::display_statistics(std::ostream & out) const {
|
||||
void kernel::display_statistics(std::ostream & out) const {
|
||||
m_imp->display_statistics(out);
|
||||
}
|
||||
|
||||
void solver::display_istatistics(std::ostream & out) const {
|
||||
void kernel::display_istatistics(std::ostream & out) const {
|
||||
m_imp->display_istatistics(out);
|
||||
}
|
||||
|
||||
void solver::set_cancel(bool f) {
|
||||
#pragma omp critical (smt_solver)
|
||||
void kernel::set_cancel(bool f) {
|
||||
#pragma omp critical (smt_kernel)
|
||||
{
|
||||
if (m_imp)
|
||||
m_imp->set_cancel(f);
|
||||
}
|
||||
}
|
||||
|
||||
bool solver::canceled() const {
|
||||
bool kernel::canceled() const {
|
||||
return m_imp->canceled();
|
||||
}
|
||||
|
||||
void solver::updt_params(params_ref const & p) {
|
||||
void kernel::updt_params(params_ref const & p) {
|
||||
return m_imp->updt_params(p);
|
||||
}
|
||||
|
||||
void solver::collect_param_descrs(param_descrs & d) {
|
||||
void kernel::collect_param_descrs(param_descrs & d) {
|
||||
solver_front_end_params_descrs(d);
|
||||
}
|
||||
|
||||
context & solver::kernel() {
|
||||
context & kernel::get_context() {
|
||||
return m_imp->m_kernel;
|
||||
}
|
||||
|
|
@ -3,11 +3,13 @@ Copyright (c) 2012 Microsoft Corporation
|
|||
|
||||
Module Name:
|
||||
|
||||
smt_solver.h
|
||||
smt_kernel.h
|
||||
|
||||
Abstract:
|
||||
|
||||
New frontend for the incremental solver.
|
||||
New frontend for smt::context.
|
||||
The "kernel" tries to hide details of the smt::context object.
|
||||
From now on, clients (code outside of the smt module) should be use smt::kernel instead of smt::context.
|
||||
|
||||
Author:
|
||||
|
||||
|
@ -15,9 +17,15 @@ Author:
|
|||
|
||||
Revision History:
|
||||
|
||||
I initially called it smt::solver. This was confusing to others since we have the abstract solver API,
|
||||
and smt::kernel is not a subclass of ::solver.
|
||||
To increase the confusion I had a class default_solver that implemented the solver API on top of smt::context.
|
||||
To avoid this problem I renamed them in the following way:
|
||||
smt::solver ---> smt::kernel
|
||||
default_solver ---> smt::solver
|
||||
--*/
|
||||
#ifndef _SMT_SOLVER_H_
|
||||
#define _SMT_SOLVER_H_
|
||||
#ifndef _SMT_KERNEL_H_
|
||||
#define _SMT_KERNEL_H_
|
||||
|
||||
#include"ast.h"
|
||||
#include"params.h"
|
||||
|
@ -34,13 +42,13 @@ namespace smt {
|
|||
class enode;
|
||||
class context;
|
||||
|
||||
class solver {
|
||||
class kernel {
|
||||
struct imp;
|
||||
imp * m_imp;
|
||||
public:
|
||||
solver(ast_manager & m, front_end_params & fp, params_ref const & p = params_ref());
|
||||
kernel(ast_manager & m, front_end_params & fp, params_ref const & p = params_ref());
|
||||
|
||||
~solver();
|
||||
~kernel();
|
||||
|
||||
ast_manager & m() const;
|
||||
|
||||
|
@ -51,7 +59,7 @@ namespace smt {
|
|||
bool set_logic(symbol logic);
|
||||
|
||||
/**
|
||||
brief Set progress meter. Solver will invoke the callback from time to time.
|
||||
brief Set progress meter. Kernel will invoke the callback from time to time.
|
||||
*/
|
||||
void set_progress_callback(progress_callback * callback);
|
||||
|
||||
|
@ -67,7 +75,7 @@ namespace smt {
|
|||
void assert_expr(expr * e, proof * pr);
|
||||
|
||||
/**
|
||||
\brief Return the number of asserted formulas in the solver.
|
||||
\brief Return the number of asserted formulas in the kernel.
|
||||
*/
|
||||
unsigned size() const;
|
||||
|
||||
|
@ -101,7 +109,7 @@ namespace smt {
|
|||
unsigned get_scope_level() const;
|
||||
|
||||
/**
|
||||
\brief Reset the solver.
|
||||
\brief Reset the kernel.
|
||||
All assertions are erased.
|
||||
*/
|
||||
void reset();
|
||||
|
@ -155,7 +163,7 @@ namespace smt {
|
|||
std::string last_failure_as_string() const;
|
||||
|
||||
/**
|
||||
\brief Return the set of formulas assigned by the solver.
|
||||
\brief Return the set of formulas assigned by the kernel.
|
||||
*/
|
||||
void get_assignments(expr_ref_vector & result);
|
||||
|
||||
|
@ -180,7 +188,7 @@ namespace smt {
|
|||
void get_guessed_literals(expr_ref_vector & result);
|
||||
|
||||
/**
|
||||
\brief (For debubbing purposes) Prints the state of the solver
|
||||
\brief (For debubbing purposes) Prints the state of the kernel
|
||||
*/
|
||||
void display(std::ostream & out) const;
|
||||
|
||||
|
@ -190,7 +198,7 @@ namespace smt {
|
|||
void collect_statistics(::statistics & st) const;
|
||||
|
||||
/**
|
||||
\brief Reset solver statistics.
|
||||
\brief Reset kernel statistics.
|
||||
*/
|
||||
void reset_statistics();
|
||||
|
||||
|
@ -205,7 +213,7 @@ namespace smt {
|
|||
void display_istatistics(std::ostream & out) const;
|
||||
|
||||
/**
|
||||
\brief Interrupt the solver.
|
||||
\brief Interrupt the kernel.
|
||||
*/
|
||||
void set_cancel(bool f = true);
|
||||
void cancel() { set_cancel(true); }
|
||||
|
@ -216,7 +224,7 @@ namespace smt {
|
|||
void reset_cancel() { set_cancel(false); }
|
||||
|
||||
/**
|
||||
\brief Return true if the solver was interrupted.
|
||||
\brief Return true if the kernel was interrupted.
|
||||
*/
|
||||
bool canceled() const;
|
||||
|
||||
|
@ -231,7 +239,7 @@ namespace smt {
|
|||
static void collect_param_descrs(param_descrs & d);
|
||||
|
||||
/**
|
||||
\brief Return a reference to the kernel.
|
||||
\brief Return a reference to smt::context.
|
||||
This is a temporary hack to support user theories.
|
||||
TODO: remove this hack.
|
||||
We need to revamp user theories too.
|
||||
|
@ -240,7 +248,7 @@ namespace smt {
|
|||
|
||||
\warning We should not use this method
|
||||
*/
|
||||
context & kernel();
|
||||
context & get_context();
|
||||
};
|
||||
};
|
||||
|
|
@ -56,7 +56,7 @@ namespace smt {
|
|||
SASSERT(m_qm == 0);
|
||||
SASSERT(m_context == 0);
|
||||
m_qm = &qm;
|
||||
m_context = &(m_qm->kernel());
|
||||
m_context = &(m_qm->get_context());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -248,7 +248,7 @@ namespace smt {
|
|||
dealloc(m_imp);
|
||||
}
|
||||
|
||||
context & quantifier_manager::kernel() const {
|
||||
context & quantifier_manager::get_context() const {
|
||||
return m_imp->m_context;
|
||||
}
|
||||
|
||||
|
@ -414,7 +414,7 @@ namespace smt {
|
|||
virtual void set_manager(quantifier_manager & qm) {
|
||||
SASSERT(m_qm == 0);
|
||||
m_qm = &qm;
|
||||
m_context = &(qm.kernel());
|
||||
m_context = &(qm.get_context());
|
||||
m_fparams = &(m_context->get_fparams());
|
||||
ast_manager & m = m_context->get_manager();
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace smt {
|
|||
quantifier_manager(context & ctx, front_end_params & fp, params_ref const & p);
|
||||
~quantifier_manager();
|
||||
|
||||
context & kernel() const;
|
||||
context & get_context() const;
|
||||
|
||||
void set_plugin(quantifier_manager_plugin * plugin);
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ Notes:
|
|||
#include"ctx_solver_simplify_tactic.h"
|
||||
#include"arith_decl_plugin.h"
|
||||
#include"front_end_params.h"
|
||||
#include"smt_solver.h"
|
||||
#include"smt_kernel.h"
|
||||
#include"ast_pp.h"
|
||||
#include"mk_simplified_app.h"
|
||||
|
||||
|
@ -29,7 +29,7 @@ class ctx_solver_simplify_tactic : public tactic {
|
|||
ast_manager& m;
|
||||
params_ref m_params;
|
||||
front_end_params m_front_p;
|
||||
smt::solver m_solver;
|
||||
smt::kernel m_solver;
|
||||
arith_util m_arith;
|
||||
mk_simplified_app m_mk_app;
|
||||
func_decl_ref m_fn;
|
||||
|
|
|
@ -18,7 +18,7 @@ Notes:
|
|||
--*/
|
||||
#include"tactic.h"
|
||||
#include"tactical.h"
|
||||
#include"smt_solver.h"
|
||||
#include"smt_kernel.h"
|
||||
#include"front_end_params.h"
|
||||
#include"params2front_end_params.h"
|
||||
#include"rewriter_types.h"
|
||||
|
@ -28,7 +28,7 @@ class smt_tactic : public tactic {
|
|||
params_ref m_params_ref;
|
||||
statistics m_stats;
|
||||
std::string m_failure;
|
||||
smt::solver * m_ctx;
|
||||
smt::kernel * m_ctx;
|
||||
symbol m_logic;
|
||||
progress_callback * m_callback;
|
||||
bool m_candidate_models;
|
||||
|
@ -117,7 +117,7 @@ public:
|
|||
smt_tactic & m_owner;
|
||||
|
||||
scoped_init_ctx(smt_tactic & o, ast_manager & m):m_owner(o) {
|
||||
smt::solver * new_ctx = alloc(smt::solver, m, o.fparams());
|
||||
smt::kernel * new_ctx = alloc(smt::kernel, m, o.fparams());
|
||||
TRACE("smt_tactic", tout << "logic: " << o.m_logic << "\n";);
|
||||
new_ctx->set_logic(o.m_logic);
|
||||
if (o.m_callback) {
|
||||
|
@ -130,7 +130,7 @@ public:
|
|||
}
|
||||
|
||||
~scoped_init_ctx() {
|
||||
smt::solver * d = m_owner.m_ctx;
|
||||
smt::kernel * d = m_owner.m_ctx;
|
||||
#pragma omp critical (as_st_cancel)
|
||||
{
|
||||
m_owner.m_ctx = 0;
|
||||
|
|
|
@ -642,8 +642,8 @@ namespace smt {
|
|||
out << "Theory " << get_name() << ":\n";
|
||||
}
|
||||
|
||||
user_theory * mk_user_theory(solver & _s, void * ext_context, void * ext_data, char const * name) {
|
||||
context & ctx = _s.kernel(); // HACK
|
||||
user_theory * mk_user_theory(kernel & _s, void * ext_context, void * ext_data, char const * name) {
|
||||
context & ctx = _s.get_context(); // HACK
|
||||
symbol _name(name);
|
||||
ast_manager & m = ctx.get_manager();
|
||||
family_id fid = m.get_family_id(_name);
|
||||
|
|
|
@ -23,7 +23,7 @@ Revision History:
|
|||
#include"user_simplifier_plugin.h"
|
||||
#include"smt_theory.h"
|
||||
#include"union_find.h"
|
||||
#include"smt_solver.h"
|
||||
#include"smt_kernel.h"
|
||||
|
||||
namespace smt {
|
||||
|
||||
|
@ -316,7 +316,7 @@ namespace smt {
|
|||
virtual void display(std::ostream & out) const;
|
||||
};
|
||||
|
||||
user_theory * mk_user_theory(solver & s, void * ext_context, void * ext_data, char const * name);
|
||||
user_theory * mk_user_theory(kernel & s, void * ext_context, void * ext_data, char const * name);
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue