src/HOL/Tools/Mirabelle/mirabelle.ML
changeset 82857 ca4aed6a9eb0
parent 82825 5e9c9f2c2cd8
equal deleted inserted replaced
82856:1e39653de974 82857:ca4aed6a9eb0
   128       ()
   128       ()
   129   end
   129   end
   130 
   130 
   131 fun apply_action ({run, ...} : action) context (command as {pos, pre, ...} : command) =
   131 fun apply_action ({run, ...} : action) context (command as {pos, pre, ...} : command) =
   132   let
   132   let
   133     val thy = Proof.theory_of pre;
   133     val action_path = make_action_path context
   134     val action_path = make_action_path context;
   134     and goal_name_path = Path.basic (#name command)
   135     val goal_name_path = Path.basic (#name command)
   135     and line_path = Path.basic (string_of_int (the (Position.line_of pos)))
   136     val line_path = Path.basic (string_of_int (the (Position.line_of pos)));
   136     and offset_path = Path.basic (string_of_int (the (Position.offset_of pos)))
   137     val offset_path = Path.basic (string_of_int (the (Position.offset_of pos)));
   137     and ({elapsed, ...}, s) = Timing.timing run_action_function (fn () => run command);
   138     val ({elapsed, ...}, s) = Timing.timing run_action_function (fn () => run command);
       
   139     val export_name =
   138     val export_name =
   140       Path.binding0 (Path.basic "mirabelle" + action_path + Path.basic "goal" + goal_name_path +
   139       Path.binding0 (Path.basic "mirabelle" + action_path + Path.basic "goal" + goal_name_path +
   141         line_path + offset_path + Path.basic (string_of_int (Time.toMilliseconds elapsed)));
   140         line_path + offset_path + Path.basic (string_of_int (Time.toMilliseconds elapsed)));
   142   in
   141   in
   143     Export.export thy export_name [XML.Text s]
   142     Export.export (Proof.theory_of pre) export_name [XML.Text s]
   144   end;
   143   end;
   145 
   144 
   146 
   145 
   147 (* theory line range *)
   146 (* theory line range *)
   148 
   147