File tree 14 files changed +181
-0
lines changed
14 files changed +181
-0
lines changed Original file line number Diff line number Diff line change
1
+ int main ()
2
+ {
3
+ char a [10 ];
4
+ __CPROVER_input ("a[3]" , a [3 ]);
5
+
6
+ int len = strlen (a );
7
+
8
+ if (len == 3 )
9
+ {
10
+ return 0 ;
11
+ }
12
+ else if (len == 4 )
13
+ {
14
+ return -1 ;
15
+ }
16
+ return 1 ;
17
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --cover location --unwind 1
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ ^\*\* 4 of 7 covered
7
+ --
8
+ ^warning: ignoring
9
+ ^\[.*<builtin-library-
Original file line number Diff line number Diff line change
1
+ struct mystruct {
2
+ int x ;
3
+ char y ;
4
+ };
5
+
6
+ int main ()
7
+ {
8
+ struct mystruct s ;
9
+ char c ;
10
+ __CPROVER_input ("c" , c );
11
+
12
+ memset (& s ,c ,sizeof (struct mystruct ));
13
+
14
+ if (s .y == 'A' )
15
+ {
16
+ return 0 ;
17
+ }
18
+ return 1 ;
19
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --cover location --unwind 10
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ ^\*\* 4 of 4 covered
7
+ --
8
+ ^warning: ignoring
9
+ ^\[.*<builtin-library-
Original file line number Diff line number Diff line change
1
+ #include <stdio.h>
2
+
3
+ int main ()
4
+ {
5
+ const char * s = "test" ;
6
+ int ret = puts (s ); //return value is nondet (internal to built-in, thus non-controllable)
7
+
8
+ if (ret < 0 )
9
+ {
10
+ return 1 ;
11
+ }
12
+
13
+ return 0 ;
14
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --cover location --unwind 10
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ ^\*\* 4 of 4 covered
7
+ --
8
+ ^warning: ignoring
9
+ ^\[.*<builtin-library-
Original file line number Diff line number Diff line change
1
+ int main ()
2
+ {
3
+ char a [10 ];
4
+ __CPROVER_input ("a[3]" , a [3 ]);
5
+
6
+ int len = strlen (a );
7
+
8
+ if (len == 3 )
9
+ {
10
+ return 0 ;
11
+ }
12
+ else if (len == 4 )
13
+ {
14
+ return -1 ;
15
+ }
16
+ return 1 ;
17
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --cover branch --unwind 5
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ ^\*\* 5 of 5 covered
7
+ --
8
+ ^warning: ignoring
9
+ ^\[.*<builtin-library-
Original file line number Diff line number Diff line change
1
+ int main ()
2
+ {
3
+ char a [10 ];
4
+ __CPROVER_input ("a[3]" , a [3 ]);
5
+
6
+ int len = strlen (a );
7
+
8
+ if (len == 3 )
9
+ {
10
+ return 0 ;
11
+ }
12
+ else if (len == 4 )
13
+ {
14
+ return -1 ;
15
+ }
16
+ return 1 ;
17
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --cover condition --unwind 5
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ ^\*\* 4 of 4 covered
7
+ --
8
+ ^warning: ignoring
9
+ ^\[.*<builtin-library-
Original file line number Diff line number Diff line change
1
+ int main ()
2
+ {
3
+ char a [10 ];
4
+ __CPROVER_input ("a[3]" , a [3 ]);
5
+
6
+ int len = strlen (a );
7
+
8
+ if (len == 3 )
9
+ {
10
+ return 0 ;
11
+ }
12
+ else if (len == 4 )
13
+ {
14
+ return -1 ;
15
+ }
16
+ return 1 ;
17
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --cover decision --unwind 5
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ ^\*\* 4 of 4 covered
7
+ --
8
+ ^warning: ignoring
9
+ ^\[.*<builtin-library-
Original file line number Diff line number Diff line change
1
+ int main ()
2
+ {
3
+ char a [10 ];
4
+ __CPROVER_input ("a[3]" , a [3 ]);
5
+
6
+ int len = strlen (a );
7
+
8
+ if (len == 3 )
9
+ {
10
+ return 0 ;
11
+ }
12
+ else if (len == 4 )
13
+ {
14
+ return -1 ;
15
+ }
16
+ return 1 ;
17
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --cover mcdc --unwind 5
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ ^\*\* 4 of 4 covered
7
+ --
8
+ ^warning: ignoring
9
+ ^\[.*<builtin-library-
You can’t perform that action at this time.
0 commit comments