Fixes #6510.
This PR also eliminates a deprecated variant mkBooleanTermVariable from SkolemManager.
return NodeManager::currentNM()->mkSkolem(prefix, type, comment, flags);
}
-Node SkolemManager::mkBooleanTermVariable(Node t)
-{
- return mkPurifySkolem(t, "", "", NodeManager::SKOLEM_BOOL_TERM_VAR);
-}
-
ProofGenerator* SkolemManager::getProofGenerator(Node t) const
{
std::map<Node, ProofGenerator*>::const_iterator it = d_gens.find(t);
const TypeNode& type,
const std::string& comment = "",
int flags = NodeManager::SKOLEM_DEFAULT);
- /**
- * Make Boolean term variable for term t. This is a special case of
- * mkPurifySkolem above, where the returned term has kind
- * BOOLEAN_TERM_VARIABLE.
- */
- Node mkBooleanTermVariable(Node t);
/**
* Get proof generator for existentially quantified formula q. This returns
* the proof generator that was provided in a call to mkSkolem above.
{
// exists k. k = a
case SK_PURIFY:
- sk = sm->mkPurifySkolem(a, c, "string purify skolem");
- break;
+ {
+ // for sequences of Booleans, we may purify Boolean terms, in which case
+ // they must be Boolean term variables.
+ int flags = a.getType().isBoolean() ? NodeManager::SKOLEM_BOOL_TERM_VAR
+ : NodeManager::SKOLEM_DEFAULT;
+ sk = sm->mkPurifySkolem(a, c, "string purify skolem", flags);
+ }
+ break;
// these are eliminated by normalizeStringSkolem
case SK_ID_V_SPT:
case SK_ID_V_SPT_REV:
// otherwise, it is a shared term
argVal = d_valuation.getModelValue(nfe.d_nf[0][0]);
}
+ Assert(!argVal.isNull());
Node c = Rewriter::rewrite(nm->mkNode(SEQ_UNIT, argVal));
pure_eq_assign[eqc] = c;
Trace("strings-model") << "(unit: " << nfe.d_nf[0] << ") ";
regress0/strings/issue5816-re-kind.smt2
regress0/strings/issue5915-repl-ctn-rewrite.smt2
regress0/strings/issue6203-3-unfold-trivial-true.smt2
+ regress0/strings/issue6510-seq-bool.smt2
regress0/strings/itos-entail.smt2
regress0/strings/large-model.smt2
regress0/strings/leadingzero001.smt2
--- /dev/null
+; COMMAND-LINE: --strings-exp -q
+; EXPECT: sat
+(set-logic ALL)
+(declare-fun e () (Seq Bool))
+(assert (seq.nth (ite (= 0 (seq.len e)) (as seq.empty (Seq Bool)) (seq.unit false)) 0))
+(check-sat)