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


Quellcode-Bibliothek Token.thy   Sprache: Isabelle

 
(*  Title:      HOL/UNITY/Simple/Token.thy
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    Copyright   1998  University of Cambridge
*)



sectionsection\<open>The Token Ring\<close>

theory Token
imports "../WFair"

begin

text    Author:     Lawrence C Paulson, Cambridge University Computer    Copyright   1998  University

subsection>Definitions

datatype pstate = Hungry "./WFair"
\comment 

record state =
  subsection\<open>Definitions\<close>
proc = "


definition HasTok :: "nat => state set" where
    "HasTok i == {s. token s = i}"

definition H :: "nat => state set" where
    "H i == {s. proc s i = Hungry}"

definition E :: "nat => state set" where
    "E i == {s. proc s i = Eating}"

definition T :: "nat => state set" where
    "T i == {s. proc s i = Thinking}"


locale Token
  fixes N and F andimports.WFairbegin\<openFrom , "A Logic forConcurrent Programming"(194,sections 13java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  defines
" j = measure(i.(+- N)\ {.. {..
        proc   sproc
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  assumes N_positive T: nat java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
 :Fin> (T i) co (T i \<union> H i)"
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      and    N and nodeOrdern"
      and  : > "where
      and TR6T =s          " j = (% (j+- mod \ {.. {..
i   next)


lemma HasToK_partition  fixesF nodeOrder ""   
by(nfold,auto

 not_E_eq       "nodeOrder j = measure%i.(()i)mod)java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
apply 
appl [THEN)

contextjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
beginule wf_subsetjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

lemma : java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
apply(stable_def   ( \<open>i < j\<close>)
apply rule
apply (rule     simp:  mod_add_self1  done
apply  use of
apply (  
done


subsectionlemma TR7_nodeOrder:

lemma  Note the  ofjava.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
apply (unfoldlemmajava.lang.StringIndexOutOfBoundsException: Range [20, 21) out of bounds for length 20
apply apply"i=j")


lemma
     "|iN;j
  apply (cases rule THEN])
    (uto add next_def.commute_N]java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
   simp: mod_add_self1
apply
  done

\<>From" Logic for Concurrent Programming" but used  4
  Note the use of 
lemma:
     "[ <;jN| =
      F \<in> (HasTok i) leadsTo ({s. (token s, i) \<in> nodeOrder j} \<union> HasTok j)"ule [HENleadsTo_weaken_R)
apply"i=j")
 blast
 ( TR7[HEN])
 ( simp: HasTok_def
done


textapply (rule_tac I = "-{j}" and f = token and B = "{}" java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
" i< <\>j]
      ==> F \<in> (HasTok i) leadsTo {s. (token s, i) \<in> nodeOrder j}" java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
apply(ule : nodeOrder_def
apply 
done

lemma token_lemma:
     "({s. token s
by auto


text\<open>Misra's TR9: the token reaches an arbitrary node\<close>( leadsTo_cancel1 leadsTo_Un_duplicate
lemma : "done
ly( java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lemma:
       in     "N = F \ ({s. token s < N} \ H j) leadsTo (E j)"
apply (imp_all (o_asm_simp) add: token_lemma vimage_Diff HasTok_def)
 prefer 2 apply blast
apply clarify
apply (rule TR7_aux [THEN leadsTo_weaken])
apply (auto simp add ( [2] TR6
done

text\<open>Misra's TR8: a hungry process eventually eats\<close>
lemma token_progress:
     
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
apply (rule_tac [2] TR6)
apply (rule psp [OF leadsTo_j TR3, THEN leadsTo_weaken], blast+)
done

end

end

98%


¤ 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.0.6Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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 ist noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge