File tree Expand file tree Collapse file tree 5 files changed +10
-6
lines changed Expand file tree Collapse file tree 5 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ test.json
44activate-multi-line-match
55^EXIT=0$
66^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 \)
99--
1010--
1111Annotate function contracts to functions f1 and f2.
Original file line number Diff line number Diff line change 55 "functions" : [
66 {
77 "f1" : [
8- " requires *x1 > 1 && *x1 < 10000" ,
8+ " requires *(signed long int*) x1 > 1 && *(signed long int*) x1 < 10000" ,
99 " ensures __CPROVER_return_value == *x1 + 2"
1010 ],
1111 "f2" : [
Original file line number Diff line number Diff line change 11CORE
22test.json
33
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
55^EXIT=0$
66^SIGNAL=0$
77--
Original file line number Diff line number Diff line change 55 "functions" : [
66 {
77 "foo" : [
8- " while 1 invariant i >= 0" ,
8+ " while 1 invariant (unsigned long int) i >= 0" ,
99 " while 1 assigns i, __CPROVER_POINTER_OBJECT(arr)" ,
1010 " while 1 decreases 2-i"
1111 ]
Original file line number Diff line number Diff line change @@ -61,7 +61,11 @@ std::string c_definest::operator()(const std::string &src) const
6161 }
6262 else
6363 out << t.text ;
64+ out << " " ;
6465 }
6566
66- return out.str ();
67+ auto result = out.str ();
68+ result.pop_back ();
69+
70+ return result;
6771}
You can’t perform that action at this time.
0 commit comments