Trace("skolem-cache") << "mkTypedSkolemCached start: (" << id << ", " << a
<< ", " << b << ")" << std::endl;
SkolemId idOrig = id;
- a = a.isNull() ? a : Rewriter::rewrite(a);
- b = b.isNull() ? b : Rewriter::rewrite(b);
-
+ // do not rewrite beforehand if we are not using optimizations, this is so
+ // that the proof checker does not depend on the rewriter.
+ if (d_useOpts)
+ {
+ a = a.isNull() ? a : Rewriter::rewrite(a);
+ b = b.isNull() ? b : Rewriter::rewrite(b);
+ }
std::tie(id, a, b) = normalizeStringSkolem(id, a, b);
// optimization: if we aren't asking for the purification skolem for constant
std::map<SkolemId, Node>::iterator it = d_skolemCache[a][b].find(id);
if (it != d_skolemCache[a][b].end())
{
+ Trace("skolem-cache") << "...return existing " << it->second << std::endl;
// already cached
return it->second;
}
}
break;
}
+ Trace("skolem-cache") << "...returned " << sk << std::endl;
d_allSkolems.insert(sk);
d_skolemCache[a][b][id] = sk;
return sk;
b = Node::null();
}
- a = a.isNull() ? a : Rewriter::rewrite(a);
- b = b.isNull() ? b : Rewriter::rewrite(b);
-
+ if (d_useOpts)
+ {
+ a = a.isNull() ? a : Rewriter::rewrite(a);
+ b = b.isNull() ? b : Rewriter::rewrite(b);
+ }
Trace("skolem-cache") << "normalizeStringSkolem end: (" << id << ", " << a
<< ", " << b << ")" << std::endl;
return std::make_tuple(id, a, b);
Node m = t[2];
Node skt = sc->mkSkolemCached(t, SkolemCache::SK_PURIFY, "sst");
Node t12 = nm->mkNode(PLUS, n, m);
- t12 = Rewriter::rewrite(t12);
Node lt0 = nm->mkNode(STRING_LENGTH, s);
//start point is greater than or equal zero
Node c1 = nm->mkNode(GEQ, n, zero);
Node lemma = nm->mkNode(ITE, cond, b1, b2);
// assert:
- // IF n >=0 AND n < len( s ) AND m > 0
+ // IF n >=0 AND len( s ) > n AND m > 0
// THEN: s = sk1 ++ skt ++ sk2 AND
// len( sk1 ) = n AND
// ( len( sk2 ) = len( s )-(n+m) OR len( sk2 ) = 0 ) AND