#include <limits.h>
#include "abs.h"

/*@
 requires 0 < n <= UINT_MAX;
 requires \valid_read(tab+(0..n-1));
 requires \forall integer i; 0 <= i < n ==> INT_MIN / 2 <= tab[i] <=  INT_MAX/2;
 terminates \true;
 ensures \forall integer a,b; 0 <= a < b < n ==> \result >= abs(tab[a]-tab[b]);
 ensures \exists integer i,j; 0 < i < j < n ==> \result == abs(tab[i]-tab[j]);
 assigns \nothing;
 */
int max_dist(int *tab, unsigned int n);
