.
.
Proof.
').
Proof.
').
Proof.
').
Proof.
').
Proof.
').
Proof.
').
Proof.
').
Proof.
intros.
destruct H1,
H2.
inv H3;
simpl in *;
constructor;
intros.
{
inversion H_tp_upd;
destruct c;
subst;
simpl in *.
pose proof H1.
apply tp_valid_freelist_free in H1.
/ need lemma for blockset and no_overlap *)
intros b n0 H'.
specialize (
H1 b n0 H').
intro.
apply H1.
unfold Bset.belongsto in *.
unfold valid_block_bset in *.
specialize (
cs_inv _ _ H2).
destruct cs_inv.
specialize (
fid_valid {|
Core.i :=
i0;
Core.c :=
c;
Core.sg :=
sg;
Core.F :=
F |}).
simpl in fid_valid.
clear fid_disjoint.
apply (
step_local_eff _ (
H i0))
in H_core_step.
eapply LEffect_local_alloc in H_core_step;
eauto.
rename H_core_step into H_in_fl.
destruct H_in_fl as (
n0'&
H_in_fl).
subst b.
unfold FLists.get_tfl in H_in_fl.
assert (
FLists.get_tfid (
GlobEnv.freelists GE)
i n <>
F).
{
apply get_top_in_cs in H_tp_core.
destruct H_tp_core as (
cs0&
H''&
H''').
rewrite H''
in H2.
inversion H2.
subst.
clear H2.
unfold CallStack.top in H'''.
destruct cs;
try discriminate.
inversion H'''.
subst.
clear H'''.
simpl in *.
clear H_tp_upd H_core_upd fid_belongsto tp_valid_freelist_free H3.
specialize (
fid_valid (
or_introl eq_refl)).
destruct fid_valid as (
nF&
HnF&
HF).
subst F.
destruct (
peq i t).
{
subst.
apply (
FLists.thread_fl_norep _ (
GlobEnv.wd_fl _ H0));
omega. }
{
apply (
FLists.thread_fl_disj _ (
GlobEnv.wd_fl _ H0));
auto. }
}
exfalso.
pose proof (
FLists.flist_disj _ (
GlobEnv.wd_fl _ H0)
_ _ H6).
destruct H7.
eapply H7;
eauto.
}
call *) {
apply tp_valid_freelist_free.
unfold ThreadPool.push in H_tp_push.
destruct ((
ThreadPool.content thdp)!!
t);
try discriminate.
inversion H_tp_push.
subst.
simpl in *.
destruct peq;
subst;
omega. }
*) {
apply tp_valid_freelist_free.
unfold ThreadPool.pop in H_tp_pop.
destruct ((
ThreadPool.content thdp)!!
t);
try discriminate.
destruct (
CallStack.pop t0);
try discriminate.
inversion H_tp_pop;
inversion H_tp_upd.
subst;
simpl in *;
auto.
}
{
apply tp_valid_freelist_free.
unfold ThreadPool.pop in H_tp_pop.
destruct ((
ThreadPool.content thdp) !!
t);
try discriminate.
destruct (
CallStack.pop t0);
try discriminate.
inversion H_tp_pop.
subst.
auto.
}
{
apply tp_valid_freelist_free.
inversion H_tp_upd;
subst.
auto.
}
{
apply tp_valid_freelist_free.
inversion H_tp_upd;
subst.
auto.
}
{
apply tp_valid_freelist_free.
inversion H_tp_upd;
subst.
auto.
}
eauto.
Qed.
').
Proof.
').
Proof.