src/HOL/IMP/OO.thy
changeset 58249 180f1b3508ed
parent 53015 a1119cf551e8
child 58310 91ea607a34d8
equal deleted inserted replaced
58248:25af24e1f37b 58249:180f1b3508ed
     6 abbreviation fun_upd2 :: "('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> 'c \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> 'c"
     6 abbreviation fun_upd2 :: "('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> 'c \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> 'c"
     7   ("_/'((2_,_ :=/ _)')" [1000,0,0,0] 900)
     7   ("_/'((2_,_ :=/ _)')" [1000,0,0,0] 900)
     8 where "f(x,y := z) == f(x := (f x)(y := z))"
     8 where "f(x,y := z) == f(x := (f x)(y := z))"
     9 
     9 
    10 type_synonym addr = nat
    10 type_synonym addr = nat
    11 datatype ref = null | Ref addr
    11 datatype_new ref = null | Ref addr
    12 
    12 
    13 type_synonym obj = "string \<Rightarrow> ref"
    13 type_synonym obj = "string \<Rightarrow> ref"
    14 type_synonym venv = "string \<Rightarrow> ref"
    14 type_synonym venv = "string \<Rightarrow> ref"
    15 type_synonym store = "addr \<Rightarrow> obj"
    15 type_synonym store = "addr \<Rightarrow> obj"
    16 
    16 
    17 datatype exp =
    17 datatype_new exp =
    18   Null |
    18   Null |
    19   New |
    19   New |
    20   V string |
    20   V string |
    21   Faccess exp string       ("_\<bullet>/_" [63,1000] 63) |
    21   Faccess exp string       ("_\<bullet>/_" [63,1000] 63) |
    22   Vassign string exp       ("(_ ::=/ _)" [1000,61] 62) |
    22   Vassign string exp       ("(_ ::=/ _)" [1000,61] 62) |