// We could but don't do congruence for DT_SIZE and DT_HEIGHT_BOUND here.
// It also could make sense in practice to do congruence for APPLY_UF, but
// this is not done.
- if (getQuantifiersEngine() && options().quantifiers.sygus)
+ // Enable the sygus extension if we will introduce sygus datatypes. This
+ // is the case for sygus problems and when using sygus-inst.
+ if (getQuantifiersEngine()
+ && (options().quantifiers.sygus || options().quantifiers.sygusInst))
{
quantifiers::TermDbSygus* tds =
getQuantifiersEngine()->getTermDatabaseSygus();
// type is is the same as x_i, and whose value will be used to instantiate x_i
std::vector<Node> evals;
std::vector<Node> inst_constants;
+ InstConstantAttribute ica;
for (size_t i = 0, size = types.size(); i < size; ++i)
{
TypeNode tn = types[i];
/* Create the instantiation constant and set attribute accordingly. */
Node ic = nm->mkInstConstant(tn);
- InstConstantAttribute ica;
ic.setAttribute(ica, q);
Trace("sygus-inst") << "Create " << ic << " for " << var << std::endl;
// for evaluation functions. We use the DT_SYGUS_EVAL term so that the
// skolem construction here is deterministic and reproducible.
Node k = sm->mkPurifySkolem(eval, "eval");
+ // Requires instantiation constant attribute as well. This ensures that
+ // other instantiation methods, e.g. E-matching do not consider this term
+ // for instantiation, as it is model-unsound to do so.
+ k.setAttribute(ica, q);
inst_constants.push_back(ic);
evals.push_back(k);
regress1/quantifiers/issue8157-duplicate-conflicts.smt2
regress1/quantifiers/issue8344-cegqi-string-witness.smt2
regress1/quantifiers/issue8410-vts-subtypes.smt2
+ regress1/quantifiers/issue8456-2-syqi-ic.smt2
+ regress1/quantifiers/issue8456-syqi-ic.smt2
regress1/quantifiers/issue993.smt2
regress1/quantifiers/javafe.ast.StmtVec.009.smt2
regress1/quantifiers/lia-witness-div-pp.smt2
--- /dev/null
+; COMMAND-LINE: --sygus-inst
+; EXPECT: unsat
+(set-logic ALL)
+(assert (and (forall ((v (Array (_ BitVec 1) Bool))) (select v (_ bv0 1)))))
+(check-sat)
--- /dev/null
+; COMMAND-LINE: --sygus-inst
+; EXPECT: unsat
+(set-logic ALL)
+(declare-const x Bool)
+(declare-sort I 0)
+(declare-fun e () I)
+(declare-fun ex () I)
+(declare-fun t () I)
+(declare-fun r () I)
+(assert (distinct e ex))
+(assert (forall ((xt I)) (exists ((E I)) (= xt t))))
+(assert (or x (= t r)))
+(check-sat)