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

Merge branch 'master' into opt

This commit is contained in:
Nikolaj Bjorner 2018-05-02 12:32:14 -07:00 committed by GitHub
commit 202d497be8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 4 deletions

View file

@ -9873,6 +9873,14 @@ def String(name, ctx=None):
ctx = _get_ctx(ctx)
return SeqRef(Z3_mk_const(ctx.ref(), to_symbol(name, ctx), StringSort(ctx).ast), ctx)
def SubString(s, offset, length):
"""Extract substring or subsequence starting at offset"""
return Extract(s, offset, length)
def SubSeq(s, offset, length):
"""Extract substring or subsequence starting at offset"""
return Extract(s, offset, length)
def Strings(names, ctx=None):
"""Return a tuple of String constants. """
ctx = _get_ctx(ctx)

View file

@ -88,12 +88,18 @@ namespace smt {
smt_solver * result = alloc(smt_solver, m, p, m_logic);
smt::kernel::copy(m_context, result->m_context);
for (auto & kv : m_name2assertion)
result->m_name2assertion.insert(translator(kv.m_key),
translator(kv.m_value));
if (mc0())
result->set_model_converter(mc0()->translate(translator));
for (auto & kv : m_name2assertion) {
expr* val = translator(kv.m_value);
expr* t = translator(kv.m_key);
result->m_name2assertion.insert(t, val);
result->solver_na2as::assert_expr(val, t);
m.inc_ref(val);
}
return result;
}

View file

@ -59,7 +59,8 @@ private:
ref<solver> m_solver2;
// We delay sending assertions to solver 2
// This is relevant for big benchmarks that are meant to be solved
// by a non-incremental solver.
// by a non-incremental solver. );
bool m_solver2_initialized;
bool m_ignore_solver1;
@ -137,6 +138,7 @@ public:
}
solver* translate(ast_manager& m, params_ref const& p) override {
TRACE("solver", tout << "translate\n";);
solver* s1 = m_solver1->translate(m, p);
solver* s2 = m_solver2->translate(m, p);
combined_solver* r = alloc(combined_solver, s1, s2, p);