@@ -83,9 +83,9 @@ module Completion {
83
83
module CfgScope {
84
84
abstract class CfgScope extends AstNode { }
85
85
86
- class WorkflowScope extends CfgScope instanceof WorkflowStmt { }
86
+ class WorkflowScope extends CfgScope instanceof Workflow { }
87
87
88
- class CompositeActionScope extends CfgScope instanceof CompositeActionStmt { }
88
+ class CompositeActionScope extends CfgScope instanceof CompositeAction { }
89
89
}
90
90
91
91
private module Implementation implements CfgShared:: InputSig< Location > {
@@ -119,13 +119,13 @@ private module Implementation implements CfgShared::InputSig<Location> {
119
119
int maxSplits ( ) { result = 0 }
120
120
121
121
predicate scopeFirst ( CfgScope scope , AstNode e ) {
122
- first ( scope .( WorkflowStmt ) , e ) or
123
- first ( scope .( CompositeActionStmt ) , e )
122
+ first ( scope .( Workflow ) , e ) or
123
+ first ( scope .( CompositeAction ) , e )
124
124
}
125
125
126
126
predicate scopeLast ( CfgScope scope , AstNode e , Completion c ) {
127
- last ( scope .( WorkflowStmt ) , e , c ) or
128
- last ( scope .( CompositeActionStmt ) , e , c )
127
+ last ( scope .( Workflow ) , e , c ) or
128
+ last ( scope .( CompositeAction ) , e , c )
129
129
}
130
130
131
131
predicate successorTypeIsSimple ( SuccessorType t ) { t instanceof NormalSuccessor }
@@ -143,14 +143,14 @@ private import CfgImpl
143
143
private import Completion
144
144
private import CfgScope
145
145
146
- private class CompositeActionTree extends StandardPreOrderTree instanceof CompositeActionStmt {
146
+ private class CompositeActionTree extends StandardPreOrderTree instanceof CompositeAction {
147
147
override ControlFlowTree getChildNode ( int i ) {
148
148
result =
149
- rank [ i ] ( Expression child , Location l |
149
+ rank [ i ] ( AstNode child , Location l |
150
150
(
151
- child = this .( CompositeActionStmt ) . getInputsStmt ( ) or
152
- child = this .( CompositeActionStmt ) . getOutputsStmt ( ) or
153
- child = this .( CompositeActionStmt ) . getRunsStmt ( )
151
+ child = this .( CompositeAction ) . getInputs ( ) or
152
+ child = this .( CompositeAction ) . getOutputs ( ) or
153
+ child = this .( CompositeAction ) . getRuns ( )
154
154
) and
155
155
l = child .getLocation ( )
156
156
|
@@ -161,21 +161,21 @@ private class CompositeActionTree extends StandardPreOrderTree instanceof Compos
161
161
}
162
162
}
163
163
164
- private class RunsTree extends StandardPreOrderTree instanceof RunsStmt {
165
- override ControlFlowTree getChildNode ( int i ) { result = super .getStepStmt ( i ) }
164
+ private class RunsTree extends StandardPreOrderTree instanceof Runs {
165
+ override ControlFlowTree getChildNode ( int i ) { result = super .getStep ( i ) }
166
166
}
167
167
168
- private class WorkflowTree extends StandardPreOrderTree instanceof WorkflowStmt {
168
+ private class WorkflowTree extends StandardPreOrderTree instanceof Workflow {
169
169
override ControlFlowTree getChildNode ( int i ) {
170
- if this instanceof ReusableWorkflowStmt
170
+ if this instanceof ReusableWorkflow
171
171
then
172
172
result =
173
- rank [ i ] ( Expression child , Location l |
173
+ rank [ i ] ( AstNode child , Location l |
174
174
(
175
- child = this .( ReusableWorkflowStmt ) . getInputsStmt ( ) or
176
- child = this .( ReusableWorkflowStmt ) . getOutputsStmt ( ) or
177
- child = this .( ReusableWorkflowStmt ) . getStrategyStmt ( ) or
178
- child = this .( ReusableWorkflowStmt ) . getAJobStmt ( )
175
+ child = this .( ReusableWorkflow ) . getInputs ( ) or
176
+ child = this .( ReusableWorkflow ) . getOutputs ( ) or
177
+ child = this .( ReusableWorkflow ) . getStrategy ( ) or
178
+ child = this .( ReusableWorkflow ) . getAJob ( )
179
179
) and
180
180
l = child .getLocation ( )
181
181
|
@@ -185,10 +185,10 @@ private class WorkflowTree extends StandardPreOrderTree instanceof WorkflowStmt
185
185
)
186
186
else
187
187
result =
188
- rank [ i ] ( Expression child , Location l |
188
+ rank [ i ] ( AstNode child , Location l |
189
189
(
190
- child = super .getAJobStmt ( ) or
191
- child = super .getStrategyStmt ( )
190
+ child = super .getAJob ( ) or
191
+ child = super .getStrategy ( )
192
192
) and
193
193
l = child .getLocation ( )
194
194
|
@@ -199,10 +199,10 @@ private class WorkflowTree extends StandardPreOrderTree instanceof WorkflowStmt
199
199
}
200
200
}
201
201
202
- private class InputsTree extends StandardPreOrderTree instanceof InputsStmt {
202
+ private class InputsTree extends StandardPreOrderTree instanceof Inputs {
203
203
override ControlFlowTree getChildNode ( int i ) {
204
204
result =
205
- rank [ i ] ( Expression child , Location l |
205
+ rank [ i ] ( AstNode child , Location l |
206
206
child = super .getInputExpr ( _) and l = child .getLocation ( )
207
207
|
208
208
child
@@ -212,12 +212,10 @@ private class InputsTree extends StandardPreOrderTree instanceof InputsStmt {
212
212
}
213
213
}
214
214
215
- private class InputExprTree extends LeafTree instanceof InputExpr { }
216
-
217
- private class OutputsTree extends StandardPreOrderTree instanceof OutputsStmt {
215
+ private class OutputsTree extends StandardPreOrderTree instanceof Outputs {
218
216
override ControlFlowTree getChildNode ( int i ) {
219
217
result =
220
- rank [ i ] ( Expression child , Location l |
218
+ rank [ i ] ( AstNode child , Location l |
221
219
child = super .getOutputExpr ( _) and l = child .getLocation ( )
222
220
|
223
221
child
@@ -227,12 +225,10 @@ private class OutputsTree extends StandardPreOrderTree instanceof OutputsStmt {
227
225
}
228
226
}
229
227
230
- private class OutputExprTree extends LeafTree instanceof OutputExpr { }
231
-
232
- private class StrategyTree extends StandardPreOrderTree instanceof StrategyStmt {
228
+ private class StrategyTree extends StandardPreOrderTree instanceof Strategy {
233
229
override ControlFlowTree getChildNode ( int i ) {
234
230
result =
235
- rank [ i ] ( Expression child , Location l |
231
+ rank [ i ] ( AstNode child , Location l |
236
232
child = super .getMatrixVariableExpr ( _) and l = child .getLocation ( )
237
233
|
238
234
child
@@ -242,17 +238,15 @@ private class StrategyTree extends StandardPreOrderTree instanceof StrategyStmt
242
238
}
243
239
}
244
240
245
- private class MatrixVariableExprTree extends LeafTree instanceof MatrixVariableExpr { }
246
-
247
- private class JobTree extends StandardPreOrderTree instanceof JobStmt {
241
+ private class JobTree extends StandardPreOrderTree instanceof Job {
248
242
override ControlFlowTree getChildNode ( int i ) {
249
243
result =
250
- rank [ i ] ( Expression child , Location l |
244
+ rank [ i ] ( AstNode child , Location l |
251
245
(
252
- child = super .getAStepStmt ( ) or
253
- child = super .getOutputsStmt ( ) or
254
- child = super .getStrategyStmt ( ) or
255
- child = super .getUsesExpr ( )
246
+ child = super .getAStep ( ) or
247
+ child = super .getOutputs ( ) or
248
+ child = super .getStrategy ( ) or
249
+ child = super .getUses ( )
256
250
) and
257
251
l = child .getLocation ( )
258
252
|
@@ -263,12 +257,10 @@ private class JobTree extends StandardPreOrderTree instanceof JobStmt {
263
257
}
264
258
}
265
259
266
- private class UsesExprTree extends LeafTree instanceof UsesExpr { }
267
-
268
- private class UsesTree extends StandardPreOrderTree instanceof UsesExpr {
260
+ private class UsesTree extends StandardPreOrderTree instanceof Uses {
269
261
override ControlFlowTree getChildNode ( int i ) {
270
262
result =
271
- rank [ i ] ( Expression child , Location l |
263
+ rank [ i ] ( AstNode child , Location l |
272
264
( child = super .getArgumentExpr ( _) or child = super .getEnvExpr ( _) ) and
273
265
l = child .getLocation ( )
274
266
|
@@ -279,11 +271,10 @@ private class UsesTree extends StandardPreOrderTree instanceof UsesExpr {
279
271
}
280
272
}
281
273
282
- private class RunTree extends StandardPreOrderTree instanceof RunExpr {
283
- //override ControlFlowTree getChildNode(int i) { result = super.getScriptExpr() and i = 0 }
274
+ private class RunTree extends StandardPreOrderTree instanceof Run {
284
275
override ControlFlowTree getChildNode ( int i ) {
285
276
result =
286
- rank [ i ] ( Expression child , Location l |
277
+ rank [ i ] ( AstNode child , Location l |
287
278
( child = super .getEnvExpr ( _) or child = super .getScriptExpr ( ) ) and
288
279
l = child .getLocation ( )
289
280
|
@@ -294,4 +285,16 @@ private class RunTree extends StandardPreOrderTree instanceof RunExpr {
294
285
}
295
286
}
296
287
297
- private class ExprAccessTree extends LeafTree instanceof ExprAccessExpr { }
288
+ private class UsesLeaf extends LeafTree instanceof Uses { }
289
+
290
+ private class InputExprTree extends LeafTree instanceof InputExpr { }
291
+
292
+ private class OutputExprTree extends LeafTree instanceof OutputExpr { }
293
+
294
+ private class MatrixVariableExprTree extends LeafTree instanceof MatrixVariableExpr { }
295
+
296
+ private class EnvExprTree extends LeafTree instanceof EnvExpr { }
297
+
298
+ private class ExprAccessTree extends LeafTree instanceof ContextExpression { }
299
+
300
+ private class AstNodeLeaf extends LeafTree instanceof Expression { }
0 commit comments