equal
deleted
inserted
replaced
1551 |
1551 |
1552 lemma imethds_declI: "\<lbrakk>m \<in> imethds G I sig; ws_prog G; is_iface G I\<rbrakk> \<Longrightarrow> |
1552 lemma imethds_declI: "\<lbrakk>m \<in> imethds G I sig; ws_prog G; is_iface G I\<rbrakk> \<Longrightarrow> |
1553 (\<exists>i. iface G (decliface m) = Some i \<and> |
1553 (\<exists>i. iface G (decliface m) = Some i \<and> |
1554 table_of (imethods i) sig = Some (mthd m)) \<and> |
1554 table_of (imethods i) sig = Some (mthd m)) \<and> |
1555 (I,decliface m) \<in> (subint1 G)^* \<and> m \<in> imethds G (decliface m) sig" |
1555 (I,decliface m) \<in> (subint1 G)^* \<and> m \<in> imethds G (decliface m) sig" |
1556 apply (erule make_imp) |
1556 apply (erule rev_mp) |
1557 apply (rule ws_subint1_induct, assumption, assumption) |
1557 apply (rule ws_subint1_induct, assumption, assumption) |
1558 apply (subst imethds_rec, erule conjunct1, assumption) |
1558 apply (subst imethds_rec, erule conjunct1, assumption) |
1559 apply (force elim: imethds_norec intro: rtrancl_into_rtrancl2) |
1559 apply (force elim: imethds_norec intro: rtrancl_into_rtrancl2) |
1560 done |
1560 done |
1561 |
1561 |
1615 |
1615 |
1616 lemma methd_declC: |
1616 lemma methd_declC: |
1617 "\<lbrakk>methd G C sig = Some m; ws_prog G;is_class G C\<rbrakk> \<Longrightarrow> |
1617 "\<lbrakk>methd G C sig = Some m; ws_prog G;is_class G C\<rbrakk> \<Longrightarrow> |
1618 (\<exists>d. class G (declclass m)=Some d \<and> table_of (methods d) sig=Some (mthd m)) \<and> |
1618 (\<exists>d. class G (declclass m)=Some d \<and> table_of (methods d) sig=Some (mthd m)) \<and> |
1619 G\<turnstile>C \<preceq>\<^sub>C (declclass m) \<and> methd G (declclass m) sig = Some m" |
1619 G\<turnstile>C \<preceq>\<^sub>C (declclass m) \<and> methd G (declclass m) sig = Some m" |
1620 apply (erule make_imp) |
1620 apply (erule rev_mp) |
1621 apply (rule ws_subcls1_induct, assumption, assumption) |
1621 apply (rule ws_subcls1_induct, assumption, assumption) |
1622 apply (subst methd_rec, assumption) |
1622 apply (subst methd_rec, assumption) |
1623 apply (case_tac "Ca=Object") |
1623 apply (case_tac "Ca=Object") |
1624 apply (force elim: methd_norec ) |
1624 apply (force elim: methd_norec ) |
1625 |
1625 |
2174 lemma fields_declC: |
2174 lemma fields_declC: |
2175 "\<lbrakk>table_of (fields G C) efn = Some f; ws_prog G; is_class G C\<rbrakk> \<Longrightarrow> |
2175 "\<lbrakk>table_of (fields G C) efn = Some f; ws_prog G; is_class G C\<rbrakk> \<Longrightarrow> |
2176 (\<exists>d. class G (declclassf efn) = Some d \<and> |
2176 (\<exists>d. class G (declclassf efn) = Some d \<and> |
2177 table_of (cfields d) (fname efn)=Some f) \<and> |
2177 table_of (cfields d) (fname efn)=Some f) \<and> |
2178 G\<turnstile>C \<preceq>\<^sub>C (declclassf efn) \<and> table_of (fields G (declclassf efn)) efn = Some f" |
2178 G\<turnstile>C \<preceq>\<^sub>C (declclassf efn) \<and> table_of (fields G (declclassf efn)) efn = Some f" |
2179 apply (erule make_imp) |
2179 apply (erule rev_mp) |
2180 apply (rule ws_subcls1_induct, assumption, assumption) |
2180 apply (rule ws_subcls1_induct, assumption, assumption) |
2181 apply (subst fields_rec, assumption) |
2181 apply (subst fields_rec, assumption) |
2182 apply clarify |
2182 apply clarify |
2183 apply (simp only: map_of_append) |
2183 apply (simp only: map_of_append) |
2184 apply (case_tac "table_of (map (split (\<lambda>fn. Pair (fn, Ca))) (cfields c)) efn") |
2184 apply (case_tac "table_of (map (split (\<lambda>fn. Pair (fn, Ca))) (cfields c)) efn") |
2205 |
2205 |
2206 (* easier than with table_of *) |
2206 (* easier than with table_of *) |
2207 lemma fields_mono_lemma: |
2207 lemma fields_mono_lemma: |
2208 "\<lbrakk>x \<in> set (fields G C); G\<turnstile>D \<preceq>\<^sub>C C; ws_prog G\<rbrakk> |
2208 "\<lbrakk>x \<in> set (fields G C); G\<turnstile>D \<preceq>\<^sub>C C; ws_prog G\<rbrakk> |
2209 \<Longrightarrow> x \<in> set (fields G D)" |
2209 \<Longrightarrow> x \<in> set (fields G D)" |
2210 apply (erule make_imp) |
2210 apply (erule rev_mp) |
2211 apply (erule converse_rtrancl_induct) |
2211 apply (erule converse_rtrancl_induct) |
2212 apply fast |
2212 apply fast |
2213 apply (drule subcls1D) |
2213 apply (drule subcls1D) |
2214 apply clarsimp |
2214 apply clarsimp |
2215 apply (subst fields_rec) |
2215 apply (subst fields_rec) |