-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Java: Type based summary models. #10628
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
Conversation
java/ql/src/utils/model-generator/internal/CaptureTypeBasedSummaryModels.qll
Fixed
Show fixed
Hide fixed
java/ql/src/utils/model-generator/internal/CaptureTypeBasedSummaryModels.qll
Fixed
Show fixed
Hide fixed
java/ql/src/utils/model-generator/internal/CaptureTypeBasedSummaryModels.qll
Fixed
Show fixed
Hide fixed
java/ql/src/utils/model-generator/internal/CaptureTypeBasedSummaryModels.qll
Fixed
Show fixed
Hide fixed
java/ql/src/utils/model-generator/internal/CaptureTypeBasedSummaryModels.qll
Fixed
Show fixed
Hide fixed
85f21ca
to
4668c55
Compare
java/ql/src/utils/model-generator/internal/CaptureTypeBasedSummaryModels.qll
Fixed
Show fixed
Hide fixed
java/ql/src/utils/model-generator/internal/CaptureTypeBasedSummaryModels.qll
Fixed
Show fixed
Hide fixed
java/ql/src/utils/model-generator/internal/CaptureTypeBasedSummaryModels.qll
Fixed
Show fixed
Hide fixed
3e0bdbe
to
01016f6
Compare
java/ql/src/utils/model-generator/internal/CaptureTypeBasedSummaryModels.qll
Fixed
Show fixed
Hide fixed
java/ql/src/utils/model-generator/internal/CaptureTypeBasedSummaryModels.qll
Fixed
Show fixed
Hide fixed
f488cc6
to
69cc0ba
Compare
b1a9464
to
f40e1d7
Compare
java/ql/test/utils/model-generator/typebasedflow/p/TypeBasedComplex.java
Show resolved
Hide resolved
java/ql/test/utils/model-generator/typebasedflow/CaptureTypeBasedSummaryModels.expected
Outdated
Show resolved
Hide resolved
aee3ddd
to
384e2f7
Compare
java/ql/test/utils/model-generator/typebasedflow/CaptureTypeBasedSummaryModels.ql
Outdated
Show resolved
Hide resolved
java/ql/test/utils/model-generator/typebasedflow/CaptureTypeBasedSummaryModels.ql
Outdated
Show resolved
Hide resolved
java/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll
Outdated
Show resolved
Hide resolved
java/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll
Outdated
Show resolved
Hide resolved
|
||
/** | ||
* Holds if `t` is a container like type of `tv` (eg. `List<T>`). | ||
* Note that collections are covariant in their element type. |
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.
No? In Java they aren't. Or is this something that you assume for some heuristic purpose?
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.
Ok, that claim is to strong.
At least the idea is that, if we have "relevant" type variable that serves as an upper bound for a given type, then we use that to eg. decide if the method reads from an implicit field or the implicit collection.
I will delete the comment.
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.
Not yet deleted.
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.
haha - no - you are right! I will try once more :-)
…t happy with the generated result.
…ents to comments.
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
ef82d05
to
8041542
Compare
In this PR we introduce the a query for generating type based models for Java.
This is the Java version of #10238.
It is worth mentioning the following differences.
Func
ordelegate
like type, but instead relies on functional interfaces (ie. interfaces with a single abstract method) as these can be perceived as functions, which complicated the implementation compared to C#.java.util.stream.Stream
is used (an approximate equivalent to theSystem.Linq.Enumerable
extension methods for C#).