Debian Codegraph @

tests/rte_manual/oracle/safearrays.res.oracle

raw
1 [kernel] Parsing safearrays.i (no preprocessing)
2 [rte:annot] annotating function main
3 /* Generated by Frama-C */
4 struct S {
5 int val ;
6 struct S *next ;
7 };
8 struct C {
9 struct S cell[5] ;
10 int (*f)(int ) ;
11 };
12 struct ArrayStruct {
13 struct C data[10] ;
14 };
15 unsigned int i;
16 unsigned int j;
17 int main(void)
18 {
19 int __retres;
20 int a;
21 struct ArrayStruct buff;
22 /*@ assert rte: index_bound: i < 10; */
23 /*@ assert rte: index_bound: j < 5; */
24 /*@ assert rte: mem_access: \valid_read(&(buff.data[i].cell[j].next)->val);
25 */
26 a = (buff.data[i].cell[j].next)->val;
27 /*@ assert rte: index_bound: i < 10; */
28 /*@ assert rte: function_pointer: \valid_function(buff.data[i].f); */
29 (*(buff.data[i].f))(a);
30 __retres = 0;
31 return __retres;
32 }
33
34