lean2/src/library/blast/trace.cpp

41 lines
1.1 KiB
C++
Raw Normal View History

2015-11-18 20:59:53 +00:00
/*
Copyright (c) 2015 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include "library/trace.h"
#include "library/io_state_stream.h"
2015-11-18 20:59:53 +00:00
#include "library/blast/blast.h"
#include "library/blast/choice_point.h"
#include "library/blast/trace.h"
#include "library/blast/options.h"
namespace lean {
namespace blast {
void trace_curr_state() {
lean_trace(name({"blast", "state"}),
tout() << "[" << curr_state().get_proof_depth() << "], #choice: " << get_num_choice_points() << "\n";
curr_state().display(tout()););
2015-11-18 20:59:53 +00:00
}
void trace_search(char const * msg) {
lean_trace(name({"blast", "search"}), tout() << msg << "\n";);
2015-11-18 20:59:53 +00:00
}
void trace_action(char const * a) {
lean_trace(name({"blast", "action"}), tout() << a << "\n";);
2015-11-18 20:59:53 +00:00
}
void trace_curr_state_if(action_result r) {
if (!failed(r) && !solved(r))
trace_curr_state();
2015-11-18 20:59:53 +00:00
}
io_state_stream const & operator<<(io_state_stream const & out, ppb const & e) {
expr tmp = curr_state().to_kernel_expr(e.m_expr);
out << tmp;
return out;
}
2015-11-18 20:59:53 +00:00
}}