Skip to content

Simplify: fold comparisons between integers - #755

Open
mtzguido wants to merge 2 commits into
FStarLang:masterfrom
mtzguido:fold-int-comparisons
Open

Simplify: fold comparisons between integers#755
mtzguido wants to merge 2 commits into
FStarLang:masterfrom
mtzguido:fold-int-comparisons

Conversation

@mtzguido

Copy link
Copy Markdown
Member

This deserves a look to make sure we're not messing up wrt overflow,
promotion, etc. I think this is correct since 1) we keep the invariant
that integer constants are in bounds (see the asserts) and 2) we are only
folding comparisons where the width of the operator and the width of
both constants exactly match.

@mtzguido

Copy link
Copy Markdown
Member Author

The failure here is legit since it depends on a fix I bundled into #754. The GH actions caches seem to be acting up too. I deleted a bunch of them and I think CI will now work.

This deserves a look to make sure we're not messing up wrt overflow,
promotion, etc. I think this is correct since 1) we keep the invariant
that integer constants are in bounds (see the asserts) and 2) we are only
folding comparisons where the width of the operator and the width of
both constants exactly match.
@mtzguido
mtzguido force-pushed the fold-int-comparisons branch from 37fd1fa to a6083bb Compare August 21, 2026 22:01
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