Skip to content

Commit 33b515b

Browse files
committed
WIP play with ACSL contracts
1 parent df057a1 commit 33b515b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ctl/algorithm.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ static inline I JOIN(A, find_if)(A *self, int _match(T *))
4040
}
4141

4242
// C++11
43+
/*@
44+
requires valid: \valid_read(self + (0..self->size-1));
45+
assigns \nothing;
46+
ensures result: 0 <= \result <= self->size;
47+
ensures result: \result == FindNotEqual(self, self->size, v);
48+
*/
4349
static inline I JOIN(A, find_if_not)(A *self, int _match(T *))
4450
{
4551
foreach (A, self, i)

0 commit comments

Comments
 (0)