-
Notifications
You must be signed in to change notification settings - Fork 65
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
Using UnreachableEOGPass
in python
#1951
base: main
Are you sure you want to change the base?
Conversation
This PR extends the value evaluator with python specifics. This also makes the `cpg-analysis` mandatory for the python language frontend.
083ff24
to
bfef80f
Compare
This PR adds a special version of the `UnreachableEOGPass` to the python frontend. It is executed before the symbol resolver and uses the python value evaluator. However, it is not completly usable yet, because the unreachable EOG pass is very slooooow for large code-bases. So this is blocked until #1811 is resolved.
7af754d
to
d58166a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
☔ View full report in Codecov by Sentry. |
cpg-analysis/src/main/kotlin/de/fraunhofer/aisec/cpg/passes/UnreachableEOGPass.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Python-part LGTM
@@ -63,6 +64,7 @@ import kotlin.math.min | |||
* a value (on the first assignment). | |||
*/ | |||
@RegisterExtraPass(PythonAddDeclarationsPass::class) | |||
@RegisterExtraPass(PythonUnreachableEOGPass::class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to have this pass on by default? Why isn't it part of defaultPasses
(the non-Python version obviously) and then Python replaces it with this?
I'm just wondering if this is a future we only want to have active by default for Python?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well since this pass is massively slow (at the moment), we probably do not want it active per-default. So we can either keep this PR open as blocked or I will remove the register extra pass and if someone wants it, they can activate it.
This PR adds a special version of the
UnreachableEOGPass
to the python frontend. It is executed before the symbol resolver and uses the python value evaluator. However, it is not completly usable yet, because the unreachable EOG pass is very slooooow for large code-bases. So this is blocked until #1811 is resolved.