3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00

new interpolation fixes; re-added fixedpoint-push/pop

This commit is contained in:
Ken McMillan 2013-11-05 12:17:09 -08:00
parent 7ca6c744fd
commit 49c72abb2d
10 changed files with 156 additions and 21 deletions

View file

@ -187,6 +187,10 @@ namespace datalog {
if (m_trail.get_num_scopes() == 0) {
throw default_exception("there are no backtracking points to pop to");
}
if(m_engine.get()){
if(get_engine() != DUALITY_ENGINE)
throw default_exception("operation is not supported by engine");
}
m_trail.pop_scope(1);
}

View file

@ -82,6 +82,7 @@ dl_interface::dl_interface(datalog::context& dl_ctx) :
{
_d = 0;
dl_ctx.get_manager().toggle_proof_mode(PGM_FINE);
}

View file

@ -454,6 +454,44 @@ public:
}
};
/**
\brief fixedpoint-push command.
*/
class dl_push_cmd : public cmd {
ref<dl_context> m_dl_ctx;
public:
dl_push_cmd(dl_context * dl_ctx):
cmd("fixedpoint-push"),
m_dl_ctx(dl_ctx)
{}
virtual char const * get_usage() const { return ""; }
virtual char const * get_descr(cmd_context & ctx) const { return "push the fixedpoint context"; }
virtual unsigned get_arity() const { return 0; }
virtual void execute(cmd_context & ctx) {
m_dl_ctx->push();
}
};
/**
\brief fixedpoint-pop command.
*/
class dl_pop_cmd : public cmd {
ref<dl_context> m_dl_ctx;
public:
dl_pop_cmd(dl_context * dl_ctx):
cmd("fixedpoint-pop"),
m_dl_ctx(dl_ctx)
{}
virtual char const * get_usage() const { return ""; }
virtual char const * get_descr(cmd_context & ctx) const { return "pop the fixedpoint context"; }
virtual unsigned get_arity() const { return 0; }
virtual void execute(cmd_context & ctx) {
m_dl_ctx->pop();
}
};
static void install_dl_cmds_aux(cmd_context& ctx, dl_collected_cmds* collected_cmds) {
dl_context * dl_ctx = alloc(dl_context, ctx, collected_cmds);
@ -463,7 +501,7 @@ static void install_dl_cmds_aux(cmd_context& ctx, dl_collected_cmds* collected_c
ctx.insert(alloc(dl_declare_var_cmd, dl_ctx));
// #ifndef _EXTERNAL_RELEASE
// TODO: we need these!
#if 0
#if 1
ctx.insert(alloc(dl_push_cmd, dl_ctx)); // not exposed to keep command-extensions simple.
ctx.insert(alloc(dl_pop_cmd, dl_ctx));
#endif