diff options
Diffstat (limited to 'src/theory/strings/term_registry.cpp')
-rw-r--r-- | src/theory/strings/term_registry.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/theory/strings/term_registry.cpp b/src/theory/strings/term_registry.cpp index ec034b0c9..6330d7c10 100644 --- a/src/theory/strings/term_registry.cpp +++ b/src/theory/strings/term_registry.cpp @@ -374,6 +374,13 @@ Node TermRegistry::getRegisterTermAtomicLemma(Node n, LengthStatus s, std::map<Node, bool>& reqPhase) { + if (n.isConst()) + { + // No need to send length for constant terms. This case may be triggered + // for cases where the skolem cache automatically replaces a skolem by + // a constant. + return Node::null(); + } Assert(n.getType().isStringLike()); NodeManager* nm = NodeManager::currentNM(); Node n_len = nm->mkNode(kind::STRING_LENGTH, n); @@ -433,14 +440,6 @@ Node TermRegistry::getRegisterTermAtomicLemma(Node n, Assert(false); } - // additionally add len( x ) >= 0 ? - if (options::stringLenGeqZ()) - { - Node n_len_geq = nm->mkNode(kind::GEQ, n_len, d_zero); - n_len_geq = Rewriter::rewrite(n_len_geq); - lems.push_back(n_len_geq); - } - if (lems.empty()) { return Node::null(); |