Skip to content

Commit

Permalink
Port to Coq 8.7
Browse files Browse the repository at this point in the history
  • Loading branch information
jeehoonkang committed Oct 19, 2017
1 parent 4f5110d commit 5806c1a
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 59 deletions.
3 changes: 2 additions & 1 deletion .dir-locals.el
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
(rec ,(pre "src/hahn") "cmem")
(rec ,(pre "src/while") "cmem")
))))
(coq-prog-args . ("-emacs-U")))))
;; (coq-prog-args . ("-emacs-U"))
)))
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
_CoqProject
Makefile.coq
Makefile.coq.conf
.build

*.vo
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Please visit the [project website](http://sf.snu.ac.kr/promise-concurrency/) for

## Build

- Requirement: [Coq 8.6](https://coq.inria.fr/download), Make, Rsync.
- Requirement: [Coq 8.7](https://coq.inria.fr/download), Make, Rsync.

- Initialization

Expand Down
38 changes: 19 additions & 19 deletions src/lib/respectful5.v
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ Section Respectful5.
.
Hint Constructors sound5.

Structure respectful5 (clo: rel -> rel) : Prop :=
| respectful5_intro
(MON: monotone5 clo)
(RESPECTFUL:
forall l r (LE: l <5= r) (GF: l <5= gf r),
clo l <5= gf (clo r)).
Structure respectful5 (clo: rel -> rel) : Prop := respectful5_intro {
MON: monotone5 clo;
RESPECTFUL:
forall l r (LE: l <5= r) (GF: l <5= gf r),
clo l <5= gf (clo r);
}.
Hint Constructors respectful5.

Inductive grespectful5 (r: rel) e1 e2 e3 e4 e5: Prop :=
Expand Down Expand Up @@ -69,7 +69,7 @@ Section Respectful5.
unfold rr in *; des; eauto 10 using gf_mon. }
induction n; i; [by s; eauto using gf_mon|].
ss; des; [by eauto using gf_mon|].
eapply gf_mon; [eapply RESPECTFUL; [|apply IHn|]|]; inst; s; eauto.
eapply gf_mon; [eapply RESPECTFUL0; [|apply IHn|]|]; inst; s; eauto.
Qed.

Lemma respectful5_compose
Expand All @@ -80,10 +80,10 @@ Section Respectful5.
Proof.
i. destruct RES1, RES2.
econs.
- ii. eapply MON; eauto.
- i. eapply RESPECTFUL; [| |apply PR].
+ i. eapply MON0; eauto.
+ i. eapply RESPECTFUL0; eauto.
- ii. eapply MON0; eauto.
- i. eapply RESPECTFUL0; [| |apply PR].
+ i. eapply MON1; eauto.
+ i. eapply RESPECTFUL1; eauto.
Qed.

Lemma grespectful5_respectful5: respectful5 grespectful5.
Expand Down Expand Up @@ -122,7 +122,7 @@ Section Respectful5.
Proof.
intro r; pcofix CIH; i; pfold.
eapply gf_mon, grespectful5_compose, grespectful5_respectful5.
destruct grespectful5_respectful5; eapply RESPECTFUL, PR; i; [by apply grespectful5_incl; eauto|].
destruct grespectful5_respectful5; eapply RESPECTFUL0, PR; i; [by apply grespectful5_incl; eauto|].
punfold PR0.
by eapply gfgres5_mon; eauto; i; destruct PR1; eauto.
Qed.
Expand Down Expand Up @@ -174,12 +174,12 @@ Section Respectful5.
econs 2; eauto.
Qed.

Structure weak_respectful5 (clo: rel -> rel) : Prop :=
| weak_respectful5_intro
(MON: monotone5 clo)
(RESPECTFUL:
forall l r (LE: l <5= r) (GF: l <5= gf r),
clo l <5= gf (rclo5 clo r)).
Structure weak_respectful5 (clo: rel -> rel) : Prop := weak_respectful5_intro {
WEAK_MON: monotone5 clo;
WEAK_RESPECTFUL:
forall l r (LE: l <5= r) (GF: l <5= gf r),
clo l <5= gf (rclo5 clo r);
}.
Hint Constructors weak_respectful5.

Lemma weak_respectful5_respectful5
Expand All @@ -190,7 +190,7 @@ Section Respectful5.
induction PR; i.
- eapply gf_mon; eauto. i.
apply rclo5_incl. auto.
- exploit RESPECTFUL; [|apply H|apply CLOR'|].
- exploit WEAK_RESPECTFUL0; [|apply H|apply CLOR'|].
+ i. eapply rclo5_mon; eauto.
+ i. eapply gf_mon; eauto.
apply rclo5_rclo5; auto.
Expand Down
38 changes: 19 additions & 19 deletions src/lib/respectful7.v
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ Section Respectful7.
.
Hint Constructors sound7.

Structure respectful7 (clo: rel -> rel) : Prop :=
| respectful7_intro
(MON: monotone7 clo)
(RESPECTFUL:
forall l r (LE: l <7= r) (GF: l <7= gf r),
clo l <7= gf (clo r)).
Structure respectful7 (clo: rel -> rel) : Prop := respectful7_intro {
MON: monotone7 clo;
RESPECTFUL:
forall l r (LE: l <7= r) (GF: l <7= gf r),
clo l <7= gf (clo r);
}.
Hint Constructors respectful7.

Inductive grespectful7 (r: rel) e1 e2 e3 e4 e5 e6 e7: Prop :=
Expand Down Expand Up @@ -71,7 +71,7 @@ Section Respectful7.
unfold rr in *; des; eauto 10 using gf_mon. }
induction n; i; [by s; eauto using gf_mon|].
ss; des; [by eauto using gf_mon|].
eapply gf_mon; [eapply RESPECTFUL; [|apply IHn|]|]; inst; s; eauto.
eapply gf_mon; [eapply RESPECTFUL0; [|apply IHn|]|]; inst; s; eauto.
Qed.

Lemma respectful7_compose
Expand All @@ -82,10 +82,10 @@ Section Respectful7.
Proof.
i. destruct RES1, RES2.
econs.
- ii. eapply MON; eauto.
- i. eapply RESPECTFUL; [| |apply PR].
+ i. eapply MON0; eauto.
+ i. eapply RESPECTFUL0; eauto.
- ii. eapply MON0; eauto.
- i. eapply RESPECTFUL0; [| |apply PR].
+ i. eapply MON1; eauto.
+ i. eapply RESPECTFUL1; eauto.
Qed.

Lemma grespectful7_respectful7: respectful7 grespectful7.
Expand Down Expand Up @@ -124,7 +124,7 @@ Section Respectful7.
Proof.
intro r; pcofix CIH; i; pfold.
eapply gf_mon, grespectful7_compose, grespectful7_respectful7.
destruct grespectful7_respectful7; eapply RESPECTFUL, PR; i; [by apply grespectful7_incl; eauto|].
destruct grespectful7_respectful7; eapply RESPECTFUL0, PR; i; [by apply grespectful7_incl; eauto|].
punfold PR0.
by eapply gfgres7_mon; eauto; i; destruct PR1; eauto.
Qed.
Expand Down Expand Up @@ -176,12 +176,12 @@ Section Respectful7.
econs 2; eauto.
Qed.

Structure weak_respectful7 (clo: rel -> rel) : Prop :=
| weak_respectful7_intro
(MON: monotone7 clo)
(RESPECTFUL:
forall l r (LE: l <7= r) (GF: l <7= gf r),
clo l <7= gf (rclo7 clo r)).
Structure weak_respectful7 (clo: rel -> rel) : Prop := weak_respectful7_intro {
WEAK_MON: monotone7 clo;
WEAK_RESPECTFUL:
forall l r (LE: l <7= r) (GF: l <7= gf r),
clo l <7= gf (rclo7 clo r);
}.
Hint Constructors weak_respectful7.

Lemma weak_respectful7_respectful7
Expand All @@ -192,7 +192,7 @@ Section Respectful7.
induction PR; i.
- eapply gf_mon; eauto. i.
apply rclo7_incl. auto.
- exploit RESPECTFUL; [|apply H|apply CLOR'|].
- exploit WEAK_RESPECTFUL0; [|apply H|apply CLOR'|].
+ i. eapply rclo7_mon; eauto.
+ i. eapply gf_mon; eauto.
apply rclo7_rclo7; auto.
Expand Down
38 changes: 19 additions & 19 deletions src/lib/respectful9.v
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ Section Respectful9.
.
Hint Constructors sound9.

Structure respectful9 (clo: rel -> rel) : Prop :=
| respectful9_intro
(MON: monotone9 clo)
(RESPECTFUL:
forall l r (LE: l <9= r) (GF: l <9= gf r),
clo l <9= gf (clo r)).
Structure respectful9 (clo: rel -> rel) : Prop := respectful9_intro {
MON: monotone9 clo;
RESPECTFUL:
forall l r (LE: l <9= r) (GF: l <9= gf r),
clo l <9= gf (clo r);
}.
Hint Constructors respectful9.

Inductive grespectful9 (r: rel) e1 e2 e3 e4 e5 e6 e7 e8 e9: Prop :=
Expand Down Expand Up @@ -73,7 +73,7 @@ Section Respectful9.
unfold rr in *; des; eauto 10 using gf_mon. }
induction n; i; [by s; eauto using gf_mon|].
ss; des; [by eauto using gf_mon|].
eapply gf_mon; [eapply RESPECTFUL; [|apply IHn|]|]; inst; s; eauto.
eapply gf_mon; [eapply RESPECTFUL0; [|apply IHn|]|]; inst; s; eauto.
Qed.

Lemma respectful9_compose
Expand All @@ -84,10 +84,10 @@ Section Respectful9.
Proof.
i. destruct RES1, RES2.
econs.
- ii. eapply MON; eauto.
- i. eapply RESPECTFUL; [| |apply PR].
+ i. eapply MON0; eauto.
+ i. eapply RESPECTFUL0; eauto.
- ii. eapply MON0; eauto.
- i. eapply RESPECTFUL0; [| |apply PR].
+ i. eapply MON1; eauto.
+ i. eapply RESPECTFUL1; eauto.
Qed.

Lemma grespectful9_respectful9: respectful9 grespectful9.
Expand Down Expand Up @@ -126,7 +126,7 @@ Section Respectful9.
Proof.
intro r; pcofix CIH; i; pfold.
eapply gf_mon, grespectful9_compose, grespectful9_respectful9.
destruct grespectful9_respectful9; eapply RESPECTFUL, PR; i; [by apply grespectful9_incl; eauto|].
destruct grespectful9_respectful9; eapply RESPECTFUL0, PR; i; [by apply grespectful9_incl; eauto|].
punfold PR0.
by eapply gfgres9_mon; eauto; i; destruct PR1; eauto.
Qed.
Expand Down Expand Up @@ -178,12 +178,12 @@ Section Respectful9.
econs 2; eauto.
Qed.

Structure weak_respectful9 (clo: rel -> rel) : Prop :=
| weak_respectful9_intro
(MON: monotone9 clo)
(RESPECTFUL:
forall l r (LE: l <9= r) (GF: l <9= gf r),
clo l <9= gf (rclo9 clo r)).
Structure weak_respectful9 (clo: rel -> rel) : Prop := weak_respectful9_intro {
WEAK_MON: monotone9 clo;
WEAK_RESPECTFUL:
forall l r (LE: l <9= r) (GF: l <9= gf r),
clo l <9= gf (rclo9 clo r);
}.
Hint Constructors weak_respectful9.

Lemma weak_respectful9_respectful9
Expand All @@ -194,7 +194,7 @@ Section Respectful9.
induction PR; i.
- eapply gf_mon; eauto. i.
apply rclo9_incl. auto.
- exploit RESPECTFUL; [|apply H|apply CLOR'|].
- exploit WEAK_RESPECTFUL0; [|apply H|apply CLOR'|].
+ i. eapply rclo9_mon; eauto.
+ i. eapply gf_mon; eauto.
apply rclo9_rclo9; auto.
Expand Down

0 comments on commit 5806c1a

Please sign in to comment.