Skip to content

Commit

Permalink
Rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
emnigma committed Oct 4, 2023
1 parent 514b55d commit ff7b80f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import org.usvm.api.allocateStaticRef
import org.usvm.api.evalTypeEquals
import org.usvm.api.targets.JcTarget
import org.usvm.api.typeStreamOf
import org.usvm.forkblacklists.UForkBlackList
import org.usvm.jvm.JcApplicationBlockGraph
import org.usvm.machine.*
import org.usvm.machine.interpreter.JcExprResolver
Expand All @@ -31,6 +32,7 @@ import org.usvm.util.write
class JcBlockInterpreter(
private val ctx: JcContext,
private val applicationGraph: JcApplicationBlockGraph,
var forkBlackList: UForkBlackList<JcState, JcInst> = UForkBlackList.createDefault(),
) : UInterpreter<JcState>() {

companion object {
Expand Down Expand Up @@ -67,7 +69,7 @@ class JcBlockInterpreter(
}
}

val solver = ctx.solver<JcType, JcContext>()
val solver = ctx.solver<JcType>()

val model = (solver.checkWithSoftConstraints(state.pathConstraints) as USatResult).model
state.models = listOf(model)
Expand All @@ -82,7 +84,7 @@ class JcBlockInterpreter(

logger.debug("Step: {}", stmt)

val scope = StepScope(state)
val scope = StepScope(state, forkBlackList)

// handle exception firstly
val result = state.methodResult
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class IDGenerator {
}
}

fun <Type> UPathConstraints<Type, *>.size(): Int {
fun <Type> UPathConstraints<Type>.size(): Int {
return numericConstraints.constraints().count() +
this.equalityConstraints.distinctReferences.count() +
this.equalityConstraints.equalReferences.count() +
Expand Down

0 comments on commit ff7b80f

Please sign in to comment.