-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhoare_tac.ML
42 lines (23 loc) · 1.04 KB
/
hoare_tac.ML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
(* Title: HOL/Hoare/hoare_tac.ML
Derivation of the proof rules and, most importantly, the VCG tactic.
*)
(*****************************************************************************)
(** Simplifying: **)
(** Some useful lemmata, lists and simplification tactics to control which **)
(** theorems are used to simplify at each moment, so that the original **)
(** input does not suffer any unexpected transformation **)
(*****************************************************************************)
(**Simp_tacs**)
(** hoare_rule_tac **)
(** hoare_rule_tac **)
fun hoare_rule_tac ctxt tac =
let
fun rule_tac pre_cond i st = st |>
(
rtac @{thm ord_wlp} 1
)
in rule_tac end;
(** tac is the tactic the user chooses to solve or simplify **)
(** the final verification conditions **)
fun quantum_hoare_tac ctxt tac = SUBGOAL (fn (goal, i) =>
SELECT_GOAL (hoare_rule_tac ctxt tac true 1) i);