}
}
-Node Skolemize::mkSkolemizedBody(Node f,
+Node Skolemize::mkSkolemizedBody(const Options& opts,
+ Node f,
Node n,
std::vector<TNode>& fvs,
std::vector<Node>& sk,
std::vector<unsigned> var_indicies;
for (unsigned i = 0; i < f[0].getNumChildren(); i++)
{
- if (isInductionTerm(f[0][i]))
+ if (isInductionTerm(opts, f[0][i]))
{
ind_vars.push_back(f[0][i]);
ind_var_indicies.push_back(i);
Node nret = ret.substitute(ind_vars[0], k);
// note : everything is under a negation
// the following constructs ~( R( x, k ) => ~P( x ) )
- if (options::dtStcInduction() && tn.isDatatype())
+ if (opts.quantifiers.dtStcInduction && tn.isDatatype())
{
const DType& dt = tn.getDType();
std::vector<Node> disj;
Assert(!disj.empty());
n_str_ind = disj.size() == 1 ? disj[0] : nm->mkNode(AND, disj);
}
- else if (options::intWfInduction() && tn.isInteger())
+ else if (opts.quantifiers.intWfInduction && tn.isInteger())
{
Node icond = nm->mkNode(GEQ, k, nm->mkConstInt(Rational(0)));
Node iret =
std::vector<TNode> fvs;
Node sub;
std::vector<unsigned> sub_vars;
- Node ret =
- mkSkolemizedBody(f, f[1], fvs, d_skolem_constants[f], sub, sub_vars);
+ Node ret = mkSkolemizedBody(
+ options(), f, f[1], fvs, d_skolem_constants[f], sub, sub_vars);
d_skolem_body[f] = ret;
// store sub quantifier information
if (!sub.isNull())
return it->second;
}
-bool Skolemize::isInductionTerm(Node n)
+bool Skolemize::isInductionTerm(const Options& opts, Node n)
{
TypeNode tn = n.getType();
- if (options::dtStcInduction() && tn.isDatatype())
+ if (opts.quantifiers.dtStcInduction && tn.isDatatype())
{
const DType& dt = tn.getDType();
return !dt.isCodatatype();
}
- if (options::intWfInduction() && tn.isInteger())
+ if (opts.quantifiers.intWfInduction && tn.isInteger())
{
return true;
}
* has multiple induction variables. See page 5
* of Reynolds et al., VMCAI 2015.
*/
- static Node mkSkolemizedBody(Node q,
+ static Node mkSkolemizedBody(const Options& opts,
+ Node q,
Node n,
std::vector<TNode>& fvs,
std::vector<Node>& sk,
*/
Node getSkolemizedBody(Node q);
/** is n a variable that we can apply inductive strenghtening to? */
- static bool isInductionTerm(Node n);
+ static bool isInductionTerm(const Options& opts, Node n);
/**
* Get skolemization vectors, where for each quantified formula that was
* skolemized, this is the list of skolems that were used to witness the