Skip to content

Commit 712fe00

Browse files
committed
Data flow: Sync files
1 parent bfabfc3 commit 712fe00

28 files changed

+448
-140
lines changed

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ abstract class Configuration extends string {
170170
*/
171171
int explorationLimit() { none() }
172172

173+
/**
174+
* Holds if hidden nodes should be included in the data flow graph.
175+
*
176+
* This feature should only be used for debugging or when the data flow graph
177+
* is not visualized (for example in a `path-problem` query).
178+
*/
179+
predicate includeHiddenNodes() { none() }
180+
173181
/**
174182
* Holds if there is a partial data flow path from `source` to `node`. The
175183
* approximate distance between `node` and the closest source is `dist` and
@@ -3815,11 +3823,14 @@ abstract private class PathNodeImpl extends PathNode {
38153823
abstract NodeEx getNodeEx();
38163824

38173825
predicate isHidden() {
3818-
hiddenNode(this.getNodeEx().asNode()) and
3819-
not this.isSource() and
3820-
not this instanceof PathNodeSink
3821-
or
3822-
this.getNodeEx() instanceof TNodeImplicitRead
3826+
not this.getConfiguration().includeHiddenNodes() and
3827+
(
3828+
hiddenNode(this.getNodeEx().asNode()) and
3829+
not this.isSource() and
3830+
not this instanceof PathNodeSink
3831+
or
3832+
this.getNodeEx() instanceof TNodeImplicitRead
3833+
)
38233834
}
38243835

38253836
private string ppAp() {

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ abstract class Configuration extends string {
170170
*/
171171
int explorationLimit() { none() }
172172

173+
/**
174+
* Holds if hidden nodes should be included in the data flow graph.
175+
*
176+
* This feature should only be used for debugging or when the data flow graph
177+
* is not visualized (for example in a `path-problem` query).
178+
*/
179+
predicate includeHiddenNodes() { none() }
180+
173181
/**
174182
* Holds if there is a partial data flow path from `source` to `node`. The
175183
* approximate distance between `node` and the closest source is `dist` and
@@ -3815,11 +3823,14 @@ abstract private class PathNodeImpl extends PathNode {
38153823
abstract NodeEx getNodeEx();
38163824

38173825
predicate isHidden() {
3818-
hiddenNode(this.getNodeEx().asNode()) and
3819-
not this.isSource() and
3820-
not this instanceof PathNodeSink
3821-
or
3822-
this.getNodeEx() instanceof TNodeImplicitRead
3826+
not this.getConfiguration().includeHiddenNodes() and
3827+
(
3828+
hiddenNode(this.getNodeEx().asNode()) and
3829+
not this.isSource() and
3830+
not this instanceof PathNodeSink
3831+
or
3832+
this.getNodeEx() instanceof TNodeImplicitRead
3833+
)
38233834
}
38243835

38253836
private string ppAp() {

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ abstract class Configuration extends string {
170170
*/
171171
int explorationLimit() { none() }
172172

173+
/**
174+
* Holds if hidden nodes should be included in the data flow graph.
175+
*
176+
* This feature should only be used for debugging or when the data flow graph
177+
* is not visualized (for example in a `path-problem` query).
178+
*/
179+
predicate includeHiddenNodes() { none() }
180+
173181
/**
174182
* Holds if there is a partial data flow path from `source` to `node`. The
175183
* approximate distance between `node` and the closest source is `dist` and
@@ -3815,11 +3823,14 @@ abstract private class PathNodeImpl extends PathNode {
38153823
abstract NodeEx getNodeEx();
38163824

38173825
predicate isHidden() {
3818-
hiddenNode(this.getNodeEx().asNode()) and
3819-
not this.isSource() and
3820-
not this instanceof PathNodeSink
3821-
or
3822-
this.getNodeEx() instanceof TNodeImplicitRead
3826+
not this.getConfiguration().includeHiddenNodes() and
3827+
(
3828+
hiddenNode(this.getNodeEx().asNode()) and
3829+
not this.isSource() and
3830+
not this instanceof PathNodeSink
3831+
or
3832+
this.getNodeEx() instanceof TNodeImplicitRead
3833+
)
38233834
}
38243835

38253836
private string ppAp() {

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ abstract class Configuration extends string {
170170
*/
171171
int explorationLimit() { none() }
172172

173+
/**
174+
* Holds if hidden nodes should be included in the data flow graph.
175+
*
176+
* This feature should only be used for debugging or when the data flow graph
177+
* is not visualized (for example in a `path-problem` query).
178+
*/
179+
predicate includeHiddenNodes() { none() }
180+
173181
/**
174182
* Holds if there is a partial data flow path from `source` to `node`. The
175183
* approximate distance between `node` and the closest source is `dist` and
@@ -3815,11 +3823,14 @@ abstract private class PathNodeImpl extends PathNode {
38153823
abstract NodeEx getNodeEx();
38163824

38173825
predicate isHidden() {
3818-
hiddenNode(this.getNodeEx().asNode()) and
3819-
not this.isSource() and
3820-
not this instanceof PathNodeSink
3821-
or
3822-
this.getNodeEx() instanceof TNodeImplicitRead
3826+
not this.getConfiguration().includeHiddenNodes() and
3827+
(
3828+
hiddenNode(this.getNodeEx().asNode()) and
3829+
not this.isSource() and
3830+
not this instanceof PathNodeSink
3831+
or
3832+
this.getNodeEx() instanceof TNodeImplicitRead
3833+
)
38233834
}
38243835

38253836
private string ppAp() {

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ abstract class Configuration extends string {
170170
*/
171171
int explorationLimit() { none() }
172172

173+
/**
174+
* Holds if hidden nodes should be included in the data flow graph.
175+
*
176+
* This feature should only be used for debugging or when the data flow graph
177+
* is not visualized (for example in a `path-problem` query).
178+
*/
179+
predicate includeHiddenNodes() { none() }
180+
173181
/**
174182
* Holds if there is a partial data flow path from `source` to `node`. The
175183
* approximate distance between `node` and the closest source is `dist` and
@@ -3815,11 +3823,14 @@ abstract private class PathNodeImpl extends PathNode {
38153823
abstract NodeEx getNodeEx();
38163824

38173825
predicate isHidden() {
3818-
hiddenNode(this.getNodeEx().asNode()) and
3819-
not this.isSource() and
3820-
not this instanceof PathNodeSink
3821-
or
3822-
this.getNodeEx() instanceof TNodeImplicitRead
3826+
not this.getConfiguration().includeHiddenNodes() and
3827+
(
3828+
hiddenNode(this.getNodeEx().asNode()) and
3829+
not this.isSource() and
3830+
not this instanceof PathNodeSink
3831+
or
3832+
this.getNodeEx() instanceof TNodeImplicitRead
3833+
)
38233834
}
38243835

38253836
private string ppAp() {

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

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ abstract class Configuration extends string {
170170
*/
171171
int explorationLimit() { none() }
172172

173+
/**
174+
* Holds if hidden nodes should be included in the data flow graph.
175+
*
176+
* This feature should only be used for debugging or when the data flow graph
177+
* is not visualized (for example in a `path-problem` query).
178+
*/
179+
predicate includeHiddenNodes() { none() }
180+
173181
/**
174182
* Holds if there is a partial data flow path from `source` to `node`. The
175183
* approximate distance between `node` and the closest source is `dist` and
@@ -3815,11 +3823,14 @@ abstract private class PathNodeImpl extends PathNode {
38153823
abstract NodeEx getNodeEx();
38163824

38173825
predicate isHidden() {
3818-
hiddenNode(this.getNodeEx().asNode()) and
3819-
not this.isSource() and
3820-
not this instanceof PathNodeSink
3821-
or
3822-
this.getNodeEx() instanceof TNodeImplicitRead
3826+
not this.getConfiguration().includeHiddenNodes() and
3827+
(
3828+
hiddenNode(this.getNodeEx().asNode()) and
3829+
not this.isSource() and
3830+
not this instanceof PathNodeSink
3831+
or
3832+
this.getNodeEx() instanceof TNodeImplicitRead
3833+
)
38233834
}
38243835

38253836
private string ppAp() {

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

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ abstract class Configuration extends string {
170170
*/
171171
int explorationLimit() { none() }
172172

173+
/**
174+
* Holds if hidden nodes should be included in the data flow graph.
175+
*
176+
* This feature should only be used for debugging or when the data flow graph
177+
* is not visualized (for example in a `path-problem` query).
178+
*/
179+
predicate includeHiddenNodes() { none() }
180+
173181
/**
174182
* Holds if there is a partial data flow path from `source` to `node`. The
175183
* approximate distance between `node` and the closest source is `dist` and
@@ -3815,11 +3823,14 @@ abstract private class PathNodeImpl extends PathNode {
38153823
abstract NodeEx getNodeEx();
38163824

38173825
predicate isHidden() {
3818-
hiddenNode(this.getNodeEx().asNode()) and
3819-
not this.isSource() and
3820-
not this instanceof PathNodeSink
3821-
or
3822-
this.getNodeEx() instanceof TNodeImplicitRead
3826+
not this.getConfiguration().includeHiddenNodes() and
3827+
(
3828+
hiddenNode(this.getNodeEx().asNode()) and
3829+
not this.isSource() and
3830+
not this instanceof PathNodeSink
3831+
or
3832+
this.getNodeEx() instanceof TNodeImplicitRead
3833+
)
38233834
}
38243835

38253836
private string ppAp() {

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

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ abstract class Configuration extends string {
170170
*/
171171
int explorationLimit() { none() }
172172

173+
/**
174+
* Holds if hidden nodes should be included in the data flow graph.
175+
*
176+
* This feature should only be used for debugging or when the data flow graph
177+
* is not visualized (for example in a `path-problem` query).
178+
*/
179+
predicate includeHiddenNodes() { none() }
180+
173181
/**
174182
* Holds if there is a partial data flow path from `source` to `node`. The
175183
* approximate distance between `node` and the closest source is `dist` and
@@ -3815,11 +3823,14 @@ abstract private class PathNodeImpl extends PathNode {
38153823
abstract NodeEx getNodeEx();
38163824

38173825
predicate isHidden() {
3818-
hiddenNode(this.getNodeEx().asNode()) and
3819-
not this.isSource() and
3820-
not this instanceof PathNodeSink
3821-
or
3822-
this.getNodeEx() instanceof TNodeImplicitRead
3826+
not this.getConfiguration().includeHiddenNodes() and
3827+
(
3828+
hiddenNode(this.getNodeEx().asNode()) and
3829+
not this.isSource() and
3830+
not this instanceof PathNodeSink
3831+
or
3832+
this.getNodeEx() instanceof TNodeImplicitRead
3833+
)
38233834
}
38243835

38253836
private string ppAp() {

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

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ abstract class Configuration extends string {
170170
*/
171171
int explorationLimit() { none() }
172172

173+
/**
174+
* Holds if hidden nodes should be included in the data flow graph.
175+
*
176+
* This feature should only be used for debugging or when the data flow graph
177+
* is not visualized (for example in a `path-problem` query).
178+
*/
179+
predicate includeHiddenNodes() { none() }
180+
173181
/**
174182
* Holds if there is a partial data flow path from `source` to `node`. The
175183
* approximate distance between `node` and the closest source is `dist` and
@@ -3815,11 +3823,14 @@ abstract private class PathNodeImpl extends PathNode {
38153823
abstract NodeEx getNodeEx();
38163824

38173825
predicate isHidden() {
3818-
hiddenNode(this.getNodeEx().asNode()) and
3819-
not this.isSource() and
3820-
not this instanceof PathNodeSink
3821-
or
3822-
this.getNodeEx() instanceof TNodeImplicitRead
3826+
not this.getConfiguration().includeHiddenNodes() and
3827+
(
3828+
hiddenNode(this.getNodeEx().asNode()) and
3829+
not this.isSource() and
3830+
not this instanceof PathNodeSink
3831+
or
3832+
this.getNodeEx() instanceof TNodeImplicitRead
3833+
)
38233834
}
38243835

38253836
private string ppAp() {

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ abstract class Configuration extends string {
170170
*/
171171
int explorationLimit() { none() }
172172

173+
/**
174+
* Holds if hidden nodes should be included in the data flow graph.
175+
*
176+
* This feature should only be used for debugging or when the data flow graph
177+
* is not visualized (for example in a `path-problem` query).
178+
*/
179+
predicate includeHiddenNodes() { none() }
180+
173181
/**
174182
* Holds if there is a partial data flow path from `source` to `node`. The
175183
* approximate distance between `node` and the closest source is `dist` and
@@ -3815,11 +3823,14 @@ abstract private class PathNodeImpl extends PathNode {
38153823
abstract NodeEx getNodeEx();
38163824

38173825
predicate isHidden() {
3818-
hiddenNode(this.getNodeEx().asNode()) and
3819-
not this.isSource() and
3820-
not this instanceof PathNodeSink
3821-
or
3822-
this.getNodeEx() instanceof TNodeImplicitRead
3826+
not this.getConfiguration().includeHiddenNodes() and
3827+
(
3828+
hiddenNode(this.getNodeEx().asNode()) and
3829+
not this.isSource() and
3830+
not this instanceof PathNodeSink
3831+
or
3832+
this.getNodeEx() instanceof TNodeImplicitRead
3833+
)
38233834
}
38243835

38253836
private string ppAp() {

0 commit comments

Comments
 (0)