section"Examples for Procedures as Parameters using Statespaces" theory ProcParExSP imports"../Vcg"begin
lemma DynProcProcPar': assumes adapt: "P ⊆ {s. p s = q ∧ (∃Z. init s ∈ P' Z ∧ (∀t ∈ Q' Z. return s t ∈ R s t) ∧ (∀t ∈ A' Z. return s t ∈ A))}" assumes result: "∀s t. Γ,Θ⊨F (R s t) result s t Q,A" assumes q: "∀Z. Γ,Θ⊨F (P' Z) Call q (Q' Z),(A' Z)" shows"Γ,Θ⊨F P dynCall init p return result Q,A" apply (rule HoarePartial.DynProcProcPar [OF _ result q]) apply (insert adapt) apply fast done
lemma conseq_exploit_pre': "[∀s ∈ S. Γ,Θ ⊨ ({s} ∩ P) c Q,A] ==> Γ,Θ⊨ (P ∩ S)c Q,A" apply (rule HoarePartialDef.Conseq) apply clarify by (metis IntI insertI1 subset_refl)
lemma conseq_exploit_pre'': "[∀Z. ∀s ∈ S Z. Γ,Θ ⊨ ({s} ∩ P Z) c (Q Z),(A Z)] ==> ∀Z. Γ,Θ⊨ (P Z ∩ S Z)c (Q Z),(A Z)" apply (rule allI) apply (rule conseq_exploit_pre') apply blast done
lemma conseq_exploit_pre''': "[∀s ∈ S. ∀Z. Γ,Θ ⊨ ({s} ∩ P Z) c (Q Z),(A Z)] ==> ∀Z. Γ,Θ⊨ (P Z ∩ S)c (Q Z),(A Z)" apply (rule allI) apply (rule conseq_exploit_pre') apply blast done
(* We have to rename the parameters of the compare procedure to match the LEQ procedure *) locale Max_test = Max_spec where
i_'compare_' = i_'LEQ_' and
j_'compare_' = j_'LEQ_' and
r_'compare_' = r_'LEQ_'
+ LEQ_spec + LEQ_modifies
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.