-
Notifications
You must be signed in to change notification settings - Fork 62
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
Overhaul of type propagation #1268
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KuechA
reviewed
Jul 31, 2023
oxisto
force-pushed
the
new-type-propagation
branch
3 times, most recently
from
July 31, 2023 19:39
e2a6c51
to
a119c23
Compare
oxisto
force-pushed
the
new-type-propagation
branch
from
August 5, 2023 13:41
b447307
to
23eb330
Compare
oxisto
requested review from
peckto,
maximiliankaul and
konradweiss
as code owners
August 5, 2023 18:12
oxisto
force-pushed
the
new-type-propagation
branch
3 times, most recently
from
August 7, 2023 09:13
45fd258
to
af60ff3
Compare
KuechA
reviewed
Aug 7, 2023
cpg-language-java/src/test/kotlin/de/fraunhofer/aisec/cpg/graph/types/TypeTests.kt
Outdated
Show resolved
Hide resolved
cpg-language-java/src/test/kotlin/de/fraunhofer/aisec/cpg/graph/types/TypeTests.kt
Outdated
Show resolved
Hide resolved
cpg-language-java/src/main/kotlin/de/fraunhofer/aisec/cpg/passes/JavaCallResolverHelper.kt
Outdated
Show resolved
Hide resolved
cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/passes/ControlFlowSensitiveDFGPass.kt
Show resolved
Hide resolved
cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/types/HasType.kt
Outdated
Show resolved
Hide resolved
cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/statements/expressions/BinaryOperator.kt
Show resolved
Hide resolved
cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/ExpressionBuilder.kt
Outdated
Show resolved
Hide resolved
cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/TranslationContext.kt
Outdated
Show resolved
Hide resolved
oxisto
force-pushed
the
new-type-propagation
branch
2 times, most recently
from
August 8, 2023 07:36
6d6045b
to
4c28ecb
Compare
maximiliankaul
approved these changes
Aug 8, 2023
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.
Python: LGTM.
Other changes as far as I understand them 👍
cpg-analysis/src/main/kotlin/de/fraunhofer/aisec/cpg/analysis/MultiValueEvaluator.kt
Show resolved
Hide resolved
Removed almost all type listeners for now. This will break anything and we need to rebuild.
…asType.kt Co-authored-by: KuechA <[email protected]>
Co-authored-by: Maximilian Kaul <[email protected]>
oxisto
force-pushed
the
new-type-propagation
branch
from
August 9, 2023 07:55
7f2fb44
to
ec24e91
Compare
KuechA
approved these changes
Aug 9, 2023
Kudos, SonarCloud Quality Gate passed! |
oxisto
added a commit
that referenced
this pull request
Aug 9, 2023
Co-authored-by: Alexander Kuechler <[email protected]> Co-authored-by: Maximilian Kaul <[email protected]>
oxisto
added a commit
that referenced
this pull request
Aug 9, 2023
Co-authored-by: Alexander Kuechler <[email protected]> Co-authored-by: Maximilian Kaul <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a major overhaul of the existing type listeners. This should greatly improve type parsing. The PR is actually slightly too big, but unfortunately a lot of things were dependent on each other and could not be fixed in smaller steps.
Changes
TypeListener
intoTypeObserver
and made its documentation a lot clearerNode
, to see whether we really need aTypeObserver
and (hopefully) removed all loops in type propagationCXXLanguageFrontend
BinaryOperator
using the=
operator with anAssignExpression
. Creating a binary operator with=
or a compound assignment will now throw aTranslationException
AssignExpression
in theValueEvaluator
andMultiValueEvaluator
_type
variables and thesetType
function. Now only atype
variable exists and a Kolin setter is used to inform the type observers.InitializerListExpression
back to theDFGPass
instead of the class itself. It was moved there because of performance issues, which seem to be resolved now.assign.lhs<DeclaredReferenceExpression>()
will retrieve the first element inlhs
of anAssignExpression
and cast it toDeclaredReferenceExpression?
.Fixes
Fixes #204
Fixes #705
Fixes #1071
Fixes #1260
Fixes #1262
Fixes #1263
Fixes #1269
Fixes #1270