src/HOL/SMT_Examples/boogie.ML
author wenzelm
Sat, 16 Nov 2013 16:57:09 +0100
changeset 54447 019394de2b41
parent 52734 077149654ab4
child 55788 67699e08e969
permissions -rw-r--r--
proper thy_load command 'boogie_file' -- avoid direct access to file-system;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
52722
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
     1
(*  Title:      HOL/SMT_Examples/boogie.ML
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
     2
    Author:     Sascha Boehme, TU Muenchen
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
     3
52734
077149654ab4 tuned spelling;
wenzelm
parents: 52732
diff changeset
     4
Proving Boogie-generated verification conditions.
52722
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
     5
*)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
     6
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
     7
signature BOOGIE =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
     8
sig
54447
019394de2b41 proper thy_load command 'boogie_file' -- avoid direct access to file-system;
wenzelm
parents: 52734
diff changeset
     9
  val boogie_prove: theory -> string -> unit
52722
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    10
end
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    11
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    12
structure Boogie: BOOGIE =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    13
struct
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    14
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    15
(* utility functions *)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    16
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    17
val as_int = fst o read_int o raw_explode
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    18
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    19
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    20
val isabelle_name =
52732
b4da1f2ec73f standardized aliases;
wenzelm
parents: 52722
diff changeset
    21
  let
52722
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    22
    fun purge s = if Symbol.is_letter s orelse Symbol.is_digit s then s else
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    23
      (case s of
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    24
        "." => "_o_"
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    25
      | "_" => "_n_"
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    26
      | "$" => "_S_"
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    27
      | "@" => "_G_"
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    28
      | "#" => "_H_"
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    29
      | "^" => "_T_"
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    30
      | _   => ("_" ^ string_of_int (ord s) ^ "_"))
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    31
  in prefix "b_" o translate_string purge end
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    32
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    33
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    34
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    35
(* context *)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    36
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    37
type context =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    38
  typ Symtab.table * (term * bool) Symtab.table * term list * term list
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    39
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    40
val empty_context: context = (Symtab.empty, Symtab.empty, [], [])
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    41
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    42
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    43
fun add_type name (tds, fds, axs, vcs) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    44
  let
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    45
    val T = TFree (isabelle_name name, @{sort type})
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    46
    val tds' = Symtab.update (name, T) tds
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    47
  in (tds', fds, axs, vcs) end
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    48
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    49
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    50
fun add_func name Ts T unique (tds, fds, axs, vcs) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    51
  let
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    52
    val t = Free (isabelle_name name, Ts ---> T)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    53
    val fds' = Symtab.update (name, (t, unique)) fds
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    54
  in (tds, fds', axs, vcs) end
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    55
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    56
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    57
fun add_axiom t (tds, fds, axs, vcs) = (tds, fds, t :: axs, vcs)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    58
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    59
fun add_vc t (tds, fds, axs, vcs) = (tds, fds, axs, t :: vcs)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    60
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    61
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    62
fun lookup_type (tds, _, _, _) name =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    63
  (case Symtab.lookup tds name of
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    64
    SOME T => T
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    65
  | NONE => error "Undeclared type")
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    66
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    67
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    68
fun lookup_func (_, fds, _, _) name =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    69
  (case Symtab.lookup fds name of
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    70
    SOME t_unique => t_unique
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    71
  | NONE => error "Undeclared function")
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    72
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    73
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    74
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    75
(* constructors *)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    76
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    77
fun mk_var name T = Free ("V_" ^ isabelle_name name, T)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    78
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    79
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    80
fun mk_arrayT (Ts, T) = Type (@{type_name "fun"}, [HOLogic.mk_tupleT Ts, T])
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    81
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    82
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    83
fun mk_binary t (t1, t2) = t $ t1 $ t2
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    84
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    85
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    86
fun mk_nary _ t [] = t
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    87
  | mk_nary f _ ts = uncurry (fold_rev f) (split_last ts)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    88
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    89
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    90
fun mk_distinct [] = @{const HOL.True}
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    91
  | mk_distinct [_] = @{const HOL.True}
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    92
  | mk_distinct (t :: ts) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    93
      let
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    94
        fun mk_noteq u u' =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    95
          HOLogic.mk_conj (HOLogic.mk_not (HOLogic.mk_eq (t, u)), u')
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    96
      in fold_rev mk_noteq ts (mk_distinct ts) end
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    97
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    98
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
    99
fun mk_store m k v =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   100
  let
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   101
    val mT = Term.fastype_of m and kT = Term.fastype_of k
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   102
    val vT = Term.fastype_of v
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   103
  in Const (@{const_name fun_upd}, mT --> kT --> vT --> mT) $ m $ k $ v end
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   104
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   105
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   106
fun mk_quant q (Free (x, T)) t = q T $ absfree (x, T) t
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   107
  | mk_quant _ t _ = raise TERM ("bad variable", [t])
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   108
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   109
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   110
fun mk_list T = HOLogic.mk_list T
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   111
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   112
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   113
val patternT = @{typ "SMT.pattern"}
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   114
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   115
fun mk_pat t =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   116
  Const (@{const_name "SMT.pat"}, Term.fastype_of t --> patternT) $ t
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   117
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   118
fun mk_pattern [] = raise TERM ("mk_pattern", [])
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   119
  | mk_pattern ts = mk_list patternT (map mk_pat ts)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   120
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   121
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   122
fun mk_trigger [] t = t
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   123
  | mk_trigger pss t =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   124
      @{term "SMT.trigger"} $
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   125
        mk_list @{typ "SMT.pattern list"} (map mk_pattern pss) $ t
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   126
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   127
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   128
(* parser *)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   129
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   130
fun repeat f n ls =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   131
  let fun apply (xs, ls) = f ls |>> (fn x => x :: xs)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   132
  in funpow (as_int n) apply ([], ls) |>> rev end
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   133
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   134
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   135
fun parse_type _ (["bool"] :: ls) = (@{typ bool}, ls)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   136
  | parse_type _ (["int"] :: ls) = (@{typ int}, ls)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   137
  | parse_type cx (["array", arity] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   138
      repeat (parse_type cx) arity ls |>> mk_arrayT o split_last
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   139
  | parse_type cx (("type-con" :: name :: _) :: ls) = (lookup_type cx name, ls)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   140
  | parse_type _ _ = error "Bad type"
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   141
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   142
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   143
fun parse_expr _ (["true"] :: ls) = (@{term True}, ls)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   144
  | parse_expr _ (["false"] :: ls) = (@{term False}, ls)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   145
  | parse_expr cx (["not"] :: ls) = parse_expr cx ls |>> HOLogic.mk_not
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   146
  | parse_expr cx (["and", n] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   147
      parse_nary_expr cx n HOLogic.mk_conj @{term True} ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   148
  | parse_expr cx (["or", n] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   149
      parse_nary_expr cx n HOLogic.mk_disj @{term False} ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   150
  | parse_expr cx (["implies"] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   151
      parse_bin_expr cx (mk_binary @{term HOL.implies}) ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   152
  | parse_expr cx (["="] :: ls) = parse_bin_expr cx HOLogic.mk_eq ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   153
  | parse_expr cx (["var", name] :: ls) = parse_type cx ls |>> mk_var name
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   154
  | parse_expr cx (["fun", name, n] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   155
      let val (t, _) = lookup_func cx name
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   156
      in repeat (parse_expr cx) n ls |>> curry Term.list_comb t end
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   157
  | parse_expr cx (("label" :: _) :: ls) = parse_expr cx ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   158
  | parse_expr _ (["int-num", n] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   159
      (HOLogic.mk_number @{typ int} (as_int n), ls)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   160
  | parse_expr cx (["<"] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   161
      parse_bin_expr cx (mk_binary @{term "op < :: int => _"}) ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   162
  | parse_expr cx (["<="] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   163
      parse_bin_expr cx (mk_binary @{term "op <= :: int => _"}) ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   164
  | parse_expr cx ([">"] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   165
      parse_bin_expr cx (mk_binary @{term "op < :: int => _"}o swap) ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   166
  | parse_expr cx ([">="] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   167
      parse_bin_expr cx (mk_binary @{term "op <= :: int => _"} o swap) ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   168
  | parse_expr cx (["+"] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   169
      parse_bin_expr cx (mk_binary @{term "op + :: int => _"}) ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   170
  | parse_expr cx (["-"] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   171
      parse_bin_expr cx (mk_binary @{term "op - :: int => _"}) ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   172
  | parse_expr cx (["*"] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   173
      parse_bin_expr cx (mk_binary @{term "op * :: int => _"}) ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   174
  | parse_expr cx (["/"] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   175
      parse_bin_expr cx (mk_binary @{term boogie_div}) ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   176
  | parse_expr cx (["%"] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   177
      parse_bin_expr cx (mk_binary @{term boogie_mod}) ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   178
  | parse_expr cx (["select", n] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   179
      repeat (parse_expr cx) n ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   180
      |>> (fn ts => hd ts $ HOLogic.mk_tuple (tl ts))
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   181
  | parse_expr cx (["store", n] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   182
      repeat (parse_expr cx) n ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   183
      |>> split_last
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   184
      |>> (fn (ts, t) => mk_store (hd ts) (HOLogic.mk_tuple (tl ts)) t)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   185
  | parse_expr cx (["forall", vars, pats, atts] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   186
      parse_quant cx HOLogic.all_const vars pats atts ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   187
  | parse_expr cx (["exists", vars, pats, atts] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   188
      parse_quant cx HOLogic.exists_const vars pats atts ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   189
  | parse_expr _ _ = error "Bad expression"
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   190
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   191
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   192
and parse_bin_expr cx f ls = ls |> parse_expr cx ||>> parse_expr cx |>> f
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   193
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   194
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   195
and parse_nary_expr cx n f c ls =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   196
  repeat (parse_expr cx) n ls |>> mk_nary (curry f) c
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   197
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   198
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   199
and parse_quant cx q vars pats atts ls =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   200
  let
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   201
    val ((((vs, pss), _), t), ls') =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   202
      ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   203
      |> repeat (parse_var cx) vars
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   204
      ||>> repeat (parse_pat cx) pats
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   205
      ||>> repeat (parse_attr cx) atts
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   206
      ||>> parse_expr cx
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   207
  in (fold_rev (mk_quant q) vs (mk_trigger pss t), ls') end
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   208
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   209
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   210
and parse_var cx (["var", name] :: ls) = parse_type cx ls |>> mk_var name
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   211
  | parse_var _ _ = error "Bad variable"
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   212
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   213
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   214
and parse_pat cx (["pat", n] :: ls) = repeat (parse_expr cx) n ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   215
  | parse_pat _ _ = error "Bad pattern"
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   216
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   217
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   218
and parse_attr cx (["attribute", name, n] :: ls) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   219
      let
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   220
        fun attr (["expr-attr"] :: ls) = parse_expr cx ls |>> K ()
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   221
          | attr (("string-attr" :: _) :: ls) = ((), ls)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   222
          | attr _ = error "Bad attribute value"
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   223
      in repeat attr n ls |>> K name end
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   224
  | parse_attr _ _ = error "Bad attribute"
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   225
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   226
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   227
fun parse_func cx arity n ls =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   228
  let
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   229
    val ((Ts, atts), ls') =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   230
      ls |> repeat (parse_type cx) arity ||>> repeat (parse_attr cx) n
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   231
    val unique = member (op =) atts "unique"
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   232
  in ((split_last Ts, unique), ls') end
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   233
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   234
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   235
fun parse_decl (("type-decl" :: name :: _) :: ls) cx = (ls, add_type name cx)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   236
  | parse_decl (["fun-decl", name, arity, n] :: ls) cx =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   237
      let val (((Ts, T), unique), ls') = parse_func cx arity n ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   238
      in (ls', add_func name Ts T unique cx) end
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   239
  | parse_decl (("axiom" :: _) :: ls) cx =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   240
      let val (t, ls') = parse_expr cx ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   241
      in (ls', add_axiom t cx) end
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   242
  | parse_decl (("var-decl" :: _) :: ls) cx =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   243
      parse_type cx ls |> snd |> rpair cx
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   244
  | parse_decl (("vc" :: _) :: ls) cx =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   245
      let val (t, ls') = parse_expr cx ls
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   246
      in (ls', add_vc t cx) end
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   247
  | parse_decl _ _ = error "Bad declaration"
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   248
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   249
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   250
fun parse_lines [] cx = cx
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   251
  | parse_lines ls cx = parse_decl ls cx |-> parse_lines
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   252
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   253
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   254
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   255
(* splitting of text into a lists of lists of tokens *)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   256
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   257
fun is_blank c = (c = " " orelse c = "\t" orelse c = "\r" orelse c = "\n")
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   258
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   259
fun explode_lines text =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   260
  text
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   261
  |> split_lines
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   262
  |> map (String.tokens (is_blank o str))
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   263
  |> filter (fn [] => false | _ => true)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   264
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   265
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   266
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   267
(* proving verification conditions *)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   268
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   269
fun add_unique_axioms (tds, fds, axs, vcs) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   270
  Symtab.fold (fn (_, (t, true)) => cons t | _ => I) fds []
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   271
  |> map (swap o Term.dest_Free)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   272
  |> AList.group (op =)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   273
  |> map (fn (T, ns) => mk_distinct (map (Free o rpair T) ns))
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   274
  |> (fn axs' => (tds, fds, axs' @ axs, vcs))
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   275
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   276
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   277
fun build_proof_context thy (tds, fds, axs, vcs) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   278
  let
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   279
    val vc =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   280
      (case vcs of
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   281
        [vc] => vc
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   282
      | _ => error "Bad number of verification conditions")
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   283
  in
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   284
    Proof_Context.init_global thy
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   285
    |> Symtab.fold (fn (_, T) => Variable.declare_typ T) tds
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   286
    |> Symtab.fold (fn (_, (t, _)) => Variable.declare_term t) fds
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   287
    |> fold Variable.declare_term axs
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   288
    |> fold Variable.declare_term vcs
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   289
    |> pair (map HOLogic.mk_Trueprop axs, HOLogic.mk_Trueprop vc)
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   290
  end
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   291
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   292
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   293
val boogie_rules =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   294
  [@{thm fst_conv}, @{thm snd_conv}, @{thm pair_collapse}] @
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   295
  [@{thm fun_upd_same}, @{thm fun_upd_apply}]
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   296
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   297
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   298
fun boogie_tac ctxt axioms =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   299
  ALLGOALS (SMT_Solver.smt_tac ctxt (boogie_rules @ axioms))
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   300
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   301
54447
019394de2b41 proper thy_load command 'boogie_file' -- avoid direct access to file-system;
wenzelm
parents: 52734
diff changeset
   302
fun boogie_prove thy text =
52722
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   303
  let
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   304
    val lines = explode_lines text
52732
b4da1f2ec73f standardized aliases;
wenzelm
parents: 52722
diff changeset
   305
52722
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   306
    val ((axioms, vc), ctxt) =
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   307
      empty_context
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   308
      |> parse_lines lines
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   309
      |> add_unique_axioms
54447
019394de2b41 proper thy_load command 'boogie_file' -- avoid direct access to file-system;
wenzelm
parents: 52734
diff changeset
   310
      |> build_proof_context thy
52722
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   311
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   312
    val _ = Goal.prove ctxt [] axioms vc (fn {prems, context} =>
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   313
      boogie_tac context prems)
52732
b4da1f2ec73f standardized aliases;
wenzelm
parents: 52722
diff changeset
   314
    val _ = writeln "Verification condition proved successfully"
52722
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   315
54447
019394de2b41 proper thy_load command 'boogie_file' -- avoid direct access to file-system;
wenzelm
parents: 52734
diff changeset
   316
  in () end
019394de2b41 proper thy_load command 'boogie_file' -- avoid direct access to file-system;
wenzelm
parents: 52734
diff changeset
   317
019394de2b41 proper thy_load command 'boogie_file' -- avoid direct access to file-system;
wenzelm
parents: 52734
diff changeset
   318
019394de2b41 proper thy_load command 'boogie_file' -- avoid direct access to file-system;
wenzelm
parents: 52734
diff changeset
   319
(* Isar command *)
019394de2b41 proper thy_load command 'boogie_file' -- avoid direct access to file-system;
wenzelm
parents: 52734
diff changeset
   320
019394de2b41 proper thy_load command 'boogie_file' -- avoid direct access to file-system;
wenzelm
parents: 52734
diff changeset
   321
val _ =
019394de2b41 proper thy_load command 'boogie_file' -- avoid direct access to file-system;
wenzelm
parents: 52734
diff changeset
   322
  Outer_Syntax.command @{command_spec "boogie_file"}
019394de2b41 proper thy_load command 'boogie_file' -- avoid direct access to file-system;
wenzelm
parents: 52734
diff changeset
   323
    "prove verification condition from .b2i file"
019394de2b41 proper thy_load command 'boogie_file' -- avoid direct access to file-system;
wenzelm
parents: 52734
diff changeset
   324
    (Thy_Load.provide_parse_files "boogie_file" >> (fn files =>
019394de2b41 proper thy_load command 'boogie_file' -- avoid direct access to file-system;
wenzelm
parents: 52734
diff changeset
   325
      Toplevel.theory (fn thy =>
019394de2b41 proper thy_load command 'boogie_file' -- avoid direct access to file-system;
wenzelm
parents: 52734
diff changeset
   326
        let
019394de2b41 proper thy_load command 'boogie_file' -- avoid direct access to file-system;
wenzelm
parents: 52734
diff changeset
   327
          val ([{text, ...}], thy') = files thy;
019394de2b41 proper thy_load command 'boogie_file' -- avoid direct access to file-system;
wenzelm
parents: 52734
diff changeset
   328
          val _ = boogie_prove thy' text;
019394de2b41 proper thy_load command 'boogie_file' -- avoid direct access to file-system;
wenzelm
parents: 52734
diff changeset
   329
        in thy' end)))
52722
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   330
2c81f7baf8c4 removed obsolete HOL-Boogie session;
boehmes
parents:
diff changeset
   331
end