File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
shared/dataflow/codeql/dataflow Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -727,6 +727,35 @@ module DataFlowMake<LocationSig Location, InputSig<Location> Lang> {
727
727
728
728
import PathGraphSigMod
729
729
730
+ private module GetPathGraph< GlobalFlowSig Flow> implements PathGraphSig< Flow:: PathNode > {
731
+ import Flow
732
+ }
733
+
734
+ /**
735
+ * Constructs a graph containing the disjoint union of two graphs.
736
+ */
737
+ module MergeFlows< GlobalFlowSig Graph1, GlobalFlowSig Graph2> implements GlobalFlowSig {
738
+ private module PathGraph1 = GetPathGraph< Graph1 > ;
739
+
740
+ private module PathGraph2 = GetPathGraph< Graph2 > ;
741
+
742
+ import MergePathGraph< Graph1:: PathNode , Graph2:: PathNode , PathGraph1 , PathGraph2 >
743
+ import PathGraph
744
+
745
+ predicate flowPath ( PathNode source , PathNode sink ) {
746
+ Graph1:: flowPath ( source .asPathNode1 ( ) , sink .asPathNode1 ( ) ) or
747
+ Graph2:: flowPath ( source .asPathNode2 ( ) , sink .asPathNode2 ( ) )
748
+ }
749
+
750
+ predicate flow ( Node source , Node sink ) {
751
+ Graph1:: flow ( source , sink ) or Graph2:: flow ( source , sink )
752
+ }
753
+
754
+ predicate flowTo ( Node sink ) { Graph1:: flowTo ( sink ) or Graph2:: flowTo ( sink ) }
755
+
756
+ predicate flowToExpr ( DataFlowExpr sink ) { Graph1:: flowToExpr ( sink ) or Graph2:: flowToExpr ( sink ) }
757
+ }
758
+
730
759
/**
731
760
* Constructs a `PathGraph` from two `PathGraph`s by disjoint union.
732
761
*/
You can’t perform that action at this time.
0 commit comments