@@ -41,7 +41,8 @@ Remark diff_same:
4141Proof .
4242 induction s as [ | [v i] s]; simpl.
4343 auto.
44- rewrite Pos.compare_refl. rewrite dec_eq_true. auto.
44+ destruct (Ident.compare_spec v v); try solve [eelim Ident.lt_not_eq; eauto].
45+ rewrite dec_eq_true. auto.
4546Qed .
4647
4748Remark delta_state_same:
117118 but establish some confidence in the availability analysis. *)
118119
119120Definition avail_above (v: ident) (s: avail) : Prop :=
120- forall v' i', In (v', i') s -> Plt v v'.
121+ forall v' i', In (v', i') s -> Ident.lt v v'.
121122
122123Inductive wf_avail: avail -> Prop :=
123124 | wf_avail_nil:
@@ -132,7 +133,7 @@ Lemma set_state_1:
132133Proof .
133134 induction s as [ | [v' i'] s]; simpl.
134135- auto.
135- - destruct (Pos .compare v v'); simpl; auto.
136+ - destruct (Ident .compare v v'); simpl; auto.
136137Qed .
137138
138139Lemma set_state_2:
@@ -141,7 +142,7 @@ Lemma set_state_2:
141142Proof .
142143 induction s as [ | [v1 i1] s]; simpl; intros.
143144- contradiction.
144- - destruct (Pos .compare_spec v v1); simpl.
145+ - destruct (Ident .compare_spec v v1); simpl.
145146+ subst v1. destruct H0. congruence. auto.
146147+ auto.
147148+ destruct H0; auto.
@@ -155,14 +156,14 @@ Lemma set_state_3:
155156Proof .
156157 induction 1; simpl; intros.
157158- intuition congruence.
158- - destruct (Pos .compare_spec v v0); simpl in H1.
159+ - destruct (Ident .compare_spec v v0); simpl in H1.
159160+ subst v0. destruct H1. inv H1; auto. right; split.
160- apply not_eq_sym. apply Plt_ne . eapply H; eauto.
161+ apply not_eq_sym. apply Ident.lt_not_eq . eapply H; eauto.
161162 auto.
162163+ destruct H1. inv H1; auto.
163- destruct H1. inv H1. right; split; auto. apply not_eq_sym. apply Plt_ne . auto.
164- right; split; auto. apply not_eq_sym. apply Plt_ne. apply Plt_trans with v0; eauto.
165- + destruct H1. inv H1. right; split; auto. apply Plt_ne . auto.
164+ destruct H1. inv H1. right; split; auto. apply not_eq_sym. apply Ident.lt_not_eq . auto.
165+ right; split; auto. apply not_eq_sym. apply Ident.lt_not_eq. apply Ident.lt_trans with v0; eauto.
166+ + destruct H1. inv H1. right; split; auto. apply Ident.lt_not_eq . auto.
166167 destruct IHwf_avail as [A | [A B]]; auto.
167168Qed .
168169
@@ -171,11 +172,11 @@ Lemma wf_set_state:
171172Proof .
172173 induction 1; simpl.
173174- constructor. red; simpl; tauto. constructor.
174- - destruct (Pos .compare_spec v v0).
175+ - destruct (Ident .compare_spec v v0).
175176+ subst v0. constructor; auto.
176177+ constructor.
177178 red; simpl; intros. destruct H2.
178- inv H2. auto. apply Plt_trans with v0; eauto.
179+ inv H2. auto. apply Ident.lt_trans with v0; eauto.
179180 constructor; auto.
180181+ constructor.
181182 red; intros. exploit set_state_3. eexact H0. eauto. intros [[A B] | [A B]]; subst; eauto.
@@ -187,19 +188,19 @@ Lemma remove_state_1:
187188Proof .
188189 induction 1; simpl; red; intros.
189190- auto.
190- - destruct (Pos .compare_spec v v0); simpl in *.
191- + subst v0. elim (Plt_strict v); eauto.
192- + destruct H1. inv H1. elim (Plt_strict v); eauto.
193- elim (Plt_strict v) . apply Plt_trans with v0; eauto.
194- + destruct H1. inv H1. elim (Plt_strict v); eauto. tauto.
191+ - destruct (Ident .compare_spec v v0); simpl in *.
192+ + subst v0. elim (Ident.lt_not_eq v v); eauto.
193+ + destruct H1. inv H1. elim (Ident.lt_not_eq v v); eauto.
194+ elim (Ident.lt_not_eq v v); eauto . apply Ident.lt_trans with v0; eauto.
195+ + destruct H1. inv H1. elim (Ident.lt_not_eq v v); eauto. tauto.
195196Qed .
196197
197198Lemma remove_state_2:
198199 forall v v' i' s, v' <> v -> In (v', i') s -> In (v', i') (remove_state v s).
199200Proof .
200201 induction s as [ | [v1 i1] s]; simpl; intros.
201202- auto.
202- - destruct (Pos .compare_spec v v1); simpl.
203+ - destruct (Ident .compare_spec v v1); simpl.
203204+ subst v1. destruct H0. congruence. auto.
204205+ auto.
205206+ destruct H0; auto.
@@ -210,11 +211,11 @@ Lemma remove_state_3:
210211Proof .
211212 induction 1; simpl; intros.
212213- contradiction.
213- - destruct (Pos .compare_spec v v0); simpl in H1.
214- + subst v0. split; auto. apply not_eq_sym; apply Plt_ne ; eauto.
215- + destruct H1. inv H1. split; auto. apply not_eq_sym; apply Plt_ne ; eauto.
216- split; auto. apply not_eq_sym; apply Plt_ne. apply Plt_trans with v0; eauto.
217- + destruct H1. inv H1. split; auto. apply Plt_ne ; auto.
214+ - destruct (Ident .compare_spec v v0); simpl in H1.
215+ + subst v0. split; auto. apply not_eq_sym; apply Ident.lt_not_eq ; eauto.
216+ + destruct H1. inv H1. split; auto. apply not_eq_sym; apply Ident.lt_not_eq ; eauto.
217+ split; auto. apply not_eq_sym; apply Ident.lt_not_eq. apply Ident.lt_trans with v0; eauto.
218+ + destruct H1. inv H1. split; auto. apply Ident.lt_not_eq ; auto.
218219 destruct IHwf_avail as [A B] ; auto.
219220Qed .
220221
@@ -223,7 +224,7 @@ Lemma wf_remove_state:
223224Proof .
224225 induction 1; simpl.
225226- constructor.
226- - destruct (Pos .compare_spec v v0).
227+ - destruct (Ident .compare_spec v v0).
227228+ auto.
228229+ constructor; auto.
229230+ constructor; auto. red; intros.
@@ -246,12 +247,22 @@ Lemma join_1:
246247Proof .
247248 induction 1; simpl; try tauto; induction 1; simpl; intros I1 I2; auto.
248249 destruct I1, I2.
249- - inv H3; inv H4. rewrite Pos.compare_refl. rewrite dec_eq_true; auto with coqlib.
250+ - inv H3; inv H4.
251+ destruct (Ident.compare_spec v v); try solve [eelim Ident.lt_not_eq; eauto].
252+ rewrite dec_eq_true; auto with coqlib.
250253- inv H3.
251- assert (L: Plt v1 v) by eauto. apply Pos.compare_gt_iff in L. rewrite L. auto.
254+ assert (L: Ident.lt v1 v) by eauto.
255+ destruct (Ident.compare_spec v v1).
256+ + eelim Ident.lt_not_eq; eauto.
257+ + elim (Ident.lt_not_eq v v); eauto using Ident.lt_trans.
258+ + auto.
252259- inv H4.
253- assert (L: Plt v0 v) by eauto. apply Pos.compare_lt_iff in L. rewrite L. apply IHwf_avail. constructor; auto. auto. auto with coqlib.
254- - destruct (Pos.compare v0 v1).
260+ assert (L: Ident.lt v0 v) by eauto.
261+ destruct (Ident.compare_spec v0 v).
262+ + eelim Ident.lt_not_eq; eauto.
263+ + apply IHwf_avail. constructor; auto. auto. auto with coqlib.
264+ + elim (Ident.lt_not_eq v v); eauto using Ident.lt_trans.
265+ - destruct (Ident.compare v0 v1).
255266+ destruct (eq_debuginfo i0 i1); auto with coqlib.
256267+ apply IHwf_avail; auto with coqlib. constructor; auto.
257268+ eauto.
@@ -262,7 +273,7 @@ Lemma join_2:
262273 In (v, i) (join s1 s2) -> In (v, i) s1 /\ In (v, i) s2.
263274Proof .
264275 induction 1; simpl; try tauto; induction 1; simpl; intros I; try tauto.
265- destruct (Pos .compare_spec v0 v1).
276+ destruct (Ident .compare_spec v0 v1).
266277- subst v1. destruct (eq_debuginfo i0 i1).
267278 + subst i1. destruct I. auto. exploit IHwf_avail; eauto. tauto.
268279 + exploit IHwf_avail; eauto. tauto.
@@ -275,7 +286,7 @@ Lemma wf_join:
275286 forall s1, wf_avail s1 -> forall s2, wf_avail s2 -> wf_avail (join s1 s2).
276287Proof .
277288 induction 1; simpl; induction 1; simpl; try constructor.
278- destruct (Pos .compare_spec v v0).
289+ destruct (Ident .compare_spec v v0).
279290- subst v0. destruct (eq_debuginfo i i0); auto. constructor; auto.
280291 red; intros. apply join_2 in H3; auto. destruct H3. eauto.
281292- apply IHwf_avail. constructor; auto.
0 commit comments