source:
CIVL/examples/count.cvl@
e8a7fef
| Last change on this file since e8a7fef was 59b5362, checked in by , 13 years ago | |
|---|---|
|
|
| File size: 128 bytes | |
| Line | |
|---|---|
| 1 | |
| 2 | \input int n; |
| 3 | \output int s = 0; |
| 4 | |
| 5 | void main() { |
| 6 | \assume n>0; |
| 7 | for (int i=0; i<n; i++) \invariant (i<=n) { |
| 8 | s += i; |
| 9 | } |
| 10 | } |
Note:
See TracBrowser
for help on using the repository browser.
