{
Assert(!d_ftn.isNull());
bn = d_tds->sygusToBuiltin(n);
- bn = Rewriter::rewrite(bn);
+ Assert(d_builtin_to_sygus.find(bn) == d_builtin_to_sygus.end()
+ || d_builtin_to_sygus[bn] == n);
d_builtin_to_sygus[bn] = n;
}
Assert(bn.getType() == d_tn);
return true;
}
+void SygusSampler::getVariables(std::vector<Node>& vars) const
+{
+ vars.insert(vars.end(), d_vars.begin(), d_vars.end());
+}
+
void SygusSampler::getSamplePoint(unsigned index,
std::vector<Node>& vars,
std::vector<Node>& pt)
pt.insert(pt.end(), spt.begin(), spt.end());
}
+void SygusSampler::addSamplePoint(std::vector<Node>& pt)
+{
+ Assert(pt.size() == d_vars.size());
+ d_samples.push_back(pt);
+}
+
Node SygusSampler::evaluate(Node n, unsigned index)
{
Assert(index < d_samples.size());
virtual Node registerTerm(Node n, bool forceKeep = false);
/** get number of sample points */
unsigned getNumSamplePoints() const { return d_samples.size(); }
+ /** get variables, adds d_vars to vars */
+ void getVariables(std::vector<Node>& vars) const;
/** get sample point
*
* Appends sample point #index to the vector pt, d_vars to vars.
void getSamplePoint(unsigned index,
std::vector<Node>& vars,
std::vector<Node>& pt);
+ /** Add pt to the set of sample points considered by this sampler */
+ void addSamplePoint(std::vector<Node>& pt);
/** evaluate n on sample point index */
Node evaluate(Node n, unsigned index) override;
/**