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

consider an "implies" operator #115

Open
dhh1128 opened this issue Jul 3, 2015 · 0 comments
Open

consider an "implies" operator #115

dhh1128 opened this issue Jul 3, 2015 · 0 comments

Comments

@dhh1128
Copy link
Owner

dhh1128 commented Jul 3, 2015

Consider this snippet of dafny code from http://rise4fun.com/Dafny/tutorial/guide:

screen shot 2015-07-03 at 4 02 15 pm

The second line would be read "0 <= x" implies "x == y". Implies is a boolean operator with lower precedence than && or ||; it is used in postconditions ("ensures") to make claims that are conditioned on other things. This allows more flexible preconditions and postconditions, without requiring the coder to enter the main body of a function and write traditional conditional expressions before stating the pre/postconditions.

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

No branches or pull requests

1 participant