Current_prop.thy
author chunhan
Tue, 04 Jun 2013 15:51:02 +0800
changeset 18 9b42765ce554
child 19 ced0fcfbcf8e
permissions -rw-r--r--
info_flow did NOT guarantee in current_procs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
     1
theory Current_prop
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
     2
imports Main Flask_type Flask My_list_prefix Init_prop Valid_prop Delete_prop
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
     3
begin
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
     4
(*<*)
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
     5
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
     6
context flask begin
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
     7
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
     8
lemma procs_of_shm_prop1: "\<lbrakk> p_flag \<in> procs_of_shm s h; valid s\<rbrakk> \<Longrightarrow> h \<in> current_shms s"
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
     9
apply (induct s arbitrary:p_flag)
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    10
apply (case_tac p_flag, simp, drule init_procs_has_shm, simp)
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    11
apply (frule vd_cons, frule vt_grant_os)
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    12
apply (case_tac a, auto split:if_splits option.splits)
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    13
done
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    14
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    15
lemma procs_of_shm_prop2: "\<lbrakk>(p, flag) \<in> procs_of_shm s h; valid s\<rbrakk> \<Longrightarrow> p \<in> current_procs s"
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    16
apply (induct s arbitrary:p flag)
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    17
apply (simp, drule init_procs_has_shm, simp)
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    18
apply (frule vd_cons, frule vt_grant_os)
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    19
apply (case_tac a, auto split:if_splits option.splits)
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    20
done
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    21
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    22
lemma procs_of_shm_prop3: "\<lbrakk>(p, flag) \<in> procs_of_shm s h; (p, flag') \<in> procs_of_shm s h; valid s\<rbrakk>
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    23
  \<Longrightarrow> flag = flag'"
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    24
apply (induct s arbitrary:p flag flag')
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    25
apply (simp, drule_tac flag = flag in init_procs_has_shm, drule_tac flag = flag' in init_procs_has_shm, simp)
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    26
apply (frule vd_cons, frule vt_grant_os)
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    27
apply (case_tac a, auto split:if_splits option.splits dest:procs_of_shm_prop2)
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    28
done
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    29
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    30
lemma procs_of_shm_prop4: "\<lbrakk>(p, flag) \<in> procs_of_shm s h; valid s\<rbrakk> \<Longrightarrow> flag_of_proc_shm s p h = Some flag"
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    31
apply (induct s arbitrary:p flag)
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    32
apply (simp, drule init_procs_has_shm, simp)
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    33
apply (frule vd_cons, frule vt_grant_os)
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    34
apply (case_tac a, auto split:if_splits option.splits dest:procs_of_shm_prop2)
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    35
done
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    36
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    37
lemma procs_of_shm_prop4':
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    38
  "\<lbrakk>flag_of_proc_shm s p h = None; valid s\<rbrakk> \<Longrightarrow> \<forall> flag. (p, flag) \<notin> procs_of_shm s h"
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    39
by (auto dest:procs_of_shm_prop4)
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    40
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    41
lemma not_init_intro_proc:
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    42
  "\<lbrakk>p \<notin> current_procs s; valid s\<rbrakk> \<Longrightarrow> deleted (O_proc p) s \<or> p \<notin> init_procs"
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    43
using not_deleted_init_proc by auto
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    44
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    45
lemma not_init_intro_proc':
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    46
  "\<lbrakk>p \<notin> current_procs s; valid s\<rbrakk> \<Longrightarrow> \<not> (\<not> deleted (O_proc p) s \<and> p \<in> init_procs)"
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    47
using not_deleted_init_proc by auto
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    48
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    49
end
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    50
9b42765ce554 info_flow did NOT guarantee in current_procs
chunhan
parents:
diff changeset
    51
end