Skip to content

Commit a80cb26

Browse files
committed
Java/C++/C#: Elaborate qldoc.
1 parent 9ebb834 commit a80cb26

File tree

14 files changed

+140
-14
lines changed

14 files changed

+140
-14
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ import DataFlowImplSpecific::Public
2727
* // Optionally override `isAdditionalFlowStep`.
2828
* }
2929
* ```
30+
* Conceptually, this defines a graph where the nodes are `DataFlow::Node`s and
31+
* the edges are those data-flow steps that preserve the value of the node
32+
* along with any additional edges defined by `isAdditionalFlowStep`.
33+
* Specifying nodes in `isBarrier` will remove those nodes from the graph, and
34+
* specifying nodes in `isBarrierIn` and/or `isBarrierOut` will remove in-going
35+
* and/or out-going edges from those nodes, respectively.
3036
*
3137
* Then, to query whether there is flow between some `source` and `sink`,
3238
* write
@@ -54,7 +60,10 @@ abstract class Configuration extends string {
5460
*/
5561
abstract predicate isSink(Node sink);
5662

57-
/** Holds if data flow through `node` is prohibited. */
63+
/**
64+
* Holds if data flow through `node` is prohibited. This completely removes
65+
* `node` from the data flow graph.
66+
*/
5867
predicate isBarrier(Node node) { none() }
5968

6069
/** DEPRECATED: override `isBarrierIn` and `isBarrierOut` instead. */

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ import DataFlowImplSpecific::Public
2727
* // Optionally override `isAdditionalFlowStep`.
2828
* }
2929
* ```
30+
* Conceptually, this defines a graph where the nodes are `DataFlow::Node`s and
31+
* the edges are those data-flow steps that preserve the value of the node
32+
* along with any additional edges defined by `isAdditionalFlowStep`.
33+
* Specifying nodes in `isBarrier` will remove those nodes from the graph, and
34+
* specifying nodes in `isBarrierIn` and/or `isBarrierOut` will remove in-going
35+
* and/or out-going edges from those nodes, respectively.
3036
*
3137
* Then, to query whether there is flow between some `source` and `sink`,
3238
* write
@@ -54,7 +60,10 @@ abstract class Configuration extends string {
5460
*/
5561
abstract predicate isSink(Node sink);
5662

57-
/** Holds if data flow through `node` is prohibited. */
63+
/**
64+
* Holds if data flow through `node` is prohibited. This completely removes
65+
* `node` from the data flow graph.
66+
*/
5867
predicate isBarrier(Node node) { none() }
5968

6069
/** DEPRECATED: override `isBarrierIn` and `isBarrierOut` instead. */

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ import DataFlowImplSpecific::Public
2727
* // Optionally override `isAdditionalFlowStep`.
2828
* }
2929
* ```
30+
* Conceptually, this defines a graph where the nodes are `DataFlow::Node`s and
31+
* the edges are those data-flow steps that preserve the value of the node
32+
* along with any additional edges defined by `isAdditionalFlowStep`.
33+
* Specifying nodes in `isBarrier` will remove those nodes from the graph, and
34+
* specifying nodes in `isBarrierIn` and/or `isBarrierOut` will remove in-going
35+
* and/or out-going edges from those nodes, respectively.
3036
*
3137
* Then, to query whether there is flow between some `source` and `sink`,
3238
* write
@@ -54,7 +60,10 @@ abstract class Configuration extends string {
5460
*/
5561
abstract predicate isSink(Node sink);
5662

57-
/** Holds if data flow through `node` is prohibited. */
63+
/**
64+
* Holds if data flow through `node` is prohibited. This completely removes
65+
* `node` from the data flow graph.
66+
*/
5867
predicate isBarrier(Node node) { none() }
5968

6069
/** DEPRECATED: override `isBarrierIn` and `isBarrierOut` instead. */

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ import DataFlowImplSpecific::Public
2727
* // Optionally override `isAdditionalFlowStep`.
2828
* }
2929
* ```
30+
* Conceptually, this defines a graph where the nodes are `DataFlow::Node`s and
31+
* the edges are those data-flow steps that preserve the value of the node
32+
* along with any additional edges defined by `isAdditionalFlowStep`.
33+
* Specifying nodes in `isBarrier` will remove those nodes from the graph, and
34+
* specifying nodes in `isBarrierIn` and/or `isBarrierOut` will remove in-going
35+
* and/or out-going edges from those nodes, respectively.
3036
*
3137
* Then, to query whether there is flow between some `source` and `sink`,
3238
* write
@@ -54,7 +60,10 @@ abstract class Configuration extends string {
5460
*/
5561
abstract predicate isSink(Node sink);
5662

57-
/** Holds if data flow through `node` is prohibited. */
63+
/**
64+
* Holds if data flow through `node` is prohibited. This completely removes
65+
* `node` from the data flow graph.
66+
*/
5867
predicate isBarrier(Node node) { none() }
5968

6069
/** DEPRECATED: override `isBarrierIn` and `isBarrierOut` instead. */

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ import DataFlowImplSpecific::Public
2727
* // Optionally override `isAdditionalFlowStep`.
2828
* }
2929
* ```
30+
* Conceptually, this defines a graph where the nodes are `DataFlow::Node`s and
31+
* the edges are those data-flow steps that preserve the value of the node
32+
* along with any additional edges defined by `isAdditionalFlowStep`.
33+
* Specifying nodes in `isBarrier` will remove those nodes from the graph, and
34+
* specifying nodes in `isBarrierIn` and/or `isBarrierOut` will remove in-going
35+
* and/or out-going edges from those nodes, respectively.
3036
*
3137
* Then, to query whether there is flow between some `source` and `sink`,
3238
* write
@@ -54,7 +60,10 @@ abstract class Configuration extends string {
5460
*/
5561
abstract predicate isSink(Node sink);
5662

57-
/** Holds if data flow through `node` is prohibited. */
63+
/**
64+
* Holds if data flow through `node` is prohibited. This completely removes
65+
* `node` from the data flow graph.
66+
*/
5867
predicate isBarrier(Node node) { none() }
5968

6069
/** DEPRECATED: override `isBarrierIn` and `isBarrierOut` instead. */

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ import DataFlowImplSpecific::Public
2727
* // Optionally override `isAdditionalFlowStep`.
2828
* }
2929
* ```
30+
* Conceptually, this defines a graph where the nodes are `DataFlow::Node`s and
31+
* the edges are those data-flow steps that preserve the value of the node
32+
* along with any additional edges defined by `isAdditionalFlowStep`.
33+
* Specifying nodes in `isBarrier` will remove those nodes from the graph, and
34+
* specifying nodes in `isBarrierIn` and/or `isBarrierOut` will remove in-going
35+
* and/or out-going edges from those nodes, respectively.
3036
*
3137
* Then, to query whether there is flow between some `source` and `sink`,
3238
* write
@@ -54,7 +60,10 @@ abstract class Configuration extends string {
5460
*/
5561
abstract predicate isSink(Node sink);
5662

57-
/** Holds if data flow through `node` is prohibited. */
63+
/**
64+
* Holds if data flow through `node` is prohibited. This completely removes
65+
* `node` from the data flow graph.
66+
*/
5867
predicate isBarrier(Node node) { none() }
5968

6069
/** DEPRECATED: override `isBarrierIn` and `isBarrierOut` instead. */

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ import DataFlowImplSpecific::Public
2727
* // Optionally override `isAdditionalFlowStep`.
2828
* }
2929
* ```
30+
* Conceptually, this defines a graph where the nodes are `DataFlow::Node`s and
31+
* the edges are those data-flow steps that preserve the value of the node
32+
* along with any additional edges defined by `isAdditionalFlowStep`.
33+
* Specifying nodes in `isBarrier` will remove those nodes from the graph, and
34+
* specifying nodes in `isBarrierIn` and/or `isBarrierOut` will remove in-going
35+
* and/or out-going edges from those nodes, respectively.
3036
*
3137
* Then, to query whether there is flow between some `source` and `sink`,
3238
* write
@@ -54,7 +60,10 @@ abstract class Configuration extends string {
5460
*/
5561
abstract predicate isSink(Node sink);
5662

57-
/** Holds if data flow through `node` is prohibited. */
63+
/**
64+
* Holds if data flow through `node` is prohibited. This completely removes
65+
* `node` from the data flow graph.
66+
*/
5867
predicate isBarrier(Node node) { none() }
5968

6069
/** DEPRECATED: override `isBarrierIn` and `isBarrierOut` instead. */

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ import DataFlowImplSpecific::Public
2727
* // Optionally override `isAdditionalFlowStep`.
2828
* }
2929
* ```
30+
* Conceptually, this defines a graph where the nodes are `DataFlow::Node`s and
31+
* the edges are those data-flow steps that preserve the value of the node
32+
* along with any additional edges defined by `isAdditionalFlowStep`.
33+
* Specifying nodes in `isBarrier` will remove those nodes from the graph, and
34+
* specifying nodes in `isBarrierIn` and/or `isBarrierOut` will remove in-going
35+
* and/or out-going edges from those nodes, respectively.
3036
*
3137
* Then, to query whether there is flow between some `source` and `sink`,
3238
* write
@@ -54,7 +60,10 @@ abstract class Configuration extends string {
5460
*/
5561
abstract predicate isSink(Node sink);
5662

57-
/** Holds if data flow through `node` is prohibited. */
63+
/**
64+
* Holds if data flow through `node` is prohibited. This completely removes
65+
* `node` from the data flow graph.
66+
*/
5867
predicate isBarrier(Node node) { none() }
5968

6069
/** DEPRECATED: override `isBarrierIn` and `isBarrierOut` instead. */

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ import DataFlowImplSpecific::Public
2727
* // Optionally override `isAdditionalFlowStep`.
2828
* }
2929
* ```
30+
* Conceptually, this defines a graph where the nodes are `DataFlow::Node`s and
31+
* the edges are those data-flow steps that preserve the value of the node
32+
* along with any additional edges defined by `isAdditionalFlowStep`.
33+
* Specifying nodes in `isBarrier` will remove those nodes from the graph, and
34+
* specifying nodes in `isBarrierIn` and/or `isBarrierOut` will remove in-going
35+
* and/or out-going edges from those nodes, respectively.
3036
*
3137
* Then, to query whether there is flow between some `source` and `sink`,
3238
* write
@@ -54,7 +60,10 @@ abstract class Configuration extends string {
5460
*/
5561
abstract predicate isSink(Node sink);
5662

57-
/** Holds if data flow through `node` is prohibited. */
63+
/**
64+
* Holds if data flow through `node` is prohibited. This completely removes
65+
* `node` from the data flow graph.
66+
*/
5867
predicate isBarrier(Node node) { none() }
5968

6069
/** DEPRECATED: override `isBarrierIn` and `isBarrierOut` instead. */

java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ import DataFlowImplSpecific::Public
2727
* // Optionally override `isAdditionalFlowStep`.
2828
* }
2929
* ```
30+
* Conceptually, this defines a graph where the nodes are `DataFlow::Node`s and
31+
* the edges are those data-flow steps that preserve the value of the node
32+
* along with any additional edges defined by `isAdditionalFlowStep`.
33+
* Specifying nodes in `isBarrier` will remove those nodes from the graph, and
34+
* specifying nodes in `isBarrierIn` and/or `isBarrierOut` will remove in-going
35+
* and/or out-going edges from those nodes, respectively.
3036
*
3137
* Then, to query whether there is flow between some `source` and `sink`,
3238
* write
@@ -54,7 +60,10 @@ abstract class Configuration extends string {
5460
*/
5561
abstract predicate isSink(Node sink);
5662

57-
/** Holds if data flow through `node` is prohibited. */
63+
/**
64+
* Holds if data flow through `node` is prohibited. This completely removes
65+
* `node` from the data flow graph.
66+
*/
5867
predicate isBarrier(Node node) { none() }
5968

6069
/** DEPRECATED: override `isBarrierIn` and `isBarrierOut` instead. */

0 commit comments

Comments
 (0)