summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/sygus_sampler.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-07-26 14:27:37 -0500
committerGitHub <noreply@github.com>2018-07-26 14:27:37 -0500
commita131d4b4cf086f27c4c62d4b012862c75153033e (patch)
tree454a3147ef17ac07d17e1cbbdc77307c74636d63 /src/theory/quantifiers/sygus_sampler.cpp
parentd23c9f4112003c006fc1f1d78d8c82c8310908c9 (diff)
Fix a few issues in the sygus sampler related to evaluation (#2215)
Diffstat (limited to 'src/theory/quantifiers/sygus_sampler.cpp')
-rw-r--r--src/theory/quantifiers/sygus_sampler.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/theory/quantifiers/sygus_sampler.cpp b/src/theory/quantifiers/sygus_sampler.cpp
index b1b21a53e..6808f2a6e 100644
--- a/src/theory/quantifiers/sygus_sampler.cpp
+++ b/src/theory/quantifiers/sygus_sampler.cpp
@@ -451,6 +451,8 @@ void SygusSampler::addSamplePoint(std::vector<Node>& pt)
Node SygusSampler::evaluate(Node n, unsigned index)
{
Assert(index < d_samples.size());
+ // do beta-reductions in n first
+ n = Rewriter::rewrite(n);
// use efficient rewrite for substitution + rewrite
Node ev = d_eval.eval(n, d_vars, d_samples[index]);
Trace("sygus-sample-ev") << "Evaluate ( " << n << ", " << index << " ) -> ";
@@ -459,6 +461,8 @@ Node SygusSampler::evaluate(Node n, unsigned index)
Trace("sygus-sample-ev") << ev << std::endl;
return ev;
}
+ Trace("sygus-sample-ev") << "null" << std::endl;
+ Trace("sygus-sample-ev") << "Rewrite -> ";
// substitution + rewrite
std::vector<Node>& pt = d_samples[index];
ev = n.substitute(d_vars.begin(), d_vars.end(), pt.begin(), pt.end());
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback