Skip to content

Commit f812367

Browse files
committed
Java: Qldoc updates.
1 parent 38aba7b commit f812367

File tree

5 files changed

+26
-34
lines changed

5 files changed

+26
-34
lines changed

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,8 @@ private module ImplCommon {
588588
}
589589

590590
/**
591-
* Holds if recording a dataflow call site either improves
592-
* virtual dispatch or if we can remove unreachable edges in the dataflow graph
593-
* by recoring this call site
591+
* Holds if the call context `call` either improves virtual dispatch in
592+
* `callable` or if it allows us to prune unreachable nodes in `callable`.
594593
*/
595594
cached
596595
predicate recordDataFlowCallSite(DataFlowCall call, DataFlowCallable callable) {
@@ -631,15 +630,15 @@ private module ImplCommon {
631630
}
632631

633632
/**
634-
* A call context to restrict the targets of virtual dispatch and match the
635-
* call sites of flow into a method with flow out of a method.
633+
* A call context to restrict the targets of virtual dispatch, prune local flow,
634+
* and match the call sites of flow into a method with flow out of a method.
636635
*
637636
* There are four cases:
638637
* - `TAnyCallContext()` : No restrictions on method flow.
639638
* - `TSpecificCall(DataFlowCall call, int i)` : Flow entered through the `i`th
640639
* parameter at the given `call`. This call improves the set of viable
641640
* dispatch targets for at least one method call in the current callable
642-
* or helps to prune unreachable nodes from the data flow graph.
641+
* or helps prune unreachable nodes in the current callable.
643642
* - `TSomeCall(ParameterNode p)` : Flow entered through parameter `p`. The
644643
* originating call does not improve the set of dispatch targets for any
645644
* method call in the current callable and was therefore not recorded.
@@ -678,8 +677,7 @@ private module ImplCommon {
678677
}
679678

680679
/**
681-
* A call context that is used to restrict local data flow nodes
682-
* to nodes which are actually reachable in a call context.
680+
* A call context that is relevant for pruning local flow.
683681
*/
684682
abstract class LocalCallContext extends TLocalFlowCallContext {
685683
abstract string toString();

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,8 @@ private module ImplCommon {
588588
}
589589

590590
/**
591-
* Holds if recording a dataflow call site either improves
592-
* virtual dispatch or if we can remove unreachable edges in the dataflow graph
593-
* by recoring this call site
591+
* Holds if the call context `call` either improves virtual dispatch in
592+
* `callable` or if it allows us to prune unreachable nodes in `callable`.
594593
*/
595594
cached
596595
predicate recordDataFlowCallSite(DataFlowCall call, DataFlowCallable callable) {
@@ -631,15 +630,15 @@ private module ImplCommon {
631630
}
632631

633632
/**
634-
* A call context to restrict the targets of virtual dispatch and match the
635-
* call sites of flow into a method with flow out of a method.
633+
* A call context to restrict the targets of virtual dispatch, prune local flow,
634+
* and match the call sites of flow into a method with flow out of a method.
636635
*
637636
* There are four cases:
638637
* - `TAnyCallContext()` : No restrictions on method flow.
639638
* - `TSpecificCall(DataFlowCall call, int i)` : Flow entered through the `i`th
640639
* parameter at the given `call`. This call improves the set of viable
641640
* dispatch targets for at least one method call in the current callable
642-
* or helps to prune unreachable nodes from the data flow graph.
641+
* or helps prune unreachable nodes in the current callable.
643642
* - `TSomeCall(ParameterNode p)` : Flow entered through parameter `p`. The
644643
* originating call does not improve the set of dispatch targets for any
645644
* method call in the current callable and was therefore not recorded.
@@ -678,8 +677,7 @@ private module ImplCommon {
678677
}
679678

680679
/**
681-
* A call context that is used to restrict local data flow nodes
682-
* to nodes which are actually reachable in a call context.
680+
* A call context that is relevant for pruning local flow.
683681
*/
684682
abstract class LocalCallContext extends TLocalFlowCallContext {
685683
abstract string toString();

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,8 @@ private module ImplCommon {
588588
}
589589

590590
/**
591-
* Holds if recording a dataflow call site either improves
592-
* virtual dispatch or if we can remove unreachable edges in the dataflow graph
593-
* by recoring this call site
591+
* Holds if the call context `call` either improves virtual dispatch in
592+
* `callable` or if it allows us to prune unreachable nodes in `callable`.
594593
*/
595594
cached
596595
predicate recordDataFlowCallSite(DataFlowCall call, DataFlowCallable callable) {
@@ -631,15 +630,15 @@ private module ImplCommon {
631630
}
632631

633632
/**
634-
* A call context to restrict the targets of virtual dispatch and match the
635-
* call sites of flow into a method with flow out of a method.
633+
* A call context to restrict the targets of virtual dispatch, prune local flow,
634+
* and match the call sites of flow into a method with flow out of a method.
636635
*
637636
* There are four cases:
638637
* - `TAnyCallContext()` : No restrictions on method flow.
639638
* - `TSpecificCall(DataFlowCall call, int i)` : Flow entered through the `i`th
640639
* parameter at the given `call`. This call improves the set of viable
641640
* dispatch targets for at least one method call in the current callable
642-
* or helps to prune unreachable nodes from the data flow graph.
641+
* or helps prune unreachable nodes in the current callable.
643642
* - `TSomeCall(ParameterNode p)` : Flow entered through parameter `p`. The
644643
* originating call does not improve the set of dispatch targets for any
645644
* method call in the current callable and was therefore not recorded.
@@ -678,8 +677,7 @@ private module ImplCommon {
678677
}
679678

680679
/**
681-
* A call context that is used to restrict local data flow nodes
682-
* to nodes which are actually reachable in a call context.
680+
* A call context that is relevant for pruning local flow.
683681
*/
684682
abstract class LocalCallContext extends TLocalFlowCallContext {
685683
abstract string toString();

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,8 @@ private module ImplCommon {
588588
}
589589

590590
/**
591-
* Holds if recording a dataflow call site either improves
592-
* virtual dispatch or if we can remove unreachable edges in the dataflow graph
593-
* by recoring this call site
591+
* Holds if the call context `call` either improves virtual dispatch in
592+
* `callable` or if it allows us to prune unreachable nodes in `callable`.
594593
*/
595594
cached
596595
predicate recordDataFlowCallSite(DataFlowCall call, DataFlowCallable callable) {
@@ -631,15 +630,15 @@ private module ImplCommon {
631630
}
632631

633632
/**
634-
* A call context to restrict the targets of virtual dispatch and match the
635-
* call sites of flow into a method with flow out of a method.
633+
* A call context to restrict the targets of virtual dispatch, prune local flow,
634+
* and match the call sites of flow into a method with flow out of a method.
636635
*
637636
* There are four cases:
638637
* - `TAnyCallContext()` : No restrictions on method flow.
639638
* - `TSpecificCall(DataFlowCall call, int i)` : Flow entered through the `i`th
640639
* parameter at the given `call`. This call improves the set of viable
641640
* dispatch targets for at least one method call in the current callable
642-
* or helps to prune unreachable nodes from the data flow graph.
641+
* or helps prune unreachable nodes in the current callable.
643642
* - `TSomeCall(ParameterNode p)` : Flow entered through parameter `p`. The
644643
* originating call does not improve the set of dispatch targets for any
645644
* method call in the current callable and was therefore not recorded.
@@ -678,8 +677,7 @@ private module ImplCommon {
678677
}
679678

680679
/**
681-
* A call context that is used to restrict local data flow nodes
682-
* to nodes which are actually reachable in a call context.
680+
* A call context that is relevant for pruning local flow.
683681
*/
684682
abstract class LocalCallContext extends TLocalFlowCallContext {
685683
abstract string toString();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ class DataFlowCall extends Call {
287287
ExprNode getNode() { result.getExpr() = this }
288288
}
289289

290-
/** An expression that always has the same boolean value. */
290+
/** Holds if `e` is an expression that always has the same boolean value `val`. */
291291
private predicate constantBooleanExpr(Expr e, boolean val) {
292292
e.(CompileTimeConstantExpr).getBooleanValue() = val
293293
or
@@ -307,7 +307,7 @@ class ConstantBooleanExprNode extends ArgumentNode, ExprNode {
307307
}
308308

309309
/**
310-
* holds if the node `n` is unreachable when called from `call`
310+
* Holds if the node `n` is unreachable when the call context is `call`.
311311
*/
312312
cached
313313
predicate isUnreachableInCall(Node n, DataFlowCall call) {

0 commit comments

Comments
 (0)