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

Dynamic: add TypeModel.isTypeUsed #14120

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

asgerf
Copy link
Contributor

@asgerf asgerf commented Sep 1, 2023

There was a bug in the design of TypeModel, that meant when pruning models we have no way of knowing which types might be contributed via a TypeModel.

This PR adds a predicate TypeModel.isTypeUsed(type) and then implementors must use it to expose this information.
To simplify its use in simple cases, the implementor is able to use the body any() to disable all pruning.

We want to be able to prune irrelevant models, and in order to generate flow summaries from a model, the pruning information cannot depend on data-flow nodes. For that reason, each language now has a recursion guard that prevents isTypeUsed from depending on DataFlow::Node.

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.

None yet

1 participant