Skip to content

Commit 9bd3f3d

Browse files
committed
Dataflow: Rename StagePathNode to StagePathNodeImpl.
1 parent 68dfca4 commit 9bd3f3d

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2536,7 +2536,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
25362536
TStagePathNodeSrcGrp() or
25372537
TStagePathNodeSinkGrp()
25382538

2539-
class StagePathNode extends TStagePathNode {
2539+
class StagePathNodeImpl extends TStagePathNode {
25402540
abstract string toString();
25412541

25422542
abstract Location getLocation();
@@ -2553,19 +2553,19 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
25532553
predicate isArbitrarySink() { this instanceof TStagePathNodeSinkGrp }
25542554
}
25552555

2556-
class StagePathNodeSrcGrp extends StagePathNode, TStagePathNodeSrcGrp {
2556+
class StagePathNodeSrcGrp extends StagePathNodeImpl, TStagePathNodeSrcGrp {
25572557
override string toString() { result = "<any source>" }
25582558

25592559
override Location getLocation() { result.hasLocationInfo("", 0, 0, 0, 0) }
25602560
}
25612561

2562-
class StagePathNodeSinkGrp extends StagePathNode, TStagePathNodeSinkGrp {
2562+
class StagePathNodeSinkGrp extends StagePathNodeImpl, TStagePathNodeSinkGrp {
25632563
override string toString() { result = "<any sink>" }
25642564

25652565
override Location getLocation() { result.hasLocationInfo("", 0, 0, 0, 0) }
25662566
}
25672567

2568-
class StagePathNodeMid extends StagePathNode, TStagePathNodeMid {
2568+
class StagePathNodeMid extends StagePathNodeImpl, TStagePathNodeMid {
25692569
NodeEx node;
25702570
FlowState state;
25712571
Cc cc;
@@ -2646,14 +2646,14 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
26462646

26472647
bindingset[node, state, cc, summaryCtx, argT, argAp, t, ap]
26482648
pragma[inline_late]
2649-
private StagePathNode mkStagePathNode(
2649+
private StagePathNodeImpl mkStagePathNode(
26502650
NodeEx node, FlowState state, Cc cc, ParamNodeOption summaryCtx, TypOption argT,
26512651
ApOption argAp, Typ t, Ap ap
26522652
) {
26532653
result = TStagePathNodeMid(node, state, cc, summaryCtx, argT, argAp, t, ap)
26542654
}
26552655

2656-
private StagePathNode typeStrengthenToStagePathNode(
2656+
private StagePathNodeImpl typeStrengthenToStagePathNode(
26572657
NodeEx node, FlowState state, Cc cc, ParamNodeOption summaryCtx, TypOption argT,
26582658
ApOption argAp, Typ t0, Ap ap
26592659
) {
@@ -2665,9 +2665,9 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
26652665

26662666
pragma[nomagic]
26672667
private predicate fwdFlowThroughStep1(
2668-
StagePathNode pn1, StagePathNode pn2, StagePathNode pn3, DataFlowCall call, Cc cc,
2669-
FlowState state, CcCall ccc, ParamNodeOption summaryCtx, TypOption argT, ApOption argAp,
2670-
Typ t, Ap ap, ApApprox apa, RetNodeEx ret, ApApprox innerArgApa
2668+
StagePathNodeImpl pn1, StagePathNodeImpl pn2, StagePathNodeImpl pn3, DataFlowCall call,
2669+
Cc cc, FlowState state, CcCall ccc, ParamNodeOption summaryCtx, TypOption argT,
2670+
ApOption argAp, Typ t, Ap ap, ApApprox apa, RetNodeEx ret, ApApprox innerArgApa
26712671
) {
26722672
exists(FlowState state0, ArgNodeEx arg, ParamNodeEx p, Typ innerArgT, Ap innerArgAp |
26732673
fwdFlowThroughStep0(call, arg, cc, state, ccc, summaryCtx, argT, argAp, t, ap, apa,
@@ -2685,7 +2685,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
26852685

26862686
pragma[nomagic]
26872687
private predicate fwdFlowThroughStep2(
2688-
StagePathNode pn1, StagePathNode pn2, StagePathNode pn3, NodeEx node, Cc cc,
2688+
StagePathNodeImpl pn1, StagePathNodeImpl pn2, StagePathNodeImpl pn3, NodeEx node, Cc cc,
26892689
FlowState state, ParamNodeOption summaryCtx, TypOption argT, ApOption argAp, Typ t,
26902690
Ap ap
26912691
) {
@@ -2701,7 +2701,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
27012701
}
27022702

27032703
private predicate localStep(
2704-
StagePathNode pn1, NodeEx node, FlowState state, Cc cc, ParamNodeOption summaryCtx,
2704+
StagePathNodeImpl pn1, NodeEx node, FlowState state, Cc cc, ParamNodeOption summaryCtx,
27052705
TypOption argT, ApOption argAp, Typ t, Ap ap, string label
27062706
) {
27072707
exists(NodeEx mid, FlowState state0, Typ t0, LocalCc localCc |
@@ -2732,7 +2732,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
27322732
)
27332733
}
27342734

2735-
private predicate localStep(StagePathNode pn1, StagePathNode pn2, string label) {
2735+
private predicate localStep(StagePathNodeImpl pn1, StagePathNodeImpl pn2, string label) {
27362736
exists(
27372737
NodeEx node, FlowState state, Cc cc, ParamNodeOption summaryCtx, TypOption argT,
27382738
ApOption argAp, Typ t0, Ap ap
@@ -2744,27 +2744,29 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
27442744
summaryStep(pn1, pn2, label)
27452745
}
27462746

2747-
private predicate summaryLabel(StagePathNode pn1, StagePathNode pn2, string summaryLabel) {
2747+
private predicate summaryLabel(
2748+
StagePathNodeImpl pn1, StagePathNodeImpl pn2, string summaryLabel
2749+
) {
27482750
pn1 = pn2 and
27492751
summaryLabel = "" and
27502752
subpaths(_, pn1, _, _)
27512753
or
2752-
exists(StagePathNode mid, string l1, string l2 |
2754+
exists(StagePathNodeImpl mid, string l1, string l2 |
27532755
summaryLabel(pn1, mid, l1) and
27542756
localStep(mid, pn2, l2) and
27552757
summaryLabel = mergeLabels(l1, l2)
27562758
)
27572759
}
27582760

2759-
private predicate summaryStep(StagePathNode arg, StagePathNode out, string label) {
2760-
exists(StagePathNode par, StagePathNode ret |
2761+
private predicate summaryStep(StagePathNodeImpl arg, StagePathNodeImpl out, string label) {
2762+
exists(StagePathNodeImpl par, StagePathNodeImpl ret |
27612763
subpaths(arg, par, ret, out) and
27622764
summaryLabel(par, ret, label)
27632765
)
27642766
}
27652767

27662768
private predicate nonLocalStep(
2767-
StagePathNode pn1, NodeEx node, FlowState state, Cc cc, ParamNodeOption summaryCtx,
2769+
StagePathNodeImpl pn1, NodeEx node, FlowState state, Cc cc, ParamNodeOption summaryCtx,
27682770
TypOption argT, ApOption argAp, Typ t, Ap ap, string label
27692771
) {
27702772
// jump
@@ -2823,7 +2825,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
28232825
)
28242826
}
28252827

2826-
private predicate nonLocalStep(StagePathNode pn1, StagePathNode pn2, string label) {
2828+
private predicate nonLocalStep(StagePathNodeImpl pn1, StagePathNodeImpl pn2, string label) {
28272829
exists(
28282830
NodeEx node, FlowState state, Cc cc, ParamNodeOption summaryCtx, TypOption argT,
28292831
ApOption argAp, Typ t0, Ap ap
@@ -2834,7 +2836,8 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
28342836
}
28352837

28362838
query predicate subpaths(
2837-
StagePathNode arg, StagePathNode par, StagePathNode ret, StagePathNode out
2839+
StagePathNodeImpl arg, StagePathNodeImpl par, StagePathNodeImpl ret,
2840+
StagePathNodeImpl out
28382841
) {
28392842
exists(
28402843
NodeEx node, FlowState state, Cc cc, ParamNodeOption summaryCtx, TypOption argT,
@@ -2845,7 +2848,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
28452848
)
28462849
}
28472850

2848-
query predicate edges(StagePathNode pn1, StagePathNode pn2, string key, string val) {
2851+
query predicate edges(StagePathNodeImpl pn1, StagePathNodeImpl pn2, string key, string val) {
28492852
key = "provenance" and
28502853
(
28512854
localStep(pn1, pn2, val)

0 commit comments

Comments
 (0)