src/HOL/Tools/Nunchaku/nunchaku_util.ML
changeset 79439 739b1703866e
parent 69593 3dda49e08b9d
equal deleted inserted replaced
79438:032ca41f590a 79439:739b1703866e
    21   val plural_s_for_list: 'a list -> string
    21   val plural_s_for_list: 'a list -> string
    22   val with_overlord_file: string -> string -> (Path.T -> 'a) -> 'a
    22   val with_overlord_file: string -> string -> (Path.T -> 'a) -> 'a
    23   val with_tmp_or_overlord_file: bool -> string -> string -> (Path.T -> 'a) -> 'a
    23   val with_tmp_or_overlord_file: bool -> string -> string -> (Path.T -> 'a) -> 'a
    24   val num_binder_types: typ -> int
    24   val num_binder_types: typ -> int
    25   val strip_fun_type: typ -> typ list * typ
    25   val strip_fun_type: typ -> typ list * typ
    26   val attach_typeS: term -> term
       
    27   val specialize_type: theory -> string * typ -> term -> term
    26   val specialize_type: theory -> string * typ -> term -> term
    28   val typ_match: theory -> typ * typ -> bool
    27   val typ_match: theory -> typ * typ -> bool
    29   val term_match: theory -> term * term -> bool
    28   val term_match: theory -> term * term -> bool
    30   val const_match: theory -> (string * typ) * (string * typ) -> bool
    29   val const_match: theory -> (string * typ) * (string * typ) -> bool
    31   val DETERM_TIMEOUT: Time.time -> tactic -> tactic
    30   val DETERM_TIMEOUT: Time.time -> tactic -> tactic
    56   if overlord then with_overlord_file else Isabelle_System.with_tmp_file;
    55   if overlord then with_overlord_file else Isabelle_System.with_tmp_file;
    57 
    56 
    58 val num_binder_types = BNF_Util.num_binder_types
    57 val num_binder_types = BNF_Util.num_binder_types
    59 val strip_fun_type = BNF_Util.strip_fun_type;
    58 val strip_fun_type = BNF_Util.strip_fun_type;
    60 
    59 
    61 (* Clone from "HOL/Tools/inductive_realizer.ML". *)
       
    62 val attach_typeS =
       
    63   map_types (map_atyps
       
    64     (fn TFree (s, []) => TFree (s, \<^sort>\<open>type\<close>)
       
    65       | TVar (ixn, []) => TVar (ixn, \<^sort>\<open>type\<close>)
       
    66       | T => T));
       
    67 
       
    68 val specialize_type = ATP_Util.specialize_type;
    60 val specialize_type = ATP_Util.specialize_type;
    69 
    61 
    70 fun typ_match thy TU = can (Sign.typ_match thy TU) Vartab.empty;
    62 fun typ_match thy TU = can (Sign.typ_match thy TU) Vartab.empty;
    71 fun term_match thy tu = can (Pattern.match thy tu) (Vartab.empty, Vartab.empty);
    63 fun term_match thy tu = can (Pattern.match thy tu) (Vartab.empty, Vartab.empty);
    72 fun const_match thy = term_match thy o apply2 Const;
    64 fun const_match thy = term_match thy o apply2 Const;