@@ -41,7 +41,8 @@ Remark diff_same:
41
41
Proof .
42
42
induction s as [ | [v i] s]; simpl.
43
43
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.
45
46
Qed .
46
47
47
48
Remark delta_state_same:
117
118
but establish some confidence in the availability analysis. *)
118
119
119
120
Definition 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'.
121
122
122
123
Inductive wf_avail: avail -> Prop :=
123
124
| wf_avail_nil:
@@ -132,7 +133,7 @@ Lemma set_state_1:
132
133
Proof .
133
134
induction s as [ | [v' i'] s]; simpl.
134
135
- auto.
135
- - destruct (Pos .compare v v'); simpl; auto.
136
+ - destruct (Ident .compare v v'); simpl; auto.
136
137
Qed .
137
138
138
139
Lemma set_state_2:
@@ -141,7 +142,7 @@ Lemma set_state_2:
141
142
Proof .
142
143
induction s as [ | [v1 i1] s]; simpl; intros.
143
144
- contradiction.
144
- - destruct (Pos .compare_spec v v1); simpl.
145
+ - destruct (Ident .compare_spec v v1); simpl.
145
146
+ subst v1. destruct H0. congruence. auto.
146
147
+ auto.
147
148
+ destruct H0; auto.
@@ -155,14 +156,14 @@ Lemma set_state_3:
155
156
Proof .
156
157
induction 1; simpl; intros.
157
158
- intuition congruence.
158
- - destruct (Pos .compare_spec v v0); simpl in H1.
159
+ - destruct (Ident .compare_spec v v0); simpl in H1.
159
160
+ 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.
161
162
auto.
162
163
+ 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.
166
167
destruct IHwf_avail as [A | [A B]]; auto.
167
168
Qed .
168
169
@@ -171,11 +172,11 @@ Lemma wf_set_state:
171
172
Proof .
172
173
induction 1; simpl.
173
174
- constructor. red; simpl; tauto. constructor.
174
- - destruct (Pos .compare_spec v v0).
175
+ - destruct (Ident .compare_spec v v0).
175
176
+ subst v0. constructor; auto.
176
177
+ constructor.
177
178
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.
179
180
constructor; auto.
180
181
+ constructor.
181
182
red; intros. exploit set_state_3. eexact H0. eauto. intros [[A B] | [A B]]; subst; eauto.
@@ -187,19 +188,19 @@ Lemma remove_state_1:
187
188
Proof .
188
189
induction 1; simpl; red; intros.
189
190
- 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.
195
196
Qed .
196
197
197
198
Lemma remove_state_2:
198
199
forall v v' i' s, v' <> v -> In (v', i') s -> In (v', i') (remove_state v s).
199
200
Proof .
200
201
induction s as [ | [v1 i1] s]; simpl; intros.
201
202
- auto.
202
- - destruct (Pos .compare_spec v v1); simpl.
203
+ - destruct (Ident .compare_spec v v1); simpl.
203
204
+ subst v1. destruct H0. congruence. auto.
204
205
+ auto.
205
206
+ destruct H0; auto.
@@ -210,11 +211,11 @@ Lemma remove_state_3:
210
211
Proof .
211
212
induction 1; simpl; intros.
212
213
- 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.
218
219
destruct IHwf_avail as [A B] ; auto.
219
220
Qed .
220
221
@@ -223,7 +224,7 @@ Lemma wf_remove_state:
223
224
Proof .
224
225
induction 1; simpl.
225
226
- constructor.
226
- - destruct (Pos .compare_spec v v0).
227
+ - destruct (Ident .compare_spec v v0).
227
228
+ auto.
228
229
+ constructor; auto.
229
230
+ constructor; auto. red; intros.
@@ -246,12 +247,22 @@ Lemma join_1:
246
247
Proof .
247
248
induction 1; simpl; try tauto; induction 1; simpl; intros I1 I2; auto.
248
249
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.
250
253
- 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.
252
259
- 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).
255
266
+ destruct (eq_debuginfo i0 i1); auto with coqlib.
256
267
+ apply IHwf_avail; auto with coqlib. constructor; auto.
257
268
+ eauto.
@@ -262,7 +273,7 @@ Lemma join_2:
262
273
In (v, i) (join s1 s2) -> In (v, i) s1 /\ In (v, i) s2.
263
274
Proof .
264
275
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).
266
277
- subst v1. destruct (eq_debuginfo i0 i1).
267
278
+ subst i1. destruct I. auto. exploit IHwf_avail; eauto. tauto.
268
279
+ exploit IHwf_avail; eauto. tauto.
@@ -275,7 +286,7 @@ Lemma wf_join:
275
286
forall s1, wf_avail s1 -> forall s2, wf_avail s2 -> wf_avail (join s1 s2).
276
287
Proof .
277
288
induction 1; simpl; induction 1; simpl; try constructor.
278
- destruct (Pos .compare_spec v v0).
289
+ destruct (Ident .compare_spec v v0).
279
290
- subst v0. destruct (eq_debuginfo i i0); auto. constructor; auto.
280
291
red; intros. apply join_2 in H3; auto. destruct H3. eauto.
281
292
- apply IHwf_avail. constructor; auto.
0 commit comments