equal
deleted
inserted
replaced
255 |
255 |
256 syntax |
256 syntax |
257 guarded_com :: "bool \<Rightarrow> 'a com \<Rightarrow> 'a com" ("(2_ \<rightarrow>/ _)" 71) |
257 guarded_com :: "bool \<Rightarrow> 'a com \<Rightarrow> 'a com" ("(2_ \<rightarrow>/ _)" 71) |
258 array_update :: "'a list \<Rightarrow> nat \<Rightarrow> 'a \<Rightarrow> 'a com" ("(2_[_] :=/ _)" [70, 65] 61) |
258 array_update :: "'a list \<Rightarrow> nat \<Rightarrow> 'a \<Rightarrow> 'a com" ("(2_[_] :=/ _)" [70, 65] 61) |
259 translations |
259 translations |
260 "P \<rightarrow> c" == "IF P THEN c ELSE Abort FI" |
260 "P \<rightarrow> c" == "IF P THEN c ELSE CONST Abort FI" |
261 "a[i] := v" => "(i < CONST length a) \<rightarrow> (a := CONST list_update a i v)" |
261 "a[i] := v" => "(i < CONST length a) \<rightarrow> (a := CONST list_update a i v)" |
262 (* reverse translation not possible because of duplicate "a" *) |
262 (* reverse translation not possible because of duplicate "a" *) |
263 |
263 |
264 text{* Note: there is no special syntax for guarded array access. Thus |
264 text{* Note: there is no special syntax for guarded array access. Thus |
265 you must write @{text"j < length a \<rightarrow> a[i] := a!j"}. *} |
265 you must write @{text"j < length a \<rightarrow> a[i] := a!j"}. *} |