cours/content/conception_formelle/99-DM_framac/code/abs.h
2023-05-09 21:57:24 +02:00

17 lines
No EOL
267 B
C

#ifndef __FORMALISM__
#define __FORMALISM__
#include <limits.h>
/*@ logic integer abs(integer n) = 0<n?n:-n;*/
/*@ terminates \true;
ensures \result == abs(n);
*/
int abs(int n);
/*@ terminates \true;
ensures \result == abs(n);*/
int abs2(int n);
#endif