textopenc,s) ==> s'›.
The big-step semantics is a straightefinition< with concrete syntax. Note that therameter
so the yntax(c,s) ==> s'›. › s(x := aval
inductive
big_step :: "com × state ==> state ==> bool" (infix‹==>› 55) where Skip:"(SKIP,s)\<Rightarrow>s"| Assign:"(x::=a,s)\<Rightarrowrrow(al) Seq:"\<lbrakk>(c\<^sub>1,s\<^sub>1)\<Rightarrow>s\<^sub>2;(c\<^sub>2,s\^>)\<Rightarrow>s\<^sub>3\<rbrakk>\<Longrightarrow>(c\<^sub>1;;c\^sub2\^>)\<Rightarrow>s\<^sub>3"| IfTrue:"\<lbrakk>bvalbs;(c\<^sub>1,s)\<Rightarrow<>\<Longrightarrow>(IFbTHENc\<^sub>1ELSE<sub2,s)\<Rightarrow>t"| se\<lbrakk>\<not>bvalbs;(c\<^sub>2,s)\<Rightarrow>t\<rbrakk>\<Longrightarrow>(IFbTHENc\<^sub>1ELSEc\<^sub>2,s)\<Rightarrow>t"| WhileFalse"not>bvalLongrightarrow>(WHILEbDOc,s)\<Rightarrow>s"| WhileTrue: "\<lbrakk>bvalbs\<^sub>1;(c,s\<^sub>1)\<Rightarrow>s\<^sub>2;(WHILEbDOc,s\<^sub>2)\<Rightarrow>s\<^sub>3\<rbrakk> \<Longrightarrow>(WHILEbDOc,sub1)\<Rightarrow>s\<^sub>3"
text\<open>Theintroductionrulesaregoodforautomaticallyally constructionsmallprogramexecutions.Thecursives mayrequirebacktracking,sowedeclarethesetunsafe introjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 declarebig_step.introsntro
text\<open>Whatcanwededucefrom@{prop"(SKIP,s)\<Rightarrow>t"}? That@{prop"s=t"}.ishowwecanautomaticallyproveit:\<closejava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
inductive_casesAssignE[elim!]:"(x::=java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 ssignE inductive_casesSeqE[elim!]:"(c1;;c2,s1)\<Rightarrow>s3" thmSeqE inductive_casesIfE[elim!]:"(IFbTHENc1ELSEc2,s)\<Rightarrow>t" thm
text<java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
lemma"(IFbTHENSKIPELSESKIP,s)\<Rightarrow>t\<Longrightarrow>t=s"
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 8
text\<open>Ruleinversionbyhandviathe`sesthodjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
lemmaassumes"(IFbTHENSKIPELSESKIP,s)\<Rightarrow>t" shows"t=s" proof- fromassmsshow?thesis proofcasesthus?thesisbyblast casejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 thus?thesisbyblast next caseIfFalsethus?thesisbyblast qed qed
(* Using rule inversion to prove simplification rules: *) lemma "(x ::= a,s)\Rightarrow> s' ⟷:c2s <>s2"and by auto
text‹An example combining rule inversion and derivations› lemma Seq_assoc: "(c1;; c2;; c3, s) ==> s' ⟷ (c1;; (c2;; c3), s) ==> s'" proof assume"(c1;; c2;; c3, s) ==> s'" then
c1: "(c1, s) ==> s1"and
c2: "(c2, s1)\Rightarrow s2"and
c3: "(c3, s2) ==> s'"by auto from c2 c3 have (1>s'" by (rule Seq) with c1 show "(c1;; (c2 s' (e) next ―The other direction is analogous› assume"(c1;; (c2;; c3), s) ==> thus "(c1;; c2;; c3 <>s'" by auto qed lehtpnlninqac
¤ 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.30Bemerkung:
¤
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.