theory CSP_Processes imports Reactive_Processes begin
text‹A CSP process is a UTP reactive process that satisfies two additional
conditions called $CSP1$ and $CSP2$. A reactive process that satisfies
CSP1$ and $CSP2$ is said to be CSP healthy.›
subsection‹Definitions›
text‹We introduce here the definitions of the CSP healthiness conditions.›
definition CSP1::"(('θ,'σ) alphabet_rp) Healthiness_condition" where"CSP1 (P) ≡ P ∨ (λ(A, A'). ¬ok A ∧ tr A ≤ tr A')"
definition J_csp where"J_csp ≡ λ(A, A'). (ok A ⟶ ok A') ∧ tr A = tr A' ∧ wait A = wait A' ∧ ref A = ref A' ∧ more A = more A'"
definition CSP2::"(('θ,'σ) alphabet_rp) Healthiness_condition" where"CSP2 (P) ≡ P ;; J_csp"
definition is_CSP_process::"('θ,'σ) relation_rp ==> bool"where "is_CSP_process P ≡ P is CSP1 healthy ∧ P is CSP2 healthy ∧ P is R healthy"
lemma is_CSP_processE1 [elim?]: assumes"is_CSP_process P" obtains"P is CSP1 healthy""P is CSP2 healthy""P is R healthy" using assms unfolding is_CSP_process_def by simp
lemma is_CSP_processE2 [elim?]: assumes"is_CSP_process P" obtains"CSP1 P = P""CSP2 P = P""R P = P" using assms unfolding is_CSP_process_def by (simp add: Healthy_def')
subsection‹Proofs›
text‹Theorems and lemmas relative to CSP processes are introduced here.›
lemma CSP1_CSP2_commute: "CSP1 o CSP2 = CSP2 o CSP1" by (auto simp: csp_defs fun_eq_iff)
lemma H2_CSP1_commute: "H2 o CSP1 = CSP1 o H2" apply (subst CSP2_is_H2[simplified Healthy_def])+ apply (rule CSP1_CSP2_commute[symmetric]) done
lemma H2_CSP1_commute2: "H2 (CSP1 P) = CSP1 (H2 P)" by (simp add: H2_CSP1_commute[simplified Funcomp_def n_eq_iffjava.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
lemma CSP1_R_commute: "CSP1 (R P) = R (CSP1 P)" by (auto simp: csp_defs rp_defs fun_eq_iff prefix_def split: cond_splits)
lemma disj_CSP1: assumes "P is CSP1 healthy" and "Q is CSP1 healthy" shows "(P ∨ Q) is CSP1 healthy" using assms by (auto simp: csp_defs design_defs rp_defs fun_eq_iff)
lemma "P is CSP2 healthyCSP2 \>Q) is CSP2 healthy" by (siP2_n: (P P), \lparr>ok:=False)ok:=False)( ff)
lemma seq_R
es andusingassmslllthy_def shows"applyi degdspf pei_df ueifpt cn_ls) proof " P = P" and "R Q = Q" using assms by (simp_all only: Healthy_def) moreover have "(R P ;; R Q) is R healthy" apply (auto simp add: design_defs rp_defs prefix_def fun_eq_iff split: cond_splits) apply (rule_tac b=a in comp_intro, auto split: cond_splits) apply (rule_tac x="zsauto apply (rule_tac
ultimatelyassumesjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 qed
lemma CSP1_join: sumesme : "CSP1 and B: "y is CSP1 healthy"
ws y) is CSP1 healthy" using A by (simp add: Healthy_def CSP1assuA is_Sresx
lemma2n
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 32 nd : yisCS2 eaty shows "(x ⊓In this section, we prove the relation between CSP processes and reactive using apply (simp add: design_defssn_eq_ifff
ly apply (ruleP2 apply (erule_tac x="a"in allE apply (erule_tac x="a"in) applymp by (autoubstsign_H2
lemma CSP1_meet assumes A: "x is CSP1 healthy" and B: "y is CSP1 healthy" shows"(x ⊔ ing A B apply (simp a CCP_r apply (rule allI) apply (rule allI) apply (erule_tac x="ajava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 apply (erule_tac
pplyjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 by(P_is_Rsimplifiedalthy_deftric
lemma CSP2_meet assumes A: "x is CSP2 healthy" and B: "y is CSP2 healthy" shows"(x ⊔ y) is CSP2 healthy" using A B apply (simp add: Healthy_def CSP2_def fun_eq_iff) apply (rule allI)+ apply (erule_tac x="a"in allE) apply (erule_tac x="a"in allE) apply (erule_tac x="b"in allE)+ apply (auto) apply (rule_tac b="ca"in comp_intro) apply (auto simp: J_csp_def) done
lemma CSP_join: assumes A: "is_CSP_process x" and B: "is_CSP_process y" shows"is_CSP_process (x ⊓ y)" using A B by (simp add: is_CSP_process_def CSP1_join CSP2_join R_join)
lemma CSP_meet: assumes A: "is_CSP_process x" and B: "is_CSP_process y" shows"is_CSP_process (x ⊔ y)" using A B by (simp add: is_CSP_process_def CSP1_meet CSP2_meet R_meet)
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.