src/HOL/IMP/Abs_Int0_fun.thy
changeset 45212 e87feee00a4c
parent 45127 d2eb07a1e01b
child 45623 f682f3f7b726
equal deleted inserted replaced
45211:3dd426ae6bea 45212:e87feee00a4c
     9 
     9 
    10 subsection "Annotated Commands"
    10 subsection "Annotated Commands"
    11 
    11 
    12 datatype 'a acom =
    12 datatype 'a acom =
    13   SKIP   'a                           ("SKIP {_}") |
    13   SKIP   'a                           ("SKIP {_}") |
    14   Assign name aexp 'a                 ("(_ ::= _/ {_})" [1000, 61, 0] 61) |
    14   Assign vname aexp 'a                ("(_ ::= _/ {_})" [1000, 61, 0] 61) |
    15   Semi   "'a acom" "'a acom"          ("_;//_"  [60, 61] 60) |
    15   Semi   "('a acom)" "('a acom)"          ("_;//_"  [60, 61] 60) |
    16   If     bexp "'a acom" "'a acom" 'a
    16   If     bexp "('a acom)" "('a acom)" 'a
    17     ("(IF _/ THEN _/ ELSE _//{_})"  [0, 0, 61, 0] 61) |
    17     ("(IF _/ THEN _/ ELSE _//{_})"  [0, 0, 61, 0] 61) |
    18   While  'a bexp "'a acom" 'a
    18   While  'a bexp "('a acom)" 'a
    19     ("({_}//WHILE _/ DO (_)//{_})"  [0, 0, 61, 0] 61)
    19     ("({_}//WHILE _/ DO (_)//{_})"  [0, 0, 61, 0] 61)
    20 
    20 
    21 fun post :: "'a acom \<Rightarrow>'a" where
    21 fun post :: "'a acom \<Rightarrow>'a" where
    22 "post (SKIP {P}) = P" |
    22 "post (SKIP {P}) = P" |
    23 "post (x ::= e {P}) = P" |
    23 "post (x ::= e {P}) = P" |
   298 lemma in_rep_Top[simp]: "x <: \<top>"
   298 lemma in_rep_Top[simp]: "x <: \<top>"
   299 by(simp add: rep_Top)
   299 by(simp add: rep_Top)
   300 
   300 
   301 end
   301 end
   302 
   302 
   303 type_synonym 'a st = "(name \<Rightarrow> 'a)"
   303 type_synonym 'a st = "(vname \<Rightarrow> 'a)"
   304 
   304 
   305 locale Abs_Int_Fun = Val_abs
   305 locale Abs_Int_Fun = Val_abs
   306 begin
   306 begin
   307 
   307 
   308 fun aval' :: "aexp \<Rightarrow> 'a st \<Rightarrow> 'a" where
   308 fun aval' :: "aexp \<Rightarrow> 'a st \<Rightarrow> 'a" where