definition
merge_spec :: "[i, i \i, i, i]\i" where "merge_spec(A, In, Out, iOut) \
merge_increasing(A, Out, iOut) \<inter> merge_eq_Out(Out, iOut) \<inter>
merge_bounded(iOut) \<inter> merge_follows(A, In, Out, iOut) \<inter> merge_allowed_acts(Out, iOut) \<inter> merge_preserves(In)"
(** State definitions. OUTPUT variables are locals **) locale merge = fixesIn\<comment> \<open>merge's INPUT histories: streams to merge\<close> and Out \<comment> \<open>merge's OUTPUT history: merged items\<close> and iOut \<comment> \<open>merge's OUTPUT history: origins of merged items\<close> and A \<comment> \<open>the type of items being merged\<close> and M assumes var_assumes [simp]: "(\n. In(n):var) \ Out \ var \ iOut \ var" and all_distinct_vars: "\n. all_distinct([In(n), Out, iOut])" and type_assumes [simp]: "(\n. type_of(In(n))=list(A)) \
type_of(Out)=list(A) \<and>
type_of(iOut)=list(nat)" and default_val_assumes [simp]: "(\n. default_val(In(n))=Nil) \
default_val(Out)=Nil \<and>
default_val(iOut)=Nil" and merge_spec: "M \ merge_spec(A, In, Out, iOut)"
lemma (in merge) In_value_type [TC,simp]: "s \ state \ s`In(n) \ list(A)" unfolding state_def apply (drule_tac a = "In (n)"in apply_type) apply auto done
lemma (in merge) Out_value_type [TC,simp]: "s \ state \ s`Out \ list(A)" unfolding state_def apply (drule_tac a = Out in apply_type, auto) done
lemma (in merge) iOut_value_type [TC,simp]: "s \ state \ s`iOut \ list(nat)" unfolding state_def apply (drule_tac a = iOut in apply_type, auto) done
lemma (in merge) M_ok_iff: "G \ program \
M ok G \<longleftrightarrow> (G \<in> preserves(lift(Out)) \<and>
G \<in> preserves(lift(iOut)) \<and> M \<in> Allowed(G))" apply (cut_tac merge_spec) apply (auto simp add: merge_Allowed ok_iff_Allowed) done
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 ist noch experimentell.