Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: whitelist for dpdusage #14

Open
hendriktews opened this issue Feb 27, 2017 · 6 comments
Open

feature request: whitelist for dpdusage #14

hendriktews opened this issue Feb 27, 2017 · 6 comments

Comments

@hendriktews
Copy link

Thanks for this very nice tool set!! Since I use Coq I have always been looking for a way to find unused definitions and lemmas.

My project has quite a few top-level theorems. They are reported by dpdusage, but I don't want to delete them. Moreover, I have a fair amount of technical lemmas that I want to keep, even though they are not used (currently). Because of this I am interested in a white-listing feature for dpdusage.

I am considering to open a PR that adds three things to dpdusage:

  • an option -white-list <path>:<name>

  • an option -white-list-file <file> that reads a file of white-listed names in the same format

  • an option -strict-white-list that warns about a white-listed item with usage count above the threshold

What do you think?

@hendriktews
Copy link
Author

In the future, it would be nice to extract the white list from the source code. For instance, I would like to white list all Theorem's and Proposition's. Or maybe there should be a dpdgraph command that adds an identifier to the white list.

@Karmaki
Copy link
Collaborator

Karmaki commented Feb 28, 2017

Good idea. I am waiting for your PR then. Thanks.

@Karmaki
Copy link
Collaborator

Karmaki commented Feb 28, 2017

It seems that your last proposition (white list all Theorem's and Proposition's) would need to add a new node_attribute in the .dpd format.

@chdoc
Copy link
Member

chdoc commented Apr 5, 2019

I recently stumbled across this tool and I would like to second this feature request, in particular the whitelisting by keywords (i.e., Theorem as well as Proposition, Fact, and Example). Distinguishing between desired and undesired leaves in the graph could also allow for meaningful transitive reporting (e.g., reporting lemmas that are only used to prove undesired leaves).

@Karmaki
Copy link
Collaborator

Karmaki commented Apr 5, 2019

OK. Maybe I should finish the old pull-request then (mainly add tests and resolve conflicts).
I'll see if I can find some time to do that next week...

@chdoc
Copy link
Member

chdoc commented May 29, 2020

It seems this issue has been dormant for a while. However, together with #63 it is what's currently keeping me from using dpdraph for my graph theory project. This project has some 1200 Lemmas and some 30+ Theorems, Propositions, and Facts (desired leaves), and I would be happy to better understand the (grown) dependency structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants