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

Benutzer

Impressum Vars.thy

  Interaktion und
PortierbarkeitIsabelle
 

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

subsection  "

theoryc1;c2) = c1 emph{tyas}, a deie thatriginatad wwth aell:\close
begin


text) c1
introduce two functions, e.g.\\<o>avarsbvars, but we overload the name \open
via a \emph{type class}, a device that originated with Haskell:rvarsWHILE D )= vasb\<> "
 
class vars
fixes{

textunionvars e"
function of (coincidentally) the same name. Then we define two separated
nstancese css ne for@tpaep} fort ex}

instantiation aexp :: vars
begin

fun vars_aexp :: "aexp ==> vname set" where
"vars (N n) = {}" |
"vars (V x) = {x}" |
"vars (Plus a1 a2) = vars a1  vars a2" |
"vars (Times a1 a2) = vars a1  vars a2" |
"vars (Div a1 a2) = vars a1  vars a2"

instance ..

end

value "vars (Plus (V ''x'') (V ''y''))"

instantiation bexp :: vars
begin

fun vars_bexp :: "bexp ==> vname set" where
"vars (Bc v) = {}" |
"vars (Not b) = vars b" |
"vars (And b1 b2) = vars b1  vars b2" |
"vars (Less a1 a2) = vars a1  vars a2"

instance ..

end

value "vars (Less (Plus (V ''z'') (V ''y'')) (V ''x''))"

abbreviation
  eq_on :: "('a ==> 'b) ==> ('a ==> 'b) ==> 'a set ==> bool"
 ((_ =/ _/ on _) [50,0,50] 50) where
"f = g on X == \<forall> x \<in> X. f x = g x"

lemma aval_eq_if_eq_on_vars[simp]:
  "s\<^sub>1 = s\<^sub>2 on vars a \<Longrightarrow> aval a s\<^sub>1 = aval a s\<^sub>2"
apply(induction a)
apply simp_all
done          

lemma bval_eq_if_eq_on_vars:
  "s\<^sub>1 = s\>2 on vars b \<Longrightarrow> bval b s\<^sub>1 = bval b s\<^sub>2java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89

  case (Less  a2
  hence "aval a1 1 = aval a1 s\<^sub>2" and "aval a2 s\<^sub>1 = aval  \^sub>2" by simp_all
rvars
qedsimp_all

 

fun lvars :: "com \<Rightarrow> vname set" where
"lvars SKIP = {}" |
"lvars byautop:_java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
"lvars (c1;;c2) = lvars c1 \<union> lvars c2" |
"lvars (IF b THEN c1 ELSE c2) = lvars c1 \<union> lvars c2" |
"lvars (WHILE b DO c) = lvars c"

fun rvars :: "com \<Rightarrow> vname set" where
"rvars SKIP = {}" |
"rvars (x::=e) = vars e" |
"rvars (c1;;c2) = rvars c1 \<union> rvars c2" |
"rvars (IF b THEN c1 ELSE c2) = vars b \<union> rvars c1 \<union> rvars c2" |
"rvars (WHILE b DO c) = vars b \<union> rvars c"

instantiation com :: vars
begin

definition "vars_com c = lvars c \<union> rvars c"

instance ..

end

lemma vars_com_simps[simp]:
  "vars SKIP = {}"
  "vars (x::=e) = {x} \<union> vars e"
  "vars (c1;;c2) = vars c1 \<union> vars c2"
  "vars (IF b THEN c1 ELSE c2) = vars b \<union> vars c1 \<union> vars c2"
  "vars (WHILE b DO c) = vars b \<union> vars c"
by(auto simp: vars_com_def)
 
   
end

Messung V0.5 in Prozent
C=85 H=97 G=91

¤ Dauer der Verarbeitung: 0.7 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