Skip to content
Snippets Groups Projects
Commit 10da722c authored by Alban Gruin's avatar Alban Gruin
Browse files

correct_store_buffer: an more advanced instruction stays more advanced


Signed-off-by: default avatarAlban Gruin <alban.gruin@irit.fr>
parent 62aa10be
Branches
No related tags found
No related merge requests found
...@@ -254,6 +254,55 @@ Section monotonicity. ...@@ -254,6 +254,55 @@ Section monotonicity.
- apply compare_two_eq_true. - apply compare_two_eq_true.
discriminate. discriminate.
Qed. Qed.
Variable st' : stage.
Lemma moved_no_lat_is_lower :
e = (opc, (st, 0)) -> e' = (opc, (st', 0)) -> e <> e' ->
state_leb (st, 0) (st', 0) = true ->
compare_two (List.nth_error tc i) (List.nth_error tc' i) = true.
Proof.
intros He He' Hed Hsl.
specialize (Hlu st opc).
specialize (Hsu st' opc).
(* work_on_e replacement. *)
(* Goal transformation: show exactly how e and e' are modified by the
* cycle function. *)
rewrite Htc, Htc', Ht, Ht'.
unfold cycle.
rewrite (map_in_the_middle _ _ e d _ _ tpre tpost _ (eq_refl _) Hi),
(map_in_the_middle _ _ e' d _ _ tpre' tpost' _ (eq_refl _) Hi').
unfold cycle_elt.
rewrite <- Ht, <- Ht'.
subst e.
subst e'.
(* Case-by-case analysis *)
destruct st, st';
try contradiction;
try discriminate.
(* st = Sp, st' = Lsu, Lu, Su, Sn *)
- now destruct (ready _ _ _ && free _ _ _ _), (ready _ _ _ && free _ _ _ _), opc.
- now destruct (ready _ _ _ && free _ _ _ _), opc.
- now destruct (ready _ _ _ && free _ _ _ _), (ready _ _ _ && free _ _ _ _).
- now destruct (ready _ _ _ && free _ _ _ _), opc.
(* st = Lsu, st' = Lu, Su, Sn *)
- now destruct (ready _ _ _ && free _ _ _ _), opc.
- destruct (ready _ _ _ && free _ _ _ _), (ready _ _ _ && free _ _ _ _), opc;
try reflexivity.
now discriminate Hsu.
- now destruct (ready _ _ _ && free _ _ _ _), opc.
(* st = Lu, st' = Sn *)
- now destruct opc;
[| discriminate Hlu].
(* st = Su, st' = Sn *)
- now destruct (ready _ _ _ && free _ _ _ _), (ready _ _ _ && free _ _ _ _).
Qed.
End monotonicity. End monotonicity.
Section constrained. Section constrained.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment