Skip to content
This repository was archived by the owner on Oct 30, 2025. It is now read-only.

Restrict input bits for analysis implementations in the presence of PC#659

Open
manasij7479 wants to merge 1 commit into
google:mainfrom
manasij7479:input-restrictions
Open

Restrict input bits for analysis implementations in the presence of PC#659
manasij7479 wants to merge 1 commit into
google:mainfrom
manasij7479:input-restrictions

Conversation

@manasij7479

Copy link
Copy Markdown
Contributor

No description provided.

@regehr

regehr commented Nov 18, 2019

Copy link
Copy Markdown
Contributor

I need more here. what's going on? why is it correct?

@regehr

regehr commented Nov 18, 2019

Copy link
Copy Markdown
Contributor

add comments in the code explaining the strategy and rationale for correctness.

@regehr

regehr commented Nov 18, 2019

Copy link
Copy Markdown
Contributor

remove commented-out lines of code unless they serve a specific purpose, in which case explain them

@regehr

regehr commented Nov 18, 2019

Copy link
Copy Markdown
Contributor

ping

@manasij7479

Copy link
Copy Markdown
Contributor Author

Oh, forgot about this.
Will rebase, add comments for explanation and update.

@manasij7479

Copy link
Copy Markdown
Contributor Author

updated

Comment thread lib/Infer/Pruning.cpp

std::unordered_map<Inst *, llvm::APInt>
PruningManager::computeInputRestrictions() {
std::unordered_map<Inst *, std::pair<llvm::APInt, llvm::APInt>> Seen;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need to change it here but overall you should avoid using a std::pair for same-typed things like this, and instead pick an implementation which assigns appropriate names to things. here two separate variables would work, or else a struct with members called Zero and One or similar

Comment thread lib/Infer/Pruning.cpp Outdated
Comment thread lib/Infer/Pruning.cpp Outdated
@regehr

regehr commented Nov 19, 2019

Copy link
Copy Markdown
Contributor

I still have no idea why this does what you want it to do, you'll have to explain it more either in the code or in person

@regehr

regehr commented Dec 8, 2019

Copy link
Copy Markdown
Contributor

@manasij7479 this is one of several things you need to get back to and finish up

@manasij7479

Copy link
Copy Markdown
Contributor Author

Addressed the comments, not sure what to do about the explanation.

@regehr

regehr commented Dec 10, 2019

Copy link
Copy Markdown
Contributor

how about some examples which show this working, then?

@regehr

regehr commented Dec 10, 2019

Copy link
Copy Markdown
Contributor

I don't like random, complicated code which is neither tested nor well-explained. I know you can do better than this, please make an effort here.

@regehr

regehr commented Dec 10, 2019

Copy link
Copy Markdown
Contributor

it seems pretty obvious what to do here:

  • add restricted bits to souper-interpret
  • write test cases checking for sound processing of souper expressions with pcs

@regehr

regehr commented Dec 10, 2019

Copy link
Copy Markdown
Contributor

I have no idea why you would be confident enough in this code's correctness to submit it for inclusion in souper without having done this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants