Skip to content

Commit a020189

Browse files
authored
Merge pull request github#13822 from owen-mc/dataflow/mergepathgraph3-signature-fix
Dataflow: MergePathGraph3 signature fix
2 parents a98ae89 + 9b2b58a commit a020189

File tree

8 files changed

+144
-8
lines changed

8 files changed

+144
-8
lines changed

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,5 +429,22 @@ module MergePathGraph3<
429429
/**
430430
* Provides the query predicates needed to include a graph in a path-problem query.
431431
*/
432-
module PathGraph = Merged::PathGraph;
432+
module PathGraph implements PathGraphSig<PathNode> {
433+
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
434+
query predicate edges(PathNode a, PathNode b) { Merged::PathGraph::edges(a, b) }
435+
436+
/** Holds if `n` is a node in the graph of data flow path explanations. */
437+
query predicate nodes(PathNode n, string key, string val) {
438+
Merged::PathGraph::nodes(n, key, val)
439+
}
440+
441+
/**
442+
* Holds if `(arg, par, ret, out)` forms a subpath-tuple, that is, flow through
443+
* a subpath between `par` and `ret` with the connecting edges `arg -> par` and
444+
* `ret -> out` is summarized as the edge `arg -> out`.
445+
*/
446+
query predicate subpaths(PathNode arg, PathNode par, PathNode ret, PathNode out) {
447+
Merged::PathGraph::subpaths(arg, par, ret, out)
448+
}
449+
}
433450
}

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,5 +429,22 @@ module MergePathGraph3<
429429
/**
430430
* Provides the query predicates needed to include a graph in a path-problem query.
431431
*/
432-
module PathGraph = Merged::PathGraph;
432+
module PathGraph implements PathGraphSig<PathNode> {
433+
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
434+
query predicate edges(PathNode a, PathNode b) { Merged::PathGraph::edges(a, b) }
435+
436+
/** Holds if `n` is a node in the graph of data flow path explanations. */
437+
query predicate nodes(PathNode n, string key, string val) {
438+
Merged::PathGraph::nodes(n, key, val)
439+
}
440+
441+
/**
442+
* Holds if `(arg, par, ret, out)` forms a subpath-tuple, that is, flow through
443+
* a subpath between `par` and `ret` with the connecting edges `arg -> par` and
444+
* `ret -> out` is summarized as the edge `arg -> out`.
445+
*/
446+
query predicate subpaths(PathNode arg, PathNode par, PathNode ret, PathNode out) {
447+
Merged::PathGraph::subpaths(arg, par, ret, out)
448+
}
449+
}
433450
}

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,5 +429,22 @@ module MergePathGraph3<
429429
/**
430430
* Provides the query predicates needed to include a graph in a path-problem query.
431431
*/
432-
module PathGraph = Merged::PathGraph;
432+
module PathGraph implements PathGraphSig<PathNode> {
433+
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
434+
query predicate edges(PathNode a, PathNode b) { Merged::PathGraph::edges(a, b) }
435+
436+
/** Holds if `n` is a node in the graph of data flow path explanations. */
437+
query predicate nodes(PathNode n, string key, string val) {
438+
Merged::PathGraph::nodes(n, key, val)
439+
}
440+
441+
/**
442+
* Holds if `(arg, par, ret, out)` forms a subpath-tuple, that is, flow through
443+
* a subpath between `par` and `ret` with the connecting edges `arg -> par` and
444+
* `ret -> out` is summarized as the edge `arg -> out`.
445+
*/
446+
query predicate subpaths(PathNode arg, PathNode par, PathNode ret, PathNode out) {
447+
Merged::PathGraph::subpaths(arg, par, ret, out)
448+
}
449+
}
433450
}

go/ql/lib/semmle/go/dataflow/internal/DataFlow.qll

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,5 +429,22 @@ module MergePathGraph3<
429429
/**
430430
* Provides the query predicates needed to include a graph in a path-problem query.
431431
*/
432-
module PathGraph = Merged::PathGraph;
432+
module PathGraph implements PathGraphSig<PathNode> {
433+
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
434+
query predicate edges(PathNode a, PathNode b) { Merged::PathGraph::edges(a, b) }
435+
436+
/** Holds if `n` is a node in the graph of data flow path explanations. */
437+
query predicate nodes(PathNode n, string key, string val) {
438+
Merged::PathGraph::nodes(n, key, val)
439+
}
440+
441+
/**
442+
* Holds if `(arg, par, ret, out)` forms a subpath-tuple, that is, flow through
443+
* a subpath between `par` and `ret` with the connecting edges `arg -> par` and
444+
* `ret -> out` is summarized as the edge `arg -> out`.
445+
*/
446+
query predicate subpaths(PathNode arg, PathNode par, PathNode ret, PathNode out) {
447+
Merged::PathGraph::subpaths(arg, par, ret, out)
448+
}
449+
}
433450
}

java/ql/lib/semmle/code/java/dataflow/internal/DataFlow.qll

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,5 +429,22 @@ module MergePathGraph3<
429429
/**
430430
* Provides the query predicates needed to include a graph in a path-problem query.
431431
*/
432-
module PathGraph = Merged::PathGraph;
432+
module PathGraph implements PathGraphSig<PathNode> {
433+
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
434+
query predicate edges(PathNode a, PathNode b) { Merged::PathGraph::edges(a, b) }
435+
436+
/** Holds if `n` is a node in the graph of data flow path explanations. */
437+
query predicate nodes(PathNode n, string key, string val) {
438+
Merged::PathGraph::nodes(n, key, val)
439+
}
440+
441+
/**
442+
* Holds if `(arg, par, ret, out)` forms a subpath-tuple, that is, flow through
443+
* a subpath between `par` and `ret` with the connecting edges `arg -> par` and
444+
* `ret -> out` is summarized as the edge `arg -> out`.
445+
*/
446+
query predicate subpaths(PathNode arg, PathNode par, PathNode ret, PathNode out) {
447+
Merged::PathGraph::subpaths(arg, par, ret, out)
448+
}
449+
}
433450
}

python/ql/lib/semmle/python/dataflow/new/internal/DataFlow.qll

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,5 +429,22 @@ module MergePathGraph3<
429429
/**
430430
* Provides the query predicates needed to include a graph in a path-problem query.
431431
*/
432-
module PathGraph = Merged::PathGraph;
432+
module PathGraph implements PathGraphSig<PathNode> {
433+
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
434+
query predicate edges(PathNode a, PathNode b) { Merged::PathGraph::edges(a, b) }
435+
436+
/** Holds if `n` is a node in the graph of data flow path explanations. */
437+
query predicate nodes(PathNode n, string key, string val) {
438+
Merged::PathGraph::nodes(n, key, val)
439+
}
440+
441+
/**
442+
* Holds if `(arg, par, ret, out)` forms a subpath-tuple, that is, flow through
443+
* a subpath between `par` and `ret` with the connecting edges `arg -> par` and
444+
* `ret -> out` is summarized as the edge `arg -> out`.
445+
*/
446+
query predicate subpaths(PathNode arg, PathNode par, PathNode ret, PathNode out) {
447+
Merged::PathGraph::subpaths(arg, par, ret, out)
448+
}
449+
}
433450
}

ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlow.qll

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,5 +429,22 @@ module MergePathGraph3<
429429
/**
430430
* Provides the query predicates needed to include a graph in a path-problem query.
431431
*/
432-
module PathGraph = Merged::PathGraph;
432+
module PathGraph implements PathGraphSig<PathNode> {
433+
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
434+
query predicate edges(PathNode a, PathNode b) { Merged::PathGraph::edges(a, b) }
435+
436+
/** Holds if `n` is a node in the graph of data flow path explanations. */
437+
query predicate nodes(PathNode n, string key, string val) {
438+
Merged::PathGraph::nodes(n, key, val)
439+
}
440+
441+
/**
442+
* Holds if `(arg, par, ret, out)` forms a subpath-tuple, that is, flow through
443+
* a subpath between `par` and `ret` with the connecting edges `arg -> par` and
444+
* `ret -> out` is summarized as the edge `arg -> out`.
445+
*/
446+
query predicate subpaths(PathNode arg, PathNode par, PathNode ret, PathNode out) {
447+
Merged::PathGraph::subpaths(arg, par, ret, out)
448+
}
449+
}
433450
}

swift/ql/lib/codeql/swift/dataflow/internal/DataFlow.qll

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,5 +429,22 @@ module MergePathGraph3<
429429
/**
430430
* Provides the query predicates needed to include a graph in a path-problem query.
431431
*/
432-
module PathGraph = Merged::PathGraph;
432+
module PathGraph implements PathGraphSig<PathNode> {
433+
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
434+
query predicate edges(PathNode a, PathNode b) { Merged::PathGraph::edges(a, b) }
435+
436+
/** Holds if `n` is a node in the graph of data flow path explanations. */
437+
query predicate nodes(PathNode n, string key, string val) {
438+
Merged::PathGraph::nodes(n, key, val)
439+
}
440+
441+
/**
442+
* Holds if `(arg, par, ret, out)` forms a subpath-tuple, that is, flow through
443+
* a subpath between `par` and `ret` with the connecting edges `arg -> par` and
444+
* `ret -> out` is summarized as the edge `arg -> out`.
445+
*/
446+
query predicate subpaths(PathNode arg, PathNode par, PathNode ret, PathNode out) {
447+
Merged::PathGraph::subpaths(arg, par, ret, out)
448+
}
449+
}
433450
}

0 commit comments

Comments
 (0)