equal
deleted
inserted
replaced
52 syntax ("" output) |
52 syntax ("" output) |
53 "_hoare" :: "['a assn,'a com,'a assn] => bool" |
53 "_hoare" :: "['a assn,'a com,'a assn] => bool" |
54 ("{_} // _ // {_}" [0,55,0] 50) |
54 ("{_} // _ // {_}" [0,55,0] 50) |
55 |
55 |
56 ML_file "hoare_syntax.ML" |
56 ML_file "hoare_syntax.ML" |
57 parse_translation {* [(@{syntax_const "_hoare_vars"}, K Hoare_Syntax.hoare_vars_tr)] *} |
57 parse_translation \<open>[(@{syntax_const "_hoare_vars"}, K Hoare_Syntax.hoare_vars_tr)]\<close> |
58 print_translation {* [(@{const_syntax Valid}, K (Hoare_Syntax.spec_tr' @{syntax_const "_hoare"}))] *} |
58 print_translation \<open>[(@{const_syntax Valid}, K (Hoare_Syntax.spec_tr' @{syntax_const "_hoare"}))]\<close> |
59 |
59 |
60 |
60 |
61 lemma SkipRule: "p \<subseteq> q \<Longrightarrow> Valid p (Basic id) q" |
61 lemma SkipRule: "p \<subseteq> q \<Longrightarrow> Valid p (Basic id) q" |
62 by (auto simp:Valid_def) |
62 by (auto simp:Valid_def) |
63 |
63 |
90 |
90 |
91 |
91 |
92 lemma Compl_Collect: "-(Collect b) = {x. ~(b x)}" |
92 lemma Compl_Collect: "-(Collect b) = {x. ~(b x)}" |
93 by blast |
93 by blast |
94 |
94 |
95 lemmas AbortRule = SkipRule -- "dummy version" |
95 lemmas AbortRule = SkipRule \<comment> "dummy version" |
96 ML_file "hoare_tac.ML" |
96 ML_file "hoare_tac.ML" |
97 |
97 |
98 method_setup vcg = {* |
98 method_setup vcg = \<open> |
99 Scan.succeed (fn ctxt => SIMPLE_METHOD' (Hoare.hoare_tac ctxt (K all_tac))) *} |
99 Scan.succeed (fn ctxt => SIMPLE_METHOD' (Hoare.hoare_tac ctxt (K all_tac)))\<close> |
100 "verification condition generator" |
100 "verification condition generator" |
101 |
101 |
102 method_setup vcg_simp = {* |
102 method_setup vcg_simp = \<open> |
103 Scan.succeed (fn ctxt => |
103 Scan.succeed (fn ctxt => |
104 SIMPLE_METHOD' (Hoare.hoare_tac ctxt (asm_full_simp_tac ctxt))) *} |
104 SIMPLE_METHOD' (Hoare.hoare_tac ctxt (asm_full_simp_tac ctxt)))\<close> |
105 "verification condition generator plus simplification" |
105 "verification condition generator plus simplification" |
106 |
106 |
107 end |
107 end |