-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRefRel.v
37 lines (32 loc) · 1.27 KB
/
RefRel.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Require Import RefProofDeps.
Require Import RData.
Require Import EventReplay.
Require Import MoverTypes.
Require Import Constants.
Require Import CommonLib.
Local Open Scope string_scope.
Local Open Scope Z_scope.
Local Opaque Z.add Z.mul Z.div Z.shiftl Z.shiftr Z.land Z.lor.
Section RefineRel.
Inductive relate_share: option State -> option State -> Prop :=
| RELATE_NONE: relate_share None None
| RELATE_SHARE: forall st st'
(id_gs: gs st = gs st')
(id_gpt: gpt st = gpt st')
(id_gpt_lk: gpt_lk st = gpt_lk st')
(id_gpt_lk: tlbs st = tlbs st'),
relate_share (Some st) (Some st').
Record relate_RData (hadt: RData) (ladt: RData) :=
mkrelate_RData {
id_priv: priv ladt = priv hadt;
rel_share: relate_share (Some (share ladt)) (Some (share hadt));
hrepl: repl hadt = replay 4;
lrepl: repl ladt = replay 3;
valid_ho: ValidOracle 4 (oracle hadt);
valid_lo: ValidOracle 3 (oracle ladt);
rel_oracle: forall st st' l l',
let lh := oracle hadt l in
let lo := oracle ladt l' in
relate_share (Some st) (Some st') -> relate_share (repl ladt lo st) (repl hadt lh st')
}.
End RefineRel.