src/HOL/MicroJava/BV/Typing_Framework.thy
author huffman
Mon, 23 Feb 2009 07:58:13 -0800
changeset 30073 a4ad0c08b7d9
parent 27680 5a557a5afc48
permissions -rw-r--r--
change imports to move Fact.thy outside Plain
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
27680
5a557a5afc48 added explicit root theory; some tuning
haftmann
parents: 16417
diff changeset
     9
theory Typing_Framework
5a557a5afc48 added explicit root theory; some tuning
haftmann
parents: 16417
diff changeset
    10
imports Listn
5a557a5afc48 added explicit root theory; some tuning
haftmann
parents: 16417
diff changeset
    11
begin
11229
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    12
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    13
text {* 
13224
6f0928a942d1 LBV instantiantion refactored, streamlined
kleing
parents: 13062
diff changeset
    14
  The relationship between dataflow analysis and a welltyped-instruction predicate. 
11229
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    15
*}
12516
d09d0f160888 exceptions
kleing
parents: 11299
diff changeset
    16
types
d09d0f160888 exceptions
kleing
parents: 11299
diff changeset
    17
  's step_type = "nat \<Rightarrow> 's \<Rightarrow> (nat \<times> 's) list"
11229
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    18
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    19
constdefs
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    20
 stable :: "'s ord \<Rightarrow> 's step_type \<Rightarrow> 's list \<Rightarrow> nat \<Rightarrow> bool"
12516
d09d0f160888 exceptions
kleing
parents: 11299
diff changeset
    21
"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
    22
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    23
 stables :: "'s ord \<Rightarrow> 's step_type \<Rightarrow> 's list \<Rightarrow> bool"
12516
d09d0f160888 exceptions
kleing
parents: 11299
diff changeset
    24
"stables r step ss == !p<size ss. stable r step ss p"
11229
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    25
14653
0848ab6fe5fc constdefs: proper order;
wenzelm
parents: 13224
diff changeset
    26
 wt_step ::
0848ab6fe5fc constdefs: proper order;
wenzelm
parents: 13224
diff changeset
    27
"'s ord \<Rightarrow> 's \<Rightarrow> 's step_type \<Rightarrow> 's list \<Rightarrow> bool"
0848ab6fe5fc constdefs: proper order;
wenzelm
parents: 13224
diff changeset
    28
"wt_step r T step ts ==
0848ab6fe5fc constdefs: proper order;
wenzelm
parents: 13224
diff changeset
    29
 !p<size(ts). ts!p ~= T & stable r step ts p"
0848ab6fe5fc constdefs: proper order;
wenzelm
parents: 13224
diff changeset
    30
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    31
 is_bcv :: "'s ord \<Rightarrow> 's \<Rightarrow> 's step_type 
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    32
           \<Rightarrow> nat \<Rightarrow> 's set \<Rightarrow> ('s list \<Rightarrow> 's list) \<Rightarrow> bool"  
12516
d09d0f160888 exceptions
kleing
parents: 11299
diff changeset
    33
"is_bcv r T step n A bcv == !ss : list n A.
11229
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    34
   (!p<n. (bcv ss)!p ~= T) =
12516
d09d0f160888 exceptions
kleing
parents: 11299
diff changeset
    35
   (? ts: list n A. ss <=[r] ts & wt_step r T step ts)"
11229
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    36
f417841385b7 Got rid of is_dfa
nipkow
parents:
diff changeset
    37
end