Skip to content

Overlay: Add manual Java overlay annotations & discard predicates #19813

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

Draft
wants to merge 3 commits into
base: kaspersv/overlay-java-annotations
Choose a base branch
from

Conversation

kaspersv
Copy link
Contributor

@kaspersv kaspersv commented Jun 18, 2025

This PR builds on top of #19779, adding a few additional manual overlay annotations and defining entity discard predicates for Java.

The overlay[local?] annotations in the experimental queries are needed to ensure that virtual dispatch (which depends indirectly on ActiveExperimentalModels) becomes local. In addition to the manual overlay[local?] annotations, the PR adds an overlay[global] annotation in DataFlowImplCommon.qll to ensure lambda flow is global.

The entity discard predicates defined in this PR are not exhaustive and additional discarding may be needed. The PR adds entity discard predicates to discard the following:

  • base locations, expressions, javadocs, statements and local scoped variables in files fully extracted in the overlay
  • base methods on anonymous classes in files fully extracted in the overlay
  • base methods in files fully extracted in the overlay that are not used in the overlay

@kaspersv kaspersv force-pushed the kaspersv/overlay-java-discarding branch from 6f5bc41 to 8672313 Compare June 19, 2025 06:34
@kaspersv kaspersv force-pushed the kaspersv/overlay-java-discarding branch from 8672313 to db52a3c Compare June 19, 2025 07:13
@kaspersv kaspersv force-pushed the kaspersv/overlay-java-discarding branch from db52a3c to 26896ea Compare June 20, 2025 11:39
@kaspersv kaspersv force-pushed the kaspersv/overlay-java-annotations branch from ea40677 to 052023e Compare June 20, 2025 11:59
@kaspersv kaspersv force-pushed the kaspersv/overlay-java-discarding branch 3 times, most recently from bdf1bdd to 3c2c871 Compare June 23, 2025 13:00
@kaspersv kaspersv changed the title Java: Add manual overlay annotations & discard predicates Overlay: Add manual Java overlay annotations & discard predicates Jun 24, 2025
@kaspersv kaspersv force-pushed the kaspersv/overlay-java-annotations branch from 052023e to 81b677a Compare June 24, 2025 08:26
@kaspersv kaspersv force-pushed the kaspersv/overlay-java-discarding branch from 3c2c871 to 0ee6a78 Compare June 24, 2025 08:38
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.

2 participants