main
test-branch
|
Last change
on this file since bb03188 was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago |
|
Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.
git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c
|
-
Property mode
set to
100644
|
|
File size:
540 bytes
|
| Line | |
|---|
| 1 | #include<mpi.h>
|
|---|
| 2 | #pragma CIVL ACSL
|
|---|
| 3 |
|
|---|
| 4 | struct T {
|
|---|
| 5 | int *x;
|
|---|
| 6 | };
|
|---|
| 7 | int * y;
|
|---|
| 8 | int i[10];
|
|---|
| 9 | int (*u)[100];
|
|---|
| 10 | int v[100][100][100];
|
|---|
| 11 |
|
|---|
| 12 | /*@
|
|---|
| 13 | @ requires \valid(x + (0 .. 10));
|
|---|
| 14 | @ requires \valid(u + (0 .. 10));
|
|---|
| 15 | @ requires \valid(y + (0 .. 10));
|
|---|
| 16 | @ assigns u[0 .. 2][0 .. 2], v[0 .. 2][0][0 .. 2],
|
|---|
| 17 | @ x;
|
|---|
| 18 | @ ensures *y == 0;
|
|---|
| 19 | @ behavior test:
|
|---|
| 20 | @ assumes \true;
|
|---|
| 21 | @ assigns *(y + (0..2));
|
|---|
| 22 | @ ensures *y > 0;
|
|---|
| 23 | @*/
|
|---|
| 24 | int foo(struct T * x) {
|
|---|
| 25 | return x->x[0];
|
|---|
| 26 | }
|
|---|
| 27 |
|
|---|
| 28 | /*@
|
|---|
| 29 | @ requires \true;
|
|---|
| 30 | @*/
|
|---|
| 31 | int g() {
|
|---|
| 32 | void * x;
|
|---|
| 33 |
|
|---|
| 34 | return foo(x);
|
|---|
| 35 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.