3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-13 14:40:55 +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:
Rocco Salvia 2020-08-08 13:09:24 -06:00 committed by GitHub
parent 934f87a336
commit 3852d4516d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 108 additions and 11 deletions

View file

@ -202,11 +202,26 @@ namespace smt {
ent.m_instantiated = true;
TRACE("qi_queue_profile", tout << q->get_qid() << ", gen: " << generation << " " << *f << " cost: " << ent.m_cost << "\n";);
// NEVER remove coming_from_quant
// "coming_from_quant" allows the logging of bindings and enodes
// only when they come from instantiations
enable_trace("coming_from_quant");
quantifier_stat * stat = m_qm.get_stat(q);
if (m_checker.is_sat(q->get_expr(), num_bindings, bindings)) {
TRACE("checker", tout << "instance already satisfied\n";);
// we log the "dummy" instantiations separately from "instance"
STRACE("dummy", tout << "### " << static_cast<void*>(f) <<", " << q->get_qid() << "\n";);
STRACE("dummy", tout << "Instance already satisfied (dummy)\n";);
// a dummy instantiation is still an instantiation.
// in this way smt.qi.profile=true coincides with the axiom profiler
stat->inc_num_instances_checker_sat();
disable_trace("coming_from_quant");
return;
}
STRACE("instance", tout << "### " << static_cast<void*>(f) <<", " << q->get_qid() << "\n";);
expr_ref instance(m);
m_subst(q, num_bindings, bindings, instance);
@ -219,15 +234,17 @@ namespace smt {
if (m.is_true(s_instance)) {
TRACE("checker", tout << "reduced to true, before:\n" << mk_ll_pp(instance, m););
STRACE("instance", tout << "Instance reduced to true\n";);
stat -> inc_num_instances_simplify_true();
if (m.has_trace_stream()) {
display_instance_profile(f, q, num_bindings, bindings, pr ? pr->get_id() : 0, generation);
m.trace_stream() << "[end-of-instance]\n";
}
disable_trace("coming_from_quant");
return;
}
TRACE("qi_queue", tout << "simplified instance:\n" << s_instance << "\n";);
quantifier_stat * stat = m_qm.get_stat(q);
stat->inc_num_instances();
if (stat->get_num_instances() % m_params.m_qi_profile_freq == 0) {
m_qm.display_stats(verbose_stream(), q);
@ -312,6 +329,8 @@ namespace smt {
if (m.has_trace_stream())
m.trace_stream() << "[end-of-instance]\n";
// NEVER remove coming_from_quant
disable_trace("coming_from_quant");
}
void qi_queue::push_scope() {