Rename predicates to be consistent with qlpack

In preparation for migrating to the FlowSummary module in the qlpack,
rename predicates to be consistent with the qlpack.
This commit is contained in:
Asger F
2024-06-25 13:30:33 +02:00
parent 6c8fb61f60
commit 6e32f27652
3 changed files with 9 additions and 5 deletions

View File

@@ -84,7 +84,7 @@ abstract class SummarizedCallable extends LibraryCallable, Impl::Public::Summari
DataFlow::ParameterNode getParameter(string s) {
exists(ParameterPosition pos |
DataFlowImplCommon::parameterNode(result, MkLibraryCallable(this), pos) and
s = getParameterPosition(pos)
s = encodeParameterPosition(pos)
)
}
}

View File

@@ -286,11 +286,15 @@ string getMadRepresentationSpecific(SummaryComponent sc) {
/** Gets the textual representation of a parameter position in the format used for flow summaries. */
bindingset[pos]
string getParameterPosition(ParameterPosition pos) { positionName(pos, result) and result != "any" }
string encodeParameterPosition(ParameterPosition pos) {
positionName(pos, result) and result != "any"
}
/** Gets the textual representation of an argument position in the format used for flow summaries. */
bindingset[pos]
string getArgumentPosition(ArgumentPosition pos) { positionName(pos, result) and result != "any" }
string encodeArgumentPosition(ArgumentPosition pos) {
positionName(pos, result) and result != "any"
}
/** Holds if input specification component `c` needs a reference. */
predicate inputNeedsReferenceSpecific(string c) { none() }

View File

@@ -30,12 +30,12 @@ module Public {
or
exists(ArgumentPosition pos |
this = TParameterSummaryComponent(pos) and
result = "Parameter[" + getArgumentPosition(pos) + "]"
result = "Parameter[" + encodeArgumentPosition(pos) + "]"
)
or
exists(ParameterPosition pos |
this = TArgumentSummaryComponent(pos) and
result = "Argument[" + getParameterPosition(pos) + "]"
result = "Argument[" + encodeParameterPosition(pos) + "]"
)
or
exists(string synthetic |