File tree Expand file tree Collapse file tree
src/experimental/dataflow/internal
test/experimental/dataflow/regression Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,19 @@ module EssaFlow {
4242 // nodeTo is `x`, essa var
4343 nodeFrom .asCfgNode ( ) = nodeTo .asEssaNode ( ) .getDefinition ( ) .( AssignmentDefinition ) .getValue ( )
4444 or
45+ // With definition
46+ // `with f(42) as x:`
47+ // nodeFrom is `f(42)`, cfg node
48+ // nodeTo is `x`, essa var
49+ exists ( With with , ControlFlowNode contextManager , ControlFlowNode var |
50+ nodeFrom .asCfgNode ( ) = contextManager and
51+ nodeTo .asEssaNode ( ) .getDefinition ( ) .( WithDefinition ) .getDefiningNode ( ) = var and
52+ // see `with_flow`
53+ with .getContextExpr ( ) = contextManager .getNode ( ) and
54+ with .getOptionalVars ( ) = var .getNode ( ) and
55+ contextManager .strictlyDominates ( var )
56+ )
57+ or
4558 // Use
4659 // `y = 42`
4760 // `x = f(y)`
Original file line number Diff line number Diff line change 66| test.py:37:13:37:18 | ControlFlowNode for SOURCE | test.py:41:14:41:14 | ControlFlowNode for t |
77| test.py:76:9:76:14 | ControlFlowNode for SOURCE | test.py:78:10:78:10 | ControlFlowNode for t |
88| test.py:108:13:108:18 | ControlFlowNode for SOURCE | test.py:112:14:112:14 | ControlFlowNode for t |
9+ | test.py:139:10:139:15 | ControlFlowNode for SOURCE | test.py:140:14:140:14 | ControlFlowNode for t |
910| test.py:143:9:143:14 | ControlFlowNode for SOURCE | test.py:145:10:145:10 | ControlFlowNode for s |
1011| test.py:158:9:158:14 | ControlFlowNode for SOURCE | test.py:160:14:160:14 | ControlFlowNode for t |
1112| test.py:158:9:158:14 | ControlFlowNode for SOURCE | test.py:162:14:162:14 | ControlFlowNode for t |
Original file line number Diff line number Diff line change 44 DataFlow:: Node source ,
55 DataFlow:: Node sink
66where
7- // source != sink and
87 exists ( TestConfiguration cfg | cfg .hasFlow ( source , sink ) )
98select
109 source , sink
You can’t perform that action at this time.
0 commit comments