File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
usvm-ts/src/main/kotlin/org/usvm/machine Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -663,15 +663,18 @@ class TsExprResolver(
663
663
isSigned = true ,
664
664
).asExpr(sizeSort)
665
665
666
+ // TODO add test for array as parameter and reading as parameter, seems like it produces not fake object
666
667
val lValue = mkArrayIndexLValue(
667
668
sort = addressSort,
668
669
ref = array,
669
670
index = bvIndex,
670
- type = value.array.type as EtsArrayType
671
+ type = EtsArrayType ( EtsUnknownType , 1 )
671
672
)
672
673
val expr = scope.calcOnState { memory.read(lValue) }
673
674
674
- check(expr.isFakeObject()) { " Only fake objects are allowed in arrays" }
675
+ check(expr.isFakeObject()) {
676
+ " Only fake objects are allowed in arrays"
677
+ }
675
678
676
679
return expr
677
680
}
Original file line number Diff line number Diff line change @@ -127,7 +127,12 @@ class TsInterpreter(
127
127
is EtsCallStmt -> visitCallStmt(scope, stmt)
128
128
is EtsThrowStmt -> visitThrowStmt(scope, stmt)
129
129
is EtsNopStmt -> visitNopStmt(scope, stmt)
130
- else -> error(" Unknown stmt: $stmt " )
130
+ else -> {
131
+ logger.error { " Unknown stmt: $stmt " }
132
+ scope.doWithState {
133
+ newStmt(graph.successors(stmt).single())
134
+ }
135
+ }
131
136
}
132
137
} catch (e: Exception ) {
133
138
logger.error {
@@ -488,12 +493,14 @@ class TsInterpreter(
488
493
expr.extractBool(scope)
489
494
}
490
495
}
496
+
491
497
is EtsNumberType -> {
492
498
scope.calcOnState {
493
499
pathConstraints + = expr.getFakeType(scope).fpTypeExpr
494
500
expr.extractFp(scope)
495
501
}
496
502
}
503
+
497
504
else -> {
498
505
scope.calcOnState {
499
506
pathConstraints + = expr.getFakeType(scope).refTypeExpr
You can’t perform that action at this time.
0 commit comments