Skip to content

[9.0 parity 9/9] perf(klee): pin nondet values only when they will be formatted - #55

Draft
GuilhermeBn198 wants to merge 1 commit into
port/property-before-abortfrom
port/concretize-on-violation
Draft

GuilhermeBn198 wants to merge 1 commit into
port/property-before-abortfrom
port/concretize-on-violation

Conversation

@GuilhermeBn198

Copy link
Copy Markdown
Collaborator

Found while comparing the merged build with Map2Check 9.0 (C runtime) on repeated runs. Brings the KLEE cost per path back in line with 9.0.

What

Under KLEE the nondet log was concretised at the end of every path — one klee_get_value query plus one klee_assume per value — although the log is written only on a violation (and the JSON report only when no mode is set). Map2Check 9.0 pins the values only on the violating path (nondet_generate_aux_witness_files). Now concretize pins the nondet values only when they will be formatted; memory records are still pinned as before.

Measured

loop-acceleration/array_3-2 (1024 nondet reads), Cover-Error, 300 s:

The remaining gap to 9.0 (9 vs 263 paths in phase 1) is the per-read allocation 9.0 also removed and this stack does not (non_det_log_t box returned through the C ABI, see #51).

Tests

cargo test and clippy pass; KLEE-only change, exercised end to end above.

Stack: after #54; merge order #47 → #55. Commits not signed yet (see #47).

Under KLEE the nondet log was concretised at the end of every path, one
solver query plus one assume per value, though it is written only on a
violation (and the JSON report only without a mode). Map2Check 9.0 pins the
values only on the violating path. On loop-acceleration/array_3-2 (1024
nondet reads) KLEE completed 1 path in its first phase where the 9.0 C
runtime completed 263, and the target 9.0 finds in every run (3/3, ~185 s)
was never found (0/3). Pinning only when the log or the report will be
formatted: found in 2/2 runs (254 s, 113 s).
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.

1 participant