8000 Eliminate deadcode from the Python codebase by ehildenb · Pull Request #976 · runtimeverification/kontrol · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Eliminate deadcode from the Python codebase #976

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

Merged
merged 10 commits into from
Mar 14, 2025

Conversation

ehildenb
Copy link
Member
@ehildenb ehildenb commented Mar 7, 2025

Part of: #977.

I used the Python utility deadcode https://pypi.org/project/deadcode/ to detect unused code in this codebase. Still all of the methods in __main__.py which are of the form def exec_... are marked as dead by this tool because it does not understand the dynamic dispatch approach we used in def main():.

I suspect that porting the updated sourcemaps approach from Simbolik to this tool resulted in also porting a lot of functions which are not used in Kontrol.

I came across this refactoring as I was trying to understand how to avoid rekompiling every time kontrol build is called.

@anvacaru
Copy link
Contributor

It might be worth it to add deadcode to pyproject.toml and use it in the current format or check Makefile targets.

@ehildenb
Copy link
Member Author

I added an issue here about deadcode: #989

@ehildenb ehildenb marked this pull request as ready for review March 14, 2025 15:33
@automergerpr-permission-manager automergerpr-permission-manager bot merged commit 765f984 into master Mar 14, 2025
12 checks passed
@automergerpr-permission-manager automergerpr-permission-manager bot deleted the eliminate-deadcode branch March 14, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0