Skip to content
Draft
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
14 changes: 14 additions & 0 deletions usvm-ts-fast-check/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ runtime.
The public property model, validation, registries, coverage contracts and decoders, and property-to-EtsIR mapping
remain in [`usvm-ts-pbt`](../usvm-ts-pbt/README.md).

## Branch coverage boundary

One c8 execution produces the existing source-mapped Istanbul statement report and raw V8 ranges. The bounded
TypeScript branch converter reads those same raw ranges, the executed source snapshot, and the source map. It emits
ordered `if` arms only when the original TypeScript points map back exactly, each arm has a distinct V8 execution
point, and the arm counts add up to the count at the condition. A supported `if` without `else` additionally needs
a single terminating `return` or `throw` in its true arm and a following statement that is reached only on false.
Nested `if` statements are supported under those conditions. Ambiguous counts or ranges and unsupported constructs
produce diagnostics; exact statement mappings remain available.

Loops, `switch`, conditional expressions, logical short-circuit ranges, and function or script ranges are never
reinterpreted as `if` arms. The converter does not instrument the TypeScript program or execute it a second time.
The resulting edges are coverage artifacts; target-selection integration belongs to #399/#355.

Run the backend checks with:

```shell
Expand Down
1 change: 1 addition & 0 deletions usvm-ts-fast-check/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies {
implementation(Libs.clikt)
implementation(Libs.kotlinx_serialization_json)

testImplementation(Libs.jacodb_ets)
testImplementation(Libs.logback)
}

Expand Down
8 changes: 4 additions & 4 deletions usvm-ts-fast-check/fast-check-adapter/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions usvm-ts-fast-check/fast-check-adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@
"build": "tsc --project tsconfig.json",
"pretest": "npm run build",
"test": "npm run test:compiled",
"test:compiled": "node --test dist/test/entry-point.test.js dist/test/local-source-closure.test.js dist/test/execute-property.test.js dist/test/execution-cli.test.js dist/test/js-value.test.js dist/test/process-group-shutdown.test.js dist/test/process-supervisor.test.js dist/test/project-domain.test.js dist/test/projection-cli.test.js"
"test:compiled": "node --test dist/test/coverage-branches.test.js dist/test/entry-point.test.js dist/test/local-source-closure.test.js dist/test/execute-property.test.js dist/test/execution-cli.test.js dist/test/js-value.test.js dist/test/process-group-shutdown.test.js dist/test/process-supervisor.test.js dist/test/project-domain.test.js dist/test/projection-cli.test.js"
},
"dependencies": {
"@jridgewell/trace-mapping": "0.3.31",
"c8": "10.1.3",
"fast-check": "4.9.0",
"tsx": "4.23.12"
"tsx": "4.23.12",
"typescript": "5.9.2"
},
"devDependencies": {
"@types/node": "18.19.130",
"typescript": "5.9.2"
"@types/node": "18.19.130"
},
"overrides": {
"c8": {
Expand Down
Loading
Loading