Introduce BranchTypes (requires #1343)#1348
Conversation
BranchTypes (requires #1343)
BranchTypes (requires #1343)
Codecov Report
@@ Coverage Diff @@
## master #1348 +/- ##
==========================================
- Coverage 69.35% 69.34% -0.01%
==========================================
Files 155 155
Lines 18479 18476 -3
Branches 4098 4098
==========================================
- Hits 12816 12813 -3
Misses 3886 3886
Partials 1777 1777
|
|
@ccadar Ready for review. The argument in |
MartinNowack
left a comment
There was a problem hiding this comment.
@251 Changes look great!
Maybe rename branch type Br to Branch (and maybe IndirectBr to IndirectBranch). That improves readability.
Beside that, I'm more than happy with those changes.
ccadar
left a comment
There was a problem hiding this comment.
Thanks, @251, I like the changes too.
But could you add a bit of documentation about each branch type? E.g., what is BranchType::Exact, it's not an intuitive name? Why do we have BranchType::UNKNOWN?
Also, do you ever use BrachType::Alloc?
BrachType::Branch sounds funny: maybe BranchType::DirectBranch (and BranchType::IndirectBranch)?
BranchType::Memop should be BranchType::MemOp to be consistent with the capitalization.
Thanks!
|
Thanks for the review.
Done. I initially kept the LLVM instruction names.
I've added a doxygen table in the header file. |
ccadar
left a comment
There was a problem hiding this comment.
Thanks, @251 , I love the table, really useful as high-level documentation too.
A few more small comments, as we'll stick with these names:
- I still find
UNKNOWNconfusing, as well as the explanation "no branch yet". As far as I can see, it's only used in unit tests, and doesn't occur during regular execution. Should we perhaps say it's for test purposes? Or do you see other future uses? - I missed the capitalization for
Getval, should beGetVal - I think
Resolvewould be more meaningful thanExact, which I find confusing - Can you make the comments for
AllocandReallocsimilar? - I find the order weird. I would propose: DirectBranch, IndirectBranch, Switch, Call, MemOp, Resolve, Alloc, Realloc, UNKNOWN.
Thanks again!
|
@251 Great updates, maybe one thing: |
It does. The goal is to track branches in ptree nodes. E.g. for a concrete execution or in leave nodes there is "no branch yet". Would "NONE" be better?
ResolvePointer?
Fine with me. |
|
@251 Thanks, everything looks good to me now! I still find the explanation about |
|
So let's merge it now! |
This PR extends #1343 and keeps track of the different branch types.
Thank you for contributing to KLEE. We are looking forward to reviewing your PR. However, given the small number of active reviewers and our limited time, it might take a while to do so. We aim to get back to each PR within one month, and often do so within one week.
To help expedite the review please ensure the following, by adding an "x" for each completed item: