1324 from this methd_C have "?filter (methd G (super c)) sig = Some m" |
1318 from this methd_C have "?filter (methd G (super c)) sig = Some m" |
1325 by simp |
1319 by simp |
1326 moreover |
1320 moreover |
1327 from wf cls_C False obtain sup where "class G (super c) = Some sup" |
1321 from wf cls_C False obtain sup where "class G (super c) = Some sup" |
1328 by (blast dest: wf_prog_cdecl wf_cdecl_supD is_acc_class_is_class) |
1322 by (blast dest: wf_prog_cdecl wf_cdecl_supD is_acc_class_is_class) |
1329 moreover note wf False cls_C Hyp |
1323 moreover note wf False cls_C |
1330 ultimately have "G\<turnstile>super c \<preceq>\<^sub>C declclass m" by auto |
1324 ultimately have "G\<turnstile>super c \<preceq>\<^sub>C declclass m" |
|
1325 by (auto intro: Hyp [rule_format]) |
1331 moreover from cls_C False have "G\<turnstile>C \<prec>\<^sub>C\<^sub>1 super c" by (rule subcls1I) |
1326 moreover from cls_C False have "G\<turnstile>C \<prec>\<^sub>C\<^sub>1 super c" by (rule subcls1I) |
1332 ultimately show ?thesis by - (rule rtrancl_into_rtrancl2) |
1327 ultimately show ?thesis by - (rule rtrancl_into_rtrancl2) |
1333 next |
1328 next |
1334 case Some |
1329 case Some |
1335 from this wf False cls_C methd_C show ?thesis by auto |
1330 from this wf False cls_C methd_C show ?thesis by auto |
1336 qed |
1331 qed |
1337 qed |
1332 qed |
1338 qed |
1333 qed |
1339 |
1334 |
1340 (* |
|
1341 lemma declclass_widen[rule_format]: |
|
1342 "wf_prog G |
|
1343 \<longrightarrow> (\<forall>c m. class G C = Some c \<longrightarrow> methd G C sig = Some m |
|
1344 \<longrightarrow> G\<turnstile>C \<preceq>\<^sub>C declclass m)" (is "?P G C") |
|
1345 apply (rule class_rec.induct) |
|
1346 apply (rule impI)+ |
|
1347 apply (case_tac "C=Object") |
|
1348 apply (force simp add: methd_Object_SomeD) |
|
1349 |
|
1350 apply (rule allI)+ |
|
1351 apply (rule impI) |
|
1352 apply (simp (no_asm_simp) add: methd_rec) |
|
1353 apply (case_tac "table_of (map (\<lambda>(s, m). (s, C, m)) (methods c)) sig") |
|
1354 apply (simp add: override_def) |
|
1355 apply (frule (1) subcls1I) |
|
1356 apply (drule (1) wf_prog_cdecl) |
|
1357 apply (drule (1) wf_cdecl_supD) |
|
1358 apply clarify |
|
1359 apply (drule is_acc_class_is_class) |
|
1360 apply clarify |
|
1361 apply (blast dest: rtrancl_into_rtrancl2) |
|
1362 |
|
1363 apply auto |
|
1364 done |
|
1365 *) |
|
1366 |
|
1367 (* |
|
1368 lemma accessible_public_inheritance_lemma1: |
|
1369 "\<lbrakk>wf_prog G; class G C = Some c; C \<noteq> Object; accmodi m = Public; |
|
1370 G\<turnstile>m accessible_through_inheritance_in (super c)\<rbrakk> |
|
1371 \<Longrightarrow> G\<turnstile>m accessible_through_inheritance_in C" |
|
1372 apply (frule (1) subcls1I) |
|
1373 apply (rule accessible_through_inheritance.Indirect) |
|
1374 apply (blast) |
|
1375 apply (erule accessible_through_inheritance_subclsD) |
|
1376 apply (blast dest: wf_prog_acc_superD is_acc_classD) |
|
1377 apply assumption |
|
1378 apply (force dest: wf_prog_acc_superD is_acc_classD |
|
1379 simp add: accessible_for_inheritance_in_def) |
|
1380 done |
|
1381 |
|
1382 lemma accessible_public_inheritance_lemma[rule_format]: |
|
1383 "\<lbrakk>wf_prog G;C \<noteq> Object; class G C = Some c; |
|
1384 accmodi m = Public |
|
1385 \<rbrakk> \<Longrightarrow> methd G (super c) sig = Some m |
|
1386 \<longrightarrow> G\<turnstile>m accessible_through_inheritance_in C" |
|
1387 apply (frule (2) wf_prog_acc_superD [THEN is_acc_classD]) |
|
1388 apply (erule conjE) |
|
1389 apply (simp only: not_None_eq) |
|
1390 apply (erule exE) |
|
1391 apply (case_tac "(super c) = Object") |
|
1392 apply (rule impI) |
|
1393 apply (rule accessible_through_inheritance.Direct) |
|
1394 apply force |
|
1395 apply (force simp add: accessible_for_inheritance_in_def) |
|
1396 |
|
1397 apply (frule wf_ws_prog) |
|
1398 apply (simp add: methd_rec) |
|
1399 apply (case_tac "table_of (map (\<lambda>(s, m). (s, super c, m)) (methods y)) sig") |
|
1400 apply simp |
|
1401 apply (clarify) |
|
1402 apply (rule_tac D="super c" in accessible_through_inheritance.Indirect) |
|
1403 apply (blast dest: subcls1I) |
|
1404 apply (blast) |
|
1405 apply simp |
|
1406 apply assumption |
|
1407 apply (simp add: accessible_for_inheritance_in_def) |
|
1408 |
|
1409 apply clarsimp |
|
1410 apply (rule accessible_through_inheritance.Direct) |
|
1411 apply (auto dest: subcls1I simp add: accessible_for_inheritance_in_def) |
|
1412 done |
|
1413 |
|
1414 lemma accessible_public_inheritance: |
|
1415 "\<lbrakk>wf_prog G; class G D = Some d; G\<turnstile>C \<prec>\<^sub>C D; methd G D sig = Some m; |
|
1416 accmodi m = Public\<rbrakk> |
|
1417 \<Longrightarrow> G \<turnstile> m accessible_through_inheritance_in C" |
|
1418 apply (erule converse_trancl_induct) |
|
1419 apply (blast dest: subcls1D intro: accessible_public_inheritance_lemma) |
|
1420 |
|
1421 apply (frule subcls1D) |
|
1422 apply clarify |
|
1423 apply (frule (2) wf_prog_acc_superD [THEN is_acc_classD]) |
|
1424 apply clarify |
|
1425 apply (rule_tac D="super c" in accessible_through_inheritance.Indirect) |
|
1426 apply (auto intro:trancl_into_trancl2 |
|
1427 accessible_through_inheritance_subclsD |
|
1428 simp add: accessible_for_inheritance_in_def) |
|
1429 done |
|
1430 *) |
|
1431 |
|
1432 |
|
1433 lemma declclass_methd_Object: |
1335 lemma declclass_methd_Object: |
1434 "\<lbrakk>wf_prog G; methd G Object sig = Some m\<rbrakk> \<Longrightarrow> declclass m = Object" |
1336 "\<lbrakk>wf_prog G; methd G Object sig = Some m\<rbrakk> \<Longrightarrow> declclass m = Object" |
1435 by auto |
1337 by auto |
1436 |
|
1437 |
1338 |
1438 lemma methd_declaredD: |
1339 lemma methd_declaredD: |
1439 "\<lbrakk>wf_prog G; is_class G C;methd G C sig = Some m\<rbrakk> |
1340 "\<lbrakk>wf_prog G; is_class G C;methd G C sig = Some m\<rbrakk> |
1440 \<Longrightarrow> G\<turnstile>(mdecl (sig,mthd m)) declared_in (declclass m)" |
1341 \<Longrightarrow> G\<turnstile>(mdecl (sig,mthd m)) declared_in (declclass m)" |
1441 proof - |
1342 proof - |
1976 apply (drule (3) r_into_rtrancl [THEN inheritable_instance_methd_props, |
1875 apply (drule (3) r_into_rtrancl [THEN inheritable_instance_methd_props, |
1977 OF _ implmt_is_class]) |
1876 OF _ implmt_is_class]) |
1978 apply auto |
1877 apply auto |
1979 done |
1878 done |
1980 |
1879 |
1981 |
|
1982 declare split_paired_All [simp] split_paired_Ex [simp] |
|
1983 ML_setup {* |
|
1984 claset_ref() := claset() addSbefore ("split_all_tac", split_all_tac); |
|
1985 simpset_ref() := simpset() addloop ("split_all_tac", split_all_tac) |
|
1986 *} |
|
1987 lemma mheadsD [rule_format (no_asm)]: |
1880 lemma mheadsD [rule_format (no_asm)]: |
1988 "emh \<in> mheads G S t sig \<longrightarrow> wf_prog G \<longrightarrow> |
1881 "emh \<in> mheads G S t sig \<longrightarrow> wf_prog G \<longrightarrow> |
1989 (\<exists>C D m. t = ClassT C \<and> declrefT emh = ClassT D \<and> |
1882 (\<exists>C D m. t = ClassT C \<and> declrefT emh = ClassT D \<and> |
1990 accmethd G S C sig = Some m \<and> |
1883 accmethd G S C sig = Some m \<and> |
1991 (declclass m = D) \<and> mhead (mthd m) = (mhd emh)) \<or> |
1884 (declclass m = D) \<and> mhead (mthd m) = (mhd emh)) \<or> |
2166 @{term "G\<turnstile>Class dynC\<preceq> statT"}. Unfortunately this ordinary widening relation |
2059 @{term "G\<turnstile>Class dynC\<preceq> statT"}. Unfortunately this ordinary widening relation |
2167 isn't enough to describe the valid lookup classes, since we must cope the |
2060 isn't enough to describe the valid lookup classes, since we must cope the |
2168 special cases of arrays and interfaces,too. If we statically expect an array or |
2061 special cases of arrays and interfaces,too. If we statically expect an array or |
2169 inteface we may lookup a field or a method in Object which isn't covered in |
2062 inteface we may lookup a field or a method in Object which isn't covered in |
2170 the widening relation. |
2063 the widening relation. |
2171 \begin{verbatim} |
2064 |
2172 statT field instance method static (class) method |
2065 statT field instance method static (class) method |
2173 ------------------------------------------------------------------------ |
2066 ------------------------------------------------------------------------ |
2174 NullT / / / |
2067 NullT / / / |
2175 Iface / dynC Object |
2068 Iface / dynC Object |
2176 Class dynC dynC dynC |
2069 Class dynC dynC dynC |
2177 Array / Object Object |
2070 Array / Object Object |
2178 \end{verbatim} |
2071 |
2179 In most cases we con lookup the member in the dynamic class. But as an |
2072 In most cases we con lookup the member in the dynamic class. But as an |
2180 interface can't declare new static methods, nor an array can define new |
2073 interface can't declare new static methods, nor an array can define new |
2181 methods at all, we have to lookup methods in the base class Object. |
2074 methods at all, we have to lookup methods in the base class Object. |
2182 |
2075 |
2183 The limitation to classes in the field column is artificial and comes out |
2076 The limitation to classes in the field column is artificial and comes out |
2187 indeed has no non private fields. So interfaces and arrays can actually |
2080 indeed has no non private fields. So interfaces and arrays can actually |
2188 have no fields at all and a field access would be senseless. (In Java |
2081 have no fields at all and a field access would be senseless. (In Java |
2189 interfaces are allowed to declare new fields but in current Bali not!). |
2082 interfaces are allowed to declare new fields but in current Bali not!). |
2190 So there is no principal reason why we should not allow Objects to declare |
2083 So there is no principal reason why we should not allow Objects to declare |
2191 non private fields. Then we would get the following column: |
2084 non private fields. Then we would get the following column: |
2192 \begin{verbatim} |
2085 |
2193 statT field |
2086 statT field |
2194 ----------------- |
2087 ----------------- |
2195 NullT / |
2088 NullT / |
2196 Iface Object |
2089 Iface Object |
2197 Class dynC |
2090 Class dynC |
2198 Array Object |
2091 Array Object |
2199 \end{verbatim} |
|
2200 *} |
2092 *} |
2201 consts valid_lookup_cls:: "prog \<Rightarrow> ref_ty \<Rightarrow> qtname \<Rightarrow> bool \<Rightarrow> bool" |
2093 consts valid_lookup_cls:: "prog \<Rightarrow> ref_ty \<Rightarrow> qtname \<Rightarrow> bool \<Rightarrow> bool" |
2202 ("_,_ \<turnstile> _ valid'_lookup'_cls'_for _" [61,61,61,61] 60) |
2094 ("_,_ \<turnstile> _ valid'_lookup'_cls'_for _" [61,61,61,61] 60) |
2203 primrec |
2095 primrec |
2204 "G,NullT \<turnstile> dynC valid_lookup_cls_for static_membr = False" |
2096 "G,NullT \<turnstile> dynC valid_lookup_cls_for static_membr = False" |
2235 declare split_paired_All [simp del] split_paired_Ex [simp del] |
2127 declare split_paired_All [simp del] split_paired_Ex [simp del] |
2236 ML_setup {* |
2128 ML_setup {* |
2237 simpset_ref() := simpset() delloop "split_all_tac"; |
2129 simpset_ref() := simpset() delloop "split_all_tac"; |
2238 claset_ref () := claset () delSWrapper "split_all_tac" |
2130 claset_ref () := claset () delSWrapper "split_all_tac" |
2239 *} |
2131 *} |
2240 |
|
2241 lemma dynamic_mheadsD: |
2132 lemma dynamic_mheadsD: |
2242 "\<lbrakk>emh \<in> mheads G S statT sig; |
2133 "\<lbrakk>emh \<in> mheads G S statT sig; |
2243 G,statT \<turnstile> dynC valid_lookup_cls_for (is_static emh); |
2134 G,statT \<turnstile> dynC valid_lookup_cls_for (is_static emh); |
2244 isrtype G statT; wf_prog G |
2135 isrtype G statT; wf_prog G |
2245 \<rbrakk> \<Longrightarrow> \<exists>m \<in> dynlookup G statT dynC sig: |
2136 \<rbrakk> \<Longrightarrow> \<exists>m \<in> dynlookup G statT dynC sig: |
2502 show ?thesis |
2398 show ?thesis |
2503 by (auto simp add: dynlookup_def dynmethd_C_C [OF is_cls_Obj ws] |
2399 by (auto simp add: dynlookup_def dynmethd_C_C [OF is_cls_Obj ws] |
2504 dest: methd_Object_SomeD) |
2400 dest: methd_Object_SomeD) |
2505 qed |
2401 qed |
2506 |
2402 |
|
2403 |
2507 declare split_paired_All [simp del] split_paired_Ex [simp del] |
2404 declare split_paired_All [simp del] split_paired_Ex [simp del] |
2508 ML_setup {* |
2405 ML_setup {* |
2509 simpset_ref() := simpset() delloop "split_all_tac"; |
2406 simpset_ref() := simpset() delloop "split_all_tac"; |
2510 claset_ref () := claset () delSWrapper "split_all_tac" |
2407 claset_ref () := claset () delSWrapper "split_all_tac" |
2511 *} |
2408 *} |
2512 |
|
2513 lemma wt_is_type: "E,dt\<Turnstile>v\<Colon>T \<Longrightarrow> wf_prog (prg E) \<longrightarrow> |
2409 lemma wt_is_type: "E,dt\<Turnstile>v\<Colon>T \<Longrightarrow> wf_prog (prg E) \<longrightarrow> |
2514 dt=empty_dt \<longrightarrow> (case T of |
2410 dt=empty_dt \<longrightarrow> (case T of |
2515 Inl T \<Rightarrow> is_type (prg E) T |
2411 Inl T \<Rightarrow> is_type (prg E) T |
2516 | Inr Ts \<Rightarrow> Ball (set Ts) (is_type (prg E)))" |
2412 | Inr Ts \<Rightarrow> Ball (set Ts) (is_type (prg E)))" |
2517 apply (unfold empty_dt_def) |
2413 apply (unfold empty_dt_def) |
2596 "\<lbrakk>emh \<in> mheads G S T sig; wf_prog G\<rbrakk> |
2492 "\<lbrakk>emh \<in> mheads G S T sig; wf_prog G\<rbrakk> |
2597 \<Longrightarrow> G\<turnstile>RefT T accessible_in (pid S)" |
2493 \<Longrightarrow> G\<turnstile>RefT T accessible_in (pid S)" |
2598 by (erule mheads_cases) |
2494 by (erule mheads_cases) |
2599 (auto dest: accmethd_SomeD accessible_from_commonD accimethdsD) |
2495 (auto dest: accmethd_SomeD accessible_from_commonD accimethdsD) |
2600 |
2496 |
2601 lemma static_to_dynamic_accessible_from: |
2497 lemma static_to_dynamic_accessible_from_aux: |
2602 "\<lbrakk>G\<turnstile>m of C accessible_from accC;wf_prog G\<rbrakk> |
2498 "\<lbrakk>G\<turnstile>m of C accessible_from accC;wf_prog G\<rbrakk> |
2603 \<Longrightarrow> G\<turnstile>m in C dyn_accessible_from accC" |
2499 \<Longrightarrow> G\<turnstile>m in C dyn_accessible_from accC" |
2604 proof (induct rule: accessible_fromR.induct) |
2500 proof (induct rule: accessible_fromR.induct) |
2605 qed (auto intro: dyn_accessible_fromR.intros |
2501 qed (auto intro: dyn_accessible_fromR.intros |
2606 member_of_to_member_in |
2502 member_of_to_member_in |
2613 ) "G\<turnstile>m in dynC dyn_accessible_from accC" |
2509 ) "G\<turnstile>m in dynC dyn_accessible_from accC" |
2614 proof - |
2510 proof - |
2615 from stat_acc subclseq |
2511 from stat_acc subclseq |
2616 show ?thesis (is "?Dyn_accessible m") |
2512 show ?thesis (is "?Dyn_accessible m") |
2617 proof (induct rule: accessible_fromR.induct) |
2513 proof (induct rule: accessible_fromR.induct) |
2618 case (immediate statC m) |
2514 case (Immediate statC m) |
2619 then show "?Dyn_accessible m" |
2515 then show "?Dyn_accessible m" |
2620 by (blast intro: dyn_accessible_fromR.immediate |
2516 by (blast intro: dyn_accessible_fromR.Immediate |
2621 member_inI |
2517 member_inI |
2622 permits_acc_inheritance) |
2518 permits_acc_inheritance) |
2623 next |
2519 next |
2624 case (overriding _ _ m) |
2520 case (Overriding _ _ m) |
2625 with wf show "?Dyn_accessible m" |
2521 with wf show "?Dyn_accessible m" |
2626 by (blast intro: dyn_accessible_fromR.overriding |
2522 by (blast intro: dyn_accessible_fromR.Overriding |
2627 member_inI |
2523 member_inI |
2628 static_to_dynamic_overriding |
2524 static_to_dynamic_overriding |
2629 rtrancl_trancl_trancl |
2525 rtrancl_trancl_trancl |
2630 static_to_dynamic_accessible_from) |
2526 static_to_dynamic_accessible_from_aux) |
2631 qed |
2527 qed |
|
2528 qed |
|
2529 |
|
2530 lemma static_to_dynamic_accessible_from_static: |
|
2531 (assumes stat_acc: "G\<turnstile>m of statC accessible_from accC" and |
|
2532 static: "is_static m" and |
|
2533 wf: "wf_prog G" |
|
2534 ) "G\<turnstile>m in (declclass m) dyn_accessible_from accC" |
|
2535 proof - |
|
2536 from stat_acc wf |
|
2537 have "G\<turnstile>m in statC dyn_accessible_from accC" |
|
2538 by (auto intro: static_to_dynamic_accessible_from) |
|
2539 from this static |
|
2540 show ?thesis |
|
2541 by (rule dyn_accessible_from_static_declC) |
2632 qed |
2542 qed |
2633 |
2543 |
2634 lemma dynmethd_member_in: |
2544 lemma dynmethd_member_in: |
2635 (assumes m: "dynmethd G statC dynC sig = Some m" and |
2545 (assumes m: "dynmethd G statC dynC sig = Some m" and |
2636 iscls_statC: "is_class G statC" and |
2546 iscls_statC: "is_class G statC" and |
2970 assume accessible: "G \<turnstile> m in C dyn_accessible_from accC" |
2880 assume accessible: "G \<turnstile> m in C dyn_accessible_from accC" |
2971 then show "accmodi m = Package |
2881 then show "accmodi m = Package |
2972 \<Longrightarrow> pid accC = pid (declclass m)" |
2882 \<Longrightarrow> pid accC = pid (declclass m)" |
2973 (is "?Pack m \<Longrightarrow> ?P m") |
2883 (is "?Pack m \<Longrightarrow> ?P m") |
2974 proof (induct rule: dyn_accessible_fromR.induct) |
2884 proof (induct rule: dyn_accessible_fromR.induct) |
2975 case (immediate C m) |
2885 case (Immediate C m) |
2976 assume "G\<turnstile>m member_in C" |
2886 assume "G\<turnstile>m member_in C" |
2977 "G \<turnstile> m in C permits_acc_to accC" |
2887 "G \<turnstile> m in C permits_acc_to accC" |
2978 "accmodi m = Package" |
2888 "accmodi m = Package" |
2979 then show "?P m" |
2889 then show "?P m" |
2980 by (auto simp add: permits_acc_def) |
2890 by (auto simp add: permits_acc_def) |
2981 next |
2891 next |
2982 case (overriding declC C new newm old Sup) |
2892 case (Overriding declC C new newm old Sup) |
2983 assume member_new: "G \<turnstile> new member_in C" and |
2893 assume member_new: "G \<turnstile> new member_in C" and |
2984 new: "new = (declC, mdecl newm)" and |
2894 new: "new = (declC, mdecl newm)" and |
2985 override: "G \<turnstile> (declC, newm) overrides old" and |
2895 override: "G \<turnstile> (declC, newm) overrides old" and |
2986 subcls_C_Sup: "G\<turnstile>C \<prec>\<^sub>C Sup" and |
2896 subcls_C_Sup: "G\<turnstile>C \<prec>\<^sub>C Sup" and |
2987 acc_old: "G \<turnstile> methdMembr old in Sup dyn_accessible_from accC" and |
2897 acc_old: "G \<turnstile> methdMembr old in Sup dyn_accessible_from accC" and |
2999 with eq_pid_new_old P_sup show "?P new" |
2909 with eq_pid_new_old P_sup show "?P new" |
3000 by auto |
2910 by auto |
3001 qed |
2911 qed |
3002 qed |
2912 qed |
3003 |
2913 |
|
2914 |
|
2915 text {* @{text dyn_accessible_instance_field_Protected} only works for fields |
|
2916 since methods can break the package bounds due to overriding |
|
2917 *} |
|
2918 lemma dyn_accessible_instance_field_Protected: |
|
2919 (assumes dyn_acc: "G \<turnstile> f in C dyn_accessible_from accC" and |
|
2920 prot: "accmodi f = Protected" and |
|
2921 field: "is_field f" and |
|
2922 instance_field: "\<not> is_static f" and |
|
2923 outside: "pid (declclass f) \<noteq> pid accC" |
|
2924 ) "G\<turnstile> C \<preceq>\<^sub>C accC" |
|
2925 proof - |
|
2926 from dyn_acc prot field instance_field outside |
|
2927 show ?thesis |
|
2928 proof (induct) |
|
2929 case (Immediate C f) |
|
2930 have "G \<turnstile> f in C permits_acc_to accC" . |
|
2931 moreover |
|
2932 assume "accmodi f = Protected" and "is_field f" and "\<not> is_static f" and |
|
2933 "pid (declclass f) \<noteq> pid accC" |
|
2934 ultimately |
|
2935 show "G\<turnstile> C \<preceq>\<^sub>C accC" |
|
2936 by (auto simp add: permits_acc_def) |
|
2937 next |
|
2938 case Overriding |
|
2939 then show ?case by (simp add: is_field_def) |
|
2940 qed |
|
2941 qed |
|
2942 |
|
2943 lemma dyn_accessible_static_field_Protected: |
|
2944 (assumes dyn_acc: "G \<turnstile> f in C dyn_accessible_from accC" and |
|
2945 prot: "accmodi f = Protected" and |
|
2946 field: "is_field f" and |
|
2947 static_field: "is_static f" and |
|
2948 outside: "pid (declclass f) \<noteq> pid accC" |
|
2949 ) "G\<turnstile> accC \<preceq>\<^sub>C declclass f \<and> G\<turnstile>C \<preceq>\<^sub>C declclass f" |
|
2950 proof - |
|
2951 from dyn_acc prot field static_field outside |
|
2952 show ?thesis |
|
2953 proof (induct) |
|
2954 case (Immediate C f) |
|
2955 assume "accmodi f = Protected" and "is_field f" and "is_static f" and |
|
2956 "pid (declclass f) \<noteq> pid accC" |
|
2957 moreover |
|
2958 have "G \<turnstile> f in C permits_acc_to accC" . |
|
2959 ultimately |
|
2960 have "G\<turnstile> accC \<preceq>\<^sub>C declclass f" |
|
2961 by (auto simp add: permits_acc_def) |
|
2962 moreover |
|
2963 have "G \<turnstile> f member_in C" . |
|
2964 then have "G\<turnstile>C \<preceq>\<^sub>C declclass f" |
|
2965 by (rule member_in_class_relation) |
|
2966 ultimately show ?case |
|
2967 by blast |
|
2968 next |
|
2969 case Overriding |
|
2970 then show ?case by (simp add: is_field_def) |
|
2971 qed |
|
2972 qed |
|
2973 |
3004 end |
2974 end |