# HG changeset patch # User wenzelm # Date 1256844947 -3600 # Node ID 1e189f96c39343daefb649641fe3ac72567149ed # Parent cba65e4bf565d1b1325085ce0dc7f3ce1cf7ff11 DEEPEN: less aggressive tracing, subject to trace_DEEPEN; diff -r cba65e4bf565 -r 1e189f96c393 src/Pure/search.ML --- a/src/Pure/search.ML Thu Oct 29 18:53:58 2009 +0100 +++ b/src/Pure/search.ML Thu Oct 29 20:35:47 2009 +0100 @@ -21,6 +21,7 @@ val iter_deepen_limit: int Unsynchronized.ref val THEN_ITER_DEEPEN: tactic -> (thm -> bool) -> (int -> tactic) -> tactic val ITER_DEEPEN: (thm -> bool) -> (int -> tactic) -> tactic + val trace_DEEPEN: bool Unsynchronized.ref val DEEPEN: int * int -> (int -> int -> tactic) -> int -> int -> tactic val trace_BEST_FIRST: bool Unsynchronized.ref val THEN_BEST_FIRST: tactic -> (thm -> bool) * (thm -> int) -> tactic -> tactic @@ -174,13 +175,15 @@ (*Simple iterative deepening tactical. It merely "deepens" any search tactic using increment "inc" up to limit "lim". *) +val trace_DEEPEN = Unsynchronized.ref false; + fun DEEPEN (inc,lim) tacf m i = let fun dpn m st = st |> (if has_fewer_prems i st then no_tac else if m>lim then - (warning "Search depth limit exceeded: giving up"; + (tracing "Search depth limit exceeded: giving up"; no_tac) - else (priority ("Search depth = " ^ string_of_int m); + else (if !trace_DEEPEN then tracing ("Search depth = " ^ string_of_int m) else (); tacf m i ORELSE dpn (m+inc))) in dpn m end;