summaryrefslogtreecommitdiff
path: root/src/preprocessing
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-03-20 17:29:41 -0500
committerGitHub <noreply@github.com>2020-03-20 17:29:41 -0500
commit0a0cee14c38cac0f87772c192ef387dcd36b6977 (patch)
tree43b96661c05e742ff9b296439e9df20ab02cac7b /src/preprocessing
parent537bb89c664375aa0fe0143e65d255de34bd611c (diff)
Fix variable shadowing issue in sygus-inference (#4121)
This makes the sygus-inference preprocessing pass avoid variable shadowing, which technically could happen by forcing unexpected options. Fixes #4083.
Diffstat (limited to 'src/preprocessing')
-rw-r--r--src/preprocessing/passes/sygus_inference.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/preprocessing/passes/sygus_inference.cpp b/src/preprocessing/passes/sygus_inference.cpp
index 41bb226a3..776e738d3 100644
--- a/src/preprocessing/passes/sygus_inference.cpp
+++ b/src/preprocessing/passes/sygus_inference.cpp
@@ -154,16 +154,18 @@ bool SygusInference::solveSygus(std::vector<Node>& assertions,
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];
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback