mirror of
https://github.com/Z3Prover/z3
synced 2026-07-15 19:45:41 +00:00
update pattern inference to allow patterns with variables outside of scope
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
30a4a84c79
commit
aa6dddbdf0
3 changed files with 4 additions and 7 deletions
|
|
@ -173,13 +173,9 @@ inline void pattern_inference_cfg::collect::save(expr * n, unsigned delta, info
|
|||
void pattern_inference_cfg::collect::save_candidate(expr * n, unsigned delta) {
|
||||
switch (n->get_kind()) {
|
||||
case AST_VAR: {
|
||||
unsigned idx = to_var(n)->get_idx();
|
||||
if (idx >= m_num_bindings + delta) {
|
||||
save(n, delta, nullptr);
|
||||
return;
|
||||
}
|
||||
uint_set free_vars;
|
||||
if (delta <= idx)
|
||||
unsigned idx = to_var(n)->get_idx();
|
||||
if (delta <= idx && idx < m_num_bindings + delta)
|
||||
free_vars.insert(idx - delta);
|
||||
info * i = alloc(info, m, n, free_vars, 1);
|
||||
save(n, delta, i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue