199 |
199 |
200 (*** Tactics for possibility theorems ***) |
200 (*** Tactics for possibility theorems ***) |
201 |
201 |
202 (*Omitting used_Says makes the tactic much faster: it leaves expressions |
202 (*Omitting used_Says makes the tactic much faster: it leaves expressions |
203 such as Nonce ?N \\<notin> used evs that match Nonce_supply*) |
203 such as Nonce ?N \\<notin> used evs that match Nonce_supply*) |
204 fun possibility_tac st = st |> |
204 fun gen_possibility_tac ss state = state |> |
205 (REPEAT |
205 (REPEAT |
206 (ALLGOALS (simp_tac (simpset() delsimps [used_Says, used_Notes, used_Gets] |
206 (ALLGOALS (simp_tac (ss delsimps [used_Says, used_Notes, used_Gets] |
207 setSolver safe_solver)) |
207 setSolver safe_solver)) |
208 THEN |
208 THEN |
209 REPEAT_FIRST (eq_assume_tac ORELSE' |
209 REPEAT_FIRST (eq_assume_tac ORELSE' |
210 resolve_tac [refl, conjI, Nonce_supply, Key_supply]))); |
210 resolve_tac [refl, conjI, Nonce_supply, Key_supply]))); |
|
211 |
|
212 (*Tactic for possibility theorems (ML script version)*) |
|
213 fun possibility_tac state = gen_possibility_tac (simpset()) state; |
211 |
214 |
212 (*For harder protocols (such as Recur) where we have to set up some |
215 (*For harder protocols (such as Recur) where we have to set up some |
213 nonces and keys initially*) |
216 nonces and keys initially*) |
214 fun basic_possibility_tac st = st |> |
217 fun basic_possibility_tac st = st |> |
215 REPEAT |
218 REPEAT |