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
Commit 11c748c
Browse filesBrowse the repository at this point in the historyBrowse files
Model Java integral types as fixed-width BitVectors
Migrate int/short/char/byte -> 32-bit BitVec and long -> 64-bit BitVec
in the SMT translation. Z3 BitVec ops match Java exactly: mkBVAdd/Sub/Mul
wrap (two's-complement overflow), mkBVSDiv truncates toward zero, mkBVSRem
takes the sign of the dividend, signed comparisons; int<->long mixing
sign-extends, and BV<->real/FP coercions go through mkBV2Int/getLong.
ExpressionFolding (Java-int constant folding) is now consistent with the
solver.
Closes three holes at once: ErrorIntOverflowUnsound (46341*46341 wraps
to -2147479015), ErrorNegativeModuloUnsound (-7 % 3 == -1), and
ErrorLongAsRealDivisionUnsound (7L/2L == 3).
Sound fixed-width semantics also exposed six Correct tests that were
themselves latently unsound (they asserted mathematically-true but
Java-false postconditions that overflow): CorrectSimpleIfElse (-a at
MIN_VALUE), CorrectSpecificFunctionInvocation / CorrectLongUsage /
CorrectFunctionsTutorial / CorrectIfThen / CorrectOperatorAssignments
(+,-,* overflow). Each now carries overflow-guard preconditions/bounds
so its postcondition genuinely holds (CorrectLongUsage widens to long
before multiplying). ErrorLongUsage gains a third expected-error marker
for the now-correctly-rejected overflow in its own body.
Whole verifier suite is green (304 tests, 0 failures); all 11
Error*Unsound holes are now rejected.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments