aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--backend/CSE3analysis.v5
-rw-r--r--backend/CSE3analysisproof.v20
2 files changed, 24 insertions, 1 deletions
diff --git a/backend/CSE3analysis.v b/backend/CSE3analysis.v
index a85cd493..300bb216 100644
--- a/backend/CSE3analysis.v
+++ b/backend/CSE3analysis.v
@@ -296,6 +296,11 @@ Section OPERATIONS.
end
else rel'.
+ Definition store
+ (chunk : memory_chunk) (addr: addressing) (args : list reg)
+ (src : reg) (ty: typ)
+ (rel : RELATION.t) : RELATION.t :=
+ store1 chunk addr (forward_move_l rel args) src ty rel.
End PER_NODE.
Definition apply_instr no instr (rel : RELATION.t) : RB.t :=
diff --git a/backend/CSE3analysisproof.v b/backend/CSE3analysisproof.v
index f5dd7bf9..05c7a8f3 100644
--- a/backend/CSE3analysisproof.v
+++ b/backend/CSE3analysisproof.v
@@ -689,5 +689,23 @@ Section SOUNDNESS.
eauto.
Qed.
- Hint Resolve store2_sound : cse3.
+ Hint Resolve store1_sound : cse3.
+
+ Theorem store_sound:
+ forall no chunk addr args a src rel tenv rs m m',
+ sem_rel rel rs m ->
+ wt_regset tenv rs ->
+ eval_addressing genv sp addr (rs ## args) = Some a ->
+ Mem.storev chunk m a (rs#src) = Some m' ->
+ sem_rel (store (ctx:=ctx) no chunk addr args src (tenv src) rel) rs m'.
+ Proof.
+ unfold store.
+ intros until m'.
+ intros REL WT ADDR STORE.
+ rewrite <- forward_move_l_sound with (rel:=rel) (m:=m) in ADDR by trivial.
+ rewrite <- forward_move_sound with (rel:=rel) (m:=m) in STORE by trivial.
+ apply store1_sound with (a := a) (m := m); trivial.
+ rewrite forward_move_sound with (rel:=rel) (m:=m) in STORE by trivial.
+ assumption.
+ Qed.
End SOUNDNESS.