-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Shared: Align SSA interfaces in Guards and ControlFlowReachability with shared SSA #20680
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
Shared: Align SSA interfaces in Guards and ControlFlowReachability with shared SSA #20680
Conversation
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.
Pull Request Overview
This PR aligns the naming conventions for SSA-related classes and predicates in the Guards and ControlFlowReachability libraries with the shared SSA library's standard naming scheme.
Key changes include:
- Renaming
SsaWriteDefinitiontoSsaExplicitWriteand itsgetDefinition()method togetValue() - Renaming
SsaPhiNodetoSsaPhiDefinition - Replacing
parameterDefinitionpredicate withSsaParameterInitclass - Renaming
SsaUncertainDefinitiontoSsaUncertainWrite
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| shared/controlflow/codeql/controlflow/Guards.qll | Updates shared Guards library interface definitions and all references to use new SSA naming conventions |
| shared/controlflow/codeql/controlflow/ControlFlowReachability.qll | Updates shared ControlFlowReachability library interface definitions and all references to use new SSA naming conventions |
| java/ql/lib/semmle/code/java/controlflow/Guards.qll | Updates Java Guards implementation to conform to new SSA interface naming for both v1 and v2 logic inputs |
| java/ql/lib/semmle/code/java/controlflow/ControlFlowReachability.qll | Updates Java ControlFlowReachability implementation to use new SSA class names |
| csharp/ql/lib/semmle/code/csharp/controlflow/Guards.qll | Updates C# Guards implementation to conform to new SSA interface naming |
| csharp/ql/lib/semmle/code/csharp/controlflow/ControlFlowReachability.qll | Updates C# ControlFlowReachability implementation to use new SSA class names |
| cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll | Updates C++ IRGuards implementation to conform to new SSA interface naming |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| class SsaParameterInit extends SsaDefinition { | ||
| SsaParameterInit() { this.isParameterDefinition(_) } | ||
|
|
||
| GuardsInput::Parameter getParameter() { this.isParameterDefinition(result) } |
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.
This seems to be slightly more than a renaming. Did you check that this doesn't affect join-orders?
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.
It replaces one binary predicate with another - it shouldn't make a difference whether it's a member predicate. But since you asked, I just did a DIL diff of a suitable query and verified that the generated DIL is equivalent.
This updates the class and predicate names on these two shared libraries so they align with the naming laid out in the shared SSA library.