File tree 7 files changed +52
-1
lines changed
7 files changed +52
-1
lines changed Original file line number Diff line number Diff line change 1
1
DIRS = ansi-c \
2
2
cbmc \
3
3
cbmc-cover \
4
+ cbmc-cpp \
4
5
cbmc-java \
5
6
cbmc-java-inheritance \
6
7
cpp \
Original file line number Diff line number Diff line change
1
+ #include < assert.h>
2
+ int x;
3
+
4
+ void g (int i){
5
+ x=i;
6
+ }
7
+
8
+ int main () {
9
+ g (3 );
10
+ assert (x==3 );
11
+ }
12
+
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.cpp
3
+
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ ^VERIFICATION SUCCESSFUL$
7
+ --
8
+ ^warning: ignoring
Original file line number Diff line number Diff line change
1
+ #include < assert.h>
2
+ unsigned x;
3
+
4
+ class ct {
5
+ void f (int i) {
6
+ x=x+i;
7
+ }
8
+ };
9
+
10
+ int main () {
11
+ unsigned r;
12
+ x=r%3 ;
13
+ ct c;
14
+ c.f (2 );
15
+ assert (x<4 );
16
+ assert (x<5 );
17
+ }
18
+
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.cpp
3
+
4
+ instance is SATISFIABLE$
5
+ instance is UNSATISFIABLE$
6
+ ^EXIT=10$
7
+ ^SIGNAL=0$
8
+ ^VERIFICATION FAILED$
9
+ --
10
+ ^warning: ignoring
Original file line number Diff line number Diff line change
1
+ #include < assert.h>
1
2
struct A
2
3
{
3
4
union
Original file line number Diff line number Diff line change @@ -44,8 +44,9 @@ void cpp_typecheckt::convert_parameter(
44
44
symbol.type =parameter.type ();
45
45
symbol.is_state_var =true ;
46
46
symbol.is_lvalue =!is_reference (symbol.type );
47
+ symbol.is_parameter =true ;
47
48
48
- assert (!symbol.base_name .empty ());
49
+ INVARIANT (!symbol.base_name .empty (), " parameter has base name " );
49
50
50
51
symbolt *new_symbol;
51
52
You can’t perform that action at this time.
0 commit comments