Init_prop.thy
author chunhan
Fri, 03 May 2013 08:20:21 +0100
changeset 1 7d9c0ed02b56
child 2 5a01ee1c9b4d
permissions -rw-r--r--
thy files
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
     1
(*<*)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
     2
theory Init_prop
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
     3
imports Main OS_type_def Flask Flask_type Static_type Static
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
     4
begin
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
     5
(*>*)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
     6
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
     7
context init begin
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
     8
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
     9
lemma init_files_prop1: "init_inum_of_file f = Some im \<Longrightarrow> f \<in> init_files"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    10
by (simp add:inof_has_file_tag)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    11
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    12
lemma init_files_prop2: "finite init_files" 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    13
by (simp add:init_finite_sets)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    14
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    15
lemma init_files_prop3: "f \<in> init_files \<Longrightarrow> init_inum_of_file f \<noteq> None"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    16
by (auto dest:init_file_has_inum)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    17
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    18
lemma init_files_prop4: "(f \<in> init_files) = (f \<in> current_files [])"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    19
apply (simp add:current_files_def, rule iffI)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    20
using init_files_prop1 init_files_prop3 by auto
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    21
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    22
lemmas init_files_props = init_file_has_inum init_files_prop1 init_files_prop2 init_files_prop3 init_files_prop4
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    23
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    24
lemma init_inumof_prop1: "init_inum_of_file f = Some im \<Longrightarrow> \<exists> tag. init_itag_of_inum im = Some tag"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    25
by (auto dest:inof_has_file_tag)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    26
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    27
lemma init_inumof_prop2:  "init_inum_of_file f = Some im \<Longrightarrow> init_itag_of_inum im \<noteq> None"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    28
by (auto dest:inof_has_file_tag)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    29
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    30
lemma init_inumof_prop3: "\<lbrakk>init_inum_of_file f = Some im; init_itag_of_inum im = Some tag\<rbrakk> \<Longrightarrow> is_file_dir_itag tag"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    31
by (auto dest:inof_has_file_tag)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    32
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    33
lemmas init_inum_of_file_props = init_files_prop1 init_inumof_prop1 init_inumof_prop2 init_inumof_prop3
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    34
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    35
lemma init_inumos_prop1: "init_inum_of_socket s = Some im \<Longrightarrow> s \<in> init_sockets"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    36
by (auto dest:inos_has_sock_tag)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    37
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    38
lemma init_inumos_prop2: "init_inum_of_socket s = Some im \<Longrightarrow> init_itag_of_inum im = Some Tag_TCP_SOCK \<or> init_itag_of_inum im = Some Tag_UDP_SOCK"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    39
apply (auto dest!:inos_has_sock_tag) 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    40
apply (case_tac tag, simp+)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    41
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    42
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    43
lemma init_inumos_prop3: "init_inum_of_socket s = Some im \<Longrightarrow> init_itag_of_inum im \<noteq> None"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    44
by (auto dest:inos_has_sock_tag)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    45
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    46
lemma init_inumos_prop4: "init_inum_of_socket s = Some im \<Longrightarrow> \<exists> tag. init_itag_of_inum im = Some tag \<and> is_sock_itag tag"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    47
by (auto dest!:inos_has_sock_tag) 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    48
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    49
lemmas init_inum_of_socket_props = init_inumos_prop1 init_inumos_prop2 init_inumos_prop3 init_inumos_prop4
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    50
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    51
lemma init_sockets_prop1: "(p, fd) \<in> init_sockets \<Longrightarrow> p \<in> init_procs"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    52
by (auto dest: init_socket_has_inode)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    53
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    54
lemma init_sockets_prop2: "(p, fd) \<in> init_sockets \<Longrightarrow> fd \<in> init_fds_of_proc p"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    55
by (auto dest:init_socket_has_inode)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    56
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    57
lemma init_sockets_prop3: "s \<in> init_sockets \<Longrightarrow> \<exists> im. init_inum_of_socket s = Some im"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    58
by (case_tac s, auto dest:init_socket_has_inode)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    59
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    60
lemma init_sockets_prop4: "s \<in> init_sockets \<Longrightarrow> init_inum_of_socket s \<noteq> None"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    61
by (simp add:init_sockets_prop3)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    62
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    63
lemma init_sockets_prop5: "s \<in> init_sockets = (s \<in> current_sockets [])"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    64
apply (simp add:current_sockets_def, rule iffI)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    65
using init_sockets_prop4 inos_has_sock_tag apply auto
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    66
apply (case_tac s, auto)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    67
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    68
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    69
lemmas init_sockets_props = init_sockets_prop1 init_sockets_prop2 init_sockets_prop3 init_sockets_prop4 init_sockets_prop5
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    70
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    71
lemma is_init_file_prop1: "is_init_file f = (f \<in> init_files \<and> is_file [] f)"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    72
by (auto simp add:is_init_file_def is_file_def init_inum_of_file_props split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    73
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    74
lemma is_init_file_prop2: "is_init_file f = (init_alive (O_file f))"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    75
by (auto simp add:is_init_file_def is_file_def init_inum_of_file_props split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    76
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    77
lemmas is_init_file_props = is_init_file_prop1 is_init_file_prop2
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    78
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    79
lemma is_init_dir_prop1: "is_init_dir f = (f \<in> init_files \<and> is_dir [] f)"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    80
by (auto simp add:is_init_dir_def is_dir_def init_inum_of_file_props split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    81
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    82
lemma is_init_dir_prop2: "is_init_dir f = (init_alive (O_dir f))"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    83
by (auto simp add:is_init_dir_def is_dir_def init_inum_of_file_props split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    84
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    85
lemmas is_init_dir_props = is_init_dir_prop1 is_init_dir_prop2
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    86
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    87
lemma is_init_udp_sock_prop1: "is_init_udp_sock s = (s \<in> init_sockets \<and> is_udp_sock [] s)"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    88
apply (auto simp add:is_init_udp_sock_def is_udp_sock_def init_inum_of_socket_props 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    89
                dest:init_socket_has_inode split:option.splits)       
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    90
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    91
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    92
lemma is_init_udp_sock_prop2: "is_init_udp_sock s = (init_alive (O_udp_sock s))"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    93
apply (auto simp add:is_init_udp_sock_def is_udp_sock_def init_inum_of_socket_props 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    94
                dest:init_socket_has_inode split:option.splits)       
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    95
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    96
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    97
lemmas is_init_udp_sock_props = is_init_udp_sock_prop1 is_init_udp_sock_prop2
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    98
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    99
lemma is_init_tcp_sock_prop1: "is_init_tcp_sock s = (s \<in> init_sockets \<and> is_tcp_sock [] s)"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   100
apply (auto simp add:is_init_tcp_sock_def is_tcp_sock_def init_inum_of_socket_props 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   101
                dest:init_socket_has_inode split:option.splits)       
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   102
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   103
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   104
lemma is_init_tcp_sock_prop2: "is_init_tcp_sock s = (init_alive (O_tcp_sock s))"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   105
apply (auto simp add:is_init_tcp_sock_def is_tcp_sock_def init_inum_of_socket_props 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   106
                dest:init_socket_has_inode split:option.splits)       
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   107
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   108
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   109
lemmas is_init_tcp_sock_props = is_init_tcp_sock_prop1 is_init_tcp_sock_prop2
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   110
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   111
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   112
lemma init_parent_file_prop1: 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   113
  "\<lbrakk>parent f = Some pf; f \<in> init_files\<rbrakk> \<Longrightarrow> is_init_dir pf"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   114
apply (frule parent_file_in_init, simp, frule_tac f = pf in init_files_prop3)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   115
apply (clarsimp, drule_tac im = y in init_parentf_is_dir, simp+)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   116
by (simp add:is_init_dir_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   117
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   118
lemma init_parent_file_prop1': 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   119
  "a # f \<in> init_files \<Longrightarrow> is_init_dir f"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   120
by (rule_tac pf = f in init_parent_file_prop1, auto)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   121
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   122
lemma init_parent_file_prop2:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   123
  "\<lbrakk>parent f = Some pf; is_init_file f\<rbrakk> \<Longrightarrow> is_init_dir pf"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   124
by (rule init_parent_file_prop1, simp, simp add: is_init_file_props)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   125
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   126
lemma init_parent_file_prop2':
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   127
  "is_init_file (f#pf) \<Longrightarrow> is_init_dir pf"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   128
apply (rule init_parent_file_prop2)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   129
by auto
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   130
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   131
lemma init_parent_file_prop3:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   132
  "\<lbrakk>parent f = Some pf; is_init_dir f\<rbrakk> \<Longrightarrow> is_init_dir pf"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   133
by (rule init_parent_file_prop1, simp, simp add: is_init_dir_props)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   134
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   135
lemma init_parent_file_prop3':
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   136
  "is_init_dir (f#pf) \<Longrightarrow> is_init_dir pf"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   137
apply (rule init_parent_file_prop3)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   138
by auto
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   139
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   140
lemma parent_file_in_init': "a # f \<in> init_files \<Longrightarrow> f \<in> init_files"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   141
by (subgoal_tac "parent (a # f) = Some f", drule parent_file_in_init, auto)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   142
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   143
lemmas init_parent_file_props = parent_file_in_init init_parent_file_prop1 parent_file_in_init' init_parent_file_prop1' init_parent_file_prop2 init_parent_file_prop2' init_parent_file_prop3 init_parent_file_prop3'
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   144
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   145
lemma root_in_filesystem:  "[] \<in> init_files" 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   146
using init_files_prop1 root_is_dir by auto
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   147
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   148
lemma root_is_init_dir: "is_init_dir []"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   149
using root_is_dir
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   150
by (auto simp add:is_init_dir_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   151
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   152
lemma root_is_init_dir': "is_init_file [] \<Longrightarrow> False"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   153
using root_is_dir
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   154
by (auto simp:is_init_file_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   155
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   156
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   157
lemma init_files_hung_prop1: "f \<in> init_files_hung_by_del \<Longrightarrow> f \<in> init_files"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   158
by (auto dest:init_files_hung_valid)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   159
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   160
lemma init_files_hung_prop2: "f \<in> init_files_hung_by_del \<Longrightarrow> \<exists> p fd. init_file_of_proc_fd p fd = Some f"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   161
by (auto dest:init_files_hung_valid)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   162
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   163
lemmas init_files_hung_by_del_props = init_files_hung_prop1 init_files_hung_prop2 init_files_hung_valid'
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   164
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   165
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   166
lemma init_fds_of_proc_prop1: "fd \<in> init_fds_of_proc p \<Longrightarrow> p \<in> init_procs"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   167
by (auto dest!:init_procfds_valid)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   168
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   169
lemma init_fds_of_proc_prop2: "fd \<in> init_fds_of_proc p \<Longrightarrow> (\<exists> f \<in> init_files. init_file_of_proc_fd p fd = Some f) \<or> (p, fd) \<in> init_sockets"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   170
by (auto dest:init_procfds_valid)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   171
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   172
lemmas init_fds_of_proc_props = init_fds_of_proc_prop1 init_fds_of_proc_prop2
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   173
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   174
lemma init_filefd_prop1: "init_file_of_proc_fd p fd = Some f \<Longrightarrow> f \<in> init_files"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   175
by (auto dest!:init_filefd_valid intro:init_files_prop1)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   176
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   177
lemma init_filefd_prop2: "init_file_of_proc_fd p fd = Some f \<Longrightarrow> p \<in> init_procs"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   178
by (auto dest:init_filefd_valid)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   179
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   180
lemma init_filefd_prop3: "init_file_of_proc_fd p fd = Some f \<Longrightarrow> fd \<in> init_fds_of_proc p"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   181
by (auto dest:init_filefd_valid)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   182
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   183
lemma init_filefd_prop4: "init_file_of_proc_fd p fd = Some f \<Longrightarrow> \<exists> flags. init_oflags_of_proc_fd p fd = Some flags"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   184
by (auto dest:init_filefd_valid)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   185
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   186
lemma init_filefd_prop5: "init_file_of_proc_fd p fd = Some f \<Longrightarrow> is_init_file f"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   187
by (auto dest:init_filefd_valid simp:is_init_file_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   188
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   189
lemmas init_file_of_proc_fd_props = init_filefd_prop1 init_filefd_prop2 init_filefd_prop3 init_filefd_prop4 init_filefd_prop5
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   190
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   191
lemma init_oflags_prop1: "init_oflags_of_proc_fd p fd = Some flags \<Longrightarrow> p \<in> init_procs"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   192
by (auto dest:init_fileflag_valid init_file_of_proc_fd_props)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   193
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   194
lemma init_oflags_prop2: "init_oflags_of_proc_fd p fd = Some flags \<Longrightarrow> fd \<in> init_fds_of_proc p"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   195
by (auto dest:init_fileflag_valid init_file_of_proc_fd_props)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   196
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   197
lemmas init_oflags_of_proc_fd_props = init_oflags_prop1 init_oflags_prop2 init_fileflag_valid
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   198
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   199
(*
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   200
lemma init_socketstate_prop1: "s \<in> init_sockets \<Longrightarrow> init_socket_state s \<noteq> None"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   201
using init_socket_has_state
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   202
by (case_tac s, simp add:bidirect_in_init_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   203
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   204
lemma init_socketstate_prop2: "s \<in> init_sockets \<Longrightarrow> \<exists> t. init_socket_state s = Some t"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   205
using init_socket_has_state
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   206
by (case_tac s, simp add:bidirect_in_init_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   207
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   208
lemma init_socketstate_prop3: "init_socket_state s = Some t \<Longrightarrow> s \<in> init_sockets"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   209
using init_socket_has_state
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   210
by (case_tac s, simp add:bidirect_in_init_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   211
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   212
lemmas init_socket_state_props = init_socketstate_prop1 init_socketstate_prop2 init_socketstate_prop3
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   213
*)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   214
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   215
lemma init_inum_sock_file_noninter: "\<lbrakk>init_inum_of_socket s = Some im; init_inum_of_file f = Some im\<rbrakk> \<Longrightarrow> False"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   216
apply (frule init_inumof_prop1, erule exE, drule init_inumof_prop3, simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   217
apply (frule init_inumos_prop2)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   218
apply (case_tac tag, simp+)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   219
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   220
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   221
lemma init_parent_file_has_inum: "\<lbrakk>parent f = Some pf; init_inum_of_file f = Some im\<rbrakk> \<Longrightarrow> \<exists> im. init_inum_of_file pf = Some im"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   222
by (drule init_files_prop1, drule parent_file_in_init, simp, simp add:init_files_props)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   223
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   224
lemma init_file_has_no_son': "\<lbrakk>init_itag_of_inum im = Some Tag_FILE; init_inum_of_file f = Some im; parent f' = Some f\<rbrakk> \<Longrightarrow> init_inum_of_file f' = None"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   225
apply (drule init_file_no_son, simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   226
by (case_tac "init_inum_of_file f'", auto dest:init_files_prop1)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   227
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   228
lemma init_parent_file_is_dir': "\<lbrakk>parent f = Some pf; init_inum_of_file f = Some im; init_inum_of_file pf = Some ipm\<rbrakk> \<Longrightarrow> init_itag_of_inum ipm = Some Tag_DIR"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   229
by (drule init_parentf_is_dir, auto dest:init_files_prop1)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   230
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   231
lemma init_file_hung_has_no_son: "\<lbrakk>f \<in> init_files_hung_by_del; parent f' = Some f; init_inum_of_file f' = Some im\<rbrakk> \<Longrightarrow> False"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   232
apply (frule init_files_hung_prop1, drule init_file_has_inum, erule exE)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   233
apply (drule init_files_hung_valid', simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   234
apply (frule init_parent_file_is_dir', simp+)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   235
apply (drule init_files_prop1)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   236
apply (erule_tac x = f' in allE, simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   237
by (case_tac f', simp_all add:no_junior_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   238
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   239
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   240
end
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   241
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   242
context flask begin
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   243
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   244
lemma init_alive_prop: "init_alive obj = alive [] obj"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   245
apply (case_tac obj, simp_all add:is_init_file_props is_init_dir_props is_init_tcp_sock_props
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   246
         is_init_udp_sock_props init_files_props init_sockets_props)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   247
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   248
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   249
lemma init_alive_proc: "p \<in> init_procs \<Longrightarrow> init_alive (O_proc p)" by simp
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   250
lemma init_alive_file: "is_init_file f \<Longrightarrow> init_alive (O_file f)" by simp
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   251
lemma init_alive_dir: "is_init_dir f \<Longrightarrow> init_alive (O_dir f)" by simp
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   252
lemma init_alive_fd: "fd \<in> init_fds_of_proc p \<Longrightarrow> init_alive (O_fd p fd)" by simp
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   253
lemma init_alive_tcp: "is_init_tcp_sock s \<Longrightarrow> init_alive (O_tcp_sock s)" by simp
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   254
lemma init_alive_udp: "is_init_udp_sock s \<Longrightarrow> init_alive (O_udp_sock s)" by simp
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   255
lemma init_alive_node: "n \<in> init_nodes \<Longrightarrow> init_alive (O_node n)" by simp
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   256
lemma init_alive_shm: "h \<in> init_shms \<Longrightarrow> init_alive (O_shm h)" by simp
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   257
lemma init_alive_msgq: "q \<in> init_msgqs \<Longrightarrow> init_alive (O_msgq q)" by simp
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   258
lemma init_alive_msg: "\<lbrakk>m \<in> set (init_msgs_of_queue q); q \<in> init_msgqs\<rbrakk>
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   259
  \<Longrightarrow> init_alive (O_msg q m)" by simp
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   260
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   261
lemmas init_alive_intros = init_alive_proc init_alive_file init_alive_dir init_alive_fd 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   262
  init_alive_tcp init_alive_udp init_alive_node init_alive_shm init_alive_msgq init_alive_msg
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   263
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   264
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   265
lemma init_file_type_prop1: "is_init_file f \<Longrightarrow> \<exists> t. init_type_of_obj (O_file f) = Some t"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   266
using init_obj_has_type
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   267
by (auto simp:is_init_file_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   268
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   269
lemma init_file_type_prop2: "is_init_file f \<Longrightarrow> init_type_of_obj (O_file f) \<noteq> None"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   270
by (simp add:init_file_type_prop1)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   271
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   272
lemma init_file_type_prop3: "init_type_of_obj (O_file f) = Some t \<Longrightarrow> f \<in> init_files"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   273
apply (drule init_type_has_obj) 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   274
by (simp add:is_init_file_def init_inum_of_file_props split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   275
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   276
lemma init_file_type_prop4: "init_type_of_obj (O_file f) = Some t \<Longrightarrow> is_init_file f"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   277
apply (drule init_type_has_obj) 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   278
by (simp add:is_init_file_def init_inum_of_file_props split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   279
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   280
lemmas init_file_types_props = init_file_type_prop1 init_file_type_prop2 init_file_type_prop3 init_file_type_prop4
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   281
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   282
lemma init_dir_type_prop1: "is_init_dir f \<Longrightarrow> \<exists> t. init_type_of_obj (O_dir f) = Some t"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   283
using init_obj_has_type
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   284
by (auto simp:is_init_dir_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   285
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   286
lemma init_dir_type_prop2: "is_init_dir f \<Longrightarrow> init_type_of_obj (O_dir f) \<noteq> None"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   287
by (simp add:init_dir_type_prop1)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   288
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   289
lemma init_dir_type_prop3: "init_type_of_obj (O_dir f) = Some t \<Longrightarrow> f \<in> init_files"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   290
apply (drule init_type_has_obj) 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   291
by (simp add:is_init_dir_def init_inum_of_file_props split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   292
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   293
lemma init_dir_type_prop4: "init_type_of_obj (O_dir f) = Some t \<Longrightarrow> is_init_dir f"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   294
apply (drule init_type_has_obj) 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   295
by (simp add:is_init_dir_def init_inum_of_file_props split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   296
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   297
lemmas init_dir_types_props = init_dir_type_prop1 init_dir_type_prop2 init_dir_type_prop3 init_dir_type_prop4
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   298
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   299
lemma init_procrole_prop1: "init_role_of_proc p = Some r \<Longrightarrow> p \<in> init_procs"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   300
using init_proc_has_role
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   301
by (auto simp:bidirect_in_init_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   302
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   303
lemma init_procrole_prop2: "p \<in> init_procs \<Longrightarrow> \<exists> r. init_role_of_proc p = Some r"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   304
using init_proc_has_role
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   305
by (auto simp:bidirect_in_init_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   306
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   307
lemma init_procrole_prop3: "p \<in> init_procs \<Longrightarrow> init_role_of_proc p \<noteq> None"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   308
using init_proc_has_role
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   309
by (auto simp:bidirect_in_init_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   310
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   311
lemmas init_role_of_proc_props = init_procrole_prop1 init_procrole_prop2 init_procrole_prop3
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   312
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   313
lemma init_file_user_prop1: "is_init_file f \<Longrightarrow> \<exists> t. init_user_of_obj (O_file f) = Some t"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   314
apply (simp only: is_init_file_prop2)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   315
by (drule init_obj_has_user, auto)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   316
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   317
lemma init_file_user_prop2: "is_init_file f \<Longrightarrow> init_user_of_obj (O_file f) \<noteq> None"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   318
by (simp add:init_file_user_prop1)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   319
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   320
lemma init_file_user_prop3: "init_user_of_obj (O_file f) = Some t \<Longrightarrow> f \<in> init_files"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   321
apply (drule init_user_has_obj) 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   322
by (simp add:is_init_file_def init_inum_of_file_props split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   323
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   324
lemma init_file_user_prop4: "init_user_of_obj (O_file f) = Some t \<Longrightarrow> is_init_file f"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   325
apply (drule init_user_has_obj) 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   326
by (simp add:is_init_file_def init_inum_of_file_props split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   327
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   328
lemma init_file_user_prop5: "init_user_of_obj (O_file f) = Some u \<Longrightarrow> u \<in> init_users"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   329
by (simp add:init_user_has_obj)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   330
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   331
lemmas init_file_users_props = init_file_user_prop1 init_file_user_prop2 init_file_user_prop3 init_file_user_prop4 init_file_user_prop5
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   332
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   333
lemma init_dir_user_prop1: "is_init_dir f \<Longrightarrow> \<exists> t. init_user_of_obj (O_dir f) = Some t"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   334
apply (simp only: is_init_dir_prop2)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   335
by (drule init_obj_has_user, auto)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   336
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   337
lemma init_dir_user_prop2: "is_init_dir f \<Longrightarrow> init_user_of_obj (O_dir f) \<noteq> None"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   338
by (simp add:init_dir_user_prop1)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   339
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   340
lemma init_dir_user_prop3: "init_user_of_obj (O_dir f) = Some t \<Longrightarrow> f \<in> init_files"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   341
apply (drule init_user_has_obj) 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   342
by (simp add:is_init_dir_def init_inum_of_file_props split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   343
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   344
lemma init_dir_user_prop4: "init_user_of_obj (O_dir f) = Some t \<Longrightarrow> is_init_dir f"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   345
apply (drule init_user_has_obj) 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   346
by (simp add:is_init_dir_def init_inum_of_file_props split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   347
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   348
lemma init_dir_user_prop5: "init_user_of_obj (O_dir f) = Some u \<Longrightarrow> u \<in> init_users"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   349
by (simp add:init_user_has_obj)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   350
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   351
lemmas init_dir_users_props = init_dir_user_prop1 init_dir_user_prop2 init_dir_user_prop3 init_dir_user_prop4 init_dir_user_prop5
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   352
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   353
end
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   354
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   355
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   356
context tainting_s begin
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   357
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   358
lemma init_file_has_ctxt:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   359
  "is_init_file f \<Longrightarrow> \<exists> sec. init_sectxt_of_obj (O_file f) = Some sec"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   360
apply (simp add:init_sectxt_of_obj_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   361
apply (rule conjI, rule init_obj_has_user, simp add:is_init_file_props)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   362
by (simp add:init_file_types_props)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   363
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   364
lemma init_file_has_ctxt':
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   365
  "init_sectxt_of_obj (O_file f) = None \<Longrightarrow> \<not> is_init_file f"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   366
by (rule notI, drule init_file_has_ctxt, simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   367
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   368
lemma init_dir_has_ctxt:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   369
  "is_init_dir f \<Longrightarrow> \<exists> sec. init_sectxt_of_obj (O_dir f) = Some sec"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   370
apply (simp add:init_sectxt_of_obj_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   371
apply (rule conjI, rule init_obj_has_user, simp add:is_init_dir_props)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   372
by (simp add:init_dir_types_props)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   373
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   374
lemma init_dir_has_ctxt':
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   375
  "init_sectxt_of_obj (O_dir f) = None \<Longrightarrow> \<not> is_init_dir f"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   376
by (rule notI, drule init_dir_has_ctxt, simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   377
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   378
lemma init_proc_has_ctxt:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   379
  "p \<in> init_procs \<Longrightarrow> \<exists> sec. init_sectxt_of_obj (O_proc p) = Some sec"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   380
apply (simp add:init_sectxt_of_obj_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   381
apply (rule conjI, rule init_obj_has_user, simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   382
apply (frule init_alive_proc, drule init_obj_has_type)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   383
by (drule init_procrole_prop2, auto)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   384
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   385
lemma init_proc_has_ctxt':
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   386
  "init_sectxt_of_obj (O_proc p) = None \<Longrightarrow> p \<notin> init_procs"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   387
by (rule notI, drule init_proc_has_ctxt, simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   388
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   389
lemma init_fd_has_ctxt:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   390
  "fd \<in> init_fds_of_proc p \<Longrightarrow> \<exists> sec. init_sectxt_of_obj (O_fd p fd) = Some sec"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   391
apply (simp add:init_sectxt_of_obj_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   392
apply (rule conjI, rule init_obj_has_user, simp add:is_init_dir_props)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   393
apply (drule init_alive_intros)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   394
apply (drule init_obj_has_type, clarsimp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   395
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   396
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   397
lemma init_fd_has_ctxt':
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   398
  "init_sectxt_of_obj (O_fd p fd) = None \<Longrightarrow> fd \<notin> init_fds_of_proc p"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   399
by (rule notI, drule init_fd_has_ctxt, simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   400
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   401
lemma init_node_has_ctxt:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   402
  "n \<in> init_nodes \<Longrightarrow> \<exists> sec. init_sectxt_of_obj (O_node n) = Some sec"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   403
apply (simp add:init_sectxt_of_obj_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   404
apply (rule conjI, rule init_obj_has_user, simp add:is_init_dir_props)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   405
apply (drule init_alive_intros)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   406
apply (drule init_obj_has_type, clarsimp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   407
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   408
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   409
lemma init_node_has_ctxt':
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   410
  "init_sectxt_of_obj (O_node n) = None \<Longrightarrow> n \<notin> init_nodes"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   411
by (rule notI, drule init_node_has_ctxt, simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   412
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   413
lemma init_tcp_has_ctxt:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   414
  "is_init_tcp_sock s \<Longrightarrow> \<exists> sec. init_sectxt_of_obj (O_tcp_sock s) = Some sec"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   415
apply (simp add:init_sectxt_of_obj_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   416
apply (rule conjI, rule init_obj_has_user, simp add:is_init_dir_props)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   417
apply (drule init_alive_intros)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   418
apply (drule init_obj_has_type, clarsimp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   419
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   420
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   421
lemma init_tcp_has_ctxt':
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   422
  "init_sectxt_of_obj (O_tcp_sock s) = None \<Longrightarrow> \<not> is_init_tcp_sock s"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   423
by (rule notI, drule init_tcp_has_ctxt, simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   424
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   425
lemma init_udp_has_ctxt:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   426
  "is_init_udp_sock s \<Longrightarrow> \<exists> sec. init_sectxt_of_obj (O_udp_sock s) = Some sec"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   427
apply (simp add:init_sectxt_of_obj_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   428
apply (rule conjI, rule init_obj_has_user, simp add:is_init_dir_props)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   429
by (drule init_alive_intros, drule init_obj_has_type, clarsimp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   430
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   431
lemma init_udp_has_ctxt':
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   432
  "init_sectxt_of_obj (O_udp_sock s) = None \<Longrightarrow> \<not> is_init_udp_sock s"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   433
by (rule notI, drule init_udp_has_ctxt, simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   434
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   435
lemma init_shm_has_ctxt:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   436
  "h \<in> init_shms \<Longrightarrow> \<exists> sec. init_sectxt_of_obj (O_shm h) = Some sec"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   437
apply (simp add:init_sectxt_of_obj_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   438
apply (rule conjI, rule init_obj_has_user, simp add:is_init_dir_props)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   439
by (drule init_alive_intros, drule init_obj_has_type, clarsimp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   440
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   441
lemma init_shm_has_ctxt':
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   442
  "init_sectxt_of_obj (O_shm h) = None \<Longrightarrow> h \<notin> init_shms"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   443
by (rule notI, drule init_shm_has_ctxt, simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   444
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   445
lemma init_msgq_has_ctxt:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   446
  "q \<in> init_msgqs \<Longrightarrow> \<exists> sec. init_sectxt_of_obj (O_msgq q) = Some sec"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   447
apply (simp add:init_sectxt_of_obj_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   448
apply (rule conjI, rule init_obj_has_user, simp add:is_init_dir_props)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   449
by (drule init_alive_intros, drule init_obj_has_type, clarsimp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   450
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   451
lemma init_msgq_has_ctxt':
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   452
  "init_sectxt_of_obj (O_msgq q) = None \<Longrightarrow> q \<notin> init_msgqs"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   453
by (rule notI, drule init_msgq_has_ctxt, simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   454
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   455
lemma init_msg_has_ctxt:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   456
  "\<lbrakk>m \<in> set (init_msgs_of_queue q); q \<in> init_msgqs\<rbrakk> \<Longrightarrow> \<exists> sec. init_sectxt_of_obj (O_msg q m) = Some sec"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   457
apply (simp add:init_sectxt_of_obj_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   458
apply (rule conjI, rule init_obj_has_user, simp add:is_init_dir_props)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   459
by (drule init_alive_intros, simp, drule init_obj_has_type, clarsimp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   460
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   461
lemma init_msg_has_ctxt':
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   462
  "init_sectxt_of_obj (O_msg q m) = None \<Longrightarrow> m \<notin> set (init_msgs_of_queue q) \<or> q \<notin> init_msgqs"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   463
by (auto dest:init_msg_has_ctxt)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   464
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   465
lemma init_rootf_has_ctxt:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   466
  "\<exists> sec. init_sectxt_of_obj (O_dir []) = Some sec"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   467
apply (rule init_dir_has_ctxt, simp add:is_init_dir_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   468
using root_is_dir by auto
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   469
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   470
lemma init_rootf_has_ctxt':
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   471
  "init_sectxt_of_obj (O_dir []) = None \<Longrightarrow> False" 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   472
using init_rootf_has_ctxt by auto
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   473
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   474
lemmas init_has_ctxt = init_file_has_ctxt init_dir_has_ctxt init_proc_has_ctxt init_fd_has_ctxt
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   475
  init_node_has_ctxt init_tcp_has_ctxt init_udp_has_ctxt init_shm_has_ctxt init_msgq_has_ctxt
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   476
  init_msg_has_ctxt init_rootf_has_ctxt
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   477
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   478
lemmas init_has_ctxt' = init_file_has_ctxt' init_dir_has_ctxt' init_proc_has_ctxt' init_fd_has_ctxt'
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   479
  init_node_has_ctxt' init_tcp_has_ctxt' init_udp_has_ctxt' init_shm_has_ctxt' init_msgq_has_ctxt'
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   480
  init_msg_has_ctxt' init_rootf_has_ctxt'
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   481
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   482
lemma sec_of_root_valid:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   483
  "init_sectxt_of_obj (O_dir []) = Some sec_of_root"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   484
using init_rootf_has_ctxt
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   485
by (auto simp:init_sectxt_of_obj_def sec_of_root_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   486
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   487
lemma sec_of_root_is_tuple:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   488
  "\<exists> u t. sec_of_root = (u, R_object, t)"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   489
using sec_of_root_valid
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   490
by (auto simp:sec_of_root_def init_sectxt_of_obj_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   491
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   492
lemma sroot_valid:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   493
  "init_cf2sfile [] = Some sroot"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   494
by (simp add:init_cf2sfile_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   495
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   496
lemma sroot_valid':
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   497
  "cf2sfile s [] False = Some sroot"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   498
by (simp add:cf2sfile_def)  
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   499
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   500
lemma init_sectxt_prop:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   501
  "sectxt_of_obj [] obj = init_sectxt_of_obj obj"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   502
apply (auto simp:init_sectxt_of_obj_def sectxt_of_obj_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   503
apply (case_tac [!] obj, simp+)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   504
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   505
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   506
lemma init_sectxt_prop2:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   507
  "init_sectxt_of_obj obj = Some sec \<Longrightarrow> init_alive obj"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   508
by (case_tac obj, auto simp:init_sectxt_of_obj_def split:option.splits dest:init_type_has_obj)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   509
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   510
lemma init_dir_has_seclist:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   511
  "is_init_dir f \<Longrightarrow> \<exists> seclist. get_parentfs_ctxts [] f = Some seclist"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   512
apply (induct f)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   513
apply (simp only:get_parentfs_ctxts.simps init_sectxt_prop)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   514
using init_rootf_has_ctxt apply (auto)[1]
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   515
apply (frule init_parent_file_prop3', simp del:get_parentfs_ctxts.simps)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   516
apply (erule exE, drule init_dir_has_ctxt)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   517
by (auto simp add:init_sectxt_prop)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   518
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   519
lemma is_init_file_dir_prop1:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   520
  "is_init_dir f \<Longrightarrow> \<not> is_init_file f"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   521
by (auto simp:is_init_dir_def is_init_file_def split:option.splits t_inode_tag.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   522
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   523
lemma is_init_file_dir_prop2:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   524
  "is_init_file f \<Longrightarrow> \<not> is_init_dir f"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   525
by (auto simp:is_init_dir_def is_init_file_def split:option.splits t_inode_tag.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   526
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   527
lemma is_init_file_dir_prop3:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   528
  "\<lbrakk>is_init_dir f; is_init_file f\<rbrakk> \<Longrightarrow> False"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   529
by (auto simp:is_init_dir_def is_init_file_def split:option.splits t_inode_tag.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   530
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   531
lemma is_init_file_dir_prop4:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   532
  "\<lbrakk>is_init_file f; is_init_dir f\<rbrakk> \<Longrightarrow> False"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   533
by (auto simp:is_init_dir_def is_init_file_def split:option.splits t_inode_tag.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   534
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   535
lemmas is_init_file_dir_props = is_init_file_dir_prop1 is_init_file_dir_prop2 is_init_file_dir_prop3 is_init_file_dir_prop4
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   536
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   537
lemma init_dir_has_sfile:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   538
  "is_init_dir f \<Longrightarrow> \<exists> sf. init_cf2sfile f = Some sf"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   539
apply (case_tac f)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   540
using init_rootf_has_ctxt apply (auto)[1]
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   541
apply (simp add:sec_of_root_valid sroot_valid sroot_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   542
apply (simp, frule init_parent_file_prop3')
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   543
apply (frule_tac f = list in init_dir_has_seclist)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   544
apply (frule_tac f = list in init_dir_has_ctxt)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   545
apply (frule_tac f = "a # list" in init_dir_has_ctxt)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   546
apply ((erule exE)+, case_tac sec, auto simp:init_cf2sfile_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   547
by (auto simp:is_init_file_def is_init_dir_def split:option.splits t_inode_tag.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   548
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   549
lemma init_file_has_sfile:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   550
  "is_init_file f \<Longrightarrow> \<exists> sf. init_cf2sfile f = Some sf"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   551
apply (case_tac f)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   552
apply (simp, drule root_is_init_dir', simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   553
apply (simp, frule init_parent_file_prop2')
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   554
apply (frule_tac f = list in init_dir_has_seclist)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   555
apply (frule_tac f = list in init_dir_has_ctxt)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   556
apply (frule_tac f = "a # list" in init_file_has_ctxt)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   557
by ((erule exE)+, case_tac sec, auto simp:init_cf2sfile_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   558
  
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   559
lemma init_shm_has_sshm:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   560
  "h \<in> init_shms \<Longrightarrow> \<exists> sh. init_ch2sshm h = Some sh"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   561
apply (drule init_shm_has_ctxt)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   562
by (auto simp add:init_ch2sshm_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   563
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   564
lemma init_proc_has_sproc:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   565
  "p \<in> init_procs \<Longrightarrow> \<exists> sp. init_cp2sproc p = Some sp"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   566
apply (frule init_proc_has_ctxt, erule exE)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   567
apply (simp add:init_cp2sproc_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   568
by (case_tac sec, simp+)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   569
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   570
lemma init_cqm2sms_has_sms_aux:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   571
  "\<forall> m \<in> set ms. init_sectxt_of_obj (O_msg q m) \<noteq> None \<Longrightarrow> (\<exists> sms. init_cqm2sms q ms = Some sms)"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   572
by (induct ms, auto split:option.splits simp:init_cm2smsg_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   573
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   574
lemma init_cqm2sms_has_sms: 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   575
  "q \<in> init_msgqs \<Longrightarrow> \<exists> sms. init_cqm2sms q (init_msgs_of_queue q) = Some sms"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   576
apply (rule init_cqm2sms_has_sms_aux)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   577
using init_msg_has_ctxt by auto
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   578
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   579
lemma init_msgq_has_smsgq:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   580
  "q \<in> init_msgqs \<Longrightarrow> \<exists> sq. init_cq2smsgq q = Some sq"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   581
apply (frule init_msgq_has_ctxt, erule exE, drule init_cqm2sms_has_sms, erule exE)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   582
apply (simp add:init_cq2smsgq_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   583
by (case_tac sec, simp+)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   584
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   585
lemma cf2sfile_nil_prop1:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   586
  "f \<in> init_files \<Longrightarrow> cf2sfile [] f (is_init_file f) = init_cf2sfile f"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   587
apply (case_tac f)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   588
apply (simp add:init_sectxt_prop cf2sfile_def init_cf2sfile_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   589
apply (rule notI, drule root_is_init_dir', simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   590
apply (auto simp:init_sectxt_prop cf2sfile_def init_cf2sfile_def split:option.splits dest!:init_has_ctxt')
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   591
apply (auto simp:is_init_file_def is_init_dir_def split:option.splits t_inode_tag.splits
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   592
            dest:init_file_has_inum inof_has_file_tag)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   593
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   594
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   595
lemma init_file_dir_conflict: "\<lbrakk>is_init_file f; is_init_dir f\<rbrakk> \<Longrightarrow> False"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   596
by (auto simp:is_init_file_def is_init_dir_def split:option.splits t_inode_tag.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   597
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   598
lemma init_file_dir_conflict1: "is_init_file f \<Longrightarrow> \<not> is_init_dir f"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   599
by (auto simp:is_init_file_def is_init_dir_def split:option.splits t_inode_tag.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   600
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   601
lemma init_file_dir_conflict2: "is_init_dir f \<Longrightarrow> \<not> is_init_file f"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   602
by (auto simp:is_init_file_def is_init_dir_def split:option.splits t_inode_tag.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   603
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   604
lemma init_sec_file_dir:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   605
  "\<lbrakk>init_sectxt_of_obj (O_file f) = Some x; init_sectxt_of_obj (O_dir f) = Some y\<rbrakk> \<Longrightarrow> False"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   606
apply (drule init_sectxt_prop2)+
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   607
apply (auto intro:init_file_dir_conflict)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   608
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   609
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   610
lemma cf2sfile_nil_prop2:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   611
  "f \<in> init_files \<Longrightarrow> cf2sfile [] f (\<not> is_init_file f) = None"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   612
apply (case_tac f)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   613
apply (simp add:init_sectxt_prop cf2sfile_def init_cf2sfile_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   614
apply (rule notI, drule root_is_init_dir', simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   615
apply (auto simp:init_sectxt_prop cf2sfile_def init_cf2sfile_def split:option.splits dest!:init_has_ctxt')
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   616
apply (auto simp:is_init_file_def is_init_dir_def split:option.splits t_inode_tag.splits
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   617
            dest:init_file_has_inum inof_has_file_tag init_sec_file_dir)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   618
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   619
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   620
lemma cf2sfile_nil_prop:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   621
  "f \<in> init_files \<Longrightarrow> cf2sfile [] f = (\<lambda> b. if (b = is_init_file f) then init_cf2sfile f else None)"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   622
apply (frule cf2sfile_nil_prop1, frule cf2sfile_nil_prop2)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   623
by (rule ext, auto split:if_splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   624
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   625
lemma cf2sfile_nil_prop3:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   626
  "is_init_file f \<Longrightarrow> cf2sfile [] f True = init_cf2sfile f"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   627
by (simp add:is_init_file_prop1 cf2sfile_nil_prop)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   628
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   629
lemma cf2sfile_nil_prop4:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   630
  "is_init_dir f \<Longrightarrow> cf2sfile [] f False = init_cf2sfile f"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   631
apply (frule init_file_dir_conflict2)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   632
by (simp add:is_init_file_prop1 is_init_dir_prop1 cf2sfile_nil_prop)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   633
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   634
lemma cfs2sfiles_nil_prop:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   635
  "\<forall> f \<in> fs. f \<in> init_files \<Longrightarrow> cfs2sfiles [] fs = init_cfs2sfiles fs"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   636
apply (simp add:cfs2sfiles_def init_cfs2sfiles_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   637
using cf2sfile_nil_prop apply auto
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   638
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   639
lemma cfd2sfd_nil_prop:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   640
  "init_file_of_proc_fd p fd = Some f \<Longrightarrow> cfd2sfd [] p fd = init_cfd2sfd p fd"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   641
apply (simp add:cfd2sfd_def init_sectxt_prop init_cfd2sfd_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   642
apply (drule init_filefd_prop1, drule cf2sfile_nil_prop)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   643
by (auto split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   644
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   645
lemma cpfd2sfds_nil_prop:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   646
  "cpfd2sfds [] p = init_cfds2sfds p"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   647
apply (simp only:cpfd2sfds_def init_cfds2sfds_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   648
apply (rule set_eqI, rule iffI)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   649
apply (drule CollectD, rule CollectI, (erule exE)+)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   650
apply (rule_tac x = fd in exI, rule_tac x = sfd in exI, rule_tac x = f in exI) defer
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   651
apply (drule CollectD, rule CollectI, (erule exE)+)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   652
apply (rule_tac x = fd in exI, rule_tac x = sfd in exI, rule_tac x = f in exI)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   653
using cfd2sfd_nil_prop by auto
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   654
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   655
lemma ch2sshm_nil_prop:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   656
  "h \<in> init_shms \<Longrightarrow> ch2sshm [] h = init_ch2sshm h"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   657
by (simp add:ch2sshm_def init_sectxt_prop init_ch2sshm_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   658
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   659
lemma cph2spshs_nil_prop:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   660
  "cph2spshs [] p = init_cph2spshs p"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   661
apply (auto simp add:init_cph2spshs_def cph2spshs_def init_sectxt_prop)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   662
apply (rule_tac x = h in exI, simp) defer
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   663
apply (rule_tac x = h in exI, simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   664
by (auto simp:ch2sshm_nil_prop dest:init_procs_has_shm)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   665
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   666
lemma cp2sproc_nil_prop:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   667
  "p \<in> init_procs \<Longrightarrow> cp2sproc [] p = init_cp2sproc p"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   668
by (auto simp add:init_cp2sproc_def cp2sproc_def init_sectxt_prop cph2spshs_nil_prop cpfd2sfds_nil_prop
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   669
         split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   670
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   671
lemma tainted_nil_prop:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   672
  "(x \<in> tainted []) = (x \<in> seeds)"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   673
apply (rule iffI)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   674
apply (erule tainted.cases, simp+)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   675
apply (erule t_init)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   676
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   677
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   678
lemma msg_has_sec_imp_init: 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   679
  "init_sectxt_of_obj (O_msg q m) = Some sec \<Longrightarrow> q \<in> init_msgqs \<and> m \<in> set (init_msgs_of_queue q)"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   680
apply (simp add:init_sectxt_of_obj_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   681
by (drule init_type_has_obj, simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   682
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   683
lemma msgq_has_sec_imp_init:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   684
  "init_sectxt_of_obj (O_msgq q) = Some sec \<Longrightarrow> q \<in> init_msgqs"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   685
apply (simp add:init_sectxt_of_obj_def split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   686
by (drule init_type_has_obj, simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   687
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   688
lemma cm2smsg_nil_prop:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   689
  "cm2smsg [] q m = init_cm2smsg q m"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   690
by (auto simp add:init_sectxt_prop cm2smsg_def init_cm2smsg_def split:option.splits
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   691
             dest: msg_has_sec_imp_init intro:t_init elim:tainted.cases)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   692
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   693
lemma cqm2sms_nil_prop:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   694
  "cqm2sms [] q ms = init_cqm2sms q ms"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   695
apply (induct ms, simp)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   696
by (auto simp add:cm2smsg_def init_sectxt_prop tainted_nil_prop msg_has_sec_imp_init init_cm2smsg_def
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   697
         split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   698
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   699
lemma cq2smsga_nil_prop:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   700
  "cq2smsgq [] q = init_cq2smsgq q"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   701
by (auto simp add:cq2smsgq_def init_cq2smsgq_def init_sectxt_prop cqm2sms_nil_prop
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   702
            intro:msgq_has_sec_imp_init split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   703
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   704
lemma same_inode_nil_prop:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   705
  "same_inode_files [] f = init_same_inode_files f"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   706
by (simp add:same_inode_files_def init_same_inode_files_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   707
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   708
lemma init_same_inode_prop1:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   709
  "f \<in> init_files \<Longrightarrow> \<forall> f' \<in> init_same_inode_files f. f' \<in> init_files"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   710
apply (simp add:init_same_inode_files_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   711
apply (drule init_files_prop3)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   712
apply (auto simp:init_files_prop1)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   713
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   714
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   715
lemma co2sobj_nil_prop:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   716
  "init_alive obj \<Longrightarrow> co2sobj [] obj = init_obj2sobj obj"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   717
apply (case_tac obj)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   718
apply (auto simp add:cf2sfile_nil_prop cq2smsga_nil_prop cqm2sms_nil_prop tainted_nil_prop 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   719
                     cp2sproc_nil_prop cfs2sfiles_nil_prop is_init_dir_prop1 is_init_file_prop1
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   720
                     is_init_udp_sock_prop1 is_init_tcp_sock_prop1 ch2sshm_nil_prop 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   721
                     same_inode_nil_prop  cm2smsg_nil_prop dest:init_same_inode_prop1 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   722
               split:option.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   723
apply (rule_tac x = list in exI, simp add:init_same_inode_files_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   724
by (simp add:init_files_props)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   725
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   726
lemma s2ss_nil_prop:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   727
  "s2ss [] = init_static_state"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   728
using co2sobj_nil_prop init_alive_prop
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   729
by (auto simp add:s2ss_def init_static_state_def)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   730
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   731
end
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   732
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   733
(*<*)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   734
end
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
   735
(*>*)