Skip to content

Commit 7a4201c

Browse files
committed
Replace assert with path constraints update
1 parent 458e96f commit 7a4201c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • usvm-ts/src/main/kotlin/org/usvm/machine/expr

usvm-ts/src/main/kotlin/org/usvm/machine/expr/ExprUtil.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ fun TsContext.mkTruthyExpr(
2525
val conjuncts = mutableListOf<ExprWithTypeConstraint<UBoolSort>>()
2626
val possibleType = memory.types.getTypeStream(expr.asExpr(addressSort)).single() as FakeType
2727

28-
scope.assert(possibleType.mkExactlyOneTypeConstraint(this@mkTruthyExpr)) // TODO add to path constraints instead
28+
scope.doWithState {
29+
pathConstraints += possibleType.mkExactlyOneTypeConstraint(this@mkTruthyExpr)
30+
}
2931

3032
if (!possibleType.boolTypeExpr.isFalse) {
3133
conjuncts += ExprWithTypeConstraint(

0 commit comments

Comments
 (0)