section‹Examples using the Verification Environment›
theory VcgEx imports"../HeapList""../Vcg"begin
text‹Some examples, especially the single-step Isar proofs are taken from
texttt{HOL/Isar\_examples/HoareEx.thy}. ›
subsection‹State Spaces›
text‹
First of all we provide a store of program variables that
occur in the programs considered later. Slightly unexpected
things may happen when attempting to work with undeclared variables. ›
text‹We decorate the state components in the record with the suffix ‹_'›,
avoid cluttering the namespace with the simple names that could no longer
used for logical variables otherwise. ›
text‹We will first consider programs without procedures, later on
will regard procedures without global variables and finally we
get the full pictures: mutually recursive procedures with global
(including heap). ›
subsection‹Basic Examples›
text‹
We look at few trivialities involving assignment and sequential
composition, in order to get an idea of how to work with our
formulation of Hoare Logic. ›
text‹
Using the basic rule directly is a bit cumbersome. ›
text‹
If we refer to components (variables) of the state-space of the program
we always mark these with ‹🍋›. It is the acute-symbol and is present on
most keyboards. So all program variables are marked with the acute and all
logical variables are not.
The assertions of the Hoare tuple are
ordinary Isabelle sets. As we usually want to refer to the state space
in the assertions, we provide special brackets for them. They can be written
as {\verb+{| |}+} in ASCII or ‹{}› with symbols. Internally
marking variables has two effects. First of all we refer to the implicit
state and secondary we get rid of the suffix ‹_'›.
So the assertion @{term "{|🍋N = 5|}"} internally gets expanded to ‹{s. N_' s = 5}› written in ordinary set comprehension notation of
Isabelle. It describes the set of states where the ‹N_'› component
is equal to ‹5›. ›
text‹
Certainly we want the state modification already done, e.g.\ by
simplification. The ‹vcg› method performs the basic state
update for us; we may apply the Simplifier afterwards to achieve
``obvious'' consequences as well. ›
text‹
It is important to note that statements like the following one can
only be proven for each individual program variable. Due to the
extra-logical nature of record fields, we cannot formulate a theorem
relating record selectors and updates schematically. ›
text‹
In the following assignments we make use of the consequence rule in
order to achieve the intended precondition. Certainly, the ‹vcg› method is able to handle this case, too. ›
lemma"Γ⊨{🍋M = 🍋N}🍋M :== 🍋M + 1 {🍋M ≠🍋N}" proof - have"{🍋M = 🍋N}⊆{🍋M + 1 ≠🍋N}" by auto alsohave"Γ⊨…🍋M :== 🍋M + 1 {🍋M ≠🍋N}" by vcg finallyshow ?thesis . qed
lemma"Γ⊨{🍋M = 🍋N}🍋M :== 🍋M + 1 {🍋M ≠🍋N}" proof - have"∧m n::nat. m = n ⟶ m + 1 ≠ n"
― ‹inclusion of assertions expressed in ``pure'' logic,›
― ‹without mentioning the state space› by simp alsohave"Γ⊨{🍋M + 1 ≠🍋N}🍋M :== 🍋M + 1 {🍋M ≠🍋N}" by vcg finallyshow ?thesis . qed
text \ ‹ at web de We n do some babasic examp of actual \texttt{WHILE} programs. This one is a loop for calculating the product of two natural numbers, by iterated addition. We first give detailed structured proof based on single-step Hoare rules. \<close>
lemma WHILE \text\openSome exexamples, especially the single-step Isar proofs are taken from DO 🍋S :== 🍋S + b;; 🍋M + 1 OD {S = a * b}"
-
let "{🍋?inv}\<acute M * b<>"
have "{M = 0 & 🍋⊆{?inv}" by auto
also have "Γ⊨ 'gvas "g tt"+
roof
We decorate the state components in the record with the suffix ‹,
have "{?inv ∧🍋 a}{S + b = (🍋 1 * b\rbrace"
by auto
also have "Γ⊨… ?c {🍋oWe will first consider programs without procedures, later on
finally show
qed
also have "{🍋and> ¬ (🍋M ≠⊆🍋" by ato
ally shw?thehesis by bast
‹
The subsequent version of t 🚫
to reduce the Hoare statement to a purely logical problem that can be
solved fully automatically. Note that we have to specify the \texttt{WHILE} loop invariant in the original statement. ›
WHILE 🍋M ≠ a
INV {🍋S = 🍋 🚫 :== 🍋S + b;; 🍋M :== 🍋 {🍋🚫
apply vc
apply auto
done
‹
<>S
TRY
WHILE True
INV {🍋S = 🍋
DO IF 🍋S :== 🍋M :== 🍋+ 1 FI OD
CATCH
SKIP
END {🍋S = a * b}"
vcg
auto
"Γ⊨{M = 0 ∧🍋
TRY
WHILE True
INV {🍋M * b}
DO IF 🍋\<urnstile {True}🍋N :== 10 {N = 10}"
ELSE acute>>S :== 🍋S + b;; 🍋M :== 🍋
FI
OD
CATCH
IF 🍋Abr = ''Break'' THEN SKIP ELSE Throw FI
END {🍋S = a * b}"
vcg
auto
‹
the ‹ above, and the ‹ for an state-update followed
a ‹⊨{N = a}🍋N + 1 {🍋" ›
"Γ⊨True}acute>>M :== a;; 🍋N :== b {🍋M = a ∧🍋" {Abr = ''Break''}∙ WHILE True INV {🍋S = 🍋M * b\\}
DO IF 🍋M = a THEN RAISE 🍋Abr :== ''Break''
ELSE 🍋S :== 🍋S + b;; 🍋M :== 🍋M + 1
FI
OD {🍋S = a * b}"
vcg
auto
"Γ⊨{🍋M = 0 ∧🍋S = 0}
TRY
WHILE True
INV {🍋S = 🍋M * b}
DO IF 🍋M = a THEN RAISE 🍋Abr :== ''Break''
ELSE 🍋S :== 🍋M :== 🍋
FI
OD
CATCH
IF 🍋''Break'' THEN SKIP ELSE Throw FI
END {S = a * b}
vcg
auto
"Γ🍋N = a} {🍋 WHILE True
INV \<>\
DO IF 🍋
ELSE 🍋{N = a}N :== 🍋🍋
OD {Γs. x_'_update (x_' s) s)) {s. x_' s = a}"
voops
auto
\openvcg› method is able to handle this case, too.
"Γ{I = i}O\acutea> :== 2 COL {🍋I ≤ i}"
apply vcg
by simp
<>< LOC 🍋N :== 🚫
by vcg
"Γ⊨{🍋N = n} LOC 🍋
by vcg
‹⊨🍋M + 1 {M ≠🍋"
‹
We verify an imperative program to sum natural numbers up to a given
limit. First some functional definition for proper specification of
pr. ›
‹ a
The following proof is quite explicit in DO \acuteS :== 🍋M :== 🍋
with the ‹
nmentet and seentialcompiti oe that e expres
intermediate proof obligation in pure logic, wi
state space. ›
"Γ⊨Tre} 🍋I :== 1;;
WHILE 🍋⊨ ?c {?inv}
DO 🍋⊨🍋M ≠ ?c {?inv}. 🍋I + 1
OD
java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "macro" is null (is"\<Gamma>\<turnstile> proofjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 let?sum=\<k..SUMMj<." let?inv="\<lambda>si.s=?sumi"
have"\<Gamma>\<turnstile>\<lbrace>CATCH
have"True\<longrightarrow>0=?sum1" bysimp alsohave"\<Gamma>\<turnstile>\<lbrace>\<dots>\<rbrace>\<acute>S:==0;;\<acute>I:==applyvcg byvcg finallyshow?thesis. qed alsohave"\<Gamma>\<turnstile>\<lbrace>?inv\<acute>S\<acute>I\<rbrace\lbrace<S=<>b<> proof let?body="\<acute>S:==\<acute>S+\<acute>I;;\<acute>I:==\<acute>I+1" have"\<And>si.?invsijava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 bysimp alsohave"\<Gamma>\<turnstile>\<lbrace>\<acute>S+\<acute>I=?sum(\<acute>I+1)\<rbrace>?body\<lbrace>?inv\<acute>S\<acute>I\<rbrace>" byvcg finallyshow"\<Gamma>\<turnstile>\<lbrace>?inv\<acute>S\<acute>I\<and>\<acute>I\<noteq>n\<rbrace>?body\<lbrace>?inv\<acute>S\<acute>I\<rbrace>". qed alsohave"\<And>si.s=?sumi\<and>\<not>i\<noteq>n\<longrightarrow>s=?sumn" bysimp finallyshow?thesis. qed
text\<penjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 Thenextversionusesthe\<open>vcg\<close>method,whilestillexplaining theresultingproofobligationsinanabstract,structuredmanner. <lose>
theoremtheproblem. <><>java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 INV\<lbrace>\<acute>S=(SUMMj<\<acute>I.j)\|sumf(Sucnfn+fnjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 DO \<acute>S:==\<acute>S+\<acute>I;; \<acuteI:=\acute>+1 OD \<lbrace>\<acute>S=(SUMMj<n.j)\<rbrace>" proof- let?sum="\<lambda>k.SUMMj<k.j" let?inv="\<lambda>si.s=?sumi"
show?thesis proofvcg show"?inv01"bysimp next fixisassume"?invsi""i\<noteq>n" thus"?inv(s+i)(i+1)"bysimp next fixisassumex:"?invsi""\<not>i\<noteq>n" thus"s=?sumn"bysimp qed qed
text\<open> Certainly,thisproofmaybedonefullyautomaticallyaswell,provided thattheinvariantisgivenbeforehand. \closejava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
theorem"\<Gamma>\<turnstile>\<lbrace>True\<rbrace> \<acute>S:==0;;\<acute>I:==1;; WHILE\<acute>I\<noteq>n INV\<lbrace>\<acute>S=(SUMMj<\<acute>I.j)\<rbrace> DO \<acute>S:==\<acute>S+\<acute>I;; have"True<>=sum" OD \<lbrace>\<acute>S=(SUMMj<n.j)\<rbrace>" applyvcg applyauto done
subsection\<open>SWITCH\<close>
lemma"\<Gamma>\<turnstile>\<lbrace>\<acute>N=5\<rbrace>SWITCH\<acute>B {True}\<Rightarrow>\<acute>N:==6 |{False\<ightarrow\acute>N:=7 END \<lbrace>\<acute>N>5\<rbrace>" applyvcg applysimp done
lemmaproof {v.v<5}\<Rightarrow>\<acute>N:==6 |{v.v\<ge>5}\<Rightarrow>\<acute>N:==7 END \<lbrace>\<acute>N>5\<rbrace>" applyvcg applysimp done
text\<open>Aprocedureisgivenbythesignatureoftheprocedure followedbytheprocedurebody. Thesignatureconsistsofthenameoftheprocedureandalistof parameters.Theparametersinfrontofthepipe\<open>|\<close>arevalueparameters andbehindthepipejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 semantics.Thevalueofaresultparameterattheendoftheprocedureispassedback tothecaller. \<close>
text\<open> Behindthescenesthe\<open>procedures\<close>commandprovidesusconvenient forprocedurecalls,definesaconstantfortheprocedurethattheinvariantisgivenbeforehand. (named@{term"Fac_body"})andcreatessomelocales.\acuteS=0;acuteI=;; setupjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 Alocaleisnamed\<open>Fac_impl\<close>andextendsthe\<open>hoare\<close>locale withatheorem@{term"\<Gamma>''Fac''=Fac_body"}thatsimplystateshowthe applyvcg Thepurposeofthelocalesis inwhichwewillproveprogramscorrect. Intheselocalestheprocedurecontext@{term"\<Gamma>"}isfixed. SoalwaysusethisletterTrue<ightarrow>\acute>N:=6 specifications.Thisiscrucial,ifwelateronprovesometuplesunderthe assumptionofsomeprocedurespecifications. \<close>
contextFac_impl begin text\<open> @{term"CALLFac(\<acute>N,\<acute>M)"}isinternally: \\<brace><acute>>5\rbrace" declare[[hoare_use_call_tr'=false]] text\<open> @{term"CALLFac(\<subsection<>()Procedures\<> \<close> term"CALLFac(\<acute>N,\<acute>M declare[[hoare_use_call_tr'=true]] end
text\ letusthat{Fac}itsspecification \<close=1"|
text\<open> ProcedurespecificationsareordinaryHoaretuples.Weusetheparameterless callforthejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 for\<open>Call''Fac''\<close>.Thisemphasisesthatthespecification describestheinternalbehaviouroftheprocedure,whereasparameterpassing correspondstotheprocedurecall. \<close>
text\<open> Sincethefactorialwasimplementedrecursively, themainingredientofthisproofis,toassumethatthespecificationholdsfor therecursivecallof@{termFac}andprove<> Theassumptionforrecursivecallsisaddedtothecontextby<>\closesyntax the(named@termFac_body"}some.Thejava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 (alsoderivedfromgeneralrulemutuallyrecursiveprocedures)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67 @{thm[display]HoarePartial.ProcRec1[no_vars]} Theverificationconditiongeneratorwillinferthespecificationoutofthe contextwhenitencountersarecursivecallofthefactorial. \<close>
text\<open>HeresomeIsarstyleversionoftheproof\<close> lemma(inFac_impl) shows"\<forall>n.\<Gamma>\<turnstile>\<lbrace>\<acute>N=n\<rbrace>\<acute>R:==PROCFac(\<acute>N)@termCALLFac(\acute>,<java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 proof(hoare_ruleHoarePartial.ProcRec1) haveFac_spec:"\foralln.\Gamma,(\<Unionn(<lbrace>N=\rbrace,Fac_proc<><>fac\rbrace>java.lang.StringIndexOutOfBoundsException: Index 136 out of bounds for length 136 \<turnstile>java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 apply(ruleallI) apply(rulehoarep.Asm)
show"\<forall>n.\<Gamma>,(\<Union>n.{(\<lbrace>\<acute>N=n\<rbrace>,Fac_'proc,\<lbrace>\<acute>R=facn\<rbrace>,{})<> \<turnstile>\<lbrace>\<acute>N=n\<rbrace>IF\<acute>N=0for\openCall''\<>.Thisemphasisesthatthespecification java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 applyvcg simp done qed
lemma(inFac_impl) shows"\<forall>n.\<Gamma>\<turnstile>\<lbrace>\<acute>N=n\<rbrace>\<acute>R:==PROCFac(\<acute>N)\<lbrace>\<acute>R=facn\<rbrace>" (is"\<forall>n.\<Gamma>\<turnstile>(?Pren)?Fac(?Postn)") proof(hoare_ruleHoarePartial.ProcRec1) haveFac_spec:"\<forall>n.\<theverificationgeneratorencountersaprocedurecall \<turnstile>(?Pren)?Fac(?Postn)" apply(ruleallI) apply(rulehoarep.Asm) byauto show"<>n<>(<Unionn{?Pre,Fac_'procPost{)}java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 \<turnstile>(?Pren)IF\<acute>N=0THEN\<acute>R:==1 ELSE\<acute>R:==CALLFac(\<acute>N-1);;\<acute>R:==\<acute>N*\<acute>RFI(?Postn)" applyvcg applysimp done qed
lemma(inFac_impl)Fac_spec: shows"\<forall>n.\<Gamma>\<turnstile>\<lbrace>\<acute>N=n\<rbrace>\<acute>R:==PROCFac(\<acute>N)\<lbrace>\<acute>R=facn\<rbrace>" (is"\<forall>n.\<Gamma>\<turnstile>(?Pren)?Fac(?Postn)") proof(hoare_ruleHoarePartial.ProcRec1\forall>n\Gamma,\Unionn.{\lbrace><>N=\rbrace,'proc<brace>\acute>Rfac\<brace>,}}java.lang.StringIndexOutOfBoundsException: Index 126 out of bounds for length 126 define\<Theta>'where"\<Theta>'=(\<Union>n.{(?Pren,Fac_'proc,?Postn,{}::('a,'b)vars_schemeset)})" haveFac_spec:"\<forall>n.\<Gamma>,\<Theta>'\<turnstile>(?Pren)?Fac(?Postn)" by(unfold\<Theta>'_def,ruleallI,rulejava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 txt\<open>Wehavetonamethefact\<open>Fac_spec\<close>,sothatthevcgcan usethespecificationfortherecursivecall,sinceitcannotinferit fromtheopaque@{term"\<Theta>'"}.\<close> show"\<forall>\<sigma>.\<Gamma>,\<Theta>'\<turnstile>(?Pre\<sigma>)IF\<acute>N=0THEN\<acute>R:==1 ELSE\<acute>R:==CALLFac(\<acute>N-1);;\<acute>R:==\<acute>N*\<acute>RFI(?Post\<sigma>)"
java.lang.StringIndexOutOfBoundsException: Range [42, 13) out of bounds for length 13 applysimp done qed
record'glist_vars="'gstate"+ p_'::"ref" q_'::"ref" r_'::"ref" root_'::"<>:=njava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 tmp_'::"ref"
text\<>Updatestoglobalcomponentsaprocedurewill alwaysbepropagatedtothecaller.Thisisimplicitlydonebythe parameterpassingtranslations.Therecordcontainingtheglobalwithprefix""java.lang.StringIndexOutOfBoundsException: Index 119 out of bounds for length 119 \<close>
(* append_spec: "\<forall>\<sigma>PsQs. \<Gamma>\<turnstile>\<lbrace>\<sigma>.List\<java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 'glist_vars'gstate" \<lbrace>List\<acute>p\<acute>next(Ps@Qs)\<and>(\<forall>x.x\<notin>setPs\<longrightarrow>\<acute>nextx=q_:ref
lemma"{statespacevariable@term"\sigma"},@term"Ps"{term"Qs"java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78 = {t.\<exists>next.globalst=next_'_update(\<lambda>_.next)(globalsZ)}" apply(unfoldmex_defmeq_def) apply(simp) done
text\<open>Iftheverificationconditiongeneratorworksonaprocedurecall it ispresenttheprocedurecallissimplifiedbeforetheHoarerule @{thm[source]HoarePartial.ProcSpec}isapplied.Simplificationoftheprocedurecallmeans, thatthe``copyback''oftheglobalcomponentsissimplified.Onlythose componentsthatoccurinthemodifiesclausewillactuallybecopiedback. Thissimplificationisjustifiedbytherule@{thm[source]HoarePartial.ProcModifyReturn}. Soafterthissimplificationallglobalcomponentsthatdonotappearin themodifiesclausewillbetreatedaslocalvariables. \<close>
text\<open>Toverifythebodyof@{term"append"}wedonotneedthemodifiesbrace>\<cute>p:==CALLappend(\<acute>p,Null)\<lbrace>\<acute>cont=c\<rbrace>" clausetext\<>theframecondition, wejava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 morecomplexprocedures. \<close>
(a\>'a\<>bool<>alist\Rightarrow>bool" where "sortedle[]=True"| "sortedle(x#xs)=((\<forall>y\<in>setxs.lexy)\<and>sortedlexs)"
procedures insert(r,p|p)= "IF\<acute>r=NullTHENSKIP ELSEIF\<acute>p=NullTHEN\<acute>p:==\<acute>r;;\<acute>p\<rightarrow>\<acute>next:==Null ELSEIF\<acute>r\<rightarrow>\<acute>cont\<le>\<acute>p\<rightarrow>\<acute>cont THEN\<acute>r\<rightarrow>\<acute>next:==\<acute>p;;\<acute>p:==\<acute>r ELSE\<acute>p\<rightarrow>\<acute>next:==CALLinsert(\<acute>r,\<acute>p\<rightarrow>\<acute>next) FI FI FI"
apply(hoare_ruleHoarePartial.ProcRec1importantsubtletyWhenevertalkaboutthe@termcont"}java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78 applyvcg apply(introconjIimpI) applyfastforce applyfastforce applyfastforce apply(clarsimp) applyforce done
localehoare_ex= hoare\<Gamma>for\<Gamma>::"'csorted(\le)map\acutecontRs<and>RssetPs\andjava.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
lemma(inhoare_ex) "\<Gamma>\<turnstile>\<lbrace>\<acute>i=0\<and>\<acute>first=Null\<and>n*sz\<le>\<acute>free\<rbrace>
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 INV\<lbrace>\<exists>Ps.List\<acute>first\<acute>(larsimp) setPs\<subseteq>set\<acute>alloc\<and>(n-\<acute>i)*sz\<le>\<acute>free\<rbrace> DO \<acute>p:==NEWsz[\<acute>cont:==0,\<acute>next:==Null];; \<acute>p\<rightarrow>\<acute>next:==\<acute>first;; \<acute>first:==\<acute>p;; \<acute>i:==\<acute>i+1 OD \<lbrace>\<exists>Ps.List\<acute>first\<acute>nextPs\<and>lengthPs=n\<and>setPs\<subseteq>set\<acute>alloc\<rbrace>"
lemma(inhoare_ex) "\<Gamma>\<turnstile>\<lbrace>\<acute>i=0\<and>\<acute>first=Null\<and>n*sz\<le>\<acute>free\<rbrace> WHILE\<acute>i<n INV\<lbrace>\<exists>Ps.List\<acute>first\<acutejava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 setPs\<subseteq>set\<acute>alloc\<and>(n-\<acute>i)*sz\<le>\<acute>free\<rbrace> DO \<acute>p:==NNEWsz[\<acute>cont:==0,\<acute>next:==Null];; \<acute>p\<rightarrow>\<acute>next:==\<acute>first;; \<acute>first:==\<acute>p;; \<acute>i:==\<acute>i+1 OD \<lbrace>\<exists>Ps.List\<acute>first\<acute>nextPs\<and>lengthPs=n\<and>setPs\<subseteq>set\<acute>alloc\<rbrace>"
lemmacircular_list_rev_II: "\<Gamma>\<turnstile> \<lbrace>\<acute>p=r\<and>distPath\<acute>p\<acute>nextcomplicatedspecificationsitbettertofirstjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 \<acute>q:==Null;; WHILE\<acute>p\<noteq>Null INV \<lbrace>((\<acute>q=Null)\<longrightarrow>(\<exists>ps.distPath\<acute>p\<acute>nextrps\<and>ps=r#Ps))\<and> ((\<acute>q\<noteq>Null)\<longrightarrow>(\<exists>psqs.distPath\<acute>q\<acute>nextrqs\<and>List\<acute>p\<acute>nextps\<and> setps\<inter>setqs={}\<and>revqs@ps=Ps@[r]))\<and> \<not>(\<acute>p=Null\<and>\<acute>q=Null\<and>r=Null) \<rbrace> DO \<acute>tmp:==\<acute>p;;\<acute>p:==\<acute>p\<rightarrow>\<acute>next;;\<acute>tmp\<rightarrow>\<acute>next:==\<acute>q;;\<acute>q:==\<acute>tmp OD \<lbrace>\<acute>q=r\<and>distPath\<acute>
DO \<acute>N:==\<acute>M OD \<lbrace>hard\<rbrace>"
\turnstile\bsub{rue\^>\>\rbrace\^sub>\acuteN<<acuteArri FIXZ. INV\<lbrace>\<acute>N<2\<rbrace> VAR DO \<acute>N:==\<acute<\acuteNn+2\and<acuteM=m+2\>java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 OD \<lbrace>hard\<rbrace>" applyvcg oops
lemma"\<Gamma>\<turnstile>\<^bsub>/{True}\<^esub>\<lbrace>True\<rbrace>WHILE\<lbrace>P\<acute>N\<\>N:=\acuteN;<M=M+1 FIXZ. INV\<lbrace>\<acute>N<2\<rbrace> VARarbitrary DO \<acute>N:==\<acute>M OD \<lbrace>hard\<rbrace>" applyvcg oops
end
Messung V0.5 in Prozent
¤ 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.151Bemerkung:
¤
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 und die Messung sind noch experimentell.