equal
deleted
inserted
replaced
11 |
11 |
12 subsection "Field access and update" |
12 subsection "Field access and update" |
13 |
13 |
14 syntax |
14 syntax |
15 "_refupdate" :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a ref \<Rightarrow> 'b \<Rightarrow> ('a \<Rightarrow> 'b)" |
15 "_refupdate" :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a ref \<Rightarrow> 'b \<Rightarrow> ('a \<Rightarrow> 'b)" |
16 (\<open>_/'((_ \<rightarrow> _)')\<close> [1000,0] 900) |
16 (\<open>(\<open>open_block notation=\<open>mixfix Hoare ref update\<close>\<close>_/'((_ \<rightarrow> _)'))\<close> [1000,0] 900) |
17 "_fassign" :: "'a ref => id => 'v => 's com" |
17 "_fassign" :: "'a ref => id => 'v => 's com" |
18 (\<open>(2_^._ :=/ _)\<close> [70,1000,65] 61) |
18 (\<open>(\<open>indent=2 notation=\<open>mixfix Hoare ref assignment\<close>\<close>_^._ :=/ _)\<close> [70,1000,65] 61) |
19 "_faccess" :: "'a ref => ('a ref \<Rightarrow> 'v) => 'v" |
19 "_faccess" :: "'a ref => ('a ref \<Rightarrow> 'v) => 'v" |
20 (\<open>_^._\<close> [65,1000] 65) |
20 (\<open>(\<open>open_block notation=\<open>infix Hoare ref access\<close>\<close>_^._)\<close> [65,1000] 65) |
21 translations |
21 translations |
22 "f(r \<rightarrow> v)" == "f(CONST addr r := v)" |
22 "f(r \<rightarrow> v)" == "f(CONST addr r := v)" |
23 "p^.f := e" => "f := f(p \<rightarrow> e)" |
23 "p^.f := e" => "f := f(p \<rightarrow> e)" |
24 "p^.f" => "f(CONST addr p)" |
24 "p^.f" => "f(CONST addr p)" |
25 |
25 |