feat(library/blast): trace target
This commit is contained in:
parent
36f3549c44
commit
c1a4e0ee4f
3 changed files with 13 additions and 0 deletions
|
@ -59,6 +59,7 @@ optional<expr> strategy_fn::search() {
|
|||
unsigned max_depth = get_config().m_max_depth;
|
||||
lean_trace(name({"blast", "search"}), tout() << "search upto depth " << max_depth << "\n";);
|
||||
trace_curr_state();
|
||||
trace_target();
|
||||
action_result r = next_action();
|
||||
trace_curr_state_if(r);
|
||||
while (true) {
|
||||
|
@ -97,6 +98,7 @@ optional<expr> strategy_fn::search() {
|
|||
tout() << "depth [" << curr_state().get_proof_depth() << "], #choice: "
|
||||
<< get_num_choice_points() << "\n";);
|
||||
trace_curr_state_if(r);
|
||||
trace_target();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,16 @@ Author: Leonardo de Moura
|
|||
|
||||
namespace lean {
|
||||
namespace blast {
|
||||
MK_THREAD_LOCAL_GET_DEF(expr, get_last_target);
|
||||
|
||||
void trace_target() {
|
||||
if (lean_is_trace_enabled(name({"blast", "search"})) &&
|
||||
curr_state().get_target() != get_last_target()) {
|
||||
lean_trace(name({"blast", "search"}), tout() << "target " << ppb(curr_state().get_target()) << "\n";);
|
||||
get_last_target() = curr_state().get_target();
|
||||
}
|
||||
}
|
||||
|
||||
void trace_curr_state() {
|
||||
lean_trace(name({"blast", "state"}), tout() << "\n"; curr_state().display(tout()););
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ Author: Leonardo de Moura
|
|||
namespace lean {
|
||||
namespace blast {
|
||||
void trace_curr_state();
|
||||
void trace_target();
|
||||
void trace_search(char const * msg);
|
||||
void trace_action(char const * a);
|
||||
void trace_curr_state_if(action_result r);
|
||||
|
|
Loading…
Reference in a new issue