source:
CIVL/mods/dev.civl.com/examples/contracts/contractsSeq/pointers3.c@
cb4d4f4
| Last change on this file since cb4d4f4 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 210 bytes | |
| Line | |
|---|---|
| 1 | #include <stdlib.h> |
| 2 | /*@ requires \valid(x); |
| 3 | @ requires \valid(x[0] + (0 .. 3)); |
| 4 | @ ensures \result == (*(x[0]) + 1); |
| 5 | */ |
| 6 | int add(int ** x) |
| 7 | { |
| 8 | return *(x[0]) + 1; |
| 9 | } |
| 10 | |
| 11 | |
| 12 | int main() { |
| 13 | add(NULL); |
| 14 | return 0; |
| 15 | } |
Note:
See TracBrowser
for help on using the repository browser.
