This is an archive of the discontinued LLVM Phabricator instance.

[analyzer][Z3-refutation] Add statistics for refutation visitor
AbandonedPublic

Authored by steakhal on Jun 30 2020, 3:40 AM.

Details

Summary

This patch adds two statics.
The diff speaks for itself.

Diff Detail

Event Timeline

steakhal created this revision.Jun 30 2020, 3:40 AM

Yay! This looks good to me and I love statistics, so a huge +1.
I have one question though. Isn't this counting all the reports in an equivalence class? I.e. if the analyzer finds something multiple times it will only be displayed once but here it will be counted multiple times. I think it might be worth to have two statistics, one for all bug reports and one for equivalence classes. What do you think?

Yay! This looks good to me and I love statistics, so a huge +1.
I have one question though. Isn't this counting all the reports in an equivalence class? I.e. if the analyzer finds something multiple times it will only be displayed once but here it will be counted multiple times. I think it might be worth to have two statistics, one for all bug reports and one for equivalence classes. What do you think?

You might be right.

NoQ added inline comments.Jun 30 2020, 8:47 AM
clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
2860–2863

I strongly recommend a statistic for this branch as well. I.e., how many reports were too difficult for the refutation solver to solve.

NoQ added a comment.Jun 30 2020, 8:48 AM

I have one question though. Isn't this counting all the reports in an equivalence class?

Yes it is. You have no choice but to run refutation before deduplication; otherwise the otherwise-best report in the class may be false when other reports are true.

steakhal updated this revision to Diff 274510.Jun 30 2020, 9:04 AM
  • adds statistic to undecidable branch
steakhal marked an inline comment as done.Jun 30 2020, 9:05 AM
steakhal abandoned this revision.Mar 10 2021, 3:56 AM

It might be useful in the future, but right now, I'm not interested in upstreaming this.