summaryrefslogtreecommitdiff
path: root/src/theory/strings/sequences_rewriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/theory/strings/sequences_rewriter.cpp')
-rw-r--r--src/theory/strings/sequences_rewriter.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/theory/strings/sequences_rewriter.cpp b/src/theory/strings/sequences_rewriter.cpp
index aa85d1056..2d2ec0af0 100644
--- a/src/theory/strings/sequences_rewriter.cpp
+++ b/src/theory/strings/sequences_rewriter.cpp
@@ -3044,10 +3044,9 @@ Node SequencesRewriter::canonicalStrForSymbolicLength(Node len, TypeNode stype)
{
res = nm->mkConst(String(std::string(u, 'A')));
}
- else
- {
- Unimplemented() << "canonicalStrForSymbolicLength for non-string";
- }
+ // we could do this for sequences, but we need to be careful: some
+ // sorts do not permit values that the solver can handle (e.g. uninterpreted
+ // sorts and arrays).
}
else if (len.getKind() == PLUS)
{
@@ -3075,6 +3074,10 @@ Node SequencesRewriter::canonicalStrForSymbolicLength(Node len, TypeNode stype)
Integer intReps = ratReps.getNumerator();
Node nRep = canonicalStrForSymbolicLength(len[1], stype);
+ if (nRep.isNull())
+ {
+ return Node::null();
+ }
std::vector<Node> nRepChildren;
utils::getConcat(nRep, nRepChildren);
NodeBuilder<> concatBuilder(STRING_CONCAT);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback