Skip to content

Commit

Permalink
Fix JcApplicationGraph initialization
Browse files Browse the repository at this point in the history
Remove Usages in JacoDBContainer. Use SyncUsagesExtension directly
  • Loading branch information
Lipen committed Jul 18, 2024
1 parent bea6a3a commit ad6301c
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 @@ -6,7 +6,8 @@ import org.jacodb.api.jvm.JcMethod
import org.jacodb.api.jvm.JcTypedMethod
import org.jacodb.api.jvm.cfg.JcInst
import org.jacodb.api.jvm.ext.toType
import org.jacodb.impl.features.usagesExt
import org.jacodb.impl.features.SyncUsagesExtension
import org.jacodb.impl.features.hierarchyExt
import org.usvm.dataflow.jvm.graph.JcApplicationGraphImpl
import org.usvm.statistics.ApplicationGraph
import org.usvm.util.originalInst
Expand All @@ -18,7 +19,8 @@ import java.util.concurrent.ConcurrentHashMap
class JcApplicationGraph(
cp: JcClasspath,
) : ApplicationGraph<JcMethod, JcInst> {
private val jcApplicationGraph = JcApplicationGraphImpl(cp, runBlocking { cp.usagesExt() })
private val jcApplicationGraph =
JcApplicationGraphImpl(cp, SyncUsagesExtension(runBlocking { cp.hierarchyExt() }, cp))

override fun predecessors(node: JcInst): Sequence<JcInst> {
return jcApplicationGraph.predecessors(node.originalInst())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class JacoDBContainer(

private val defaultBuilder: JcSettings.() -> Unit = {
useProcessJavaRuntime()
installFeatures(InMemoryHierarchy, Usages)
installFeatures(InMemoryHierarchy)
}
}
}
Expand Down

0 comments on commit ad6301c

Please sign in to comment.