Skip to content

Commit f9e63c7

Browse files
authored
Merge pull request #12 from clayrat/pcm-1.3
updates for fcsl-pcm 1.3
2 parents 0418990 + 8dbdaac commit f9e63c7

28 files changed

Lines changed: 680 additions & 686 deletions

.travis.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ jobs:
3737
include:
3838

3939
# Test supported versions of Coq via OPAM
40-
- env:
41-
- COQ_IMAGE=coqorg/coq:8.10
42-
- PACKAGE=coq-disel.dev
43-
- NJOBS=2
44-
<<: *OPAM
4540
- env:
4641
- COQ_IMAGE=coqorg/coq:8.11
4742
- PACKAGE=coq-disel.dev

Core/Actions.v

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Structure action (V : Type) (this : nid)
5858
(* step_frame : forall s1 s2 r z, *)
5959
(* a_lab != z -> Coh W s1 -> *)
6060
(* a_safe s1 -> a_step s1 s2 r -> getS s1 z = getS s2 z; *)
61-
61+
6262
(* Action step semantics respects the overall network semantics *)
6363
step_sem : forall s1 (pf : a_safe s1) s2 r,
6464
a_step pf s2 r -> network_step W this s1 s2
@@ -126,9 +126,9 @@ Notation getP l := (getProtocol W l).
126126
Notation getS s l := (getStatelet s l).
127127
Variable this : nid.
128128

