Repository navigation
Adds documentation about function contracts - #6185
Conversation
e0a6080 to
18b1ae6
Compare
Codecov Report
@@ Coverage Diff @@
## develop #6185 +/- ##
===========================================
+ Coverage 67.40% 75.62% +8.22%
===========================================
Files 1157 1454 +297
Lines 95236 160922 +65686
===========================================
+ Hits 64197 121705 +57508
- Misses 31039 39217 +8178
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
18b1ae6 to
c8ba8bd
Compare
| @@ -0,0 +1,502 @@ | |||
| # Function Contracts | |||
There was a problem hiding this comment.
Overall comment: this file contains too much "how" and not enough "what". We do not need to explain the implementations of ASSIGNS and is_fresh, but we should explain what they do, perhaps using examples. Also, my thought is that there should be a page for each construct (similar to a reference manual) with examples that demonstrate how the construct works. So, I'd like to see some refactoring, and a few more examples of how the constructs work.
There was a problem hiding this comment.
I've re-write and re-sctructured the documentation to highlight "what" instead of "how" and added more examples.
SaswatPadhi
left a comment
There was a problem hiding this comment.
Couple of initial comments
c8ba8bd to
11d0b0c
Compare
4b66d29 to
1fc3c88
Compare
martin-cs
left a comment
There was a problem hiding this comment.
Thank you! Documentation patches are very welcome!
| __CPROVER_old(*identifier*) | ||
| ``` | ||
|
|
||
| Refers to the value of a given object in the pre-state of a function within the |
There was a problem hiding this comment.
Can it also be used for loops?
There was a problem hiding this comment.
Not yet, but we have an intern working on this, so hopefully soon 🙂
| @@ -0,0 +1,43 @@ | |||
| # Quantifiers | |||
There was a problem hiding this comment.
Would it be possible to add something about the impact this has on the choice of back-end and that depending on how they are used, it may be necessary to use an SMT solver.
There was a problem hiding this comment.
+1. Thanks for pointing this out!
We had planned to do this (#6149). Let's make the changes as part of this PR.
1fc3c88 to
52f760e
Compare
52f760e to
7734945
Compare
9f74394 to
811995a
Compare
a2047bd to
14555a4
Compare
chrisr-diffblue
left a comment
There was a problem hiding this comment.
Thats a massive, and fantastic, addition to the docs - many thanks!
Signed-off-by: Felipe R. Monteiro <[email protected]>
14555a4 to
4f80ed1
Compare
Related to #6149.
Signed-off-by: Felipe R. Monteiro [email protected]
Adds a section about "Function Contracts" to the CPROVER manual.