Skip to content

Commit

Permalink
spec for swap(s;f,t)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkf committed Jan 7, 2020
1 parent 7092a08 commit 7dd9c53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/asdanaglib.ads
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ is
Pre => (for all W in two_t'Range =>
(for all I in index_t'First .. lens(W) =>
s(W)(I) in 'a'..'z'));
procedure swap (s : in out wordstore; f, t : index_t);
procedure swap (s : in out wordstore; f, t : index_t) with
Post => s(t) = s(f)'Old and s(f) = s(t)'Old;
FurthestParentStatic : constant index_t :=
index_t'Last / 2 + ((index_t'Last rem 2) + index_t'First - 1) / 2;
subtype parent_t is index_t range (index_t'First) .. FurthestParentStatic;
Expand Down

0 comments on commit 7dd9c53

Please sign in to comment.