Skip to content

Commit

Permalink
WIP play with ACSL contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
rurban committed Feb 16, 2024
1 parent df057a1 commit 33b515b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ctl/algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ static inline I JOIN(A, find_if)(A *self, int _match(T *))
}

// C++11
/*@
requires valid: \valid_read(self + (0..self->size-1));
assigns \nothing;
ensures result: 0 <= \result <= self->size;
ensures result: \result == FindNotEqual(self, self->size, v);
*/
static inline I JOIN(A, find_if_not)(A *self, int _match(T *))
{
foreach (A, self, i)
Expand Down

0 comments on commit 33b515b

Please sign in to comment.