File tree 5 files changed +10
-6
lines changed
5 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ test.json
4
4
activate-multi-line-match
5
5
^EXIT=0$
6
6
^SIGNAL=0$
7
- int f1\(int \*x1\)\n \_\_CPROVER\_requires\(\*x1\>1 \&\&\*x1\<10000\) \ _\_CPROVER\_ensures\(.*\=\=\*x1\+2 \)
8
- int f2\(int \*x2\)\n \_\_CPROVER\_requires\(\*x2\>1 \&\&\*x2\< 10000\) \_\_CPROVER\_ensures\(.*\=\=\*x2\+1 \)
7
+ int f1\(int \*x1\)\n \_\_CPROVER\_requires\(\* \( signed long int \* \) x1 \> 1 \&\&.*\ _\_CPROVER\_ensures\(.*\=\= \* x1 \+ 2 \)
8
+ int f2\(int \*x2\)\n \_\_CPROVER\_requires\(\* x2 \> 1 \&\& \* x2 \< 10000 \) \_\_CPROVER\_ensures\(.*\=\= \* x2 \+ 1 \)
9
9
--
10
10
--
11
11
Annotate function contracts to functions f1 and f2.
Original file line number Diff line number Diff line change 5
5
"functions" : [
6
6
{
7
7
"f1" : [
8
- " requires *x1 > 1 && *x1 < 10000" ,
8
+ " requires *(signed long int*) x1 > 1 && *(signed long int*) x1 < 10000" ,
9
9
" ensures __CPROVER_return_value == *x1 + 2"
10
10
],
11
11
"f2" : [
Original file line number Diff line number Diff line change 1
1
CORE
2
2
test.json
3
3
4
- ^\s+while\(i \< 2\) \_\_CPROVER\_assigns.*\_\_CPROVER\_loop\_invariant.*\_\_CPROVER_decreases
4
+ ^\s+while\(i \< 2\) \_\_CPROVER\_assigns.*\_\_CPROVER\_loop\_invariant\(\( unsigned long int \) .*\_\_CPROVER_decreases
5
5
^EXIT=0$
6
6
^SIGNAL=0$
7
7
--
Original file line number Diff line number Diff line change 5
5
"functions" : [
6
6
{
7
7
"foo" : [
8
- " while 1 invariant i >= 0" ,
8
+ " while 1 invariant (unsigned long int) i >= 0" ,
9
9
" while 1 assigns i, __CPROVER_POINTER_OBJECT(arr)" ,
10
10
" while 1 decreases 2-i"
11
11
]
Original file line number Diff line number Diff line change @@ -61,7 +61,11 @@ std::string c_definest::operator()(const std::string &src) const
61
61
}
62
62
else
63
63
out << t.text ;
64
+ out << " " ;
64
65
}
65
66
66
- return out.str ();
67
+ auto result = out.str ();
68
+ result.pop_back ();
69
+
70
+ return result;
67
71
}
You can’t perform that action at this time.
0 commit comments