Skip to content

Commit 3939eff

Browse files
committed
TypeFlow: Rename step to uniqStep.
1 parent b112a9b commit 3939eff

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/TypeFlow.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ private module Input implements TypeFlowInput<Location> {
199199
i2.(PointerArithmeticInstruction).getLeft() = i1
200200
}
201201

202-
predicate step(TypeFlowNode n1, TypeFlowNode n2) {
202+
predicate uniqStep(TypeFlowNode n1, TypeFlowNode n2) {
203203
instructionStep(n1.asInstruction(), n2.asInstruction())
204204
}
205205

@@ -246,7 +246,7 @@ private module Input implements TypeFlowInput<Location> {
246246
pragma[nomagic]
247247
private predicate upcastCand(TypeFlowNode n, Type t1, Type t2) {
248248
exists(TypeFlowNode next |
249-
step(n, next)
249+
uniqStep(n, next)
250250
or
251251
joinStep(n, next)
252252
|

java/ql/lib/semmle/code/java/dataflow/TypeFlow.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ private module Input implements TypeFlowInput<Location> {
118118
* Holds if data can flow from `n1` to `n2` in one step, and `n1` is
119119
* functionally determined by `n2`.
120120
*/
121-
predicate step(TypeFlowNode n1, TypeFlowNode n2) {
121+
predicate uniqStep(TypeFlowNode n1, TypeFlowNode n2) {
122122
n2.asExpr() = n1.asField().getAnAccess()
123123
or
124124
n2.asExpr() = n1.asSsa().getAUse()
@@ -169,7 +169,7 @@ private module Input implements TypeFlowInput<Location> {
169169
*/
170170
pragma[nomagic]
171171
private predicate upcastCand(TypeFlowNode n, RefType t1, RefType t1e, RefType t2, RefType t2e) {
172-
exists(TypeFlowNode next | step(n, next) or joinStep(n, next) |
172+
exists(TypeFlowNode next | uniqStep(n, next) or joinStep(n, next) |
173173
n.getType() = t1 and
174174
next.getType() = t2 and
175175
t1.getErasure() = t1e and

shared/typeflow/codeql/typeflow/TypeFlow.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ signature module TypeFlowInput<LocationSig Location> {
3737
* Holds if data can flow from `n1` to `n2` in one step, and `n1` is
3838
* functionally determined by `n2`.
3939
*/
40-
predicate step(TypeFlowNode n1, TypeFlowNode n2);
40+
predicate uniqStep(TypeFlowNode n1, TypeFlowNode n2);
4141

4242
/** Holds if `n` represents a `null` value. */
4343
predicate isNullValue(TypeFlowNode n);

shared/typeflow/codeql/typeflow/internal/TypeFlowImpl.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module TypeFlow<LocationSig Location, TypeFlowInput<Location> I> {
99
predicate isNull(TypeFlowNode n) {
1010
isNullValue(n)
1111
or
12-
exists(TypeFlowNode mid | isNull(mid) and step(mid, n))
12+
exists(TypeFlowNode mid | isNull(mid) and uniqStep(mid, n))
1313
or
1414
forex(TypeFlowNode mid | joinStep(mid, n) | isNull(mid)) and
1515
not isExcludedFromNullAnalysis(n)
@@ -24,7 +24,7 @@ module TypeFlow<LocationSig Location, TypeFlowInput<Location> I> {
2424
}
2525

2626
private predicate anyStep(TypeFlowNode n1, TypeFlowNode n2) {
27-
joinStepNotNull(n1, n2) or step(n1, n2)
27+
joinStepNotNull(n1, n2) or uniqStep(n1, n2)
2828
}
2929

3030
private predicate sccEdge(TypeFlowNode n1, TypeFlowNode n2) {
@@ -171,7 +171,7 @@ module TypeFlow<LocationSig Location, TypeFlowInput<Location> I> {
171171
private predicate exactType(TypeFlowNode n, Type t) {
172172
exactTypeBase(n, t)
173173
or
174-
exists(TypeFlowNode mid | exactType(mid, t) and step(mid, n))
174+
exists(TypeFlowNode mid | exactType(mid, t) and uniqStep(mid, n))
175175
or
176176
// The following is an optimized version of
177177
// `forex(TypeFlowNode mid | joinStepNotNull(mid, n) | exactType(mid, t))`
@@ -234,7 +234,7 @@ module TypeFlow<LocationSig Location, TypeFlowInput<Location> I> {
234234
private predicate typeFlow(TypeFlowNode n, Type t) {
235235
typeFlowBase(n, t)
236236
or
237-
exists(TypeFlowNode mid | typeFlow(mid, t) and step(mid, n))
237+
exists(TypeFlowNode mid | typeFlow(mid, t) and uniqStep(mid, n))
238238
or
239239
ForAll<TypeFlowNode, RankedJoinStep, TypeFlowPropagation>::flowJoin(n, t)
240240
or
@@ -366,7 +366,7 @@ module TypeFlow<LocationSig Location, TypeFlowInput<Location> I> {
366366
ForAll<TypeFlowScc, RankedSccJoinStep, HasUnionTypePropagation>::flowJoin(scc, _)
367367
)
368368
or
369-
exists(TypeFlowNode mid | step(mid, n) and hasUnionTypeFlow(mid))
369+
exists(TypeFlowNode mid | uniqStep(mid, n) and hasUnionTypeFlow(mid))
370370
or
371371
instanceofDisjunctionGuarded(n, _)
372372
)

0 commit comments

Comments
 (0)