diff -r fc7151df7f8e -r 002c34a6ff4f Flask.thy --- a/Flask.thy Wed Nov 20 13:44:32 2013 +0800 +++ b/Flask.thy Wed Nov 20 15:19:58 2013 +0800 @@ -154,7 +154,7 @@ init_itag_of_inum im = Some Tag_FILE \ (init_itag_of_inum im = Some Tag_DIR \ \ (\ f'. f' \ init_files \ f \ f'))" and init_procfds_valid: "\ p fd. fd \ init_fds_of_proc p \ p \ init_procs \ ((\ f \ init_files. init_file_of_proc_fd p fd = Some f) \ (p, fd) \ init_sockets)" - and init_filefd_valid: "\ p fd f. init_file_of_proc_fd p fd = Some f \ fd \ init_fds_of_proc p \ (\ im. init_inum_of_file f = Some im \ init_itag_of_inum im = Some Tag_FILE) \ p \ init_procs \ (\ flags. init_oflags_of_proc_fd p fd = Some flags)" + and init_filefd_valid: "\ p fd f. init_file_of_proc_fd p fd = Some f \ fd \ init_fds_of_proc p \ (\ im. init_inum_of_file f = Some im \ init_itag_of_inum im = Some Tag_FILE) \ p \ init_procs \ (\ flags. init_oflags_of_proc_fd p fd = Some flags) \ (p, fd) \ init_sockets" and init_fileflag_valid: "\ p fd flags. init_oflags_of_proc_fd p fd = Some flags \ \ f. init_file_of_proc_fd p fd = Some f" and init_procs_has_shm: "\ p h flag. (p,flag) \ init_procs_of_shm h \ p \ init_procs \ h \ init_shms \ init_flag_of_proc_shm p h = Some flag" @@ -162,7 +162,7 @@ and init_msgs_distinct: "\ q. distinct (init_msgs_of_queue q)" and init_msgs_valid: "\ m q. m \ set (init_msgs_of_queue q) \ q \ init_msgqs" - and init_socket_has_inode: "\ p fd. (p, fd) \ init_sockets \ \ im. init_inum_of_socket (p, fd) = Some im \ p \ init_procs \ fd \ init_fds_of_proc p" + and init_socket_has_inode: "\ p fd. (p, fd) \ init_sockets \ \ im. init_inum_of_socket (p, fd) = Some im \ p \ init_procs \ fd \ init_fds_of_proc p \ init_file_of_proc_fd p fd = None" and inos_has_sock_tag: "\ s im. init_inum_of_socket s = Some im \ s \ init_sockets \ (\ tag. init_itag_of_inum im = Some tag \ is_sock_itag tag)" (* and init_netobj_has_state: "bidirect_in_init init_netobjs init_netobj_state" @@ -260,6 +260,13 @@ where "proc_fd_of_file \ f = {(p, fd) | p fd. file_of_proc_fd \ p fd = Some f}" +definition proc_file_fds :: "t_state \ t_process \ t_fd set" +where + "proc_file_fds s p \ {fd. \ f. file_of_proc_fd s p fd = Some f}" + +definition init_proc_file_fds:: "t_process \ t_fd set" +where + "init_proc_file_fds p \ {fd. \ f. init_file_of_proc_fd p fd = Some f}" (****** files and directories ******) @@ -802,16 +809,6 @@ | "deleted obj (RecvMsg p q m # s) = (obj = O_msg q m \ deleted obj s)" | "deleted obj (_ # s) = deleted obj s" - -definition proc_file_fds :: "t_state \ t_process \ t_fd set" -where - "proc_file_fds s p \ {fd. \ f. file_of_proc_fd s p fd = Some f}" - - -definition init_proc_file_fds:: "t_process \ t_fd set" -where - "init_proc_file_fds p \ {fd. \ f. init_file_of_proc_fd p fd = Some f}" - end