equal
deleted
inserted
replaced
87 val unknown_proof: transition -> transition |
87 val unknown_proof: transition -> transition |
88 val unknown_context: transition -> transition |
88 val unknown_context: transition -> transition |
89 val setmp_thread_position: transition -> ('a -> 'b) -> 'a -> 'b |
89 val setmp_thread_position: transition -> ('a -> 'b) -> 'a -> 'b |
90 val status: transition -> Markup.T -> unit |
90 val status: transition -> Markup.T -> unit |
91 val add_hook: (transition -> state -> state -> unit) -> unit |
91 val add_hook: (transition -> state -> state -> unit) -> unit |
92 val approximative_id: transition -> {file: string, offset: int, name: string} option |
|
93 val get_timing: transition -> Time.time option |
92 val get_timing: transition -> Time.time option |
94 val put_timing: Time.time option -> transition -> transition |
93 val put_timing: Time.time option -> transition -> transition |
95 val transition: bool -> transition -> state -> (state * (exn * string) option) option |
94 val transition: bool -> transition -> state -> (state * (exn * string) option) option |
96 val command_errors: bool -> transition -> state -> Runtime.error list * state option |
95 val command_errors: bool -> transition -> state -> Runtime.error list * state option |
97 val command_exception: bool -> transition -> state -> state |
96 val command_exception: bool -> transition -> state -> state |
589 |
588 |
590 fun get_id (Transition {pos, ...}) = Position.get_id pos; |
589 fun get_id (Transition {pos, ...}) = Position.get_id pos; |
591 fun put_id id (tr as Transition {pos, ...}) = position (Position.put_id id pos) tr; |
590 fun put_id id (tr as Transition {pos, ...}) = position (Position.put_id id pos) tr; |
592 |
591 |
593 |
592 |
594 (* approximative identification within source file *) |
|
595 |
|
596 fun approximative_id tr = |
|
597 let |
|
598 val name = name_of tr; |
|
599 val pos = pos_of tr; |
|
600 in |
|
601 (case (Position.file_of pos, Position.offset_of pos) of |
|
602 (SOME file, SOME offset) => SOME {file = file, offset = offset, name = name} |
|
603 | _ => NONE) |
|
604 end; |
|
605 |
|
606 |
|
607 (* thread position *) |
593 (* thread position *) |
608 |
594 |
609 fun setmp_thread_position (Transition {pos, ...}) f x = |
595 fun setmp_thread_position (Transition {pos, ...}) f x = |
610 Position.setmp_thread_data pos f x; |
596 Position.setmp_thread_data pos f x; |
611 |
597 |
641 val (result, opt_err) = |
627 val (result, opt_err) = |
642 state |> (apply_trans int trans |> ! profiling > 0 ? profile (! profiling)); |
628 state |> (apply_trans int trans |> ! profiling > 0 ? profile (! profiling)); |
643 val _ = if int andalso not (! quiet) andalso print then print_state false result else (); |
629 val _ = if int andalso not (! quiet) andalso print then print_state false result else (); |
644 |
630 |
645 val timing_result = Timing.result timing_start; |
631 val timing_result = Timing.result timing_start; |
646 |
632 val timing_props = |
647 val _ = |
633 Markup.command_timing :: (Markup.nameN, name_of tr) :: Position.properties_of (pos_of tr); |
648 if Timing.is_relevant timing_result andalso (! profiling > 0 orelse ! timing) |
634 val _ = Timing.protocol_message timing_props timing_result; |
649 andalso not (Keyword.is_control (name_of tr)) |
|
650 then tracing (command_msg "" tr ^ ": " ^ Timing.message timing_result) |
|
651 else (); |
|
652 val _ = |
|
653 if Timing.is_relevant timing_result |
|
654 then status tr (Markup.timing timing_result) |
|
655 else (); |
|
656 val _ = |
|
657 (case approximative_id tr of |
|
658 SOME id => |
|
659 (Output.try_protocol_message |
|
660 (Markup.command_timing :: |
|
661 Markup.command_timing_properties id (#elapsed timing_result)) "") |
|
662 | NONE => ()); |
|
663 in |
635 in |
664 (result, Option.map (fn UNDEF => type_error tr state | exn => exn) opt_err) |
636 (result, Option.map (fn UNDEF => type_error tr state | exn => exn) opt_err) |
665 end); |
637 end); |
666 |
638 |
667 in |
639 in |