3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 01:24:08 +00:00

more descriptive naming convention

This commit is contained in:
Nikolaj Bjorner 2021-03-15 15:48:33 -07:00
parent 4b3fecc35e
commit d03fdf5fed
7 changed files with 16 additions and 16 deletions

View file

@ -23,12 +23,12 @@ def init_project_def():
add_lib('realclosure', ['interval'], 'math/realclosure')
add_lib('subpaving', ['interval'], 'math/subpaving')
add_lib('ast', ['util', 'polynomial'])
add_lib('params', ['util'])
add_lib('euf', ['ast', 'util'], 'ast/euf')
add_lib('params', ['util'])
add_lib('smt_params', ['params'], 'smt/params')
add_lib('grobner', ['ast', 'dd', 'simplex'], 'math/grobner')
add_lib('sat', ['util', 'dd', 'grobner'])
add_lib('nlsat', ['polynomial', 'sat'])
add_lib('smt_params', ['params'], 'smt/params')
add_lib('lp', ['util', 'nlsat', 'grobner', 'interval', 'smt_params'], 'math/lp')
add_lib('rewriter', ['ast', 'polynomial', 'automata', 'params'], 'ast/rewriter')
add_lib('macros', ['rewriter'], 'ast/macros')

View file

@ -70,7 +70,7 @@ extern "C" {
try {
memory::initialize(UINT_MAX);
LOG_Z3_mk_config();
Z3_config r = reinterpret_cast<Z3_config>(alloc(ast_context));
Z3_config r = reinterpret_cast<Z3_config>(alloc(ast_context_params));
RETURN_Z3(r);
} catch (z3_exception & ex) {
// The error handler is only available for contexts
@ -82,13 +82,13 @@ extern "C" {
void Z3_API Z3_del_config(Z3_config c) {
LOG_Z3_del_config(c);
dealloc((reinterpret_cast<ast_context*>(c)));
dealloc((reinterpret_cast<ast_context_params*>(c)));
}
void Z3_API Z3_set_param_value(Z3_config c, char const * param_id, char const * param_value) {
LOG_Z3_set_param_value(c, param_id, param_value);
try {
ast_context * p = reinterpret_cast<ast_context*>(c);
ast_context_params * p = reinterpret_cast<ast_context_params*>(c);
p->set(param_id, param_value);
}
catch (z3_exception & ex) {

View file

@ -70,8 +70,8 @@ namespace api {
//
// ------------------------
context::context(ast_context * p, bool user_ref_count):
m_params(p != nullptr ? *p : ast_context()),
context::context(ast_context_params * p, bool user_ref_count):
m_params(p != nullptr ? *p : ast_context_params()),
m_user_ref_count(user_ref_count),
m_manager(m_params.mk_ast_manager()),
m_plugins(m()),
@ -343,7 +343,7 @@ extern "C" {
Z3_TRY;
LOG_Z3_mk_context(c);
memory::initialize(UINT_MAX);
Z3_context r = reinterpret_cast<Z3_context>(alloc(api::context, reinterpret_cast<ast_context*>(c), false));
Z3_context r = reinterpret_cast<Z3_context>(alloc(api::context, reinterpret_cast<ast_context_params*>(c), false));
RETURN_Z3(r);
Z3_CATCH_RETURN_NO_HANDLE(nullptr);
}
@ -352,7 +352,7 @@ extern "C" {
Z3_TRY;
LOG_Z3_mk_context_rc(c);
memory::initialize(UINT_MAX);
Z3_context r = reinterpret_cast<Z3_context>(alloc(api::context, reinterpret_cast<ast_context*>(c), true));
Z3_context r = reinterpret_cast<Z3_context>(alloc(api::context, reinterpret_cast<ast_context_params*>(c), true));
RETURN_Z3(r);
Z3_CATCH_RETURN_NO_HANDLE(nullptr);
}

View file

@ -73,7 +73,7 @@ namespace api {
class context : public tactic_manager {
struct add_plugins { add_plugins(ast_manager & m); };
ast_context m_params;
ast_context_params m_params;
bool m_user_ref_count; //!< if true, the user is responsible for managing reference counters.
scoped_ptr<ast_manager> m_manager;
scoped_ptr<cmd_context> m_cmd;
@ -135,11 +135,11 @@ namespace api {
//
// ------------------------
context(ast_context * p, bool user_ref_count = false);
context(ast_context_params * p, bool user_ref_count = false);
~context();
ast_manager & m() const { return *(m_manager.get()); }
ast_context & params() { m_params.updt_params(); return m_params; }
ast_context_params & params() { m_params.updt_params(); return m_params; }
scoped_ptr<cmd_context>& cmd() { return m_cmd; }
bool produce_proofs() const { return m().proofs_enabled(); }
bool produce_models() const { return m_params.m_model; }

View file

@ -876,7 +876,7 @@ extern "C" {
solver::push_eh_t _push = push_eh;
solver::pop_eh_t _pop = pop_eh;
solver::fresh_eh_t _fresh = [&](void * user_ctx, ast_manager& m, solver::context_obj*& _ctx) {
ast_context params;
ast_context_params params;
params.set_foreign_manager(&m);
auto* ctx = alloc(api::context, &params, false);
_ctx = alloc(api_context_obj, ctx);

View file

@ -280,7 +280,7 @@ void macro_decls::erase_last(ast_manager& m) {
m_decls->pop_back();
}
ast_manager * ast_context::mk_ast_manager() {
ast_manager * ast_context_params::mk_ast_manager() {
if (m_manager)
return m_manager;
ast_manager * r = alloc(ast_manager,

View file

@ -160,7 +160,7 @@ public:
virtual void updt_params(params_ref const& p) = 0;
};
class ast_context : public context_params {
class ast_context_params : public context_params {
ast_manager* m_manager { nullptr };
public:
/**
@ -194,7 +194,7 @@ public:
protected:
ast_context m_params;
ast_context_params m_params;
bool m_main_ctx;
symbol m_logic;
bool m_interactive_mode;