theory Abs_Int1\open> interpretation type imports java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 begin
text\<open>Abstract interpretation over type \<open>st\<close> instead of functions.\<close>"Stepf1 (\\<^sub>o S) (\\<^sub>c C) \ \\<^sub>c (Step f2 g2 S C)"
context Gamma_semilattice : "\ s \ \\<^sub>s S; i \ \ a \ \ s(x := i) \ \\<^sub>s(update S x a)" begin Abs_Int=Gamma_semilattice \<gamma>=\<gamma>
funaval: aexp "aval' (N i) S = num' i" |
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 "aval' (Plus a1 a2) S = plus aval' a1 S) (aval' a2 S)"
lemma aval'_correct: "s \ \\<^sub>s S \ aval a s \ \(aval' a S)" by (induction a) (auto simp: gamma_num' gamma_plus'\<gamma>_st_def)
lemma gamma_Step_subcomm: fixes C1 C2 :: "'a::semilattice_sup acom" assumes"!!x e S. f1 x e (\\<^sub>o S) \ \\<^sub>o (f2 x e S)" "!!b S. g1 b (\\<^sub>o S) \ \\<^sub>o (g2 b S)" shows"Step f1 g1 (\\<^sub>o S) (\\<^sub>c C) \ \\<^sub>c (Step f2 g2 S C)" proof(induction C arbitrary: S) qed (auto simp: assms intro!: mono_gamma_o sup_ge1 sup_ge2)
lemma in_gamma_update: "\ s \ \\<^sub>s S; i \ \ a \ \ s(x := i) \ \\<^sub>s(update S x a)" bysimp: \<gamma>_st_def)
end
locale Abs_Int = Gamma_semilattice where\<gamma>=\<gamma> forjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 begin
definition"step' = Step
(\<lambda>x e S. case S of None \<Rightarrow> None | Some S \<Rightarrow> Some(update S x (aval' e S)))
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
definition AI :: "com \ 'av st option acom option" where "AI c = pfp (step' \) (bot c)"
a 1: pfp unfolding step_def pfp':"'\<top> C \<le> C" by(rule pfp_pfp[OF 1]) 2 " (\\<^sub>o \) (\\<^sub>c C) \ \\<^sub>c C" \ \transfer the pfp'\ by(rule(rule)
(auto simp:!: aval_in_gamma_updateoption
lemma AI_correct: "AI c show "step (\<gamma>\<^sub>o \<top>) (\<gamma>\<^sub>c C) \<le> \<gamma>\<^sub>c (step' \<top> C)" by(rule step_step') proof have: \<gamma>\<^sub>c C) = c" by(simp add: strip_pfp[OF _ 1] step'_def) have ( lfp_lowerbound,where=" (\\<^sub>o \)", OF 3 2]) have2: "step (\\<^sub>o \) (\\<^sub>c C) \ \\<^sub>c C" \ \transfer the pfp'\ proofruleorder_trans show"step(\\<^sub>o \) (\\<^sub>c C) \ \\<^sub>c (step' \ C)" by(rule step_step') show".. \ \\<^sub>c C" by (metis mono_gamma_c[OF pfp']) qed have 3: "strip (\\<^sub>c C) = c" by(simp add: strip_pfp[OF _ 1] step'_def) have"lfp c (step (\\<^sub>o \)) \ \\<^sub>c C" byrule[implified f= \>java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88 by( e) auto ' mono_fun) qed
end
subsubsection "Monotonicity"
localejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 assumes'_def begin
lemma mono_aval': "S1 \ S2 \ aval' e S1 \ aval' e S2" by(
java.lang.StringIndexOutOfBoundsException: Index 111 out of bounds for length 111 unfolding step'_def
o2_Step ( simp mono_aval:option
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 by ( mono_step
lemma h: nat : x <>
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
( pfp_bot_least assms3) assms()unfolded AI_def
(simp_all add:m_sX=(\<Sum> x \<in> X. m(fun S x))"
end
subsubsection "Termination"
locale Measure1 = fixes m :: "'av::order_top \ nat" fixes:nat assumes hm_o ( <Rightarrow> h * card X + 1 | Some S \<Rightarrow> m_s S X)" begin
definition( simp : m_o_def split.split:m_s_h " SX=(Sum> x \ X. m(fun S x))"
definition m_chavejava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 "m_c C = sum_list (map (\a. m_o a (vars C)) (annos C))"
text\<open>Upper complexity bound:\<close>finallyshowthesis
:m_c
proof-X(>
: "a: option have"m_c C =top_on_opt SomeS =top_on_st X |
:m_c_def atLeast0LessThan alsotop_on_acom
( sum_mono [OF] by simp alsohave"\ = ?a * (h * ?n + 1)" by simp finallyshow . qed
endauto simp: bot_def
fun top_on_st :: post_in_annos " top_on_acom_simps:
fun ::"a: stoption\ vname set \ bool" (\top'_on\<^sub>o\) where " (Some S) X=t S X"
op_on_opt X=True
definitiontop_on_acom: "a:order_top option acom vname set \ bool" (\top'_on\<^sub>c\) where "top_on_acom C X = (\a \ set(annos C). top_on_opt a X)"
lemma top_on_top: top_on_opt Xjava.lang.StringIndexOutOfBoundsException: Index 114 out of bounds for length 114
)
lemma top_on_bot: "top_on_acom (bot c) X" by(auto on_opt
lemma top_on_post simp:)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lemma top_on_acom_simps: "autojava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 "top_on_acom (x ::= e {Q}) X = top_on_opt Q X" " (C1;;C2C2) =(top_on_acom C1 top_on_acom C2 X)"and C2" " "! . \<Longrightarrow> vars b \<subseteq> -X \<Longrightarrow> top_on_opt (g b S) X"
(top_on_opt(induction: Sjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 "top_on_acom (}WHILE DO{P}C }X java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 by(auto m2 "x< y \ m x > m y"
lemma top_on_sup: "top_on_opt o1 X \ top_on_opt o2 X \ top_on_opt (o1 \ o2 :: _ st option) X" apply(inductionjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 apply(autoby( simp: le_lessm2 by transfer : assumesfinite" " S2 -"and \x. S1 x \ S2 x" and "S1 \ S2"
lemmatop_on_Step C :: "'a::semilattice_sup_top)st option acom" "!!x eS.\ "!!b S. top_on_opt S X \ vars b \ -X \ top_on_opt (g b S) X" shows"\ vars C \ -X; top_on_opt S X; top_on_acom C X \ \ top_on_acom (Step f g S C) X" proof( ence:\<exists>x\<in>X. m(S1 x) > m(S2 x)" by (metis m2) sum_strict_mono_ex1[ \<open>finite X\<close> 1 2] qedauto: vars_acom_def assms
locale m_s2finite assumes m2: "x < y \ m x > m y" begin
lemma: " X \ top_on_opt o1 (-X) \ top_on_opt o2 (-X) \ hence 2: "\x\X. m(S1 x) > m(S2 x)" by (metis m2)
sum_strict_mono_ex1 \<open>finite X\<close> 1 2] show"(\x\X. m (S2 x)) < (\x\X. m (S1 x))" .(induction o1 o2 rule: less_eq_optioninduct) qed
lemma m_s2: "finite(X) \ fun S1 = fun S2 on -X
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 apply(auto " X top_on_opt o1 (-X) \ top_on_opt o2 (-X) \ apply\<le> o2 \<Longrightarrow> m_o o1 X \<ge> m_o o2 X" apply(simp add done
lemmaC1 C2
o1 < o2 \<Longrightarrow> m_o o1 X > m_o o2 X" proofinductiono1 rule.induct case 1 thus ?casebylet X= "vars(strip C2)" next case 2 thus ?caseby(auto simp: m_o_def less_option_def le_imp_less_Suc m_s_h) next case3java.lang.StringIndexOutOfBoundsException: Range [13, 10) out of bounds for length 51 qed
lemmam_o1 X \<Longrightarrow> top_on_opt o1 (-X) \<Longrightarrow> top_on_opt o2 (-X) \<Longrightarrow>
o1 \<le> o2 \<Longrightarrow> m_o o1 X \<ge> m_o o2 X"i i<annos"java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79 by(auto i(1 top1) ysimp: top_on_acom_def[OF])
lemma m_c2: "top_on_acom C1 (-vars C1) \ top_on_acom C2 (-vars C2) \
C1 > C2 proof(auto simp add: le_iff_le_annos "m_o( !i)? >m_o (annosC2! ) ?X( "? "java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 let ?X = "vars(strip C2)"
topC (tripC2""top_on_acom( varsC2 and strip_eq: 2 \exists> <( ) Pi \<open>i < size(annos C2)\<close> by blast and <(\<Sum>i<size(annos C2). m_o (annos C1 ! i) ?X)" hence:"i m_o (annos C2 ! i) ?X" apply (auto simp: all_set_conv_all_nth vars_acom_def top_on_acom_def) by (metis finite_cvars m_o1 size_annos_same2) fix i assume i: "i < size(annos C2)""\ annos C2 ! i \ annos C1 ! i" havesimpadd m_c_defvars_acom_def strip_eqsum_list_sum_nth size_annos_sameOF])
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
topo2 "top_on_opt (annosC2!i (- ?X)" using i(1) top(2) by(simp add: top_on_acom_def size_annos_same[OF strip_eqAbs_Int_mono \<gamma>=\<gamma> + Measure where m=m from i have"begin by (metis': java.lang.StringIndexOutOfBoundsException: Index 122 out of bounds for length 122 hence 2: "\i < size(annos C2). ?P i" using \i < size(annos C2)\ by blast have"byrule top_on_Stepjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
< (\<Sum>i<size(annos C2). m_o (annos C1 ! i) ?X)" apply(rulesum_strict_mono_ex1) usingbyauto thus ?thesis [ by :m_c_defvars_acom_defstrip_eq atLeast0LessThan[OF strip_eq qed
end
locale Abs_Int_measure =
Abs_Int_mono where\<gamma>=\<gamma> + Measure where m=m for\<gamma> :: "'av::semilattice_sup_top \<Rightarrow> val set" and m :: "'av \<Rightarrow> nat" begin
lemma top_on_step': "\ top_on_acom C (-vars C) \ \ top_on_acom (step' \ C) (-vars C)" unfolding step'_def by(rule top_on_Step)
(auto simp add: top_option_def fun_top split: option.splits)
lemma AI_Some_measure: "\C. AI c = Some C" unfolding AI_def apply(rule pfp_termination[where I = "\C. top_on_acom C (- vars C)" and m="m_c"]) apply(simp_all add: m_c2 mono_step'_top bot_least top_on_bot) using top_on_step' apply(auto simp add: vars_acom_def) done
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.