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 |