Skip to content

Replaced access path bases with access paths in backward dataflow #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
DEST_DIR="arkanalyzer"
MAX_RETRIES=10
RETRY_DELAY=3 # Delay between retries in seconds
BRANCH="neo/2025-06-16"
BRANCH="neo/2025-06-24"

for ((i=1; i<=MAX_RETRIES; i++)); do
git clone --depth=1 --branch $BRANCH $REPO_URL $DEST_DIR && break
Expand Down
4 changes: 4 additions & 0 deletions usvm-ts-dataflow/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ dependencies {
implementation(Libs.kotlinx_collections)
implementation(Libs.kotlinx_serialization_json)
implementation(Libs.clikt)
runtimeOnly(Libs.logback)

testImplementation(Libs.mockk)
testImplementation(Libs.junit_jupiter_params)
Expand Down Expand Up @@ -129,5 +130,8 @@ tasks.shadowJar {
// Provider com.github.ajalt.mordant.terminal.terminalinterface.jna.TerminalInterfaceProviderJna not found
// ```
exclude(dependency("com.github.ajalt.mordant:.*:.*"))

// Keep the logback in shadow jar:
exclude(dependency("ch.qos.logback:logback-classic:.*"))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@ package org.usvm.dataflow.ts.infer

import org.jacodb.ets.model.EtsMethod
import org.jacodb.ets.model.EtsStmt
import org.jacodb.ets.model.EtsType
import org.jacodb.impl.cfg.graphs.GraphDominators
import org.usvm.dataflow.ifds.Analyzer
import org.usvm.dataflow.ifds.Edge
import org.usvm.dataflow.ifds.Vertex
import org.usvm.dataflow.ts.graph.EtsApplicationGraph

class BackwardAnalyzer(
val graph: EtsApplicationGraph,
savedTypes: MutableMap<EtsType, MutableList<EtsTypeFact>>,
dominators: (EtsMethod) -> GraphDominators<EtsStmt>,
doAddKnownTypes: Boolean = true,
) : Analyzer<BackwardTypeDomainFact, AnalyzerEvent, EtsMethod, EtsStmt> {

override val flowFunctions = BackwardFlowFunctions(graph, dominators, savedTypes, doAddKnownTypes)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want to keep savedTypes, or somehow justify its removal and clean up the forward flow functions accordingly.

override val flowFunctions = BackwardFlowFunctions(doAddKnownTypes)

override fun handleCrossUnitCall(
caller: Vertex<BackwardTypeDomainFact, EtsStmt>,
Expand All @@ -27,7 +23,7 @@ class BackwardAnalyzer(

override fun handleNewEdge(edge: Edge<BackwardTypeDomainFact, EtsStmt>): List<AnalyzerEvent> {
val (startVertex, currentVertex) = edge
val (current, currentFact) = currentVertex
val (current, _) = currentVertex

val method = graph.methodOf(current)
val currentIsExit = current in graph.exitPoints(method)
Expand Down
Loading