File tree Expand file tree Collapse file tree 5 files changed +23
-12
lines changed
cbmc/wrap_entry_point_in_while_true_custom_entry_point
wrap_entry_point_in_while_true
wrap_entry_point_in_while_true_custom_entry_point Expand file tree Collapse file tree 5 files changed +23
-12
lines changed Original file line number Diff line number Diff line change 1
- int skipWhitespace ()
1
+ int g = 0 ;
2
+
3
+ int skipWhitespace (void )
2
4
{
3
- return 120 ;
5
+ assert (g == 0 );
6
+ g = (g == 0 ) ? 1 : 0 ;
4
7
}
Original file line number Diff line number Diff line change 1
1
CORE
2
2
main.c
3
- --show-goto-functions -- wrap-entry-point-in-while --function skipWhitespace
4
- ^EXIT=0 $
3
+ --wrap-entry-point-in-while --unwind 100 --function skipWhitespace
4
+ ^EXIT=10 $
5
5
^SIGNAL=0$
6
- ^ 1: skipWhitespace\(\);$
7
- ^ GOTO 1$
6
+ ^\[skipWhitespace.assertion.1\] assertion g == 0: FAILURE$
7
+ ^VERIFICATION FAILED$
8
+ --
9
+ ^VERIFICATION SUCCESSFUL$
8
10
--
Original file line number Diff line number Diff line change 1
- int main (int argc , char * * argv )
1
+ int g = 0 ;
2
+
3
+ int main (void )
2
4
{
3
- return 0 ;
5
+ assert (g == 0 );
6
+ g = (g == 0 ) ? 1 : 0 ;
4
7
}
Original file line number Diff line number Diff line change 1
1
CORE
2
2
main.c
3
- --show-goto-functions -- wrap-entry-point-in-while
3
+ --wrap-entry-point-in-while --show-goto-functions
4
4
^EXIT=6$
5
5
^SIGNAL=0$
6
6
^ 1: IF FALSE THEN GOTO 2$
7
- ^ main\(argc', argv' \);$
7
+ ^ main\(\);$
8
8
^ GOTO 1$
9
9
--
Original file line number Diff line number Diff line change 1
- int skipWhitespace ()
1
+ int g = 0 ;
2
+
3
+ int skipWhitespace (void )
2
4
{
3
- return 120 ;
5
+ assert (g == 0 );
6
+ g = (g == 0 ) ? 1 : 0 ;
4
7
}
You can’t perform that action at this time.
0 commit comments