Skip to content

Commit 4d2f2b8

Browse files
committed
Shared/Java/C#/Rust/C++: Rename 'captureHeuristicFlow' to 'captureFlow'.
1 parent 54f0eed commit 4d2f2b8

File tree

7 files changed

+17
-20
lines changed

7 files changed

+17
-20
lines changed

cpp/ql/test/library-tests/dataflow/modelgenerator/dataflow/CaptureHeuristicSummaryModels.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import SummaryModels
44
import InlineModelsAsDataTest
55

66
module InlineMadTestConfig implements InlineMadTestConfigSig {
7-
string getCapturedModel(MadRelevantFunction c) { result = Heuristic::captureHeuristicFlow(c, _) }
7+
string getCapturedModel(MadRelevantFunction c) { result = Heuristic::captureFlow(c, _) }
88

99
string getKind() { result = "heuristic-summary" }
1010
}

csharp/ql/src/utils/modelgenerator/debug/CaptureSummaryModelsPath.ql

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@
1111
import csharp
1212
import utils.modelgenerator.internal.CaptureModels
1313
import SummaryModels
14-
import Heuristic
15-
import PropagateTaintFlow::PathGraph
14+
import Heuristic::PropagateTaintFlow::PathGraph
1615

1716
from
18-
PropagateTaintFlow::PathNode source, PropagateTaintFlow::PathNode sink,
17+
Heuristic::PropagateTaintFlow::PathNode source, Heuristic::PropagateTaintFlow::PathNode sink,
1918
DataFlowSummaryTargetApi api, DataFlow::Node p, DataFlow::Node returnNodeExt
2019
where
21-
PropagateTaintFlow::flowPath(source, sink) and
20+
Heuristic::PropagateTaintFlow::flowPath(source, sink) and
2221
p = source.getNode() and
2322
returnNodeExt = sink.getNode() and
24-
captureThroughFlow0(api, p, returnNodeExt)
23+
Heuristic::captureThroughFlow0(api, p, returnNodeExt)
2524
select sink.getNode(), source, sink, "There is flow from $@ to the $@.", source.getNode(),
2625
"parameter", sink.getNode(), "return value"

csharp/ql/test/utils/modelgenerator/dataflow/CaptureHeuristicSummaryModels.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import SummaryModels
44
import utils.test.InlineMadTest
55

66
module InlineMadTestConfig implements InlineMadTestConfigSig {
7-
string getCapturedModel(Callable c) { result = Heuristic::captureHeuristicFlow(c, _) }
7+
string getCapturedModel(Callable c) { result = Heuristic::captureFlow(c, _) }
88

99
string getKind() { result = "heuristic-summary" }
1010
}

java/ql/src/utils/modelgenerator/debug/CaptureSummaryModelsPath.ql

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,15 @@ import java
1212
import semmle.code.java.dataflow.DataFlow
1313
import utils.modelgenerator.internal.CaptureModels
1414
import SummaryModels
15-
import Heuristic
16-
import PropagateTaintFlow::PathGraph
15+
import Heuristic::PropagateTaintFlow::PathGraph
1716

1817
from
19-
PropagateTaintFlow::PathNode source, PropagateTaintFlow::PathNode sink,
18+
Heuristic::PropagateTaintFlow::PathNode source, Heuristic::PropagateTaintFlow::PathNode sink,
2019
DataFlowSummaryTargetApi api, DataFlow::Node p, DataFlow::Node returnNodeExt
2120
where
22-
PropagateTaintFlow::flowPath(source, sink) and
21+
Heuristic::PropagateTaintFlow::flowPath(source, sink) and
2322
p = source.getNode() and
2423
returnNodeExt = sink.getNode() and
25-
captureThroughFlow0(api, p, returnNodeExt)
24+
Heuristic::captureThroughFlow0(api, p, returnNodeExt)
2625
select sink.getNode(), source, sink, "There is flow from $@ to the $@.", source.getNode(),
2726
"parameter", sink.getNode(), "return value"

java/ql/test/utils/modelgenerator/dataflow/CaptureHeuristicSummaryModels.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import SummaryModels
44
import utils.test.InlineMadTest
55

66
module InlineMadTestConfig implements InlineMadTestConfigSig {
7-
string getCapturedModel(Callable c) { result = Heuristic::captureHeuristicFlow(c, _) }
7+
string getCapturedModel(Callable c) { result = Heuristic::captureFlow(c, _) }
88

99
string getKind() { result = "heuristic-summary" }
1010
}

rust/ql/src/utils/modelgenerator/debug/CaptureSummaryModelsPath.ql

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@
1111
private import codeql.rust.dataflow.DataFlow
1212
import utils.modelgenerator.internal.CaptureModels
1313
import SummaryModels
14-
import Heuristic
15-
import PropagateTaintFlow::PathGraph
14+
import Heuristic::PropagateTaintFlow::PathGraph
1615

1716
from
18-
PropagateTaintFlow::PathNode source, PropagateTaintFlow::PathNode sink,
17+
Heuristic::PropagateTaintFlow::PathNode source, Heuristic::PropagateTaintFlow::PathNode sink,
1918
DataFlowSummaryTargetApi api, DataFlow::Node p, DataFlow::Node returnNodeExt
2019
where
21-
PropagateTaintFlow::flowPath(source, sink) and
20+
Heuristic::PropagateTaintFlow::flowPath(source, sink) and
2221
p = source.getNode() and
2322
returnNodeExt = sink.getNode() and
24-
captureThroughFlow0(api, p, returnNodeExt)
23+
Heuristic::captureThroughFlow0(api, p, returnNodeExt)
2524
select sink.getNode(), source, sink, "There is flow from $@ to the $@.", source.getNode(),
2625
"parameter", sink.getNode(), "return value"

shared/mad/codeql/mad/modelgenerator/internal/ModelGeneratorImpl.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ module MakeModelGeneratorFactory<
572572
*
573573
* `preservesValue` is `true` if the summary is value-preserving, and `false` otherwise.
574574
*/
575-
string captureHeuristicFlow(DataFlowSummaryTargetApi api, boolean preservesValue) {
575+
string captureFlow(DataFlowSummaryTargetApi api, boolean preservesValue) {
576576
result = captureQualifierFlow(api) and preservesValue = true
577577
or
578578
result = captureThroughFlow(api, preservesValue)
@@ -988,7 +988,7 @@ module MakeModelGeneratorFactory<
988988
api0.lift() = api.lift() and
989989
exists(ContentSensitive::captureFlow(api0, true, _))
990990
) and
991-
result = Heuristic::captureHeuristicFlow(api, preservesValue) and
991+
result = Heuristic::captureFlow(api, preservesValue) and
992992
lift = true
993993
)
994994
}

0 commit comments

Comments
 (0)