This makes the sygus-inference preprocessing pass avoid variable shadowing, which technically could happen by forcing unexpected options.
Fixes #4083.
TypeNode tnv = v.getType();
unsigned vnum = type_count[tnv];
type_count[tnv]++;
+ vars.push_back(v);
if (vnum < qtvars[tnv].size())
{
- vars.push_back(v);
subs.push_back(qtvars[tnv][vnum]);
}
else
{
Assert(vnum == qtvars[tnv].size());
- qtvars[tnv].push_back(v);
- qvars.push_back(v);
+ Node bv = nm->mkBoundVar(tnv);
+ qtvars[tnv].push_back(bv);
+ qvars.push_back(bv);
+ subs.push_back(bv);
}
}
pas = pas[1];
regress1/sygus/issue3995-fmf-var-op.smt2
regress1/sygus/issue4009-qep.smt2
regress1/sygus/issue4025-no-rlv-cond.smt2
+ regress1/sygus/issue4083-var-shadow.smt2
regress1/sygus/large-const-simp.sy
regress1/sygus/let-bug-simp.sy
regress1/sygus/list-head-x.sy
--- /dev/null
+(set-logic ALL)
+(set-option :miniscope-quant true)
+(set-option :sygus-inference true)
+(set-option :var-ineq-elim-quant false)
+(set-info :status unsat)
+(declare-fun b ( Int ) Bool)
+(assert (forall (( c Int ) ( d Int )) (and (> d 3 ) (xor (>= c d) (b c)))))
+(check-sat)