| AnnCond1: "[ r ∩ b ⊆ pre c1; ⊨ c1 q; r ∩ -b ⊆ pre c2; ⊨ c2 q] ==>⊨ (AnnCond1 r b c1 c2) q"
| AnnCond2: "[ r ∩ b ⊆ pre c; ⊨ c q; r ∩ -b ⊆ q ]==>⊨ (AnnCond2 r b c) q"
| AnnWhile: "[ r ⊆ i; i ∩ b ⊆ pre c; ⊨ c i; i ∩ -b ⊆ q ] ==>⊨ (AnnWhile r b i c) q"
| AnnAwait: "[ atom_com c; ∥- (r ∩ b) c q ]==>⊨ (AnnAwait r b c) q"
| AnnConseq: "[⊨ c q; q ⊆ q' ]==>⊨ c q'"
| Parallel: "[∀i∃c q. Ts!i = (Some c, q) ∧⊨ c q; interfree Ts ] ==>∥- (∩i∈{i. i Parallel Ts (∩i∈{i. i
| Basic: "∥- {s. f s ∈q} (Basic f) q"
| Seq: "[∥- p c1 r; ∥- r c2 q ]==>∥- p (Seq c1 c2) q "
| Cond: "[∥- (p ∩ b) c1 q; ∥- (p ∩ -b) c2 q ]==>∥- p (Cond b c1 c2) q"
| While: "[∥- (p ∩ b) c p ]==>∥- p (While b i c) (p ∩ -b)"
| Conseq: "[ p' ⊆ p; ∥- p c q ; q ⊆ q' ]==>∥- p' c q'"
section‹Soundness› (* In the version Isabelle-10-Sep-1999: HOL: The THEN and ELSE parts of conditional expressions (if P then x else y) are no longer simplified. (This allows the simplifier to unfold recursive functional programs.) To restore the old behaviour, we declare @{text "lemmas [cong del] = if_weak_cong"}. *)
subsection‹Soundness of the System for Component Programs›
inductive_cases ann_transition_cases: "(None,s) -1→ (c', s')" "(Some (AnnBasic r f),s) -1→ (c', s')" "(Some (AnnSeq c1 c2), s) -1→ (c', s')" "(Some (AnnCond1 r b c1 c2), s) -1→ (c', s')" "(Some (AnnCond2 r b c), s) -1→ (c', s')" "(Some (AnnWhile r b I c), s) -1→ (c', s')" "(Some (AnnAwait r b c),s) -1→ (c', s')"
text‹Strong Soundness for Component Programs:›
lemma ann_hoare_case_analysis [rule_format]: "⊨ C q' ⟶ ((∀r f. C = AnnBasic r f ⟶ (∃q. r ⊆ {s. f s ∈ q} ∧ q ⊆ q')) ∧ (∀c0 c1. C = AnnSeq c0 c1 ⟶ (∃q. q ⊆ q' ∧⊨ c0 pre c1 ∧⊨ c1 q)) ∧ (∀r b c1 c2. C = AnnCond1 r b c1 c2 ⟶ (∃q. q ⊆ q' ∧ r ∩ b ⊆ pre c1 ∧⊨ c1 q ∧ r ∩ -b ⊆ pre c2 ∧⊨ c2 q)) ∧ (∀r b c. C = AnnCond2 r b c ⟶ (∃q. q ⊆ q' ∧ r ∩ b ⊆ pre c ∧⊨ c q ∧ r ∩ -b ⊆ q)) ∧ (∀r i b c. C = AnnWhile r b i c ⟶ (∃q. q ⊆ q' ∧ r ⊆ i ∧ i ∩ b ⊆ pre c ∧⊨ c i ∧ i ∩ -b ⊆ q)) ∧ (∀r b c. C = AnnAwait r b c ⟶ (∃q. q ⊆ q' ∧∥- (r ∩ b) c q)))" apply(rule ann_hoare_induct) apply simp_all apply(rule_tac x=q in exI,simp)+ apply(rule conjI,clarify,simp,clarify,rule_tac x=qa in exI,fast)+ apply(clarify,simp,clarify,rule_tac x=qa in exI,fast) done
lemmaHelp: "(transition ∩ {(x,y). True}) = (transition)" apply force done
lemma Strong_Soundness_aux_aux [rule_format]: "(co, s) -1→ (co', t) ⟶ (∀c. co = Some c ⟶ s∈ pre c ⟶ (∀q. ⊨ c q ⟶ (if co' = None then t∈q else t ∈ pre(the co') ∧⊨ (the co') q )))" apply(rule ann_transition_transition.induct [THEN conjunct1]) apply simp_all 🍋‹Basic› apply clarify apply(frule ann_hoare_case_analysis) apply force 🍋‹Seq› apply clarify apply(frule ann_hoare_case_analysis,simp) apply(fast intro: AnnConseq) apply clarify apply(frule ann_hoare_case_analysis,simp) apply clarify apply(rule conjI) apply force apply(rule AnnSeq,simp) apply(fast intro: AnnConseq) 🍋‹Cond1› apply clarify apply(frule ann_hoare_case_analysis,simp) apply(fast intro: AnnConseq) apply clarify apply(frule ann_hoare_case_analysis,simp) apply(fast intro: AnnConseq) 🍋‹Cond2› apply clarify apply(frule ann_hoare_case_analysis,simp) apply(fast intro: AnnConseq) apply clarify apply(frule ann_hoare_case_analysis,simp) apply(fast intro: AnnConseq) 🍋‹While› apply clarify apply(frule ann_hoare_case_analysis,simp) apply force apply clarify apply(frule ann_hoare_case_analysis,simp) apply auto apply(rule AnnSeq) apply simp apply(rule AnnWhile) apply simp_all 🍋‹Await› apply(frule ann_hoare_case_analysis,simp) apply clarify apply(drule atom_hoare_sound) apply simp apply(simp add: com_validity_def SEM_def sem_def) apply(simp add: Help All_None_def) apply force done
lemma Strong_Soundness_aux: "[ (Some c, s) -*→ (co, t); s ∈ pre c; ⊨ c q ] ==> if co = None then t ∈ q else t ∈ pre (the co) ∧⊨ (the co) q" apply(erule rtrancl_induct2) apply simp apply(case_tac "a") apply(fast elim: ann_transition_cases) apply(erule Strong_Soundness_aux_aux) apply simp apply simp_all done
lemma Strong_Soundness: "[ (Some c, s)-*→(co, t); s ∈ pre c; ⊨ c q ] ==> if co = None then t∈q else t ∈ pre (the co)" apply(force dest:Strong_Soundness_aux) done
lemma ann_hoare_sound: "⊨ c q ==>⊨ c q" apply (unfold ann_com_validity_def ann_SEM_def ann_sem_def) apply clarify apply(drule Strong_Soundness) apply simp_all done
subsection‹Soundness of the System for Parallel Programs›
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.