11// PARAM: --set solver td3 --enable ana.int.interval --enable exp.partition-arrays.enabled --set ana.activated "['base','threadid','threadflag','escape','expRelation','mallocWrapper']" --set exp.privatization none --enable annotation.int.enabled --set ana.int.refinement fixpoint
22int global ;
33
4- int main (void ) __attribute__((goblint_precision ("no-interval" )))
4+ int main (void ) __attribute__((goblint_precision ("no-interval" )));
5+ void example1 (void ) __attribute__((goblint_precision ("no-def_exc" )));
6+ void example2 (void ) __attribute__((goblint_precision ("no-def_exc" )));
7+ void example3 (void ) __attribute__((goblint_precision ("no-def_exc" )));
8+ void example4 (void ) __attribute__((goblint_precision ("no-def_exc" )));
9+ void example5 (void ) __attribute__((goblint_precision ("no-def_exc" )));
10+ void example6 (void ) __attribute__((goblint_precision ("no-def_exc" )));
11+ void example7 (void ) __attribute__((goblint_precision ("no-def_exc" )));
12+ void example8 () __attribute__((goblint_precision ("no-def_exc" )));
13+ void example9 () __attribute__((goblint_precision ("no-def_exc" )));
14+ void example10 () __attribute__((goblint_precision ("no-def_exc" )));
15+
16+
17+ int main (void )
518{
619 example1 ();
720 example2 ();
@@ -17,7 +30,7 @@ int main(void) __attribute__((goblint_precision("no-interval")))
1730}
1831
1932// Simple example
20- void example1 (void ) __attribute__(( goblint_precision ( "no-def_exc" )))
33+ void example1 (void )
2134{
2235 int a [42 ];
2336 int i = 0 ;
@@ -37,7 +50,7 @@ void example1(void) __attribute__((goblint_precision("no-def_exc")))
3750}
3851
3952// More complicated expression to index rather than just a variable
40- void example2 (void ) __attribute__(( goblint_precision ( "no-def_exc" ))) {
53+ void example2 (void ) {
4154 int a [42 ];
4255 int i = 1 ;
4356
@@ -54,7 +67,7 @@ void example2(void) __attribute__((goblint_precision("no-def_exc"))) {
5467}
5568
5669// Two values initialized in one loop
57- void example3 (void ) __attribute__(( goblint_precision ( "no-def_exc" ))) {
70+ void example3 (void ) {
5871 int a [42 ];
5972 int i = 0 ;
6073
@@ -72,7 +85,7 @@ void example3(void) __attribute__((goblint_precision("no-def_exc"))) {
7285}
7386
7487// Example where initialization proceeds backwards
75- void example4 (void ) __attribute__(( goblint_precision ( "no-def_exc" ))) {
88+ void example4 (void ) {
7689 int a [42 ];
7790 int i = 41 ;
7891
@@ -88,7 +101,7 @@ void example4(void) __attribute__((goblint_precision("no-def_exc"))) {
88101}
89102
90103// Example having two arrays partitioned according to one expression
91- void example5 (void ) __attribute__(( goblint_precision ( "no-def_exc" ))) {
104+ void example5 (void ) {
92105 int a [42 ];
93106 int b [42 ];
94107 int i = 0 ;
@@ -109,7 +122,7 @@ void example5(void) __attribute__((goblint_precision("no-def_exc"))) {
109122}
110123
111124// Example showing array becoming partitioned according to different expressions
112- void example6 (void ) __attribute__(( goblint_precision ( "no-def_exc" ))) {
125+ void example6 (void ) {
113126 int a [42 ];
114127 int i = 0 ;
115128 int j = 0 ;
@@ -139,7 +152,7 @@ void example6(void) __attribute__((goblint_precision("no-def_exc"))) {
139152}
140153
141154// This was the case where we thought we needed path-splitting
142- void example7 (void ) __attribute__(( goblint_precision ( "no-def_exc" ))) {
155+ void example7 (void ) {
143156 int a [42 ];
144157 int i = 0 ;
145158 int top ;
@@ -159,7 +172,7 @@ void example7(void) __attribute__((goblint_precision("no-def_exc"))) {
159172}
160173
161174// Check that the global variable is not used for partitioning
162- void example8 () __attribute__(( goblint_precision ( "no-def_exc" ))) {
175+ void example8 () {
163176 int a [10 ];
164177
165178 a [global ] = 4 ;
@@ -177,7 +190,7 @@ void example8() __attribute__((goblint_precision("no-def_exc"))) {
177190}
178191
179192// Check that arrays of types different from int are handeled correctly
180- void example9 () __attribute__(( goblint_precision ( "no-def_exc" ))) {
193+ void example9 () {
181194 char a [10 ];
182195 int n ;
183196 assert (a [3 ] == 800 ); // FAIL
@@ -196,7 +209,7 @@ void example9() __attribute__((goblint_precision("no-def_exc"))) {
196209 assert (a [3 ] == -129 ); //FAIL
197210}
198211
199- void example10 () __attribute__(( goblint_precision ( "no-def_exc" ))) {
212+ void example10 () {
200213 int a [20 ];
201214 a [5 ] = 3 ;
202215
0 commit comments