Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ghost int literal #1256

Merged
merged 8 commits into from
Nov 30, 2024
Merged

Conversation

arnaudgolfouse
Copy link
Collaborator

@arnaudgolfouse arnaudgolfouse commented Nov 27, 2024

Create Ints in ghost code using a int suffix, like so:

ghost! {
    let x = 1int;
};

This is also added in pearlite for consistency.

Fixes #1251.

@arnaudgolfouse
Copy link
Collaborator Author

I'm unhappy about the duplicated ghost.rs file in creusot-contracts-proc and creusot-contracts-dummy, but using a #[path = "..."] annotation does not work... If someone has a better idea I'm interested!

@arnaudgolfouse arnaudgolfouse force-pushed the ghost-int-literal branch 4 times, most recently from 0c92f7f to dcca424 Compare November 29, 2024 14:32
@arnaudgolfouse
Copy link
Collaborator Author

I'm unhappy about the duplicated ghost.rs file in creusot-contracts-proc and creusot-contracts-dummy, but using a #[path = "..."] annotation does not work... If someone has a better idea I'm interested!

Well apparently it does work!

@arnaudgolfouse arnaudgolfouse marked this pull request as ready for review November 29, 2024 14:33
@arnaudgolfouse arnaudgolfouse merged commit 29f350e into creusot-rs:master Nov 30, 2024
4 checks passed
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.

Int literals in ghost code
1 participant