intros s t Sub FP5 SP TF; inversion TF.
inversion H.
unfold StarProperty in |- *; simpl in |- *; intros.
cut
match
fsecmat (secmat s) o1, fsecmat (secmat s) o2, fOSC (objectSC s) o2,
fOSC (objectSC s) o1
with
| None, _, _, _ => True
| _, None, _, _ => True
| _, _, None, _ => True
| _, _, _, None => True
| Some w, Some x, Some y, Some z =>
set_In u0 (ActWriters w) -> set_In u0 (ActReaders x) -> le_sc y z
end.
elim (OBJeq_dec o o1); elim (OBJeq_dec o o2); intros EQ2 EQ1.
rewrite <- EQ1; rewrite <- EQ2.
elim (fsecmat (secmat s) o); elim (fOSC (objectSC s) o);
elim (fsecmat (open_sm s Sub o READ) o); auto.
rewrite <- EQ1.
replace (fsecmat (open_sm s Sub o READ) o2) with (fsecmat (secmat s) o2).
cut
match fsecmat (open_sm s Sub o READ) o, fsecmat (secmat s) o with
| None, _ => False
| Some y, None =>
ActReaders y = set_add SUBeq_dec Sub (empty_set SUBJECT) /\
ActWriters y = empty_set SUBJECT
| Some x, Some y => set_In u0 (ActWriters x) -> set_In u0 (ActWriters y)
end.
elim (fsecmat (secmat s) o); elim (fOSC (objectSC s) o);
elim (fsecmat (secmat s) o2); elim (fsecmat (open_sm s Sub o READ) o);
elim (fOSC (objectSC s) o2); auto.
intros.
elim H9; intros H16 H17; rewrite H17 in H11; simpl in H11; contradiction.
apply Open_smCorr31; auto.
auto.
rewrite <- EQ2.
replace (fsecmat (open_sm s Sub o READ) o1) with (fsecmat (secmat s) o1).
elim (SUBeq_dec Sub u0); intro EQu.
cut
match fsecmat (secmat s) o1, fOSC (objectSC s) o, fOSC (objectSC s) o1 with
| None, _, _ => False
| _, None, _ => False
| _, _, None => False
| Some x, Some y, Some z => set_In Sub (ActWriters x) -> le_sc y z
end.
rewrite <- EQu.
elim (fsecmat (secmat s) o); elim (fOSC (objectSC s) o);
elim (fsecmat (secmat s) o1); elim (fsecmat (open_sm s Sub o READ) o);
elim (fOSC (objectSC s) o1); auto.
unfold PreStarPropRead in H6; apply H6.
cut
match fsecmat (open_sm s Sub o READ) o, fsecmat (secmat s) o with
| Some y, None =>
ActReaders y = set_add SUBeq_dec Sub (empty_set SUBJECT) /\
ActWriters y = empty_set SUBJECT
| None, _ => False
| Some y, Some z =>
(set_In u0 (ActReaders y) -> set_In u0 (ActReaders z)) /\
(set_In u0 (ActWriters y) -> set_In u0 (ActWriters z))
end.
elim (fsecmat (secmat s) o); elim (fOSC (objectSC s) o);
elim (fsecmat (secmat s) o1); elim (fsecmat (open_sm s Sub o READ) o);
elim (fOSC (objectSC s) o1); auto.
tauto.
intros.
elim H9; intros H16 H17; rewrite H16 in H12; simpl in H12; elim H12; intro;
contradiction.
apply Open_smCorr21; auto.
auto.
replace (fsecmat (open_sm s Sub o READ) o1) with (fsecmat (secmat s) o1).
replace (fsecmat (open_sm s Sub o READ) o2) with (fsecmat (secmat s) o2).
auto.
auto.
auto.
unfold StarProperty in SP; apply SP; auto.
(*********************************************************************)
(*                         End READ                                  *)
(*                                                                   *)
(*                                                                   *)
(*                                                                   *)
(*                       Begin WRITE                                 *)
(*********************************************************************)
unfold StarProperty in |- *; simpl in |- *; intros.
cut
match
fsecmat (secmat s) o1, fsecmat (secmat s) o2, fOSC (objectSC s) o2,
fOSC (objectSC s) o1
with
| None, _, _, _ => True
| _, None, _, _ => True
| _, _, None, _ => True
| _, _, _, None => True
| Some w, Some x, Some y, Some z =>
set_In u0 (ActWriters w) -> set_In u0 (ActReaders x) -> le_sc y z
end.
elim (OBJeq_dec o o1); elim (OBJeq_dec o o2); intros EQ2 EQ1.
rewrite <- EQ1; rewrite <- EQ2.
elim (fsecmat (secmat s) o); elim (fOSC (objectSC s) o);
elim (fsecmat (open_sm s Sub o WRITE) o); auto.
rewrite <- EQ1.
replace (fsecmat (open_sm s Sub o WRITE) o2) with (fsecmat (secmat s) o2).
elim (SUBeq_dec Sub u0); intro EQu.
cut
match fsecmat (secmat s) o2, fOSC (objectSC s) o, fOSC (objectSC s) o2 with
| None, _, _ => False
| _, None, _ => False
| _, _, None => False
| Some x, Some y, Some z => set_In Sub (ActReaders x) -> le_sc z y
end.
rewrite <- EQu.
elim (fsecmat (secmat s) o); elim (fOSC (objectSC s) o);
elim (fsecmat (secmat s) o2); elim (fsecmat (open_sm s Sub o WRITE) o);
elim (fOSC (objectSC s) o2); auto.
unfold PreStarPropWrite in H6; apply H6.
cut
match fsecmat (open_sm s Sub o WRITE) o, fsecmat (secmat s) o with
| Some y, None =>
ActWriters y = set_add SUBeq_dec Sub (empty_set SUBJECT) /\
ActReaders y = empty_set SUBJECT
| None, _ => False
| Some y, Some z =>
(set_In u0 (ActReaders y) -> set_In u0 (ActReaders z)) /\
(set_In u0 (ActWriters y) -> set_In u0 (ActWriters z))
end.
elim (fsecmat (secmat s) o); elim (fOSC (objectSC s) o);
elim (fsecmat (secmat s) o2); elim (fsecmat (open_sm s Sub o WRITE) o);
elim (fOSC (objectSC s) o2); auto.
tauto.
intros.
elim H9; intros H15 H16.
rewrite H15 in H11; simpl in H11; elim H11; intro; try contradiction.
apply Open_smCorr22; auto.
auto.
rewrite <- EQ2.
replace (fsecmat (open_sm s Sub o WRITE) o1) with (fsecmat (secmat s) o1).
elim (SUBeq_dec Sub u0); intro EQu.
cut
match fsecmat (open_sm s Sub o WRITE) o, fsecmat (secmat s) o with
| Some y, None =>
ActWriters y = set_add SUBeq_dec Sub (empty_set SUBJECT) /\
ActReaders y = empty_set SUBJECT
| None, _ => False
| Some y, Some z => set_In u0 (ActReaders y) -> set_In u0 (ActReaders z)
end.
rewrite <- EQu.
elim (fsecmat (secmat s) o); elim (fOSC (objectSC s) o);
elim (fsecmat (secmat s) o1); elim (fsecmat (open_sm s Sub o WRITE) o);
elim (fOSC (objectSC s) o1); auto.
intros.
elim H9; intros H14 H15; rewrite H15 in H12; simpl in H12; contradiction.
apply Open_smCorr32; auto.
cut
match fsecmat (open_sm s Sub o WRITE) o, fsecmat (secmat s) o with
| Some y, None =>
ActWriters y = set_add SUBeq_dec Sub (empty_set SUBJECT) /\
ActReaders y = empty_set SUBJECT
| None, _ => False
| Some y, Some z =>
(set_In u0 (ActReaders y) -> set_In u0 (ActReaders z)) /\
(set_In u0 (ActWriters y) -> set_In u0 (ActWriters z))
end.
elim (fsecmat (secmat s) o); elim (fOSC (objectSC s) o);
elim (fsecmat (secmat s) o1); elim (fsecmat (open_sm s Sub o WRITE) o);
elim (fOSC (objectSC s) o1); auto.
tauto.
intros.
elim H9; intros H14 H15; rewrite H15 in H12; simpl in H12; contradiction.
apply Open_smCorr22; auto.
auto.
replace (fsecmat (open_sm s Sub o WRITE) o1) with (fsecmat (secmat s) o1).
replace (fsecmat (open_sm s Sub o WRITE) o2) with (fsecmat (secmat s) o2).
auto.
auto.
auto.
unfold StarProperty in SP; apply SP; auto.
Qed.

(* Specifications: *)
Lemma OpenPCP : forall s t : SFSstate, PreservesControlProp s Open t.
intros; unfold PreservesControlProp in |- *; intros Sub TF; inversion TF;
unfold ControlProperty in |- *.