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 20, 2024
1 parent cfed9b0 commit e88fa0b
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 e88fa0b

Please sign in to comment.