Skip to content

Fix unsound Flux bitwise properties - #813

Open
fromtaoyuanhsinchuuuu wants to merge 1 commit into
model-checking:mainfrom
fromtaoyuanhsinchuuuu:fix/flux-bitwise-properties
Open

fromtaoyuanhsinchuuuu wants to merge 1 commit into
model-checking:mainfrom
fromtaoyuanhsinchuuuu:fix/flux-bitwise-properties

Conversation

@fromtaoyuanhsinchuuuu

@fromtaoyuanhsinchuuuu fromtaoyuanhsinchuuuu commented Dec 2, 2026 •

Copy link
Copy Markdown

Use a lower bound for shifting right by four, since low bits are discarded. Restrict the mask bound to nonnegative operands and remove the left-shift monotonicity property, which wrapping shifts can violate.

This follows the correction proposed by @Ode-to-a-Nightingale in #782.

Validation

  • Proved the revised shift and mask inequalities with Z3 for signed and unsigned 8-, 16-, 32-, 64-, and 128-bit values.
  • The full Flux suite is covered by the Flux workflow.

Resolves #782

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@fromtaoyuanhsinchuuuu
fromtaoyuanhsinchuuuu requested a review from a team as a code owner December 2, 2026 20:05

This branch has not been deployed

No deployments
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.

Flux: ShiftRightByFour, MaskLess and ShiftLeft in flux_info.rs are false for some operands

1 participant