-
Notifications
You must be signed in to change notification settings - Fork 58
Feature exception #806
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
base: main
Are you sure you want to change the base?
Feature exception #806
Conversation
86c4195 to
00cfe75
Compare
415a5d1 to
b415379
Compare
b717865 to
7e145ca
Compare
cac4299 to
8a1385e
Compare
1185838 to
ee89281
Compare
ee89281 to
85bc11d
Compare
ae978f0 to
2fa2c24
Compare
2fa2c24 to
ee9b68e
Compare
ee9b68e to
2719b38
Compare
| es_sr : stmt; | ||
| es_po : form; } | ||
|
|
||
| and post = (form * (EcPath.path, form) DMap.t * form option) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can remove form option if we create a special path "_".
Having special path can be useful also if we want to have return anywhere in the code: we can have a return exception. Similarly if we want to add "break".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to use a different name than post. Maybe hoare_post.
37376e0 to
1397fe3
Compare
1397fe3 to
7f90d68
Compare
This PR introduce exceptions for Hoare Logic.
We can define exception :
We can raise exception using
raise assumeorensure (x = 3) assert(raise an exception when a condition is not true):We can define postconditions for each exception and a default postcondition:
Examples are available in
examples/exception.ec.