Skip to content

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

Merged
Lipen merged 13 commits intomainfrom
mforest/ets-access-paths-in-backward
Jul 3, 2025
Merged

Replaced access path bases with access paths in backward dataflow#282
Lipen merged 13 commits intomainfrom
mforest/ets-access-paths-in-backward

Conversation

@MForest7
Copy link
Copy Markdown
Collaborator

@MForest7 MForest7 commented May 28, 2025

Replaced nested objects in backward dataflow with access paths, also get a performance increase.

project stmts avg time (main) avg time (new) aa improvement, % (old) aa improvement, % (new)
project1 9914 2.5s 1.6s 37.2 39.4
project2 26679 2.2s 1.4s 15.3 16.5
project3 4272 0.8s 0.4s 29.0 28.8
project4 4584 0.5s 0.3s 37.5 35.6
project5 121091 30.4s 9.3s 35.3 37.4
project6 28548 3.3s 1.7s 36.8 38.9
project7 5162 0.6s 0.4s 28.1 28.0

@MForest7 MForest7 requested a review from Lipen May 28, 2025 15:59
github-advanced-security[bot]

This comment was marked as spam.

@Lipen

This comment was marked as resolved.

@MForest7 MForest7 force-pushed the mforest/ets-access-paths-in-backward branch from 094d735 to 3f5fdde Compare June 24, 2025 10:57
Comment thread usvm-ts-dataflow/src/main/kotlin/org/usvm/dataflow/ts/infer/BackwardFlowFunctions.kt Dismissed
Comment thread usvm-ts-dataflow/src/main/kotlin/org/usvm/dataflow/ts/infer/BackwardFlowFunctions.kt Dismissed
Comment thread usvm-ts-dataflow/src/main/kotlin/org/usvm/dataflow/ts/infer/BackwardFlowFunctions.kt Dismissed
Comment thread usvm-ts-dataflow/src/main/kotlin/org/usvm/dataflow/ts/infer/BackwardFlowFunctions.kt Dismissed
Comment thread usvm-ts-dataflow/src/main/kotlin/org/usvm/dataflow/ts/infer/TypeGuesser.kt Dismissed
Comment thread usvm-ts-dataflow/src/main/kotlin/org/usvm/dataflow/ts/infer/TypeInferenceManager.kt Dismissed
Comment thread usvm-ts-dataflow/src/main/kotlin/org/usvm/dataflow/ts/infer/TypeInferenceManager.kt Dismissed
@Lipen
Copy link
Copy Markdown
Member

Lipen commented Jul 3, 2025

For the future reference: this PR disrupted the "saved types" trick for handling new T with unresolved T, in particular, the filling of typeInfo (later passed to savedTypes in Forward FF) in Backward FF was removed since it is either can't be expressed anymore, or it is just not clear how to do it straight. Consequently, I have removed the whole "saved types" logic from Forward FF to clean-up the code.

Below is the failing test with unresolved T and "expected" type which could be passed only with saved types trick, but it is not clean whether we even need to support such case. So, we have decided to currently disable such test.

class CaseNew2 {
    entrypoint() {
        let x = new Something(); // unresolved
        let y = x.foo; // use 'foo' field
        this.infer(x);
    }
    infer(a: any): any {
        const EXPECTED_ARG_0 = "Something { foo: any }";
    }
}

@Lipen Lipen merged commit 814740d into main Jul 3, 2025
6 checks passed
@Lipen Lipen deleted the mforest/ets-access-paths-in-backward branch July 3, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants