Skip to content

Commit 5e0ce81

Browse files
committed
Java: Refactor to improve join-pipeline.
1 parent 20084fb commit 5e0ce81

File tree

19 files changed

+114
-95
lines changed

19 files changed

+114
-95
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,16 +1734,17 @@ private class PathNodeSink extends PathNode, TPathNodeSink {
17341734
* a callable is recorded by `cc`.
17351735
*/
17361736
private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, AccessPath ap) {
1737-
exists(LocalCallContext localCC, AccessPath ap0, boolean preservesValue |
1738-
localCC = getLocalCallContext(cc, mid.getNode().getEnclosingCallable()) and
1739-
localFlowBigStep(mid.getNode(), node, preservesValue, mid.getConfiguration(), localCC) and
1737+
exists(LocalCallContext localCC, AccessPath ap0, Node midnode, Configuration conf |
1738+
midnode = mid.getNode() and
1739+
conf = mid.getConfiguration() and
17401740
cc = mid.getCallContext() and
1741+
localCC = getLocalCallContext(cc, midnode.getEnclosingCallable()) and
17411742
ap0 = mid.getAp()
17421743
|
1743-
preservesValue = true and
1744+
localFlowBigStep(midnode, node, true, conf, localCC) and
17441745
ap = ap0
17451746
or
1746-
preservesValue = false and
1747+
localFlowBigStep(midnode, node, false, conf, localCC) and
17471748
ap0 instanceof AccessPathNil and
17481749
ap = node.(AccessPathNilNode).getAp()
17491750
)

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,16 +1734,17 @@ private class PathNodeSink extends PathNode, TPathNodeSink {
17341734
* a callable is recorded by `cc`.
17351735
*/
17361736
private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, AccessPath ap) {
1737-
exists(LocalCallContext localCC, AccessPath ap0, boolean preservesValue |
1738-
localCC = getLocalCallContext(cc, mid.getNode().getEnclosingCallable()) and
1739-
localFlowBigStep(mid.getNode(), node, preservesValue, mid.getConfiguration(), localCC) and
1737+
exists(LocalCallContext localCC, AccessPath ap0, Node midnode, Configuration conf |
1738+
midnode = mid.getNode() and
1739+
conf = mid.getConfiguration() and
17401740
cc = mid.getCallContext() and
1741+
localCC = getLocalCallContext(cc, midnode.getEnclosingCallable()) and
17411742
ap0 = mid.getAp()
17421743
|
1743-
preservesValue = true and
1744+
localFlowBigStep(midnode, node, true, conf, localCC) and
17441745
ap = ap0
17451746
or
1746-
preservesValue = false and
1747+
localFlowBigStep(midnode, node, false, conf, localCC) and
17471748
ap0 instanceof AccessPathNil and
17481749
ap = node.(AccessPathNilNode).getAp()
17491750
)

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,16 +1734,17 @@ private class PathNodeSink extends PathNode, TPathNodeSink {
17341734
* a callable is recorded by `cc`.
17351735
*/
17361736
private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, AccessPath ap) {
1737-
exists(LocalCallContext localCC, AccessPath ap0, boolean preservesValue |
1738-
localCC = getLocalCallContext(cc, mid.getNode().getEnclosingCallable()) and
1739-
localFlowBigStep(mid.getNode(), node, preservesValue, mid.getConfiguration(), localCC) and
1737+
exists(LocalCallContext localCC, AccessPath ap0, Node midnode, Configuration conf |
1738+
midnode = mid.getNode() and
1739+
conf = mid.getConfiguration() and
17401740
cc = mid.getCallContext() and
1741+
localCC = getLocalCallContext(cc, midnode.getEnclosingCallable()) and
17411742
ap0 = mid.getAp()
17421743
|
1743-
preservesValue = true and
1744+
localFlowBigStep(midnode, node, true, conf, localCC) and
17441745
ap = ap0
17451746
or
1746-
preservesValue = false and
1747+
localFlowBigStep(midnode, node, false, conf, localCC) and
17471748
ap0 instanceof AccessPathNil and
17481749
ap = node.(AccessPathNilNode).getAp()
17491750
)

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,16 +1734,17 @@ private class PathNodeSink extends PathNode, TPathNodeSink {
17341734
* a callable is recorded by `cc`.
17351735
*/
17361736
private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, AccessPath ap) {
1737-
exists(LocalCallContext localCC, AccessPath ap0, boolean preservesValue |
1738-
localCC = getLocalCallContext(cc, mid.getNode().getEnclosingCallable()) and
1739-
localFlowBigStep(mid.getNode(), node, preservesValue, mid.getConfiguration(), localCC) and
1737+
exists(LocalCallContext localCC, AccessPath ap0, Node midnode, Configuration conf |
1738+
midnode = mid.getNode() and
1739+
conf = mid.getConfiguration() and
17401740
cc = mid.getCallContext() and
1741+
localCC = getLocalCallContext(cc, midnode.getEnclosingCallable()) and
17411742
ap0 = mid.getAp()
17421743
|
1743-
preservesValue = true and
1744+
localFlowBigStep(midnode, node, true, conf, localCC) and
17441745
ap = ap0
17451746
or
1746-
preservesValue = false and
1747+
localFlowBigStep(midnode, node, false, conf, localCC) and
17471748
ap0 instanceof AccessPathNil and
17481749
ap = node.(AccessPathNilNode).getAp()
17491750
)

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,16 +1734,17 @@ private class PathNodeSink extends PathNode, TPathNodeSink {
17341734
* a callable is recorded by `cc`.
17351735
*/
17361736
private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, AccessPath ap) {
1737-
exists(LocalCallContext localCC, AccessPath ap0, boolean preservesValue |
1738-
localCC = getLocalCallContext(cc, mid.getNode().getEnclosingCallable()) and
1739-
localFlowBigStep(mid.getNode(), node, preservesValue, mid.getConfiguration(), localCC) and
1737+
exists(LocalCallContext localCC, AccessPath ap0, Node midnode, Configuration conf |
1738+
midnode = mid.getNode() and
1739+
conf = mid.getConfiguration() and
17401740
cc = mid.getCallContext() and
1741+
localCC = getLocalCallContext(cc, midnode.getEnclosingCallable()) and
17411742
ap0 = mid.getAp()
17421743
|
1743-
preservesValue = true and
1744+
localFlowBigStep(midnode, node, true, conf, localCC) and
17441745
ap = ap0
17451746
or
1746-
preservesValue = false and
1747+
localFlowBigStep(midnode, node, false, conf, localCC) and
17471748
ap0 instanceof AccessPathNil and
17481749
ap = node.(AccessPathNilNode).getAp()
17491750
)

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,16 +1734,17 @@ private class PathNodeSink extends PathNode, TPathNodeSink {
17341734
* a callable is recorded by `cc`.
17351735
*/
17361736
private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, AccessPath ap) {
1737-
exists(LocalCallContext localCC, AccessPath ap0, boolean preservesValue |
1738-
localCC = getLocalCallContext(cc, mid.getNode().getEnclosingCallable()) and
1739-
localFlowBigStep(mid.getNode(), node, preservesValue, mid.getConfiguration(), localCC) and
1737+
exists(LocalCallContext localCC, AccessPath ap0, Node midnode, Configuration conf |
1738+
midnode = mid.getNode() and
1739+
conf = mid.getConfiguration() and
17401740
cc = mid.getCallContext() and
1741+
localCC = getLocalCallContext(cc, midnode.getEnclosingCallable()) and
17411742
ap0 = mid.getAp()
17421743
|
1743-
preservesValue = true and
1744+
localFlowBigStep(midnode, node, true, conf, localCC) and
17441745
ap = ap0
17451746
or
1746-
preservesValue = false and
1747+
localFlowBigStep(midnode, node, false, conf, localCC) and
17471748
ap0 instanceof AccessPathNil and
17481749
ap = node.(AccessPathNilNode).getAp()
17491750
)

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,16 +1734,17 @@ private class PathNodeSink extends PathNode, TPathNodeSink {
17341734
* a callable is recorded by `cc`.
17351735
*/
17361736
private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, AccessPath ap) {
1737-
exists(LocalCallContext localCC, AccessPath ap0, boolean preservesValue |
1738-
localCC = getLocalCallContext(cc, mid.getNode().getEnclosingCallable()) and
1739-
localFlowBigStep(mid.getNode(), node, preservesValue, mid.getConfiguration(), localCC) and
1737+
exists(LocalCallContext localCC, AccessPath ap0, Node midnode, Configuration conf |
1738+
midnode = mid.getNode() and
1739+
conf = mid.getConfiguration() and
17401740
cc = mid.getCallContext() and
1741+
localCC = getLocalCallContext(cc, midnode.getEnclosingCallable()) and
17411742
ap0 = mid.getAp()
17421743
|
1743-
preservesValue = true and
1744+
localFlowBigStep(midnode, node, true, conf, localCC) and
17441745
ap = ap0
17451746
or
1746-
preservesValue = false and
1747+
localFlowBigStep(midnode, node, false, conf, localCC) and
17471748
ap0 instanceof AccessPathNil and
17481749
ap = node.(AccessPathNilNode).getAp()
17491750
)

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,16 +1734,17 @@ private class PathNodeSink extends PathNode, TPathNodeSink {
17341734
* a callable is recorded by `cc`.
17351735
*/
17361736
private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, AccessPath ap) {
1737-
exists(LocalCallContext localCC, AccessPath ap0, boolean preservesValue |
1738-
localCC = getLocalCallContext(cc, mid.getNode().getEnclosingCallable()) and
1739-
localFlowBigStep(mid.getNode(), node, preservesValue, mid.getConfiguration(), localCC) and
1737+
exists(LocalCallContext localCC, AccessPath ap0, Node midnode, Configuration conf |
1738+
midnode = mid.getNode() and
1739+
conf = mid.getConfiguration() and
17401740
cc = mid.getCallContext() and
1741+
localCC = getLocalCallContext(cc, midnode.getEnclosingCallable()) and
17411742
ap0 = mid.getAp()
17421743
|
1743-
preservesValue = true and
1744+
localFlowBigStep(midnode, node, true, conf, localCC) and
17441745
ap = ap0
17451746
or
1746-
preservesValue = false and
1747+
localFlowBigStep(midnode, node, false, conf, localCC) and
17471748
ap0 instanceof AccessPathNil and
17481749
ap = node.(AccessPathNilNode).getAp()
17491750
)

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,16 +1734,17 @@ private class PathNodeSink extends PathNode, TPathNodeSink {
17341734
* a callable is recorded by `cc`.
17351735
*/
17361736
private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, AccessPath ap) {
1737-
exists(LocalCallContext localCC, AccessPath ap0, boolean preservesValue |
1738-
localCC = getLocalCallContext(cc, mid.getNode().getEnclosingCallable()) and
1739-
localFlowBigStep(mid.getNode(), node, preservesValue, mid.getConfiguration(), localCC) and
1737+
exists(LocalCallContext localCC, AccessPath ap0, Node midnode, Configuration conf |
1738+
midnode = mid.getNode() and
1739+
conf = mid.getConfiguration() and
17401740
cc = mid.getCallContext() and
1741+
localCC = getLocalCallContext(cc, midnode.getEnclosingCallable()) and
17411742
ap0 = mid.getAp()
17421743
|
1743-
preservesValue = true and
1744+
localFlowBigStep(midnode, node, true, conf, localCC) and
17441745
ap = ap0
17451746
or
1746-
preservesValue = false and
1747+
localFlowBigStep(midnode, node, false, conf, localCC) and
17471748
ap0 instanceof AccessPathNil and
17481749
ap = node.(AccessPathNilNode).getAp()
17491750
)

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,16 +1734,17 @@ private class PathNodeSink extends PathNode, TPathNodeSink {
17341734
* a callable is recorded by `cc`.
17351735
*/
17361736
private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, AccessPath ap) {
1737-
exists(LocalCallContext localCC, AccessPath ap0, boolean preservesValue |
1738-
localCC = getLocalCallContext(cc, mid.getNode().getEnclosingCallable()) and
1739-
localFlowBigStep(mid.getNode(), node, preservesValue, mid.getConfiguration(), localCC) and
1737+
exists(LocalCallContext localCC, AccessPath ap0, Node midnode, Configuration conf |
1738+
midnode = mid.getNode() and
1739+
conf = mid.getConfiguration() and
17401740
cc = mid.getCallContext() and
1741+
localCC = getLocalCallContext(cc, midnode.getEnclosingCallable()) and
17411742
ap0 = mid.getAp()
17421743
|
1743-
preservesValue = true and
1744+
localFlowBigStep(midnode, node, true, conf, localCC) and
17441745
ap = ap0
17451746
or
1746-
preservesValue = false and
1747+
localFlowBigStep(midnode, node, false, conf, localCC) and
17471748
ap0 instanceof AccessPathNil and
17481749
ap = node.(AccessPathNilNode).getAp()
17491750
)

0 commit comments

Comments
 (0)