equal
deleted
inserted
replaced
7 signature ATP_UTIL = |
7 signature ATP_UTIL = |
8 sig |
8 sig |
9 val timestamp : unit -> string |
9 val timestamp : unit -> string |
10 val hash_string : string -> int |
10 val hash_string : string -> int |
11 val hash_term : term -> int |
11 val hash_term : term -> int |
|
12 val chunk_list : int -> 'a list -> 'a list list |
12 val stringN_of_int : int -> int -> string |
13 val stringN_of_int : int -> int -> string |
13 val strip_spaces : bool -> (char -> bool) -> string -> string |
14 val strip_spaces : bool -> (char -> bool) -> string -> string |
14 val strip_spaces_except_between_idents : string -> string |
15 val strip_spaces_except_between_idents : string -> string |
15 val elide_string : int -> string -> string |
16 val elide_string : int -> string -> string |
16 val nat_subscript : int -> string |
17 val nat_subscript : int -> string |
64 | hashw_term (Free (s, _)) = hashw_string (s, 0w0) |
65 | hashw_term (Free (s, _)) = hashw_string (s, 0w0) |
65 | hashw_term _ = 0w0 |
66 | hashw_term _ = 0w0 |
66 |
67 |
67 fun hash_string s = Word.toInt (hashw_string (s, 0w0)) |
68 fun hash_string s = Word.toInt (hashw_string (s, 0w0)) |
68 val hash_term = Word.toInt o hashw_term |
69 val hash_term = Word.toInt o hashw_term |
|
70 |
|
71 fun chunk_list _ [] = [] |
|
72 | chunk_list k xs = |
|
73 let val (xs1, xs2) = chop k xs in xs1 :: chunk_list k xs2 end |
69 |
74 |
70 fun stringN_of_int 0 _ = "" |
75 fun stringN_of_int 0 _ = "" |
71 | stringN_of_int k n = |
76 | stringN_of_int k n = |
72 stringN_of_int (k - 1) (n div 10) ^ string_of_int (n mod 10) |
77 stringN_of_int (k - 1) (n div 10) ^ string_of_int (n mod 10) |
73 |
78 |