Skip to content

Add support for IntToFloat and FloatToInt casts#190

Open
ThomasMayerl wants to merge 7 commits into
Aurel300:rewrite-2023from
ThomasMayerl:float_to_int
Open

Add support for IntToFloat and FloatToInt casts#190
ThomasMayerl wants to merge 7 commits into
Aurel300:rewrite-2023from
ThomasMayerl:float_to_int

Conversation

@ThomasMayerl

Copy link
Copy Markdown

This PR implements support for IntToFloat and FloatToInt casts by going via the SMT Real domain.

Comment thread prusti-encoder/src/encoders/ty/interpretation/float.rs Outdated
@ThomasMayerl
ThomasMayerl requested a review from Aurel300 July 17, 2026 14:58
Comment thread vir/src/make.rs Outdated
Comment thread prusti-tests/tests/verify/pass/casts/int_to_float.rs Outdated
Comment thread prusti-encoder/src/encoders/builtin/cast.rs Outdated
Comment thread prusti-encoder/src/encoders/ty/interpretation/real.rs Outdated
Comment thread prusti-encoder/src/encoders/ty/interpretation/float.rs Outdated
Comment thread prusti-encoder/src/encoders/ty/interpretation/real.rs Outdated
Comment thread prusti-encoder/src/encoders/ty/interpretation/real.rs Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine this is going to clash with #188.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, because Reals are just Perms. This encoder merely adds functions to be used with them.

Comment thread prusti-encoder/src/encoders/ty/interpretation/real.rs Outdated
Comment thread vir/src/gendata.rs
Comment thread prusti-encoder/src/encoders/ty/interpretation/real.rs Outdated
Comment thread prusti-encoder/src/encoders/ty/interpretation/real.rs Outdated
@JonasAlaif

Copy link
Copy Markdown
Collaborator

I should have put all the comments in a single review, sorry

Comment thread prusti-tests/tests/verify/fail/casts/int_to_float.rs Outdated
Comment thread vir/src/make.rs Outdated
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.

3 participants