Dataflow: Count callables instead of nodes for fieldFlowBranchLimit.

This commit is contained in:
Anders Schack-Mulligen
2020-10-13 10:17:32 +02:00
parent 6aae51fa4f
commit 1501a40de8
21 changed files with 252 additions and 84 deletions

View File

@@ -649,8 +649,12 @@ private predicate flowIntoCallNodeCand1(
*/
private int branch(Node n1, Configuration conf) {
result =
strictcount(Node n |
flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf)
strictcount(DataFlowCallable callable |
exists(Node n |
flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf)
|
callable = n.getEnclosingCallable()
)
)
}
@@ -661,8 +665,12 @@ private int branch(Node n1, Configuration conf) {
*/
private int join(Node n2, Configuration conf) {
result =
strictcount(Node n |
flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf)
strictcount(DataFlowCallable callable |
exists(Node n |
flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf)
|
callable = n.getEnclosingCallable()
)
)
}

View File

@@ -649,8 +649,12 @@ private predicate flowIntoCallNodeCand1(
*/
private int branch(Node n1, Configuration conf) {
result =
strictcount(Node n |
flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf)
strictcount(DataFlowCallable callable |
exists(Node n |
flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf)
|
callable = n.getEnclosingCallable()
)
)
}
@@ -661,8 +665,12 @@ private int branch(Node n1, Configuration conf) {
*/
private int join(Node n2, Configuration conf) {
result =
strictcount(Node n |
flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf)
strictcount(DataFlowCallable callable |
exists(Node n |
flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf)
|
callable = n.getEnclosingCallable()
)
)
}