Theory Simple_Network_Language_Model_Checking
theory Simple_Network_Language_Model_Checking
imports Munta_Base.Temporal_Logics
Simple_Network_Language_Impl_Refine
Munta_Model_Checker.UPPAAL_Model_Checking
begin
section ‹Product Bisimulation›
no_notation State_Networks.step_sn ("_ ⊢ ⟨_, _, _⟩ →⇘_⇙ ⟨_, _, _⟩" [61,61,61,61,61] 61)
text ‹
We have proved the necessary theorems already but we need to lift it to
the case where delay and action transitions are strictly alternating.
›
inductive step_u' ::
"('a, 's, 'c, 't :: time, 'x, 'v :: linorder) nta ⇒ 's list ⇒ ('x ⇀ 'v) ⇒ ('c, 't) cval
⇒ 's list ⇒ ('x ⇀ 'v) ⇒ ('c, 't) cval ⇒ bool"
("_ ⊢ ⟨_, _, _⟩ → ⟨_, _, _⟩" [61,61,61,61] 61) where
"A ⊢ ⟨L, s, u⟩ → ⟨L'', s'', u''⟩" if
"A ⊢ ⟨L, s, u⟩ →⇘Del⇙ ⟨L', s', u'⟩"
"a ≠ Del"
"A ⊢ ⟨L', s', u'⟩ →⇘a⇙ ⟨L'', s'', u''⟩"
inductive_cases step'_elims: "A ⊢' ⟨(L, s), u⟩ → ⟨(L', s'), u'⟩"
inductive_cases step_u'_elims: "A ⊢ ⟨L, s, u⟩ → ⟨L', s', u'⟩"
theorem Bisimulation_Invariant_strong_intro:
fixes A :: "'a ⇒ 'a ⇒ bool"
and P :: "'a ⇒ bool"
and B :: "'a ⇒ 'a ⇒ bool"
assumes "⋀a b. A a b ⟹ P a ⟹ B a b"
and "⋀a b. B a b ⟹ P a ⟹ A a b"
and "⋀a b. P a ⟹ A a b ⟹ P b"
shows "Bisimulation_Invariant A B (=) P P"
apply standard
subgoal A for a b a'
by (blast intro: assms)
subgoal B for a b a'
by (blast intro: assms)
subgoal C for a b
by (rule assms)
subgoal D for a b
by (rule C, assumption) (rule assms)
done
context Prod_TA_Defs
begin
definition
"all_prop L s = (L ∈ states ∧ bounded bounds s)"
lemma all_prop_boundedD[dest]:
"bounded bounds s" if "all_prop L s"
using that unfolding all_prop_def ..
lemma all_prop_statesD[dest]:
"L ∈ states" if "all_prop L s"
using that unfolding all_prop_def ..
end
context Prod_TA
begin
lemma prod_action_step_not_eq_delay:
"a ≠ Del" if "prod_ta ⊢ ⟨(L, s), u⟩ →⇘a⇙ ⟨(L', s'), u'⟩"
using that
apply cases
unfolding trans_of_def
unfolding prod_ta_def trans_prod_def
by (auto simp: trans_int_def trans_bin_def trans_broad_def)
end
locale Prod_TA_urge =
Prod_TA + assumes urgency_removed: "∀N ∈ set (fst (snd A)). urgent N = {}"
begin
lemma prod_all_prop_inv:
"all_prop L' s'" if "all_prop L s" "prod_ta ⊢ ⟨(L, s), u⟩ → ⟨(L', s'), u'⟩"
using that unfolding all_prop_def
by (auto elim: bounded_inv states_inv simp: step_iff[symmetric, OF _ _ urgency_removed])
lemma prod_all_prop_inv':
"all_prop L' s'" if "all_prop L s" "prod_ta ⊢' ⟨(L, s), u⟩ → ⟨(L', s'), u'⟩"
using that by (auto intro: prod_all_prop_inv elim!: step'_elims)
interpretation prod_bisim:
Bisimulation_Invariant
"(λ (L, s, u) (L', s', u'). prod_ta ⊢' ⟨(L, s), u⟩ → ⟨(L', s'), u'⟩)"
"(λ (L, s, u) (L', s', u'). A ⊢ ⟨L, s, u⟩ → ⟨L', s', u'⟩)"
"(=)"
"(λ (L, s, u). all_prop L s)"
"(λ (L, s, u). all_prop L s)"
apply (rule Bisimulation_Invariant_strong_intro; clarsimp)
subgoal
by (auto intro: step_u'.intros simp: all_prop_def
dest: action_sound prod_action_step_not_eq_delay delay_sound[OF _ _ _ urgency_removed]
elim!: step'_elims)
subgoal
by (auto 4 4 dest: prod_all_prop_inv action_complete elim: delay_complete elim!: step_u'_elims)
subgoal
by (rule prod_all_prop_inv')
done
lemmas prod_bisim_intro = prod_bisim.Bisimulation_Invariant_axioms
end
section ‹The Final Semantics›
text ‹State formulas›