// grammar. This results in the error below.
// We can also be in a case where the only rule specified was
// (Constant T), in which case we have not yet added a constructor. We
- // ensure an arbitrary constant is added in this case.
- if (datatypes[i].getNumConstructors() == 0)
+ // ensure an arbitrary constant is added in this case. We additionally
+ // add a constant if the grammar allows it regardless of whether the
+ // datatype has other constructors, since this ensures the datatype is
+ // well-founded (see 3423).
+ if (aci)
{
- if (aci)
- {
- Expr c = btt.mkGroundTerm();
- PARSER_STATE->addSygusConstructorTerm(datatypes[i], c, ntsToUnres);
- }
- else
- {
- std::stringstream se;
- se << "Grouped rule listing for " << datatypes[i].getName()
- << " produced an empty rule list.";
- PARSER_STATE->parseError(se.str());
- }
+ Expr c = btt.mkGroundTerm();
+ PARSER_STATE->addSygusConstructorTerm(datatypes[i], c, ntsToUnres);
+ }
+ else if (datatypes[i].getNumConstructors() == 0)
+ {
+ std::stringstream se;
+ se << "Grouped rule listing for " << datatypes[i].getName()
+ << " produced an empty rule list.";
+ PARSER_STATE->parseError(se.str());
}
}
// pop scope from the pre-declaration
regress0/sygus/parity-AIG-d0.sy
regress0/sygus/parse-bv-let.sy
regress0/sygus/real-si-all.sy
+ regress0/sygus/sygus-no-wf.sy
+ regress0/sygus/sygus-uf.sy
regress0/sygus/strings-unconstrained.sy
regress0/sygus/uminus_one.sy
regress0/sygus/univ_3-long-repeat-conflict.sy
regress0/sets/sets-new.smt2
regress0/sets/sets-testlemma-ints.smt2
regress0/sets/sets-testlemma-reals.smt2
- regress0/sygus/sygus-uf.sy
regress0/symmetric.smtv1.smt2
regress0/tptp/BOO003-4.p
regress0/tptp/BOO027-1.p
--- /dev/null
+; COMMAND-LINE: --sygus-out=status
+; EXPECT: unsat
+(set-logic ALL)
+(synth-fun f ((x0 Bool)) Bool
+ (
+ (B Bool ((Variable Bool) (Constant Bool) (= I I) ))
+ (I Int ((Constant Int) (+ I I)))
+ )
+)
+(constraint (= (f false) false))
+(check-synth)