mirror of
https://github.com/Z3Prover/z3
synced 2025-10-09 01:11:55 +00:00
add a way to supress lambdas
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
97437bce4c
commit
5db133f875
8 changed files with 60 additions and 17 deletions
|
@ -1455,7 +1455,9 @@ bool theory_seq::internalize_term(app* term) {
|
|||
if (ctx.e_internalized(term)) {
|
||||
mk_var(ctx.get_enode(term));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
suppress_lambda(term);
|
||||
|
||||
if (m.is_bool(term) &&
|
||||
(m_util.str.is_in_re(term) || m_sk.is_skolem(term))) {
|
||||
|
@ -1490,6 +1492,23 @@ bool theory_seq::internalize_term(app* term) {
|
|||
return true;
|
||||
}
|
||||
|
||||
void theory_seq::suppress_lambda(app* term) {
|
||||
if (!m_util.str.is_map(term) && !m_util.str.is_mapi(term) &&
|
||||
!m_util.str.is_foldl(term) && !m_util.str.is_foldli(term))
|
||||
return;
|
||||
|
||||
expr* fn = to_app(term)->get_arg(0);
|
||||
quantifier* q = nullptr;
|
||||
if (is_lambda(fn))
|
||||
q = to_quantifier(fn);
|
||||
else if (is_app(fn))
|
||||
q = m.is_lambda_def(to_app(fn)->get_decl());
|
||||
|
||||
if (q)
|
||||
ctx.add_non_lambda(q);
|
||||
}
|
||||
|
||||
|
||||
void theory_seq::add_length(expr* l) {
|
||||
expr* e = nullptr;
|
||||
VERIFY(m_util.str.is_length(l, e));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue