We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62d71aa commit 833bd43Copy full SHA for 833bd43
1 file changed
usvm-ts/src/main/kotlin/org/usvm/machine/expr/ReadLength.kt
@@ -5,6 +5,7 @@ import io.ksmt.utils.asExpr
5
import org.jacodb.ets.model.EtsAnyType
6
import org.jacodb.ets.model.EtsArrayType
7
import org.jacodb.ets.model.EtsLocal
8
+import org.jacodb.ets.model.EtsStringType
9
import org.jacodb.ets.model.EtsUnknownType
10
import org.usvm.UExpr
11
import org.usvm.UHeapRef
@@ -30,6 +31,11 @@ fun TsContext.readLengthProperty(
30
31
EtsArrayType(EtsUnknownType, dimensions = 1)
32
}
33
34
+ is EtsStringType -> {
35
+ // Strings are treated as arrays of characters (represented as strings).
36
+ EtsArrayType(EtsStringType, dimensions = 1)
37
+ }
38
+
39
else -> error("Expected EtsArrayType, EtsAnyType or EtsUnknownType, but got: $type")
40
41
0 commit comments