You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SA walk desyncs on object ==: the refEquals helper no longer matches the extractor's RefEqualityEmitter #100
Status: confirmed by reading the code; the effect on verdicts has not been measured in a run yet.
What happens
SWAT rewrites every IF_ACMPEQ/IF_ACMPNE into a call to UtilInstrumented.refEquals, whose branches are recorded in the trace. The static pre-analysis graph models those branches inline at the comparison (cfg-extraction RefEqualityEmitter), so the two must report the same branches in the same order.
Since 0152059 ("Reproduce Java reference identity in the IF_ACMP rewrite"), refEquals branches on instanceof String, string pooling (RefIdentity.isCanonicalString, isPooledOnly), RefIdentity.same, isCanonicalBox and the box cache range: 2 to about 9 branch events, depending on the runtime types. RefEqualityEmitter (cfg-extraction, unchanged since 2026-09-27) still models the old helper with two branches (shouldUseValueEquality, then a != b).
Effect (expected)
The helper's branches carry no branch key, so the walk is only checked again at the next keyed branch. Comparisons of distinct objects (3 or more events), including enum comparisons, should therefore make the walk desync: sa_desync, and a SAFE verdict becomes UNKNOWN.
If the next graph node has no key, or only an open ordinal (|*), the shifted pairing may go unnoticed: a residual false SAFE risk.
sa-soundness/ref-eq* in targets/sv-comp/swat-benchmarks should show it; its result in RESULTS.md predates 0152059.
Fix
Either mask the helper's branches in the walk (as for choice branches and callbacks: the executor flags them and dfs holds the walk's place), or update RefEqualityEmitter to the new helper. Masking keeps the two repositories independent of the helper's implementation.
Fixed in #109 (and #108): the executor flags the branches of SWAT's helpers such as refEquals like callbacks (6344bd3), so the walk keeps its place, and cfg-extraction (v0.2.0, aa75899) keeps only the comparison's own if in the graph. Valid-assert desyncs went from 73 to 0 (see #93). Regression spec: RefEqualsHelperAgentSpec. Since #109 targets svcomp27/overnight-solver-perf, not main, this issue will not close automatically.
Activity
solid-eureka commentedon Oct 27, 2026
Fixed in #109 (and #108): the executor flags the branches of SWAT's helpers such as
refEqualslike callbacks (6344bd3), so the walk keeps its place, and cfg-extraction (v0.2.0, aa75899) keeps only the comparison's ownifin the graph. Valid-assert desyncs went from 73 to 0 (see #93). Regression spec:RefEqualsHelperAgentSpec. Since #109 targetssvcomp27/overnight-solver-perf, notmain, this issue will not close automatically.🤖 Generated with Claude Code