(* Title: HOL/Bali/AxSem.thyP\<forall>Y s Z. P Y s Z \<longrightarrow> type_ok G t s \<longrightarrow> Author: David von Oheimb
*)
subsection
(triples_validand \<close> theory
textdatatype'triple (aassn" 'a "(** should be design issues: \begin{itemize} \item a strong version of validity for triples with premises, namely one that takes the recursive depth needed to complete execution, enables correctness proof \item auxiliary variables are handled first-class (-> Thomas Kleymann) \item expressions not flattened to elementary assignments (as usual for axiomatic semantics) but treated first-class => explicit result value handling \item intermediate values not on triple, but on assertion level (with result entry) \item multiple results with semantical substitution mechnism not requiring a stack \item because of dynamic method binding, terms need to be dependent on state. this is also useful for conditional expressions and statements \item result values in triples exactly as in eval relation (also for xcpt states) \item validity: additional assumption of state conformance and well-typedness, which is required for soundness and thus rule hazard required of completeness \end{itemize}
restrictions: \begin{itemize} \item all triples in a derivation are of the same type (due to weak polymorphism) \end{itemize} \<close>
type_synonym res = vals \<comment> \<open>result entry\<close>
translations "\<lambda>Val:v . b" == "(\<lambda>v. b) \<circ> CONST the_In1" "\<lambda>Var:v . b" == "(\<lambda>v. b) \<circ> CONST the_In2" "\<lambda>Vals:v. b" == "(\<lambda>v. b) \<circ> CONST the_In3"
\<comment> \<open>relation on result values, state and auxiliary variables\<close> type_synonym 'a assn = "res \<Rightarrow> state \<Rightarrow> 'a \<Rightarrow> bool" translations (type) "'a assn" <= (type) "vals \<Rightarrow> state \<Rightarrow> 'a \<Rightarrow> bool"
definition assn_imp :: "'a assn \<Rightarrow> 'a assn \<Rightarrow> bool" (infixr \<open>\<Rightarrow>\<close> 25) where "(P \<Rightarrow> Q) = (\<forall>Y s Z. P Y s Z \<longrightarrow> Q Y s Z)" lemma assn_imp_def2 [iff]: "(P \<Rightarrow> Q) = (\<forall>Y s Z. P Y s Z \<longrightarrow> Q Y s Z)" apply (unfold assn_imp_def) apply (rule HOL.refl) done
subsubsection "assertion transformers"
subsection "peek-and"
definition peek_and :: "'a assn \<Rightarrow> (state \<Rightarrow> bool) \<Rightarrow> 'a assn" (infixl \<open>\<and>.\<close> 13) where "(P \<and>. p) = (\<lambda>Y s Z. P Y s Z \<and> p s)"
lemma peek_and_def2 [simp]: "peek_and P p Y s = (\<lambda>Z. (P Y s Z \<and> p s))" apply (unfold peek_and_def) apply (simp (no_asm)) done
abbreviation Normal :: "'a assn \<Rightarrow> 'a assn" where "Normal P == P \<and>. normal"
lemma peek_and_Normal [simp]: "peek_and (Normal P) p = Normal (peek_and P p)" apply (rule ext) apply (rule ext) apply (rule ext) apply auto done
subsection "assn-supd"
definition assn_supd :: "'a assn \<Rightarrow> (state \<Rightarrow> state) \<Rightarrow> 'a assn" (infixl \<open>;.\<close> 13) where "(P ;. f) = (\<lambda>Y s' Z. \<exists>s. P Y s Z \<and> s' = f s)"
lemma assn_supd_def2 [simp]: "assn_supd P f Y s' Z = (\<exists>s. P Y s Z \<and> s' = f s)" apply (unfold assn_supd_def) apply (simp (no_asm)) done
subsection "supd-assn"
definition supd_assn :: "(state \<Rightarrow> state) \<Rightarrow> 'a assn \<Rightarrow> 'a assn" (infixr \<open>.;\<close> 13) where "(f .; P) = (\<lambda>Y s. P Y (f s))"
lemma supd_assn_def2 [simp]: "(f .; P) Y s = P Y (f s)" apply (unfold supd_assn_def) apply (simp (no_asm)) done
lemma supd_assn_supdD [elim]: "((f .; Q) ;. f) Y s Z \<Longrightarrow> Q Y s Z" apply auto done
lemma supd_assn_supdI [elim]: "Q Y s Z \<Longrightarrow> (f .; (Q ;. f)) Y s Z" apply (auto simp del: split_paired_Ex) done
subsection "subst-res"
definition subst_res :: "'a assn \<Rightarrow> res \<Rightarrow> 'a assn" (\<open>_\<leftarrow>_\<close> [60,61] 60) where "P\<leftarrow>w = (\<lambda>Y. P w)"
lemma subst_res_def2 [simp]: "(P\<leftarrow>w) Y = P w" apply (unfold subst_res_def) apply (simp (no_asm)) done
(*###Do not work for some strange (unification?) reason lemma subst_res_Val_beta [simp]: "(\<lambda>Y. P (the_In1 Y))\<leftarrow>Val v = (\<lambda>Y. P v)" apply (rule ext) by simp
lemma subst_res_Var_beta [simp]: "(\<lambda>Y. P (the_In2 Y))\<leftarrow>Var vf = (\<lambda>Y. P vf)"; apply (rule ext) by simp
lemma subst_res_Vals_beta [simp]: "(\<lambda>Y. P (the_In3 Y))\<leftarrow>Vals vs = (\<lambda>Y. P vs)"; apply (rule ext) by simp
*)
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
lemmajava.lang.StringIndexOutOfBoundsException: Index 131 out of bounds for length 131 "(P \ \expressions\ applyjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 apply (simpA< ( triple_valid_def) done(simp(o_asm
lemmajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
done
subsection "peek-res"
definition 'a assn) \ 'a assn" where"peek_res Pf = (\Y. Pf Y Y)"
syntax
_peek_res" :: "pttrn \<Rightarrow> 'a assn \<Rightarrow> 'a assn" (\<open>\<lambda>_:. _\<close> [0,3] 3)
syntax_consts "_peek_res" == peek_res translations "w:. P" == "CONST peek_res (\w. P)"|: java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
lemmaG,A\<turnstile>{Normal P} e InstOf T-\<succ> {Q}" applyjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 apply (simp done
(* unused *) lemma peek_subst_res_allI>,|<>{} A<>Normal \ }java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Index 104 out of bounds for length 104
()
(java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 apply Aturnstile } GA |turnstile"
|:" ,{Normal (\s.. P\Val (val_this s))} Super-\ {P}"
subsection
definition
ign_res Y 'Z)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 where"P\ = (\Y s Z. \Y. P Y s Z)"
lemma ign_ign_res : "GA apply (ruleG,\<turnstile>{Normal P} e0 ? e1 : e2-\<succ> {Q}" apply (rule, apply rule apply (simp (no_asm)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
lemma [simp andjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
|Body apply (rule ext: \l>,java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84 apply (rule) apply (simp (no_asm GG,A\<turnstile>{Normal P} Cast T e-\<succ> {Q}" done
subsection "peek-st"
definition
peek_st: (st
here =(<lambda>Y s. P (store s) Y s)"G,A\<turnstile>{Normal P} Body D c-\<succ> {R}"
syntax "_peek_st" :: "pttrn java.lang.StringIndexOutOfBoundsException: Range [0, 52) out of bounds for length 0
syntax_consts
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 "\s.. P" == "CONST peek_st (\s. P)"
lemma peek_st_def2 [simp]: "(\s.. Pf s) Y s = Pf (store s) Y s" apply (unfold peek_st_def apply (simpno_asm
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lemma peek_st_st [simp]: "(\s.. \s'.. P s s') = (\s.. P s s)" apply (rule ext) apply (rule apply (simp (no_asm done
lemma\ ,
invocation_class(s <and>
(rule apply (simp : "| If: "\G,A \{Normal P} e-\ {P'};java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
one
peek_st_subst_res:( apply\<forall>b. G,A\<turnstile>{P'\<leftarrow>=b} .(if b then c;;While(e) c else Skip).{Q}\<rbrakk>
|BodyLoop done
, apply( ext apply (ruleG, apply (simp done
|:",
definition
::"'java.lang.StringIndexOutOfBoundsException: Index 105 out of bounds for length 105 where"PGAturnstile{ P} Throwe java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lemma ign_res_eq_def2 [ apply ( ign_res_eq_def
Gjava.lang.NullPointerException
: \>java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
A<
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 apply (rule ext apply ( ext apply (simpG:"\G,A \{Normal P} e-\ {P'}; done
(* unused *) lemma ign_res_eq_subst_res \<Longrightarrow> G,A\<turnstile>{Normal P} .While(e) c. {Q}"
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 apply (rule ext) apply (rule ext)
ply (no_asm done
definition
RefVar :: "(state \ vvar \ state) \ 'a assn \ 'a assn" (infixr \..;\ 13)
|Try java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
lemma RefVar_def2 [simp]: "(vf ..; P) Y s =
P (Var (fst (vf s))) (snd( <and>. (\<lambda>s. \<not>G,s\<turnstile>catch C)) \<Rightarrow> R\<rbrakk> \<Longrightarrow> apply( RefVar_def apply (simp java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 done
subsectionjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
definition
:: prog where|Callee,
definition
SXAlloc where" G P = (\Y s Z. \s'. G\s \sxalloc\ s' \ P Y s' Z)"
lemma Alloc_def2axioms
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 applyjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 apply simp)) done
definition
type_ok " definition
(\<exists>L T C A. (normal s \<longrightarrow> \<lparr>prg=G,cls=C,lcl=L\<rparr>\<turnstile>t\<Colon>T \<and> \<lparr>prg=G,cls=C,lcl=L\<rparr>\<turnstile>dom (locals (store s))\<guillemotright>t\<guillemotright>A ) \<and> s\<Colon>\<preceq>(G,L))"
datatype' = triple "(' )term" "' ) (** should be
something b y etac ax_derivsb y eatac ax_derivs
' "a"
abbreviation
var_triple 'java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(\<open>{(1_)}/ _=\<succ>/ {(1_)}\<close> [3,80,3] 75)
byeatac 1 1
abbreviation
expr_triplelemma ax_thin (no_asm
where}
abbreviation
exprs_triple'assnexprlist' ]
(java.lang.StringIndexOutOfBoundsException: Range [0, 84) out of bounds for length 72
edoteq= e<succ> {Q}"
"Glemma :
java.lang.StringIndexOutOfBoundsException: Range [6, 3) out of bounds for length 143 \<forall>Y s Z. P Y s Z \<longrightarrow> type_ok G t s \<longrightarrow>java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 15 forall>Y' s'. G\<turnstile>s \<midarrow>t\<succ>\<midarrow>n\<rightarrow> (Y',s') \<longrightarrow> Q Y' s' Z))"
abbreviation
ax_valid :: " \ 'b triples \ 'a triple \ bool" (\_,_\_\ [61,58,58] 57)
GA <>=GA\<Turnstile>{t}"
notation (java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
ax_valid ( \<open>_,_|=_\<close> [61,58,58] 57)(ule HOL
lemma
( (\<forall>Y s Z. P Y s Z \<longrightarrow> (\<exists>L. (normal s \<longrightarrow> (\<exists> C T A. \<lparr>prg=G,cls=C,lcl=L\<rparr>\<turnstile>t\<Colon>T \<and> \<^context>)\<close>)
inductive
ax_derivstext\<close> andax_deriv ::" \ 'a triples \ 'a triple \ bool" (\_,_\_\ [61,58,58] 57) for: java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 where\LongrightarrowGA\<turnstile>{P ::'a assn} t\<succ> {Q }"
apply ruleax_derivs)
| applyjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
| insert thetriple
G,A|\<turnstile>insert t ts"
| asm: "ts\A \ G,A|\ts"
(* could be added for convenience and efficiency, but is not necessary cut: "\<lbrakk>G,A'|\<turnstile>ts; G,A|\<turnstile>A'\<rbrakk> \<Longrightarrow> G,A |\<turnstile>ts"
*)
| weaken:" \Y s Z. P Y s Z \ (\Y' s'. (\Y Z'. P' Y s Z' \ Q' Y' s' Z') \
| conseq:"\Y s Z . P Y s Z \ (\P' Q'. G,A\{P'} t\ {Q'} \ (\Y' s'.
(\<forall>Y Z'. P' Y s Z' \<longrightarrow> Q' Y' s' Z') \<longrightarrow>
Q Y' s' Z )) \<Longrightarrow> G,A\<turnstile>{P } t\<succ> {Q }"
| AVar: "\G,A\{Normal P} e1-\ {Q};
java.lang.StringIndexOutOfBoundsException: Index 131 out of bounds for length 131
G,apply java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
( conseq12applyerule)
G
"\G,A\{Normal P} .init_comp_ty T. {Q}; G,A\{Q} e-\
{\<lambda>Val:i:. abupd (check_neg i) .; Alloc G (Arr T (the_Intg i)) R}\<rbrakk> \<Longrightarrow>
G, \<forall>Y s Z. P Y s Z \<longrightarrow> (\<forall>Y' s'. (\<forall>Y Z'. P' Y s Z' \<longrightarrow> Q' Y' s' Z') \<longrightarrow>
| Cast')
abupd
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 4
| Inst: java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
Q\<leftarrow>Val (Bool (v\<noteq>Null \<and> G,s\<turnstile>v fits RefT T))}\<rbrakk> \<Longrightarrow>
A
| Lit: "G,A\ \ G,A\{P::'a assn} t\ {Q::'a assn}"
|java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 \<Longrightarrow>
G,
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 "\G,A\{Normal P} e1-\ {Q}; <forall>v1. G,A\<turnstile>{Q\<leftarrow>Val v1} rule (* unused *)) if binopv1thent\<succ>
{\<lambda>Val:v2:. R\<leftarrow>Val (eval_binop binop v1 v2)}\<rbrakk> \<Longrightarrow>
G,A\<turnstile>{Normal P} BinOp binop e1 e2-\<succ> {R}"
| java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
|Accjava.lang.StringIndexOutOfBoundsException: Index 123 out of bounds for length 123
G
",(A:apply auto \<forall>vf. G,A\<turnstile>{Q\<leftarrow>Var vf} e-\<succ> {\<lambda>Val:v:. assign (snd vf) v .; R}\<rbrakk> \<Longrightarrow>
(java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
:"<>GA P'
rule
G,java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.NullPointerException
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
= mode s a statTconseq12
l <Longrightarrow> G,A\<turnstile>{P::(res \<times> state) assn} t\<succ> {P}" 1 )
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 lemma: G(:java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
Methd declC : "apply (rule ax_derivs( applyjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
|java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
lemma ax_di:
java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
G,A\<turnstile>{Q} .c. {\<lambda>s.. abupd (absorb Ret) .; R\<leftarrow>(In1 (the (locals s Result)))}\<rbrakk> \<Longrightarrow> applyruleax_escape java.lang.StringIndexOutOfBoundsException: Range [10, 7) out of bounds for length 10
ap safe \<comment> \<open>expression lists\<close>( conseq12)+
| Nil(* unused *)(<
ax_supd_shuffle \< \turnstileNormalees>
|java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
| (ule)
G, clarify
| Lab \< GA\<turnstile>{P \<and>. Not \<circ> C} t\<succ> {Q}\<rbrakk> \<Longrightarrow> G,A\<turnstile>{P} t\<succ> {Q}"
G,A\<turnstile>{Normal P} .l\<bullet> c. {Q}"apply
|
G,java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
) "s java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
",\
(* unfolding variant of Loop, not needed herejava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 LoopU:"\<lbrakk>G,A \<turnstile>{Normal P} e-\<succ> {P'}; \<forall>b. G,A\<turnstile>{P'\<leftarrow>=b} .(if b then c;;While(e) c else Skip).{Q}\<rbrakk> \<Longrightarrow> G,A\<turnstile>{Normal P} .While(e) c. {Q}"
*)
: java.lang.NullPointerException
:
:"
| Throw:"\G,A\{Normal P} e-\ {\Val:a:. abupd (throw a) .; Q\\}\ \ (unfold dapt_pre_def)
G,A\<turnstile>{Normal P} .Throw e. {Q}" xapplyconseq1
| applysimp: java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0
GA\<turnstile>{Q \<and>. (\<lambda>s. G,s\<turnstile>catch C) ;. new_xcpt_var vn} .c2. {R};
( <and>. (\<lambda>s. \<not>G,s\<turnstile>catch C)) \<Rightarrow> R\<rbrakk> \<Longrightarrow> conseq1 done
| java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
( ))
.
G,A\foralljava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
\<comment> \<open>Some dummy rules for the intermediate terms \<open>Callee\<close>, \<open>InsInitE\<close>, \<open>InsInitV\<close>, \<open>FinA\<close> only used by the smallstep
semantics.\<close>
: G,\<turnstile>{Normal P} InsInitV c v=\<succ> {Q}"
|InsInitE: "GA{Normal P} InsInitE c e-\ {Q}"
| Callee: " G,Alemma ax_subst_Var_allI:
|FinA GA\<turnstile>{Normal P} .FinA a c. {Q}" (* axioms
*)
apply( elim java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
adapt_pre'assnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
adapt_preQ (<java.lang.StringIndexOutOfBoundsException: Index 133 out of bounds for length 133
subsubsection "ulesmplete
lemma cut_valid: apply( elim:conseq1 apply (unfold ax_valids_def) apply fast done
(*if cut is available Goal "\<lbrakk>G,A'|\<turnstile>ts; A' \<subseteq> A; \<forall>P Q t. {P} t\<succ> {Q} \<in> A' \<longrightarrow> (\<exists>T. (G,L)\<turnstile>t\<Colon>T) \<rbrakk> \<Longrightarrow> G,A|\<turnstile>ts" b y etac ax_derivs.cut 1; b y eatac ax_derivs.asm 1 1; qed "ax_thin";
*) lemmaax_thin lemma apply (erule ax_derivs.lemmaax_Lit2_test_complete:
ALLGOALS apply (rule ax_derivs apply (erule (1) ax_derivs apply (fast introlemmaax_LVar2G(:'java.lang.StringIndexOutOfBoundsException: Index 134 out of bounds for length 134 (*apply (fast intro: ax_derivs.cut) *) apply( intro .weaken apply rule.conseq strip
tactic \<^context> 1 1",rule exI, rule exI, erule (1) conjI) (* 37 subgoals *) prefer 8(* Methd *)
ule,druleerulefast
tactic apply(* unused *) done
lemma ax_thin_insert applylemma: apply fast doneapply (erule thin_rlapply (erule finite_induct)
lemma weaken: "G,lemmaax_finite_mtriples_lemma:java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96 apply (erule ax_derivs" G,A|\{{P} mb-\ {Q} | F}" (*42 subgoals*)
tacticstrip_tac apply (tactic \<open>ALLGOALS(REPEAT o (EVERY'[dresolve_tac \<^context> @{thms subset_singletonD},thin_rl)apply (erule ax_derivsunfold)
eresolve_tac \<^context> [disjE],
fast_tac (\<^context> addSIs @{thms ax_derivs.empty})]))\<close>)
tactichyp_subst_tac
simprule.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
drule) apply( introax_derivsjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 apply (fast : ax_derivs) (*apply (blast intro: ax_derivs.cut) *): ax_derivscut apply (fast.weaken apply (ule ax_derivs( : image_eqI rev_image_eqI (*37 subgoals*)
clarsimpjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
THEN_ALL_NEW rule.insert (*1 subgoal*) apply (clarsimp simp elim) apply (rule ax_derivsdone apply (drule specjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
( impEjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 apply (rule) apply (erule G(A:a )<>Pjava.lang.StringIndexOutOfBoundsException: Index 131 out of bounds for length 131
HOL. erulerev_mp oops(* dead end, Methd is to blame *)
subsubsection
\<open>In the following rules we often have to give some type annotations like:lemmaax_free_wt \<longrightarrow> G,(A::'a triple set)\<turnstile>{Normal P} t\<succ> {Q::'a assn} \<Longrightarrow>
Given only the above annotations, Isabelle infer GA\<turnstile>{Normal P} t\<succ> {Q}"
were have
different types ofapply( ax_escape in triple (\<^term>\<open>P\<close> and \<^term>\<open>Q\<close>). But \<open>ax_derivs.Methd\<close> enforces the same type in the inductive definition of
the. So haveto ( addjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
rules.declare [intro \<close> lemma:
java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 0 lemmaax_no_hazard \<Longrightarrow> G,A\<turnstile>{P ::'a assn} t\<succ> {Q }"
( ax_derivsapply (erule) apply clarsimp
blast doneapply force
\<comment> \<open>Nice variant, since it is so symmetric we might be able to memorise it.\<close> lemma conseq12 =ax_Skip ]
(\<forall>Y Z. P' Y s Z \<longrightarrow> Q' Y' s' Z) \<longrightarrow>
java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 \<Longrightarrow> G,A\<turnstile>{P::'a assn } t\<succ> {Q }"
conseq12 apply fast done
lemma conseq12_from_conseq12': "\G,(A::'a triple set)\{P'::'a assn} t\ {Q'}; \<forall>Y s Z. P Y s Z \<longrightarrow> (\<forall>Y' s'. (\<forall>Y Z'. P' Y s Z' \<longrightarrow> Q' Y' s' Z') \<longrightarrow>
Q Y' s' Z)\<rbrakk> \<Longrightarrow> G,A\<turnstile>{P::'a assn} t\<succ> {Q }" apply (erule') apply blast done
lemma conseq1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 <Longrightarrow> G,A\<turnstile>{P::'a assn} t\<succ> {Q}" apply (erule a apply blast done
lemma conseq2: "\G,(A::'a triple set)\{P::'a assn} t\ {Q'}; Q' \ Q\ \<Longrightarrow> G,A\<turnstile>{P::'a assn} t\<succ> {Q}" applyapplyrulejava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 apply blast erule.Call [ conseq1 done
lemma ax_escapeapplyuleclarsimp "\\Y s Z. P Y s Z \<longrightarrow> G,(A::'a triple set)\<turnstile>{\<lambda>Y' s' (Z'::'a). (Y',s') = (Y,s)}
t\<succ> lemma: \<rbrakk> \<Longrightarrow> G,A\<turnstile>{P::'a assn} t\<succ> {Q::'a assn}" apply rule.conseq apply force done
(* unused *)
ax_constant \<Longrightarrow> G,A\<turnstile>{\<lambda>Y s Z. C \<and> P Y s Z} t\<succ> {Q}" apply( ax_escape applyGStatic s)a \<lparr>name=mn,parTs=pTs\<rparr>)} apply (rule conseq12) apply fast apply auto
lemma [introjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 "G,(A::'a triple lemmaax_Methd1 \,union>{{P} Methd-\<succ> {Q} | ms}|\<turnstile> {{P} body G-\<succ> {Q} | ms}; (C,sig)\<in> ms\<rbrakk> \<Longrightarrow> donedrule)
(* unused *) lemmajava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 apply auto
lemma :
Cjava.lang.NullPointerException \<Longrightarrow> G,A\<turnstile>{P::(res \<times> state) assn} t\<succ> {P}" apply ( conseq12 apply java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 apply( (1) ) done
(* unused *) lemma ax_trivial: "G,(A::'ajava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 applyapplyerule) applyauto
applV Pjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
(* unused *) lemma ax_disj "rules derived Init and Done" "\G,(A::'a triple set)\{P1::'a assn} t\ {Q1}; G,A\{P2::'a assn} t\ {Q2}\ \<Longrightarrow> G,A\<turnstile>{\<lambda>Y s Z. P1 Y s Z \<or> P2 Y s Z} t\<succ> {\<lambda>Y s Z. Q1 Y s Z \<or> Q2 Y s Z}" : apply (rule ax_escape.init c. {et_lvars. } apply safe
pply ( apply (drule ax_derivs done .apply unfold)
apply (erule apply simp apply fast
init.{apply( conseq1
lemma adapt_pre_adapts: "G,java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 \<longrightarrow> G,A\<Turnstile>{adapt_pre P Q Q'} t\<succ> {Q'}" apply ( adapt_pre_def
.Init Object <and>. initd Object)::'a assn}" apply fast done
lemma adapt_pre_weakest: "<>G A:' set) t ,\Turnstile{java.lang.StringIndexOutOfBoundsException: Index 137 out of bounds for length 137
P'apply erule.Init) apply( adapt_pre_defsimp) apply (drule specassumption apply( x = "{} pec) apply (drule_tac
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 oops
lemma ax_Super2: "G(A:'atriple set)\
{NormalA\<turnstile>{P} t\<succ> {SXAlloc G (\<lambda>Y s Z. Q Y s Z \<and> G,s\<turnstile>catch SXcpt xn)}" apply (rule ax_derivsauto!:sxalloc_elim_cases(:triple apply force done
lemma ax_Nil2 ax_Alloc: ",A:'a triple set)\{Normal P::'a assn} []\\ {Normal (P\=Vals [])}" apply( ax_derivs.Nil conseq1java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 apply force done
subsubsection miscstructural
(* unused *)\<Longrightarrow> G,A\<turnstile>{P} t\<succ> {Alloc G (CInst C) Q}" lemmaapplyauto!: )
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
G,A|\<turnstile>{{P} mb-\<succ> {Q} | F}" apply (frule (1) finite_subset) apply (erule rev_mp apply (erule thin_rl) apply (erule finite_induct) apply (unfold mtriples_def)
pply ( intro:ax_derivs ax_derivs)+ apply force done lemmas ax_finite_mtriples = ax_finite_mtriples_lemma [java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 20
lemma ax_Alloc: "G,(A::'a triple set)\{P::'a assn} t\
{Normal (\<lambda>Y (x,s) Z. (\<forall>a. new_Addr (heap s) = Some a \<longrightarrow>
Q (Val (Addr a)) (Norm(init_obj G (CInst C) (Heap a) s)) Z)) \<and>.
heap_free (Suc (Suc 0))} \<Longrightarrow> G,A\<turnstile>{P} t\<succ> {Alloc G (CInst C) Q}" apply (erule conseq2) apply (auto elim!: halloc_elim_cases) done
lemma ax_Alloc_Arr: "G,(A::'a triple set)\{P::'a assn} t\
{\<lambda>Val:i:. Normal (\<lambda>Y (x,s) Z. \<not>the_Intg i<0 \<and>
(\<forall>a. new_Addr (heap s) = Some a \<longrightarrow>
Q (Val (Addr a)) (Norm (init_obj G (Arr T (the_Intg i)) (Heap a) s)) Z)) \<and>.
heap_free (Suc (Suc 0))} \<Longrightarrow>
G,A\<turnstile>{P} t\<succ> {\<lambda>Val:i:. abupd (check_neg i) .; Alloc G (Arr T(the_Intg i)) Q}" apply (erule conseq2) apply (auto elim!: halloc_elim_cases) done
lemma ax_SXAlloc_catch_SXcpt: "\G,(A::'a triple set)\{P::'a assn} t\
{(\<lambda>Y (x,s) Z. x=Some (Xcpt (Std xn)) \<and>
(\<forall>a. new_Addr (heap s) = Some a \<longrightarrow>
Q Y (Some (Xcpt (Loc a)),init_obj G (CInst (SXcpt xn)) (Heap a) s) Z)) \<and>. heap_free (Suc (Suc 0))}\<rbrakk> \<Longrightarrow>
G,A\<turnstile>{P} t\<succ> {SXAlloc G (\<lambda>Y s Z. Q Y s Z \<and> G,s\<turnstile>catch SXcpt xn)}" apply (erule conseq2) apply (auto elim!: sxalloc_elim_cases halloc_elim_cases) done
end
¤ 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.0.23Bemerkung:
(vorverarbeitet)
¤
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.