src/HOL/Tools/Sledgehammer/sledgehammer_util.ML
changeset 36486 c2d7e2dff59e
parent 36478 1aba777a367f
child 36491 6769f8eacaac
equal deleted inserted replaced
36485:56ce8fc56be3 36486:c2d7e2dff59e
    12   val replace_all : string -> string -> string -> string
    12   val replace_all : string -> string -> string -> string
    13   val remove_all : string -> string -> string
    13   val remove_all : string -> string -> string
    14   val timestamp : unit -> string
    14   val timestamp : unit -> string
    15   val parse_bool_option : bool -> string -> string -> bool option
    15   val parse_bool_option : bool -> string -> string -> bool option
    16   val parse_time_option : string -> string -> Time.time option
    16   val parse_time_option : string -> string -> Time.time option
       
    17   val nat_subscript : int -> string
    17   val unyxml : string -> string
    18   val unyxml : string -> string
    18   val maybe_quote : string -> string
    19   val maybe_quote : string -> string
    19 end;
    20 end;
    20  
    21  
    21 structure Sledgehammer_Util : SLEDGEHAMMER_UTIL =
    22 structure Sledgehammer_Util : SLEDGEHAMMER_UTIL =
    72                \value (e.g., \"60 s\", \"200 ms\") or \"none\".")
    73                \value (e.g., \"60 s\", \"200 ms\") or \"none\".")
    73       else
    74       else
    74         SOME (Time.fromMilliseconds msecs)
    75         SOME (Time.fromMilliseconds msecs)
    75     end
    76     end
    76 
    77 
       
    78 val subscript = implode o map (prefix "\<^isub>") o explode
       
    79 val nat_subscript = subscript o string_of_int
       
    80 
    77 fun plain_string_from_xml_tree t =
    81 fun plain_string_from_xml_tree t =
    78   Buffer.empty |> XML.add_content t |> Buffer.content
    82   Buffer.empty |> XML.add_content t |> Buffer.content
    79 val unyxml = plain_string_from_xml_tree o YXML.parse
    83 val unyxml = plain_string_from_xml_tree o YXML.parse
    80 
    84 
    81 val is_long_identifier = forall Syntax.is_identifier o space_explode "."
    85 val is_long_identifier = forall Syntax.is_identifier o space_explode "."