129-
(*
129+
(*
130130
131-
Filter for specific
131+
Filter for specific
132132
- protocol labels
133133
- message tags
134134
- message bodies
@@ -152,13 +152,13 @@ Definition tryrecv_act_step s1 s2 (r : option (nid * nat * seq nat)) :=
152152
exists (pf : s1 \In Coh W),
153153
(* No message to receive -- all relevant messages are marked *)
154154
([/\ (forall l m tms from rt b,
155-
this \in nodes (getP l) (getS s1 l) ->
155+
this \in nodes (getP l) (getS s1 l) ->
156156
Some (Msg tms from this b) = find m (dsoup (getS s1 l)) ->
157157
rt \In (rcv_trans (getP l)) ->
158158
tag tms = (t_rcv rt) ->
159159
(* This is required for safety *)
160160
msg_wf rt (coh_s l pf) this from tms ->
161-
(* The filter applies *)
161+
(* The filter applies *)
162162
filter l from (t_rcv rt) (tms_cont tms) ->
163163
~~b),
164164
r = None & s2 = s1] \/
@@ -170,7 +170,7 @@ Definition tryrecv_act_step s1 s2 (r : option (nid * nat * seq nat)) :=
170170
tag tms = (t_rcv rt),
171171
(* This is required for safety *)
172172
msg_wf rt (coh_s l pf) this from tms &
173-
(* The filter applies *)
173+
(* The filter applies *)
174174
filter l from (t_rcv rt) (tms_cont tms)],
175175
let loc' := receive_step rt from tms (coh_s l pf) pf' in
176176
let: f' := upd this loc' (dstate d) in
@@ -200,7 +200,7 @@ exists (let: d := getS s l in
200200
let: f' := upd this loc' (dstate d) in
201201
let: s' := consume_msg (dsoup d) m in
202202
upd l (DStatelet f' s') s), (Some (from, tag tms, tms_cont tms)).
203-
by exists C; right; exists l, m, tms, from, rt, T.
203+
by exists C; right; exists l, m, tms, from, rt, T.
204204
Qed.
205205

206206
Lemma tryrecv_act_step_safe s1 s2 r:
@@ -250,11 +250,11 @@ Definition can_send (s : state) := (l \in dom s) && (this \in nodes p (getS s l)
250250
(* Take only the hooks that affect the transition with a tag st of *)
251251
(* protocol l *)
252252
Definition filter_hooks (h : hooks) :=
253-
um_filter (fun e => e.2 == (l, t_snd st)) h.
253+
um_filterk (fun e => e.2 == (l, t_snd st)) h.
254254

255255
Definition send_act_safe s :=
256256
[/\ Coh W s, send_safe st this to (getS s l) msg, can_send s &
257-
(* All hooks from a "reduced footprint" are applicable *)
257+
(* All hooks from a "reduced footprint" are applicable *)
258258
all_hooks_fire (filter_hooks (geth W)) l (t_snd st) s this msg to].
259259

260260
Lemma send_act_safe_coh s : send_act_safe s -> Coh W s.
@@ -297,7 +297,7 @@ rewrite /all_hooks_fire/filter_hooks in K.
297297
move: st S' E K pf'; clear pf' st; subst p=>st S' E K' pf'.
298298
apply: (@SendMsg W this s1 _ l st pf' to msg)=>////.
299299
move=>z lc hk E'; apply: (K' z); rewrite E'.
300-
by rewrite find_umfilt/= eqxx.
300+
by rewrite find_umfiltk/= eqxx.
301301
Qed.
302302

303303
Definition send_action_wrapper :=

Core/DepMaps.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ End PCMOps.
4444

4545
Section DJoin.
4646

47-
Variables (dm1 dm2 : depmap).
47+
Variables (dm1 dm2 : depmap).
4848

4949
Lemma dmDom_join um1 um2:
5050
dmDom um1 -> dmDom um2 -> dmDom (um1 \+ um2).
5151
Proof.
52-
case; case W: (valid (um1 \+ um2)); last first.
52+
case W: (valid (um1 \+ um2)); last first.
5353
- by move=> _ _; apply/allP=>l; move/dom_valid; rewrite W.
5454
move/allP=>D1/allP D2; apply/allP=>l.
5555
rewrite domUn inE=>/andP[_]/orP; rewrite findUnL//; case=>E; rewrite ?E.

Core/Freshness.v

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ Lemma keys_last_mono f1 f2 k :
1818
(forall x, x \in dom f1 -> x \in dom f2) ->
1919
oleq (last k (dom f1)) (last k (dom f2)).
2020
Proof.
21-
rewrite !umEX; case: (UMC.from f1); first by move=>_ H _; apply: path_last H.
21+
rewrite !umEX; case: (UMC.from f1).
22+
- by move=>_ H _; apply: path_lastR H=>//; apply: otrans.
2223
move=>{f1} f1 /= _ H1; case: (UMC.from f2)=>/=.
2324
- by move=>_ /allP; case: (supp f1)=>//; rewrite /oleq eq_refl orbT.
24-
by move=>{f2} f2 /= _; apply: seq_last_mono H1.
25+
by move=>{f2} f2 /= _; apply: seq_last_monoR H1=>//; apply: otrans.
2526
Qed.
2627

2728
End Keys.
@@ -48,21 +49,23 @@ rewrite /UM.empty UMC.eqE UM.umapE /supp fmapE /= {H H1}.
4849
by elim: s.
4950
Qed.
5051

51-
Lemma dom_last_key f : valid f -> ~~ empb f -> last_key f \in dom f.
52-
Proof. by move=>X; apply: contraR; move/(last_key_dom X)=>->; apply/empbP. Qed.
52+
Lemma dom_last_key f : valid f -> ~~ unitb f -> last_key f \in dom f.
53+
Proof. by move=>X; apply: contraR; move/(last_key_dom X)=>->; apply: unitb0. Qed.
5354

5455
Lemma last_key_max f x : x \in dom f -> x <= last_key f.
5556
Proof.
5657
rewrite /last_key /= !umEX; case: (UMC.from f)=>//; case=>s H _ /=.
5758
rewrite /supp /ord /= (leq_eqVlt x) orbC.
58-
by apply: sorted_last_key_max (sorted_oleq H).
59+
by apply: sorted_last_key_maxR (sorted_oleq H)=>//; apply: otrans.
5960
Qed.
6061

6162
Lemma max_key_last f x :
6263
x \in dom f -> {in dom f, forall y, y <= x} -> last_key f = x.
6364
Proof.
6465
rewrite /last_key !umEX; case: (UMC.from f)=>//; case=>s H _ /=.
6566
move=>H1 /= H2; apply: sorted_max_key_last (sorted_oleq H) H1 _.
67+
- by apply: otrans.
68+
- by apply: oantisym.
6669
by move=>z /(H2 z); rewrite leq_eqVlt orbC.
6770
Qed.
6871

0 commit comments

Comments
 (0)