src/HOL/MicroJava/BV/Typing_Framework.thy
author paulson
Tue, 01 Feb 2005 18:01:57 +0100
changeset 15481 fc075ae929e4
parent 14653 0848ab6fe5fc
child 16417 9bc16273c2d4
permissions -rw-r--r--
the new subst tactic, by Lucas Dixon
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11229
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
     1
(*  Title:      HOL/MicroJava/BV/Typing_Framework.thy
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
     2
    ID:         $Id$
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
     3
    Author:     Tobias Nipkow
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
     4
    Copyright   2000 TUM
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
     5
*)
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
     6
12911
704713ca07ea new document
kleing
parents: 12516
diff changeset
     7
header {* \isaheader{Typing and Dataflow Analysis Framework} *}
11229
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
     8
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
     9
theory Typing_Framework = Listn:
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    10
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    11
text {* 
13224
6f0928a942d1 LBV instantiantion refactored, streamlined
kleing
parents: 13062
diff changeset
    12
  The relationship between dataflow analysis and a welltyped-instruction predicate. 
11229
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    13
*}
12516
d09d0f160888 exceptions
kleing
parents: 11299
diff changeset
    14
types
d09d0f160888 exceptions
kleing
parents: 11299
diff changeset
    15
  's step_type = "nat \<Rightarrow> 's \<Rightarrow> (nat \<times> 's) list"
11229
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    16
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    17
constdefs
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    18
 stable :: "'s ord \<Rightarrow> 's step_type \<Rightarrow> 's list \<Rightarrow> nat \<Rightarrow> bool"
12516
d09d0f160888 exceptions
kleing
parents: 11299
diff changeset
    19
"stable r step ss p == !(q,s'):set(step p (ss!p)). s' <=_r ss!q"
11229
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    20
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    21
 stables :: "'s ord \<Rightarrow> 's step_type \<Rightarrow> 's list \<Rightarrow> bool"
12516
d09d0f160888 exceptions
kleing
parents: 11299
diff changeset
    22
"stables r step ss == !p<size ss. stable r step ss p"
11229
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    23
14653
0848ab6fe5fc constdefs: proper order;
wenzelm
parents: 13224
diff changeset
    24
 wt_step ::
0848ab6fe5fc constdefs: proper order;
wenzelm
parents: 13224
diff changeset
    25
"'s ord \<Rightarrow> 's \<Rightarrow> 's step_type \<Rightarrow> 's list \<Rightarrow> bool"
0848ab6fe5fc constdefs: proper order;
wenzelm
parents: 13224
diff changeset
    26
"wt_step r T step ts ==
0848ab6fe5fc constdefs: proper order;
wenzelm
parents: 13224
diff changeset
    27
 !p<size(ts). ts!p ~= T & stable r step ts p"
0848ab6fe5fc constdefs: proper order;
wenzelm
parents: 13224
diff changeset
    28
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    29
 is_bcv :: "'s ord \<Rightarrow> 's \<Rightarrow> 's step_type 
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    30
           \<Rightarrow> nat \<Rightarrow> 's set \<Rightarrow> ('s list \<Rightarrow> 's list) \<Rightarrow> bool"  
12516
d09d0f160888 exceptions
kleing
parents: 11299
diff changeset
    31
"is_bcv r T step n A bcv == !ss : list n A.
11229
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    32
   (!p<n. (bcv ss)!p ~= T) =
12516
d09d0f160888 exceptions
kleing
parents: 11299
diff changeset
    33
   (? ts: list n A. ss <=[r] ts & wt_step r T step ts)"
11229
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    34
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    35
end