1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
/*run.config*
PLUGIN: @EVA_MAIN_PLUGINS@ inout
OPT: @EVA_CONFIG@ -inout -input-with-formals -inout-with-formals -main main_main
*/
typedef unsigned char BYTE;
typedef BYTE * MESSAGE_ADDR_TYPE;
//@ assigns *RETURN_CODE \from MESSAGE_ADDR[0..length], length;
extern void SendBuffer
(const MESSAGE_ADDR_TYPE /* Array */ /* in */ MESSAGE_ADDR,
const int /* in */ length,
int * const /* out */ RETURN_CODE);
void main(const MESSAGE_ADDR_TYPE msg)
{
int ret;
SendBuffer((MESSAGE_ADDR_TYPE) &msg, 4, &ret);
}
int a, b, c;
//@ assigns a, b, c \from b;
void f(void);
//@ assigns p[0..3] \from p[3..4];
void g(int *p);
int t[10], u[20];
void g1() {
g(&t[3]);
}
void g2() {
g(&t[0]);
}
void g3(int *p) {
g(p);
}
void main2(int i) {
f();
g1();
g2();
if (i >= 5 && i <= 6)
g3(&u[i]);
}
void main_main(const MESSAGE_ADDR_TYPE msg, int i) {
main(msg);
main2(i);
}
|