Skip to content

Java: Improve several join-orders #20088

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 3 commits into from
Jul 18, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Java: Improve join-order by properly annotating haveIntersection.
  • Loading branch information
aschackmull committed Jul 18, 2025
commit d9f47bdec9ec0ac568c1a447ccf42fe93ad0ccdc
11 changes: 9 additions & 2 deletions java/ql/lib/semmle/code/java/Type.qll
Original file line number Diff line number Diff line change
Expand Up @@ -1261,14 +1261,21 @@ private Type erase(Type t) {
*
* For the definition of the notion of *erasure* see JLS v8, section 4.6 (Type Erasure).
*/
bindingset[t1, t2]
overlay[caller?]
pragma[inline]
pragma[inline_late]
predicate haveIntersection(RefType t1, RefType t2) {
exists(RefType e1, RefType e2 | e1 = erase(t1) and e2 = erase(t2) |
erasedHaveIntersection(e1, e2)
erasedHaveIntersectionFilter(e1, e2)
)
}

bindingset[t1, t2]
pragma[inline_late]
private predicate erasedHaveIntersectionFilter(RefType t1, RefType t2) {
erasedHaveIntersection(t1, t2)
}

/**
* Holds if there is no common (reflexive, transitive) subtype of the erasures
* of types `t1` and `t2`.
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy