Skip to content
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

Add triggered field access information analysis and use for call graphs #211

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

maximilianruesch
Copy link
Collaborator

The current field access information analysis is eager. Using it in call graphs usually results in many upfront calculations, growing directly proportional to the number of methods under analysis, regardless of whether they are reachable or not.

This PR adds a triggered analysis for field accesses tor rectify this issue and thus brings the field access information analysis in line with other call graph related analysis and others that are used during call graph computation. Now, field accesses are only computed for methods that are deemed reachable, which is also the only case call graph analyses need such information.

Thus, the points to keys are reconfigured to use the new triggered analysis instead of the previous eager analysis.

@errt
Copy link
Collaborator

errt commented Sep 5, 2024

Looks good at a first glance, but please factor out common code between the two schedulers (e.g., the used and derived properties).

@maximilianruesch maximilianruesch force-pushed the feature/add-triggered-field-access-analysis branch from c428580 to e37fdbd Compare September 5, 2024 20:01
@maximilianruesch

This comment was marked as resolved.


override def derivesEagerly: Set[PropertyBounds] = Set.empty

override def derivesCollaboratively: Set[PropertyBounds] = derivedProperties
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need to override these, can't you specify them in the super trait already? I wouldn't expect us to ever add a lazy scheduler where they wouldn't fit.

Copy link
Collaborator Author

@maximilianruesch maximilianruesch Sep 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since these functions stem from the specific BasicEagerFPCFAnalysisScheduler and BasicTriggeredFPCFAnalysisScheduler traits and not from the generic FPCFAnalysisScheduler trait that the super trait of these extends, they are correct here. It also only makes sense that you can specify e.g. eager behavior when you know you have an eager analysis.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, they stem from ComputationSpecification, the super trait of FPCFAnalysisScheduler. It's fine like this, though.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the Github UI is not fit for determining the origin of super functions...

@errt errt added this pull request to the merge queue Sep 9, 2024
Merged via the queue into develop with commit aa417c1 Sep 9, 2024
3 checks passed
@errt errt deleted the feature/add-triggered-field-access-analysis branch September 9, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants