// Appears to work but does not. @requires n >= 1 @ensures all(p==0 && i 0) { j = 0; @invariant all(p 0 while (j < i) { if (a[j] > a[j+1]) { temp = a[j]; a[j] = a[j+1]; a[j+1] = temp; } j = j + 1; } i = i - 1; } @end --