Shared: Align SSA interfaces in Guards and ControlFlowReachability with shared SSA#20680
Conversation
There was a problem hiding this comment.
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.
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.
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.