mirror of
https://github.com/Z3Prover/z3
synced 2025-08-02 09:20:22 +00:00
modular Axiom Profiler (#4619)
* Rocco first commit * Rocco: clean the log * Rocco: version 0.1 beta of the causality graph * Rocco: minimal fix to separate lines * Rocco: fix the enodes * Rocco: our trace has to reflect same behaviour of the native trace for what concern used_enodes * Rocco: disable trace when dummy instantiations * Rocco: fix to enodes * Update README.md * Rocco: remove causality details and add the pattern (trigger) * Rocco: add ; at the end of the bindings * Rocco: add triggers as separate trace * Rocco README file * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Rocco: bug in tout flush * Update README.md * Update README.md * Rocco: clean code * Ready for pull request * Remove commented line bindings * Add space between // and first char * Substitute or with || for compatibility; Add space around >
This commit is contained in:
parent
934f87a336
commit
3852d4516d
11 changed files with 108 additions and 11 deletions
|
@ -1893,7 +1893,7 @@ namespace {
|
|||
void update_max_generation(enode * n, enode * prev) {
|
||||
m_max_generation = std::max(m_max_generation, n->get_generation());
|
||||
|
||||
if (m.has_trace_stream())
|
||||
if (m.has_trace_stream() || is_trace_enabled("causality"))
|
||||
m_used_enodes.push_back(std::make_tuple(prev, n));
|
||||
}
|
||||
|
||||
|
@ -2309,7 +2309,7 @@ namespace {
|
|||
m_pattern_instances.push_back(n);
|
||||
m_max_generation = n->get_generation();
|
||||
|
||||
if (m.has_trace_stream()) {
|
||||
if (m.has_trace_stream() || is_trace_enabled("causality")) {
|
||||
m_used_enodes.reset();
|
||||
m_used_enodes.push_back(std::make_tuple(nullptr, n)); // null indicates that n was matched against the trigger at the top-level
|
||||
}
|
||||
|
@ -2408,7 +2408,7 @@ namespace {
|
|||
goto backtrack;
|
||||
|
||||
// We will use the common root when instantiating the quantifier => log the necessary equalities
|
||||
if (m.has_trace_stream()) {
|
||||
if (m.has_trace_stream() || is_trace_enabled("causality")) {
|
||||
m_used_enodes.push_back(std::make_tuple(m_n1, m_n1->get_root()));
|
||||
m_used_enodes.push_back(std::make_tuple(m_n2, m_n2->get_root()));
|
||||
}
|
||||
|
@ -2425,7 +2425,7 @@ namespace {
|
|||
goto backtrack;
|
||||
|
||||
// we used the equality m_n1 = m_n2 for the match and need to make sure it ends up in the log
|
||||
if (m.has_trace_stream()) {
|
||||
if (m.has_trace_stream() || is_trace_enabled("causality")) {
|
||||
m_used_enodes.push_back(std::make_tuple(m_n1, m_n2));
|
||||
}
|
||||
|
||||
|
@ -2611,7 +2611,7 @@ namespace {
|
|||
if (m_n1 == 0 || !m_context.is_relevant(m_n1)) \
|
||||
goto backtrack; \
|
||||
update_max_generation(m_n1, nullptr); \
|
||||
if (m.has_trace_stream()) { \
|
||||
if (m.has_trace_stream() || is_trace_enabled("causality")) { \
|
||||
for (unsigned i = 0; i < static_cast<const get_cgr *>(m_pc)->m_num_args; ++i) { \
|
||||
m_used_enodes.push_back(std::make_tuple(m_n1->get_arg(i), m_n1->get_arg(i)->get_root())); \
|
||||
} \
|
||||
|
@ -2707,7 +2707,7 @@ namespace {
|
|||
backtrack_point & bp = m_backtrack_stack[m_top - 1];
|
||||
m_max_generation = bp.m_old_max_generation;
|
||||
|
||||
if (m.has_trace_stream())
|
||||
if (m.has_trace_stream() || is_trace_enabled("causality"))
|
||||
m_used_enodes.shrink(bp.m_old_used_enodes_size);
|
||||
|
||||
TRACE("mam_int", tout << "backtrack top: " << bp.m_instr << " " << *(bp.m_instr) << "\n";);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue