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

Adapt warning message for ensures not found #152

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

n-osborne
Copy link
Collaborator

This PR proposes a new warning message when the next_state case cannot be computed with the ensures clauses present in the specifications.

This is an attempt to answer point 4 in #150

Copy link
Contributor

@jmid jmid left a comment

Choose a reason for hiding this comment

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

Having been confused by the original error message I think this is a nice improvement! 🎉

Copy link
Contributor

@shym shym left a comment

Choose a reason for hiding this comment

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

Nice improvement, thanks!
I suggest a slight reformulation which might be clearer.

pf ppf "Skipping %s:@ model@ %s@ %a" f m text
"is declared as modified by the function but no translatable ensures \
clause was found"
pf ppf "@[Skipping %s:@ model@ %s@ %a@]@ @[%a@]@ @[%s = f (old %s)@]" f m
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest something like:

"Skipping %s:@ model@ %s %a@;%a@ x.%s = ..."

to make sure it’s clear that the t must appear, not contents by itself, and that the clause doesn’t need to use old.

@shym shym force-pushed the next-state-wrn-msg branch from bfd31ee to 1c56524 Compare October 17, 2023 15:32
@shym
Copy link
Contributor

shym commented Oct 17, 2023

I (force-)pushed a proposed reformulation.

"translatable" was a bit confusing a word (translation was not really
the issue).
Add some explanation on what the ensures clause should look like.
@shym shym force-pushed the next-state-wrn-msg branch from 1c56524 to 8f2ebf0 Compare October 17, 2023 15:38
@n-osborne
Copy link
Collaborator Author

Thanks. I like the error message better now.

@n-osborne n-osborne merged commit 5d15470 into ocaml-gospel:main Oct 18, 2023
@n-osborne n-osborne deleted the next-state-wrn-msg branch October 18, 2023 07:51
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