SV-COMP: explorer-owned per-testcase stats.json + runs/ layout & analysis (#25)#27
Open
nils-loose wants to merge 2 commits into
Open
SV-COMP: explorer-owned per-testcase stats.json + runs/ layout & analysis (#25)#27nils-loose wants to merge 2 commits into
nils-loose wants to merge 2 commits into
Conversation
The executor no longer writes stats_<id>.json. Instead it accumulates missing invocations (each flagged when it caused symbolic context loss) in StatsStorage and ships them with the trace (TraceDTO.missingInvocations / new InvocationDTO). The explorer accumulates this per testcase on the Tree and, at testcase completion, writes a single consolidated stats.json to the log dir — mirroring the existing timing_data.json write. It holds the verdict, soundness flags, the missing-invocation superset and the explicit context-loss subset, so the analysis can rely on authoritative structured data instead of scraping logs. Execution errors cannot ride the trace: in sv-comp every error path halts the JVM before the trace is sent. They are instead surfaced from the executor stdout markers the explorer already scans in determine_next_step ([SWAT Exception] / internal SWAT AssertionError), recorded on the Tree and included in stats.json. Removes the now-dead executor error chain (StatsStorage.errors, ThreadContext/ThreadHandler.recordException, ErrorRecord) and the unused StatsStorage.entrypoint. Part of #25. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…idation Implements the remaining issue #25 parts in the svcomp CLI (lib/ + commands/): - Run folder structure: each `svcomp test run` writes its per-testcase logs and aggregated results under one timestamped runs/run_<ts>/{logs,results} dir (runs-debug/<target>/run_<ts>/logs for debug configs). Previous runs are kept; a single run timestamp is threaded through command generation and result writing. - Analysis on stats.json: rewrote lib/analysis/context_loss.py to read each testcase's consolidated stats.json instead of scraping explorer.log / stats_*.json. It pairs a run's results with its logs and reports the missing-invocation superset and its authoritative context-loss subset, fixing the old regex inconsistency. - Scoring summary: `svcomp analyze results` prints a Correct/Failed/Unk/Error/Timeout table per category and overall. - Consolidation: run_locally.sh and ci_run.sh now invoke `./svcomp test run`; the dead legacy top-level duplicates are removed (target_execution.py, command_generation.py, analyse_ctx_loss.py, analyze_by_correctness.py, compare_results.py, target_selection.py, witness_validation.py, util.py, dtypes.py). README and .gitignore updated. Closes #25. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses all five parts of #25 by making the explorer the single owner of per-testcase output and consolidating the harness onto the
svcompCLI. Two commits:550d304— explorer-ownedstats.jsonvia trace metadata (executor + explorer)stats_<id>.json. It accumulates missing invocations (each flagged when it caused symbolic context loss) inStatsStorageand ships them with the trace (TraceDTO.missingInvocations/ newInvocationDTO).Treeand, at testcase completion, writes one consolidatedstats.jsonto the log dir (same hook astiming_data.json): verdict, soundness flags, the missing-invocation superset and the explicit context-loss subset.[SWAT Exception]/ internal SWATAssertionError) and recorded intostats.json.StatsStorage.errors,recordException,ErrorRecord) and the unusedStatsStorage.entrypoint.d2c6708—runs/run_<ts>/layout,stats.jsonanalysis, CLI consolidation (Python harness)svcomp test runwrites its per-testcase logs and aggregated results under one timestampedruns/run_<ts>/{logs,results}dir (runs-debug/<target>/run_<ts>/logsfor debug configs). Old runs are preserved (part 2); a single run timestamp is threaded through command generation + result writing.stats.json(parts 1, 3): rewrotelib/analysis/context_loss.pyto read each testcase's consolidatedstats.jsoninstead of scrapingexplorer.log/stats_*.json. Reports the missing-invocation superset and its authoritative context-loss subset — fixing the old regex inconsistency.svcomp analyze resultsprints a Correct/Failed/Unk/Error/Timeout table per category and overall.run_locally.shandci_run.shnow invoke./svcomp test run; the 9 dead legacy top-level duplicates are removed (target_execution.py,command_generation.py,analyse_ctx_loss.py,analyze_by_correctness.py,compare_results.py,target_selection.py,witness_validation.py,util.py,dtypes.py). README +.gitignoreupdated.Test plan
autostub/Boolean…compare) → correctstats.json, nostats_*.jsonanywhere.Math.getExponent(double)) → verdict correctly downgraded to UNKNOWN;symbolic_context_loss=true,missing_invocations[0].context_loss=true count=2(merged across traces),context_loss_methods=["java/lang/Math/getExponent:(D)I"].runs/run_<ts>/{logs,results}withstats.jsonper testcase;svcomp analyze resultsrendered the scoring summary + superset/subset.classify()buckets (Correct/Failed/Unk/Error/Timeout, with precedence).Notes / out of scope
lib/analysis/{timing,failures,performance}.pystill default to the old flatlogs/when called standalone (the active flow passes the run dir explicitly).sv-comp.cfg:8 logging.invocations=trueis a pre-existing no-op (Config readslogging.statistics) — flagged, not changed.Closes #25.
🤖 Generated with Claude Code