# HG changeset patch # User chunhan # Date 1378358583 -28800 # Node ID 021672ec28f50c4e8712616b525384077d20bbd6 # Parent db15ef2ee18c4367dc487df515e43b8390260b6d update diff -r db15ef2ee18c -r 021672ec28f5 S2ss_prop.thy --- a/S2ss_prop.thy Wed Sep 04 15:13:54 2013 +0800 +++ b/S2ss_prop.thy Thu Sep 05 13:23:03 2013 +0800 @@ -8,22 +8,6 @@ (* simpset for s2ss*) -lemma co2sobj_createshm: - "\valid (CreateShM p h # s); alive (CreateShM p h # s) obj\ \ co2sobj (CreateShM p h # s) obj = ( - case obj of - O_shm h' \ if (h' = h) then (case (ch2sshm (CreateShM p h # s) h) of - Some sh \ Some (S_shm sh) - | _ \ None) - else co2sobj s obj - | _ \ co2sobj s obj)" -apply (frule vt_grant_os, frule vd_cons, case_tac obj) -apply (simp_all add:current_files_simps is_dir_simps ch2sshm_other cq2smsgq_other tainted_eq_Tainted) -apply (auto split:if_splits option.splits dest!:current_file_has_sfile' current_proc_has_sp' - simp:current_files_simps cf2sfiles_simps cf2sfile_simps cp2sproc_simps tainted_eq_Tainted - same_inode_files_prop6 ch2sshm_simps - dest!:current_shm_has_sh' - dest:is_file_in_current is_dir_in_current) -done lemma s2ss_execve: "valid (Execve p f fds # s) \ s2ss (Execve p f fds # s) = ( @@ -36,6 +20,7 @@ \ {S_proc sp (O_proc p \ Tainted s \ O_file f \ Tainted s)} | _ \ s2ss s) )" apply (frule vd_cons, frule vt_grant_os, simp split:if_splits) + apply (rule conjI, rule impI, (erule exE|erule conjE)+) apply (frule_tac p = p in current_proc_has_sp, simp, erule exE) apply (frule_tac p = p' in current_proc_has_sp, simp, erule exE, simp) @@ -46,6 +31,14 @@ apply (drule CollectD, (erule exE|erule conjE)+) apply (case_tac "obj = O_proc p") apply (simp add:co2sobj_execve tainted_eq_Tainted split:if_splits) +apply (simp add:co2sobj_execve, rule disjI2) +apply (rule_tac x = obj in exI, case_tac obj, (simp add:alive_simps)+)[1] +apply (simp, erule disjE) +apply (rule_tac x = "O_proc p" in exI, simp add:tainted_eq_Tainted) +apply (erule exE| erule conjE)+ +apply (case_tac "x = S_proc sp (O_proc p \ tainted s)") +apply (rule_tac x = "O_proc p'" in exI) +apply (simp add:alive_execve co2sobj_execve tainted_eq_Tainted cp2sproc_execve) apply (case_tac obj, simp_all add:co2sobj_execve alive_simps) thm alive_execve diff -r db15ef2ee18c -r 021672ec28f5 Static.thy --- a/Static.thy Wed Sep 04 15:13:54 2013 +0800 +++ b/Static.thy Thu Sep 05 13:23:03 2013 +0800 @@ -167,11 +167,12 @@ fun is_many :: "t_sobject \ bool" where - "is_many (S_proc (Many, sec, fds, shms) tag) = True" -| "is_many (S_file sfs tag) = (\ sf \ sfs. is_many_sfile sf)" -| "is_many (S_dir sf ) = is_many_sfile sf" -| "is_many (S_msgq sq ) = is_many_smsgq sq" -| "is_many (S_shm sh ) = is_many_sshm sh" + "is_many (S_proc sp tag) = is_many_sproc sp" +| "is_many (S_file sfs tag) = (\ sf \ sfs. is_many_sfile sf)" +| "is_many (S_dir sf ) = is_many_sfile sf" +| "is_many (S_msgq sq ) = is_many_smsgq sq" +| "is_many (S_shm sh ) = is_many_sshm sh" +| "is_many _ = False" (* fun update_ss_sp:: "t_static_state \ t_sobject \ t_sobject \ t_static_state"