more explicit Long_Name operations (NB: analyzing qualifiers is inherently fragile);
--- a/src/HOL/TPTP/TPTP_Parser/tptp_reconstruct.ML Wed Mar 19 21:59:31 2014 +0100
+++ b/src/HOL/TPTP/TPTP_Parser/tptp_reconstruct.ML Wed Mar 19 22:10:33 2014 +0100
@@ -1309,7 +1309,7 @@
fun mk_bind_eq prob_name params ((n, ty), t) =
let
val bnd =
- Binding.name (List.last (space_explode "." n) ^ "_def")
+ Binding.name (Long_Name.base_name n ^ "_def")
|> Binding.qualify false (TPTP_Problem_Name.mangle_problem_name prob_name)
val t' =
Term.list_comb (Const (n, ty), params)
--- a/src/HOL/TPTP/TPTP_Proof_Reconstruction.thy Wed Mar 19 21:59:31 2014 +0100
+++ b/src/HOL/TPTP/TPTP_Proof_Reconstruction.thy Wed Mar 19 22:10:33 2014 +0100
@@ -722,7 +722,7 @@
val bnd_def = (*FIXME consts*)
const_name
- |> space_implode "." o tl o space_explode "." (*FIXME hack to drop theory-name prefix*)
+ |> Long_Name.implode o tl o Long_Name.explode (*FIXME hack to drop theory-name prefix*)
|> Binding.qualified_name
|> Binding.suffix_name "_def"
--- a/src/HOL/Tools/Nitpick/nitpick_hol.ML Wed Mar 19 21:59:31 2014 +0100
+++ b/src/HOL/Tools/Nitpick/nitpick_hol.ML Wed Mar 19 22:10:33 2014 +0100
@@ -444,7 +444,7 @@
fun pretty_for_type ctxt = Syntax.pretty_typ ctxt o unarize_unbox_etc_type
val prefix_name = Long_Name.qualify o Long_Name.base_name
-fun shortest_name s = List.last (space_explode "." s) handle List.Empty => ""
+val shortest_name = Long_Name.base_name
val prefix_abs_vars = Term.map_abs_vars o prefix_name
fun short_name s =
--- a/src/HOL/Tools/Nitpick/nitpick_model.ML Wed Mar 19 21:59:31 2014 +0100
+++ b/src/HOL/Tools/Nitpick/nitpick_model.ML Wed Mar 19 22:10:33 2014 +0100
@@ -148,7 +148,7 @@
fun nth_atom thy atomss pool for_auto T j =
if for_auto then
- Free (nth_atom_name thy atomss pool (hd (space_explode "." nitpick_prefix))
+ Free (nth_atom_name thy atomss pool (hd (Long_Name.explode nitpick_prefix))
T j, T)
else
Const (nth_atom_name thy atomss pool "" T j, T)