Skip to content

Emit YAML violation witnesses (format 2.3) - #54

Merged
nils-loose merged 1 commit into
devfrom
feat/yaml-witnesses
Oct 20, 2026
Merged

nils-loose merged 1 commit into
devfrom
feat/yaml-witnesses

Conversation

@nils-loose

Copy link
Copy Markdown
Contributor

Executor and harness changes for YAML violation witnesses (format 2.3). Closes #45 once the WitnessCreator release is pinned.

Draft until: SWAT-project/WitnessCreator#1 is merged and tagged (v0.2.0); then bump WITNESS_CREATOR_VERSION/WITNESS_CREATOR_SHA256 in .github/workflows/gradle.yml. With v0.1.1 the new CLI is not understood: verdicts are unaffected, but no witness is written and the updated smoketest.sh fails. Expect overlap with #52 (gradle.yml, package scripts).

Changes

  • [WITNESS] markers carry the nondet call index on its source line (per class, bytecode order = evaluation order), the value's type descriptor and the class' SourceFile attribute
  • New [WITNESS_TARGET] marker: Witness.recordTarget replaces printStackTrace in main's surrounding try/catch (trace still printed); covers AssertionError and RuntimeException
  • -0.0 recorded with its sign
  • lib/witness.py and run_swat.py pass markers, input paths and the property file to WitnessCreator (--input/--property/--out); sources are no longer copied. Optional lint via SWAT_WITNESSLINT
  • smoketest.sh requires witness.yml with a target waypoint
  • targets/sv-comp/WitnessCreator/ gitignored (runtime from the release)

Testing

See SWAT-project/WitnessCreator#1: 40 tasks, WitnessLint 2.3 31/31, target on 27/27 violations, wit4java (GraphML) 23/27.

🤖 Generated with Claude Code

SV-COMP 2027 requires Java violation witnesses in the YAML format
(version 2.3); WitnessCreator writes them from the executor's witness
markers. This supplies what the markers were missing:

- [WITNESS] markers now carry the index of the nondet call on its
  source line (per class, bytecode order = evaluation order), the JVM
  type descriptor of the value and the class' SourceFile attribute, so
  WitnessCreator can place the function_return waypoint at the closing
  parenthesis of the right call, render a typed Java literal and find
  the file of non-public or inner classes.
- A new [WITNESS_TARGET] marker with the uncaught throwable and its
  stack trace is emitted by Witness.recordTarget, which the surrounding
  try/catch of main now calls instead of printStackTrace (the trace is
  still printed). WitnessCreator derives the target waypoint from the
  innermost frame inside the task sources.
- Negative zero is recorded as -0.0 (BigDecimal has no sign for zero).
- Harness (lib/witness.py) and competition wrapper (run_swat.py) pass
  both markers, the task's input paths and the property file to
  WitnessCreator (--input/--property/--out); sources are no longer
  copied around. Optional WitnessLint via SWAT_WITNESSLINT.
- The package smoketest requires witness.yml with a target waypoint.

Requires WitnessCreator >= the YAML-capable release (feat/yaml-witness-2.3);
the CI pin WITNESS_CREATOR_VERSION/SHA256 must be bumped with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nils-loose nils-loose added this to the SV-COMP 2027 milestone Oct 15, 2026
@nils-loose
nils-loose merged commit b14fdaf into dev Oct 20, 2026
12 checks passed
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