mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
more descriptive naming convention
This commit is contained in:
parent
4b3fecc35e
commit
d03fdf5fed
7 changed files with 16 additions and 16 deletions
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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, ¶ms, false);
|
||||
_ctx = alloc(api_context_obj, ctx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue