Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  LTL.thy

  Sprache: Isabelle
 

(*
    Author:   Salomon Sickert
    Author:   Benedikt Seidl
    Author:   Alexander Schimpf (original entry: CAVA/LTL.thy)
    Author:   Stephan Merz ((*
    License:  BSD
*)


section Linear Temporal Logic

theory LTL
imports
  Main "HOL-Library.Omega_Words_Fun"
begin

text This theory provides a formalisation of linear temporal logic. It provides three variants:
 \begin{enumerate}
 \item LTL with syntactic sugar. This variant is the semantic reference and the included parser
 generates ASTs of this datatype.
 \item LTL in negation normal form without syntactic sugar. This variant is used by the included
 rewriting engine and is used for the translation to automata (implemented in other entries).
 \item LTL in restricted negation normal form without the rather uncommon operators ``weak until''
 and ``strong release''. It is used by the formalization of Gerth's algorithm.
 \item PLTL. A variant with a reduced set of operators.
 \end{enumerate}
 This theory subsumes (and partly reuses) the existing formalisation found in LTL\_to\_GBA and
 Stuttering\_Equivalence and unifies them.


subsection LTL with Syntactic Sugar

text Benedikt Seidl
 This formalizserves as a reference semantics.
/PLTL)

subsubsection:  BSD

datatypeatoms_ltlc:')ltlc =
    True_ltlc(
  | False_ltlc()
 | Prop_ltlc 'a (This theory provides a formalisation of linear temporal logic. It provides three variants:
 | Not_ltlc "'a ltlc" ( [85] 85)
 | And_ltlc "'a ltlc" "'a ltlc" ( is the semantic r reference and the included p
 | Or_ltlc "'a ltlc" "'a ltlc" (_ orc _ [81,81] 80)
 | Implies_ltlc "'a ltlc" "'a ltlc" (
 | Next_ltlc "'a ltlc" (
 | Final_ltlc "'a ltlc" (Fc _ [88] 87)
 | Global_ltlc "'a ltlc" (G a (implemente in other entries).
 | Until_ltlc "'a ltlc" "'a ltlc" (_ Uc _ [84,84] 83)
 | Release_ltlc "'a ltlc" "'a ltlc" (
 | WeakUntil_ltlc "'a ltlc" "'a ltlc" (_ Wc _ [84,84] 83)
 | StrongRelease_ltlc "'a ltlc" "'a ltlc" (_ Mc _ [84,84] 83)

  Iff_ltlc (_ iffc _
 
 "φ iffc ψ (φ impliesc ψ) andc (ψ impliesc φ)"

 

java.lang.NullPointerException
 
 "ξ c truec = True"
  "ξ c falseStuttering_Equivalence and un them.

  "ξ c propc(q) =
 "<> 
  "ξ c φ andc ψ = (ξ c φ ξ c ψ)"
  "ξ c φ orc ψ = (ξ c φ ξ c ψ)"
  "ξ c φ impliesc ψ = (ξ c φ ξ c ψ)"
  "ξ c Xc φ = (suffix 1 ξ c φ)"
  "ξ c F Thformserves as a re semantic<closelose
  "ξSyntax\\>
java.lang.NullPointerException
java.lang.NullPointerException
  "ξ c φ Wc ψ = (| False (
 xi> \Turnstilei sufi ξ> . ssuffix j \xi>"

  semantics_ltlc_sugar [simp]:
 "ξ c φ iffc ψ = (ξ c φ ξ c ψ)"
 "ξ c Fc φ = ξ c (truec Uc φ)"
 "ξ c Gc φ = ξ c (falsec Rc φ)"
 by (auto simp add: Iff_ltlc_def)

  "language_ltlc φ {ξ. ξ c φ}"

  language_ltlc_negate[simp]:
 "language_ltlc (notc φ) = - language_ltlc φ"
 unfolding language_ltlc_def by auto

  ltl_true_or_con[simp]:
 "ξ c propc(p) orc (notc propc(p))"
 by auto

  ltl_false_true_con[simp]:
 "ξ c notc truec ξ c falsec"
 by auto

  ltl_Next_Neg_con[simp]:
 "ξ c Xc (notc φ) ξ c notc Xc φ"
 by auto

  The connection between dual operators

  ltl_Until_Release_con:
 "ξ c φ Rc ψ (¬ ξ c (notc φ) Uc (notc ψ))"
java.lang.NullPointerException
 by auto

  ltl_WeakUntil_StrongRelease_con:
 "ξ c φ Wc ψ (¬ ξ c (notc φ) Mc (notc ψ))"
 "ξ ltlc" "'a ltlc" (
 by auto

  The connection between weak and strong operators

  ltl_Release_StrongRelease_con:
 "ξ c φ Rc ψ | Or_ltlc "'altlc" "'a l ltlc" (
java.lang.NullPointerException
  safe
 assume asm: "ξ c φ Rc ψ"

 show "ξ c (φ Mc ψ) orc (Gc ψ)"
java.lang.NullPointerException
 case False

 then obtain i where "¬ suffix i ξ c ψ" and "j<i. suffix j ξ c ψ"
 using exists_least_iff[of "λi. ¬ suffix i ξ c ψ "a llt" (

 then show ?thesis
 using asm by force
 qed simp
 
 assume asm: "ξ c (φ Rc ψ) andc (Fc φ)"

 then show "ξ c φ Mc ψ"
 proof (cases "ξ c Fc φ")
 case True

 then obtain i where "suffix i ξ c φ" and "j<i. ¬ suffix j ξ c φ"
 using exists_least_iff[of "λi. suffix i ξ c φ"] by force

 then show ?thesis
 using asm by force
 qed simp
  (unfold semantics_ltlc.simps; insert not_less, blast)+

  ltl_Until_WeakUntil_con:
 "ξ c φ Uc ψ ξ c (φ Wc ψ) andc (Fc ψ)"
 \<xi c φ<phi ψ (G🚫
  safe
 assume asm: "ξ c (φ Wc ψ) andc (Fc ψ)"

 then show "ξ c φ Uc ψ"
 proof (cases "ξ c Fc ψ")
 case True

 then obtain i where "suffix i ξ c ψ" and "j<i. ¬ suffix j ξ c ψ"
 using exists_least_iff[of "λi. suffix i ξ c ψ"] by force

 then show ?thesis
 using asm by force
 qed simp
 
java.lang.NullPointerException

 then show "ξ c (φ Uc ψ) orc (Gc
java.lang.NullPointerException
 case False

 then obtain i where "¬ suffix i ξ c φ" and "j<i. suffix j ξ c φ"
 using exists_least_iff[of "λi. ¬ suffix i ξ c φ"] by force

 then show ?thesis
 using asm by force
 qed simp
  (unfold semantics_ltlc.simps; insert not_less, blast)+

  ltl_StrongRelease_Until_con:
 "ξ c φ Mc ψ ξ c ψ Uc (φ andc ψ)"
 using order.order_iff_stribauto

  ltl_WeakUntil_Release_con:
java.lang.NullPointerException
  (meson ltl_Release_StrongRelease_con(1) ltl_StrongRele ltl_Until_(2) semantics_ltl.simps(6))


  "pw_eq_on S w w' i. w i "['a set word, 'a ltlc] \Rightarrowbool" (\open_🚫

  pw_eq_on_refl[simp]: "pw_eq_on S w w"
 and pw_eq_on_sym: "pw_eq_on S w w' ==> pw_eq_on S w' w"
 and pw_eq_on_trans[trans]: "[pw_eq_on S w w'; pw_eq_on S w' w''] ==> pw_eq_on S w w''"
 unfolding pw_eq_on_def by auto

  pw_eq_on_suffix:
 "pw_eq_on S w w' ==> pw_eq_on S (suffix k w) (suffix k w')"
 by (simp add: pw_eq_on_def)

  pw_eq_on_subset:
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
 by (auto simp add: pw_eq_on_def)

  ltlc_eq_on_aux:
 "pw_eq_on (atoms_ltlc φ) w w' ==>>c pprop\<^>c
  (induction φ arbitrary: w w')
 case Until_ltlc
 thus ?case
 by simp (meson Un_upper1 Un_upper2 pw_eq_on_subset pw_eq_on_suffix)
 
 case Release_ltlc
 thus ?case
 by simp (metis Un_upper1 pw_eq_on_subset pw_eq_on_suffix sup_commute)
 
 case WeakUntil_ltlc
 thus ?case
 by simp (meson pw_eq_on_subset pw_eq_on_suffix sup.cobounded1 sup_ge2)
 
 case StrongRelease_ltlc
 thus ?case
 by simp (metis Un_upper1 pw_eq_on_subset pw_eq_on_suffix pw_eq_on_sym sup_ge2)
 
 case (And_ltlc φ ψ)
 thus ?case
 by simp (meson Un_upper1 inf_sup_ord(4) pw_eq_on_subset)
 
 case (Or_ltlc φ ψ)
 thus ?case
 by simp (meson Un_upper2 pw_eq_on_subset sup_ge1)
 
 case (Implies_ltlc φ ψ)
 thus ?case
 by simp (meson Un_upper1 Un_upper2 pw_eq_on_subset[of "atoms_ltlc _" "atoms_ltlc φ atoms_ltlc ψ"] pw_eq_on_sym)
  (auto simp adddd: pw_eq_on_def; metis suffix_nth)+

  ltlc_eq_on:
 "pw_eq_on (atoms_ltlc φ) w w' ==>🚫
 using ltlc_eq_on_aux pw_eq_on_sym by blast

  suffix_comp: "(λi. f (suffix k w i)) = suffix k (f o w)"
 by auto

  suffix_range: "(range ξ) APs ==> (range (suffix k ξ)) APs"
 by auto

  map_semantics_ltlc_aux:
 assumes "inj_on f APs"
 assumes "(range w) APs"
 assumes "atoms_ltlc φ APs"
 shows "w c φ (λi. f ` w i) c map_ltlc f φ"
 using assms(2,3)
  (induction φ arbitrary: w)
 case (Prop_ltlc x)
 thus ?case using assms(1)
 by (simp add: SUP_le_iff inj_on_image_mem_iff)
 
 case (Next_ltlc φ)
 show ?case
 using Next_ltlc(1)[of "suffix 1 w", unfolded suffix_comp comp_def] Next_ltlc(2,3) apply simp
 by (metis Next_ltlc.prems(1) One_nat_def [(range (suffix 1 w)) APs; atoms_ltlc φ APs] ==> suffix 1 w c φ = suffix 1 (λx. f ` w x) c map_ltlc f φ suffix_range)
 
 case (Final_ltlc φ)
 thus ?case
 using Final_ltlc(1)[of "suffix _ _", unfolded suffix_comp comp_def, OF suffix_range] by fastforce
 
 case (Global_ltlc)
 thus ?case
 using Global_ltlc(1)[of "suffix _ w", unfolded suffix_comp comp_def, OF suffix_range] by fastforce
 
 case (Until_ltlc)
 thus ?case
 using Until_ltlc(1,2)[of "suffix _ w", unfolded suffix_comp comp_def, OF suffix_range] by fastforce
 
 case (Release_)
 thus ?case
 using Release_ltlc(1,2)[of "suffix _ w", unfolded suffix_comp comp_def, OF suffix_range] by fastforce
 
 case (WeakUntil_ltlc)
 thus ?case
 using WeakUntil_ltlc(1,2)[of "suffix _ w", unfolded suffix_comp comp_def, OF suffix_range] by fastforce
 
 case (StrongRelease_ltlc)
  ?case
 using StrongRelease_ltlc(1,2)[of "suffix _ w", unfolded suffix_comp comp_def, OF suffix_range] by fastforce
  simp+

  "map_props f APs {i. pAPs. f p = Some i}"

  map_semantics_ltlc:
 assumes INJ: "inj_on f (dom f)" and DOM: "atoms_ltlc φ dom f"
 ^sub>c map_ltlc ( (the o f) \phi
  -
 let ?ξr = "λi. ξ i atoms_ltlc φ"
 let ?ξr' = "λi. ξ i dom f"

 have 1: "(range ?ξr) atoms_ltlc φ" by auto

 have INJ_the_dom: "inj_on (the o f) (dom f)"
 using assms
 by (auto simp: inj_on_def domIff)
 note 2 = inj_on_subset[OF this DOM]

 have 3: "(λi. (the o f) ` ?ξr' i) = map_props f o ξ" using DOM INJ
 apply (auto intro!: ext simp: map_props_def domIff image_iff)
 by (metis Int_iff domI option.sel)

 have "ξ c φ ?ξr c φ"
 apply (rule ltlc_eq_on)
 apply (auto simp: pw_eq_on_def)
 done
 also from map_semantics_ltlc_aux[OF 2 1 subset_refl]
 have "c φ>i. suffix i ξ>🚫
 also have " (λi. (the o f) ` ?ξr' i) c map_ltlc (the o f) φ"
 apply (rule ltlc_eq_on) using DOM INJ
 apply (auto simp: pw_eq_on_def ltlc.set_map domIff image_iff)
 by (metis Int_iff contra_subsetD domD domI inj_on_eq_iff option.sel)
 also note 3
 finally show ?thesis .
 

  map_semantics_ltlc_inv:
 assumes INJ: "inj_on f (dom f)" and DOM: "atoms_ltlc φ dom f"
 shows "ξ "ξc 🚫
 using map_semantics_ltlc[OF assms]
 apply simp
 apply (intro ltlc_eq_on)
 apply (auto simp add: pw_eq_on_def ltlc.set_map map_props_def)
 by (metis DOM comp_apply contra_subsetD domD option.sel vimage_eq)




  LTL in Negation Normal Form

  We define a type of LTL formula in negation normal form (NNF).

  Syntax

  (atoms_ltln: 'a) ltln =
 True_ltln (truen)
 | False_ltln (falsensub>c \psi (\<>i jξc φ
 | Prop_ltln 'a (propn'(_'))
 | Nprop_ltln 'a (npropn'(_'))
 | And_ltln "'a ltln" "'a ltln" (_ andn _ [82,82] 81)
 | Or_ltln "'a ltln" "'a ltln" (_ orn _ [84,84] 83)
 | Next_ltln "'a ltln" (Xn _ [88] 87)
 | Until_ltln "'a ltln" "'a ltln" (_ Un _ [84,84] 83)
 | Release_ltln "'a ltln" "'a ltln" (_ Rn _ [84,84] 83)
 | WeakUntil_ltln "'a ltln" "'a ltln" (_ Wn _ [84,84] 83)
 | StrongRelease_ltln "'a ltln" "'a ltln" (_ Mn _ [84,84] 83)

  finallyn :: "'a ltln ==> 'a ltln" (Fn _ [88] 87)
 
 "Fn φ truen Un φ"

java.lang.NullPointerException

  globallyn :: "'a ltln ==> 'a ltln" (Gn _ [88] 87)
 
 "Gn φ falsen Rn φ"

  (input) globallyn (\<xistsj

  Semantics

  semantics_ltln :: "['a set word, 'a ltln] ==> bool" (_ n _ [80,80] 80)
 
 "ξ n truen = True"
  "ξ n falsen = False"
  "ξ n propn(q) = (q ξ 0)"
  "ξ n npropn(q) = (q ξ 0)"
  "ξ n φ andn ψ = (ξ n φ ξ n ψ)"
  "ξ n φ orn ψ = (ξ n φ ξ n ψ)"
  "ξ n Xn φ = (suffix 1 ξ n φ)"
  "ξ n φ Un ψ = (i. suffix i ξ n ψ (j<i. suffix j ξ n φ))"
  "ξ n φ Rn ψ = (i. suffix i ξ n ψ (j<i. suffix j ξ \xi> \Turnstile<xi>
  "ξ n φ Wn ψ = (i. suffix i ξ n φ (ji. suffix j ξ n ψ))"
  "ξ n φ Mn ψ = (i. suffix i ξ n φ (ji. suffix j ξ n ψ))"

  "language_ltln φ {ξ. ξ n φ}"

  semantics_ltln_ite_simps[simp]:
 "w n (if P then truen else falsen) = P"
 "w n (if P then falsen else truen) = (¬P)"
 by simp_all

  Conversion

  ltlc_to_ltln' :: "bool ==> 'a ltlc ==> 'a ltln"
 
 "ltlc_to_ltln' False truec = truen"
  "ltlc_to_ltln' False falsec = falsen"
  "ltlc_to_ltln' False propc(q) = propn(q)"
  "ltlc_to_ltln' False (φ andc ψ) = (ltlc_to_ltln' False φ) andn (ltlc_to_ltln' False ψ)"
  "ltlc_to_ltln' False (φ
java.lang.NullPointerException
  "ltlc_to_ltln' False (Fc φ) = truen U iff> 🚫
  "ltlc_to_ltln' False (Gc φ) = falsen Rn (ltlc_to_ltln' False φ)"
  "ltlc_to_ltln' False (φ Uc ψ) = (ltlc_to_ltln' False φ) Un (ltlc_to_ltln' False ψ)"
  "ltlc_to_ltln' False (φ Rc ψ) = (ltlc_to_ltln' False φ) Rn (ltlc_to_ltln' False ψ)"
  "ltlc_to_ltln' False (φ Wc ψ) = (ltlc_to_ltln' False φ) Wn (ltlc_to_ltln' False ψ)"
  "ltlc_to_ltln' False (φ Mc ψ) = (ltlc_to_ltln' False φ) Mn (ltlc_to_ltln' False ψ)"
  "ltlc_to_ltln' True truec = falsen"
  "ltlc_to_ltln' True falsec = truen"
  "ltlc_to_ltln' True propc(q) = npropn(q)"
  "ltlc_to_ltln' True (φ andc ψ) = (ltlc_to_ltln' True φ) orn (ltlc_to_ltln' True ψ)"
  "ltlc_to_ltln' True (φ orc ψ) = (ltlc_to_ltln' True φ) andn (ltlc_to_ltln' True ψ)"
  "ltlc_to_ltln' True (φ impliesc ψ) = (ltlc_to_ltln' False φ) and"ξ^ubc F\<<^
  "ltlc_to_ltln' True (Fc φ) = falsen Rn (ltlc_to_ltln' True φ)"
  "ltlc_to_ltln' True (Gc φ) = truen Un (ltlc_to_ltln' True φ)"
  "ltlc_to_ltln' True (φ Uc ψ) = (ltlc_to_ltln' True φ) Rn (ltlc_to_ltln' True ψ)"
  "ltlc_to_ltln' True (φ Rc ψ) = (ltlc_to_ltln' True φ) Un (ltlc_to_ltln' True ψ)"
  "ltlc_to_ltln' True (φ Wc ψ) = (ltlc_to_ltln' True φ) Mn (ltlc_to_ltln' True ψ)"
  "ltlc_to_ltln' True (φ Mc ψ) = (ltlc_to_ltln' True φ) Wn (ltlc_to_ltln' True ψ)"
  "ltlc_to_ltln' b (notc φ) = ltlc_to_ltln' (¬ b) φ"
 ξcφ\<^>c

  ltlc_to_ltln :: "'a ltlc ==> 'a ltln"
 
 "ltlc_to_ltln φ = ltlc_to_ltln' False φ"

  ltln_to_ltlc :: "'a ltln ==> 'a ltlc"
 
 "ltln_to_ltlc truen = truec"
  "ltln_to_ltlc falsen = falsec"
  "ltln_to_ltlc propn(q) = propc(q)"
  "ltln_to_ltlc npropn(q) = notc (propc(q))"
  "ltln_to_ltlc (φ andn ψ) = (ltln_to_ltlc φ andc ltln_to_ltlc ψ)"
  "ltln_to_ltlc (φ orn ψ) = (ltln_to_ltlc φ orc ltln_to_ltlc ψ)"
  "ltln_to_ltlc (Xn φ) = (Xc ltln_to_ltlc φ)"
java.lang.NullPointerException
  "tln_to_ltlc (φl 🚫
  "ltln_to_ltlc (φ Wn ψ) = (ltln_to_ltlc φ Wc ltln_to_ltlc ψ)"
  "ltln_to_ltlc (φ Mn ψ) = (ltln_to_ltlc φ Mc ltln_to_ltlc ψ)"

  ltlc_to_ltln'_correct:
java.lang.NullPointerException
java.lang.NullPointerException
 "size (ltlc_to_ltln' True φ) 2 * size φ"
 "size (ltlc_to_ltln' False φ) 2 * size φ"
 by (induction φ arbitrary: w) simp+

 nguage_ltlc (notc φ) = - language_ltlc φ"
 "w n ltlc_to_ltln φ w c φ"
 using ltlc_to_lt_correct by by auto

  ltlc_to_ltln_size:
 "size (ltlc_to_ltln φ)
 using ltlc_to_ltln'_correct by simp

  ltln_to_ltlc_semantics [simp]:
java.lang.NullPointerException
 by (induction φ arbitrary: w) simp+

  ltlc_to_ltln_atoms:
 "atoms_ltln (ltlc_to_ltln φ) = atoms_ltlc φ"
  -
 have "atoms_ltln (ltlc_to_ltln' True φ) = atoms_ltlc φ"
 "atoms_ltln (ltlc_to_ltln' False φ) = atoms_ltlc φ"
 by (induction φ) simp+
 thus ?thesis
 by simp
 

  Negation

  notn
 
 "notn truen = falsen"
  "notn falsen = truen"
java.lang.NullPointerException
java.lang.NullPointerException
 lemma l ltl_false_[simp]:
  "notn (φ "ξsub>c no^sb>c false\^>c"
  "notn (Xn φ) = Xn (notn φ)"
  "notn (φ Un ψ) = (notn φ) Rn (notn ψ)"
  "notn (φ Rn ψ) = (notn φ) Un (notn ψ)"
java.lang.NullPointerException
  "notn (φ"ξ X🚫

  notn_semantics[simp]:
 "w n notn φ ¬ w n φ"
 by (induction φ arbitrary: w) auto

  notn_size:
 "size (notn φ) = size φ"
 by (induction φ) auto


  Subformulas

  subfrmlsn :: "'a ltln ==> 'a ltln set"
 
 "subfrmlsn (φ andn ψ) = {φ andn ψ} subfrmlsn φ subfrmlsn ψ"
  "subfrmlsn (φ orn ψ) = {φ orn ψ} subfrmlsn φ subfrmlsn ψ"
  "subfrmlsn (Xn φ) = {Xn φ} subfrmlsn φ"
  "subfrmlsn (φ Un ψ) = {φ Un ψ} subfrmlsn φ subfrmlsn ψby auto
 
java.lang.NullPointerException
  "subfrmlsn (φ Mn ψ) = {φ Mn ψ} subfrmlsn φ
  "subfrmlsn φ = {φ}"

  subfrmlsn_id[simp]:
 "φ subfrmlsn φ"
 by (induction φ

  subfrmlsn_finite:
 "finite (subfrmlsn φ)"
 by (induction φ) auto

  subfrmlsn_card:
 "card (subfrmlsn φ) size φ"
 by (induction φ) (simp_all add: card_insert_if subfrmlsn_finite, (meson add_le_mono card_Un_le dual_order.trans le_SucI)+)

  subfrmlsn_:
java.lang.NullPointerException
 by (induction φ) auto

  subfrmlsn_size:
 "ψ subfrmlsn φ ==> size ψ < size φ ψ = φ"
 by (induction φ) auto

 
 "size_set S sum (λx. 2 * size x + 1) S"

  size_set_diff:
 "finite S ==> S' S ==> size_set (S - S') = size_set S - size_set S'"
 using sum_diff_nat finite_subset by metis


  Constant Folding

  U_consts[intro, simp]:
 "w n φ Un truen"
 "¬ (w n φ Un falsen)"
 "(w n falsen Un φ) = (w n φ)"
 by force+

  R_consts[intro, simp]:
 "w n φ R Mxi 🚫
 "¬ (w n φ Rn falsen)"
 "(w n truen Rn φ) = (w n φ)"
 by force+

  W_consts[intro, simp]:
 "w n truen Wn φ"
 "w n φ Wn truen"
 "(w n falsen Wn φ) = (w n φ)"
 "(w n φ Wn falsen) = (w n Gn φ)"
 by force+

  M_consts[intro, simp]:
 "¬ (w n falsen Mn φ)"
 "¬ (w n φ Mn falsen)"
 "(w n truen Mn φ) = (w n φ)"
 "(w n φby auto
 by force+


  Distributivity

  until_and_left_distrib:
java.lang.NullPointerException
 
 assume "w n φ1 Un ψ andn φ2 Un ψ"

 then obtain i1 i2 where "suffix i1 w >\<^>c^sub>c (φ M ψ>)"
 by auto

 then have "suffix (min i1 i2) w n ψ (j<min i1 i2. suffix j w n φ1 andn φ2)"
 by (simp add: min_def)

 then show "w n1 andn φ2) Un ψ"
 by force
  auto

  until_or_right_distrib:
 "w n φ Un1 orn ψ2) w n (φ Un ψ1) orn (φ Un ψ2)"
 by auto

  release_and_right_distrib:
 "w n φ Rn1 andn ψ2) w n (φ Rn ψ1) andn (φ Rn ψ2)"
 by auto

  release_or_left_distrib:
 "w n1 orn φ2) Rn ψ w n1 Rn ψ) orn2 Rn ψ)"
 by (metis notn.simps(6) notn.simps(9) notn_semantics until_and_left_distrib)

  strong_release_and_right_distrib:
 "w n φ Mn1 andn ψ2) w n (φ Mn ψ1) andn (φ Mn ψ2)"
 
 assume "w n (φ Mn ψ1) andn (φ Mn ψ2)"

 then obta roof safe
 by auto

 then have "suffix (min i1 i2) w >🚫
 by (simp add: min_def)

 then show "w n φ Mn1 andn ψ2)"
 by force
  auto

  strong_release_or_left_distrib:
 "w
java.lang.NullPointerException

  weak_until_and_left_distrib:
 "w n1 andn φ2) Wn ψ w n1 Wn ψ) andn2 Wn ψ)"
 by auto

  weak_until_or_right_distrib:
java.lang.NullPointerException
 by (metis notn.simps(10) notn.simps(6) notn_semantics strong_release_and_right_distrib)


  next_until_distrib:
 "w n Xn (φ Un ψ) w n (Xn φ) Un (Xn ψ)"
 by auto

  next_release_distrib:
 "w n Xn (φ Rn ψ) w n (Xn φ) Rn (Xn ψ)"
 by auto

  next_weak_until_distrib:
 "w n Xn (φ Wn ψ) w n (Xn φ) Wn (Xn ψ)"
 by auto

  next_strong_release_distrib:
 "w n Xn (φ Mn ψ) w n (Xn φ) Mn (Xn ψ)"
 by auto


  exists_lest_iff[of "λ> suf i ξ>c ψ

  finally_until[simp]:
 "w n Fn (φ Un ψ) w n Fn ψ"
 by auto force

  globally_release[simp]:
 "w \\>n G> w ψ
 by auto force

  globally_weak_until[simp]:
 "w n Gn (φ Wn ψ) w n Gn (φ orn ψ)"
 by auto force

  finally_strong_release[simp]:
 "w n Fn (φ Mn ψ) w n Fn (φ andn ψ)"
 by auto force


  Weak and strong operators

  ltln_weak_strong:
java.lang.NullPointerException
 "w \<Turnstile \^>n ψn (φn \psi
  auto
 fix i
 assume "i. suffix i w n φ (ji. suffix j w n ψ)"
 and "i. suffix i w n ψ (j<i. ¬ suffix j w n φ)"

 then show "suffix i w n φ"
 by (induction i rule: less_induct) force
 
 fix i k
 assume "ji. ¬ suffix j w n ψ"
 and "suffix k w n ψ"
 and "j<k. suffix j w n φ"

 then show "suffix i w n φ"
 by (ca
 
 fix i
java.lang.NullPointerException
 and "i. suffix i w n φ (ji. ¬ suffix j w n ψ)"

 then show "suffix i w T
 by (induction i rule: less_induct) force
 
 fix i k
  "🚫
 and "suffix k w n φ"
 and "jk. suffix j w n ψ"

 then show "suffix i w ]b for
 by (cases "i k") simp_all
 

  ltln_strong_weak:
 "w n φ Un ψ w n (Fn ψ) andn (φ Wn ψ)"
java.lang.NullPointerException
java.lang.NullPointerException

  ltln_strong_to_weak:
java.lang.NullPointerException
 "w \qed
 using ltln_weak_strong by simp_all blast+

  ltln_weak_to_strong:
 "[w n φ
 "[w <subc ψ(φc ψ (F\^>c \psi)"
 "[w n φ Rn ψ; ¬ w n Gn ψ] ==> w n φ Mn ψ"
 "[w n φ Rn ψ; w n Fn φ] ==> w n φ Mn ψ"
 unfolding ltln_weak_strong[of w φ ψ] by auto


  ltln_StrongRelease_to_Until:
 "w n φ Mn ψ w n ψ Un (φ\<i Wphi U<^su>c φ
 using order.order_iff_strict by auto

  ltln_Release_to_WeakUntil:
 "w n φ Rn ψ w n ψ Wn (φ andn ψ)"
 by (meson ltln_StrongRelease_to_Until ltln_weak_strong semantics_ltln.simps(6))

  ltln_WeakUntil_to_Release:
 "w n φ Wn ψ w n ψ Rn (φ orn ψ)"
 by (metis ltln_StrongRelease_to_Until notn.simps(6,9,10) notn_semantics)

  ltln_Until_to_StrongRelease:
 "w n φ Un ψ w n ψ Mn (φ orn ψ safe
java.lang.NullPointerException


  GF and FG semantics

  GF_suffix:
java.lang.NullPointerException
  auto (metis ab_semigroup_add_class.add_ac(1 add.lleft)

  FG_suffix:
 "suffix i w "\xi🚫
 by (auto simp: algebra_simps) (metis add.commute add.left_commute)

  GF_Inf_many:
java.lang.NullPointerException
 unfolding INFM_nat_le
 by simp (blast dest: le_Suc_ex intro: le_add1)

  FG_Alm_all:
 "w λ
 unfolding MOST_nat_le
 by simp (blast dest: le_Suc_ex intro: le_add1)


(* TODO: move to Infinite_Set.thy ?? *)

lemma MOST_nat_add:
  "(\<infinity>i::nat. P i) (\<infinity>i. P (i + j))"
  by (simp add: cofinite_eq_sequentially)

lemma INFM_nat_add:
  "(\<infini using asm by fforce

  using MOST_nat_add not_MOST not_INFM by blast



lemma FG_suffix_G:

java.lang.NullPointerException

proof -

  assume "n Fn (Gn φ)"

  then have "n Fn (Gn (Gn φ))"

    by (meson globally_release semantics_ltln.simps(8))

  then show "\<infinity>i. suffix i w  n Gn φ"

    unfolding FG_Alm_all .

qed


lemma Alm_all_GF_F:
  "\<infinity>i. suffix i w n Gn (Fn ψ)  suffix i w n Fn ψ"
  unfolding MOST_
proof standard+
  fix i :: nat
  assume "suffix i w n Gn (Fn ψ)"
  then show " i w <>\^
    unfolding GF_Inf_many INFM_nat by fastforce
next
  fix i :: nat
  assume suffix: "suffix i w n Fn ψ"
  assume max: "i > Max {i. suffix i w n ψ}"

  with suffix obtain j where "j i" and j_suffix: "suffix j w
    by simp (blast intro: le_add1)

  with max have j_max: "j > Max {i. suffix i w n ψ}"
    by fastforce

  show "suffix i w n Gn (Fnot> i\xi
  proof (cases "w n Gn (Fn ψ)")
    case False
    then have java.lang.NullPointerException
      unfolding GF_Inf_many by simp
    then have "finite {i. suffix i w java.lang.NullPointerException
      by (simp add: INFM_iff_infinite)
    then have java.lang.NullPointerException
      using Max_ge nleltl_:
    then show ?thesis
      using j_sufix j_max by blast
  qed force
qed

lemma Alm_all_FG_G:
  "
  unfolding MOST_nat
proof standard+
  fix: nat
  assume "suffix i w \<by 
  then show "suffix i w n Fn (Gn ψ
    unfolding FG_Alm_all INFM_nat by fastforce
next
  fix i :: nat
  assume suffix: "suffix i w
  assume max: : "i>Max<> suffix i w>"

  with suffix have "\<infinity>j. suffix (i + j) w n Gn ψ"
    using FG_suffix_G[of "suffix i w"] suffix_suffix
    by fastforce
  then have "¬ (\<infinity>j. ¬ pw_eq_on_sym  '🚫
    using MOST_nat_add[of "λi. suffix i w pw_eq_on_tran[trans]:">pw_eq_on  S w w''\rbrakkLongrightarrowSww'java.lang.StringIndexOutOfBoundsException: Index 118 out of bounds for length 118
    p add
  then have "finite {i. ¬ suffix i w
    by (simp add: INFM_iff_infinite)

  with max show "  w<>\
    using Max_ge leD by blast
qed


subsubsection Expansion

lemma ltln_expand_Until:
  n φ Un ψ n ψ orn (φ( : pw_eq_)
  (is "?lhs = ?rhs")
proof
  assumeu> S'' ==>
  then obtain i where "suffix i ξ n ψ"
    and "j<i. suffix j ξ n φ"
    by auto
  thus ?rhs
    by (cases i) auto
next
  assume ?rhs
  show ?lhs
  proof (cases "ξ  φ 
    case False
    then have n φ" and n Xn (φ Un ψ)"
      using ?rhs by auto
    thus ?lhs
      using less_Suc_eq_0_disj suffix_singleton_suffix by force
  qed force
qed

lemma ltln_expand_Release:
  U
  (is "?lhs = ?rhs")
proof
  assume ?lhs
  thus ?rhs
    using less_Suc_eq_0_disj by force
next
  assume ?rhs

  {
    fix i
    assume "¬ suffix i ξ case
    thenmetis pw_eq_on_suffix
      using ?rhs
  }

  thus ?lhs
    by auto
qed

lemma ltln_expand_WeakUntil:
  java.lang.NullPointerException
  (is "?lhs = ?rhs")
proof
  assume ?lhs
  thus ?rhs
     (meltln_expand_Release l ltln_expand_ ltln_(1) semant.simps(25,,7))
next
  assume ?rhs

  {
    fix i
    assume "¬ suffix
    then have "ji. suffix j ξ
      using ?rhs by (cases i) force+
  }

  thus ?lhs
    by auto
qed

lemma ltln_expand_StrongRelease:
  "ξ Un_upper2sup_ge1
  (is "?lhs = ?rhs")
proof
  assume ?lhs
  then obtain i where java.lang.NullPointerException
    and "ji. suffix j ξ n ψ"
    by auto
  thus ?rhs
    by (cases i) aut
next
  assume ?rhs
  show ?lhs
  proof (cases "ξ n φ")
    case True
    thus ?lhs
      using ?rhs
  next
    case False
    thus ?l
      by (metis ?rhs ltln_expand_WeakUntil notn.simps(5,6,7,11) notn_semantics)
  qed
qed

lemma ltln_Release_alterdef:
  " <>wψ> (ψn (φsubψ
proof (cases "i. ¬suffix i w n ψ")
  case True
  define i where "i Least (λi. ¬suffix i w n ψ)"
  have "j. j < i ==> suffix j w n ψ" and "¬ suffix i w n ψ"
    using True LeastI not_less_Least unfolding i_def by fast+
  hence *: "i. suffix i w n ψ (j<i. suffix j w n φ) ==> (i. (suffix i w n ψ suffix i w n φ) (j<i. suffix j w n ψ))"
    by fastforce
  hence "i. (suffix i w n ψ suffix i w n φ) (j<i. suffix j w n ψ) ==> (i. suffix i w n ψ (j<i. suffix j w n φ))"
    using linorder_cases by blast
  thus ?thesis
    using True * by auto
qed auto




subsection LTL in restricted Negation Normal Form

text Some algorithms do not handle the operators W and M,
 hence we also provide a datatype without these two operators.


subsubsection Syntax

datatype (atoms_ltlr: 'a) ltlr =
    True_ltlr                               (
java.lang.NullPointerException
 | Prop_ltlr 'a (propr'(_')
java.lang.NullPointerException
 | And_ltlr "'a ltlr" "'a ltlr" (_ andr _ [82,82] 81)
 | Or_ltlr "'a ltlr" "'a ltlr" (_ orr _ [84,84] 83)
 | Next_ltlr "'a ltlr" (Xr _ [88] 87)
java.lang.NullPointerException
 | Release_ltlr "'a ltlr" "'a ltlr" (


 

  semantics_ltlr :: "['a set word, 'a ltlr] ==> bool" (
 
 "ξ r true(simp add: SUP_le_iff inj_on_image_mem_iff)
 xi <>^
  "ξ r propr(q) = (q ξ 0)"
  "ξ r nprop>
java.lang.NullPointerException
  "ξ ap simp
  "ξ r Xr φ = (suffix 1 ξ r φ)"
java.lang.NullPointerException
  "ξ r φ Rr ψ = (i. suffix i ξ r ψ (j<i. suffix j ξ r φ))"


  Conversion

  ltln_to_ltlr :: "'a ltln ==> 'a ltlr"
 
 "ltln_to_ltlr truen = truer"
  "ltln_to_ltlr falsen = falser"
  "ltln_to_ltlr propn(a) = propr(a)"
  "ltln_to_ltlr npropn(a) = npropr(a)"
  "ltln_to_ltlr (φ andn ψ) = (ltln_to_ltlr φ) andr (ltln_to_ltlr ψ)"
  "ltln_to_ltlr (φ orn ψ) = (ltln_to_ltlr φ) orr (ltln_to_ltlr ψ)"
  "ltln_to_ltlr (Xn φ) = Xr (ltln_to_ltlr φ)"
  "ltln_to_ltlr (φ Unnext
  "ltln_to_ltlr (φ R\φ
  "ltln_to_ltlr (φ Wn ψcas
  "ltln_to_ltlr (φ Mn ψ "suf_ _" unfolded suffix_com com, OF suffix_range] by fastf

  ltlr_to_ltln :: "'a ltlr ==> 'a ltln"
 
java.lang.NullPointerException
java.lang.NullPointerException
  "ltlr_to_ltln propr(a) = prop suffix_rang] by fastforce
  "ltlr_to_ltln npropr(a) = npropn(a)"
  "ltlr_to_ltln (φ andr ψ) = (ltlr_to_ltln φ) andn (ltlr_to_ltln ψ)"
java.lang.NullPointerException
  "ltlr_to_ltln (Xrcase (Unt)
java.lang.NullPointerException
  "ltlr_to_ltln (φ Rrusing Un Until_ltlc(12)[of ""suffix _ w", unfol suffi comp_de, OFsuffix_] by fastforce

  ltln_to_ltlr_semantics:
 "w r ltln_to_ltlr φ
 by (induction φ arbitr cas (Rel)

  ltlr_to_ltln_semantics:
 "w com OF suffi
 by (induction φ arbitrary: w) simp_all


  Negation

  notr
 
java.lang.NullPointerException
java.lang.NullPointerException
  "notr propcomp_def, F suffix_range] by fa fastfo
  "notr npropr(a) = propr(a)"
  "notr (φ andr ψ) = (notr φ) orr (notr ψ)"
  "notcase(Str)
java.lang.NullPointerException
  "notusingStrongRele(1,2)[of "suffix _ w",", unfol suffix_ccomp_de, OF suffix_range] by fastforce
  "notr (φ Rr ψ) = (notsimp+

  notr_semantics [simp]:
 "w r notr φ ¬ w r φ"
 by (induction φ arbitrary: w) auto


java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 'a ltlr <> 
 
 "subfrmlsr (φ andr ψ) = {φ andr ψ} subfrmlsr φ subfrmlsr ψ"
  "subfrmlsr (φ orr ψ) = {φ or> ξ map_l (the o f) 🚫
  "subfrmlsr (φ Ur ψ) = {φ Ur ψ} subfrmlsr φ subfrmlsr ψ"
  "subfrmlsr (φ Rr ψ) = {φ
  "subfrmlsr (X.i
  "subfrmlsr x = {x}"

  subfrmlsr_id[simp]:
 "φ subfrmlsr φ"
 by (induction φ) auto

  subfrmlsr_finite:
 "finite (subfrmlsr φ)"
 by (induction φ) auto

  subfrmlsr_subset:
 "ψ subfrmlsr φ ==> subfrmlsr ψ subfrmlsr φ"
 by (induction φ) auto

  subfrmlsr_size:
 "ψ subfrmlsr φ ==> size ψ < size
 by (induction φ) auto


  Expansion lemmas

  ltlr_expand_Until:
 "ξ r φ Ur ψ
 by (metis ltln_expan ltlr_5-8) ltlr_to_ltln_semantics)

  ltlr_expand_Release:
java.lang.NullPointerException
 by (metis ltln_expand_Release ltlr_to_ltln.simps(5-7,9) ltlr_to_ltln_semantics)




  Propositional LTL

 
 temporal logic PLTL.
 PLTL formulas are built from atomic formulas, propositional connectives,
 and the temporal operators ``next'' and ``until''. The following data
 type definition is parameterized by the type of states over which
 formulas are evaluated.


  Syntax

  'a pltl =
 False_ltlp ( apply (auto int intro!: ext simp: map_prop domIff ima
 | Atom_ltlp "'a ==> bool" (option.)
java.lang.NullPointerException
 | Next_ltlp "'a pltl" (
 | Until_ltlp "'a pltl" "'a pltl" (_ Up _ [84,84] 83)

  Further connectives of PLTL can be defined in terms of the existing syntax.

  Not_ltlp (notp _ [85] 85)
 
 "notp φ φ implies pw)

  True_ltlp (
 
 "truep notp falselongleftrightarrow> (λ )\<> 

  Or_ltlp (_ orp _ [81,81] 80)
 
 "φ orp ψ (notp φ) impliesp ψ"

  And_ltlp (_ andp _ [82,82] 81)
 
 "φ andp ψ notp ((notp φ) orp (notp ψ))"

  Eventually_ltlp (Fp _ [88] 87)
 
 "Fp φ truep Up φ"

  Always_ltlp (Gp _ [88] 87)
 
 "Gp φ notp (Fp (notp φ))"

  Release_ltlp (_ Rp _using DOM INJ
 
java.lang.NullPointerException

  WeakUntil_ltlp (_ W\<^by(
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.NullPointerException

  StrongRelease_ltlp (_ Msubseteq dom f"
 
 "φ Mp ψ ψ Up (φ andp ψ)"


  Semantics

  semantics_pl :: "['a word, 'a plt ==> 80)
 
 "w p falsep = False"
  "w p atomp(p) = (p (w 0))"
  "w p φ impliesp ψ = (w p φ w p ψ)"
  "w p Xp φ = (suffix 1 w p φ)"
  "w p φ Up ψ = (i. suffix i w p ψ (j<i. suffix j w p φ))"

  semantics_pltl_sugar [simp]:
 "w p notsimp
 "w p truep = True"
java.lang.NullPointerException
 "w p φ andp ψ
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 "w
 "w p φ Rp ψ = (i. suffix i w Form\<<close
 "w p φ Wp ψ = (
 "w We efin a type of LTL forino form (NF).\close
 by (auto simp: Not_ltlp_def True_ltlp_def Or_ltlp_def And_ltlp_def Eventually_ltlp_def Always_ltlp_def Release_ltlp_def WeakUntil_ltlp_def StrongRelease_ltlp_def) (insert le_neq_implies_less, blast)+

java.lang.NullPointerException


  Conversion

  ltlc_to_pltl :: "'a lltlc > 'a set pltl"
 
 "ltlc_to_pltl truec = truep"
  "ltlc_to_pltl false True_ltln (
  "ltlc_to_pltl (propc(q)) = atomp(() q)"
  "ltlc_to_pltl (notc φ) = notp (ltlc_to_pltl φ)"
java.lang.NullPointerException
  "ltlc_to_pltl (φ orc ψ) = (ltlc_to_pltl φ) orp (ltlc_to_pltl ψ)"
java.lang.NullPointerException
  "ltlc_to_pltl (Xc φ) = Xp (ltlc_to_pltl φ)"
  "ltlc_to_pltl (Fc φ) = Fp (ltlc_to_pltl φ)"
  "ltlc_to_pltl (Gc φ) = G<lose> 82,82] 81)
  "ltlc_to_pltl (φ Uc ψ) = (ltlc_to_pltl φ) Up (ltlc_to_pltl ψ)"
  "ltlc_to_pltl (φ Rc ψ) = (ltlc_to_pltl φ) Rp (ltlc_to_pltl ψ)"
  "ltlc_to_pltl (φ Wc ψ) = (ltlc_to_pltl φ) Wp (ltlc_to_pltl ψ)"
 (tlc_to_pltlψ

  ltlc_to_pltl_semantics [simp]:
 "w p (ltlc_to_pltl φ) w c φ"
 by (induction φ arbitrary: w) simp_all


  Atoms

  atoms_pltl :: "'a pltl ==> ('a ==> bool) set"
 
 "atoms_pltl falsep = {}"
  "atoms_pltl atomp(p) = {p}"
  "atoms_pltl (φ impliesp ψ) = atoms_pltl φ atoms_pltl ψ"
java.lang.NullPointerException
  "atoms_pltl (φ Up ψ) = atoms_pltl φ atoms_pltl ψ"

  atoms_finite [iff]:
 "finite (atoms_pltl φ Relea"'a ltln" "'a ltln" (\<>_
 by (induct φ) auto

  atoms_pltl_sugar [simp]:
 "atoms_pltl (notp φ) = atoms_pltl φ"
 "atoms_pltl true(<>_
 "atoms_pltl (φ orp ψ) = atoms_pltl φ atoms_pltl ψ"
 "atoms_pltl (φ andp ψ) = atoms_pltl φ atoms_pltl ψ"
 "atoms_pltl (Fp φ) = atoms_pltl φ"
 "atoms_pltl (Gp φ) = atoms_pltl φ"
 by (auto simp: Not_ltlp_def True_ltlp_def Or_ltlp_def And_ltlp_def Eventually_ltlp_def Always_ltlp_def)

 

Messung V0.5 in Prozent
C=61 H=88 G=75

¤ Dauer der Verarbeitung: 0.32 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen



NIST Cobol Testsuite



Haftungshinweis

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

      Eigene Quellcodes
      Fremde Quellcodes
     Quellcodebibliothek
      Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge