diff -r d9dc04c3ea90 -r dfde07c7cd6b no_shm_selinux/Static.thy --- a/no_shm_selinux/Static.thy Thu Jan 09 14:39:00 2014 +0800 +++ b/no_shm_selinux/Static.thy Thu Jan 09 19:09:09 2014 +0800 @@ -646,7 +646,6 @@ "init_obj_related (S_proc (pi, sec, fds) tag) (O_proc p') = (pi = Init p')" | "init_obj_related (S_file sfs tag) (O_file f) = (\ sf \ sfs. sfile_related sf f)" | "init_obj_related (S_dir sf) (O_dir f) = (sfile_related sf f)" -| "init_obj_related (S_msgq (qi, sec, sms)) (O_msgq q') = (qi = Init q')" (* | "init_obj_related (S_shm (hi, sec)) (O_shm h') = (hi = Init h')" @@ -658,11 +657,13 @@ (***************** for backward proof when Instancing static objects ******************) +(* fun all_procs :: "t_state \ t_process set" where "all_procs [] = init_procs" | "all_procs (Clone p p' fds # s) = insert p' (all_procs s)" | "all_procs (e # s) = all_procs s" +*) definition next_nat :: "nat set \ nat" where @@ -672,9 +673,12 @@ where "new_proc \ = next_nat (current_procs \)" +(* definition brandnew_proc :: "t_state \ t_process" where "brandnew_proc s \ next_nat (all_procs s)" +*) + definition new_inode_num :: "t_state \ nat" where @@ -698,9 +702,9 @@ where "new_proc_fd \ p = next_nat (current_proc_fds \ p)" -definition all_fname_under_dir:: "t_file \ t_state \ t_fname set" +definition all_fname_under_dir:: "t_file \ t_state \ t_file set \ t_fname set" where - "all_fname_under_dir d \ = {fn. \ f. fn # d = f \ f \ current_files \}" + "all_fname_under_dir d \ fs = {fn. \ f. fn # d = f \ f \ (current_files \ \ fs)}" fun fname_all_a:: "nat \ t_fname" where @@ -711,13 +715,17 @@ where "fname_length_set fns = length`fns" -definition next_fname:: "t_file \ t_state \ t_fname" +definition next_fname:: "t_file \ t_state \ t_file set \ t_fname" where - "next_fname pf \ = fname_all_a ((Max (fname_length_set (all_fname_under_dir pf \))) + 1)" + "next_fname pf \ fs = fname_all_a ((Max (fname_length_set (all_fname_under_dir pf \ fs))) + 1)" + +definition new_childf_general:: "t_file \ t_state \ t_file set \ t_file" +where + "new_childf_general pf \ fs = next_fname pf \ fs # pf" definition new_childf:: "t_file \ t_state \ t_file" where - "new_childf pf \ = next_fname pf \ # pf" + "new_childf pf \ = new_childf_general pf \ {}" end