@@ -83,9 +83,9 @@ module Completion {
8383module CfgScope {
8484 abstract class CfgScope extends AstNode { }
8585
86- class WorkflowScope extends CfgScope instanceof WorkflowStmt { }
86+ class WorkflowScope extends CfgScope instanceof Workflow { }
8787
88- class CompositeActionScope extends CfgScope instanceof CompositeActionStmt { }
88+ class CompositeActionScope extends CfgScope instanceof CompositeAction { }
8989}
9090
9191private module Implementation implements CfgShared:: InputSig< Location > {
@@ -119,13 +119,13 @@ private module Implementation implements CfgShared::InputSig<Location> {
119119 int maxSplits ( ) { result = 0 }
120120
121121 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 )
124124 }
125125
126126 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 )
129129 }
130130
131131 predicate successorTypeIsSimple ( SuccessorType t ) { t instanceof NormalSuccessor }
@@ -143,14 +143,14 @@ private import CfgImpl
143143private import Completion
144144private import CfgScope
145145
146- private class CompositeActionTree extends StandardPreOrderTree instanceof CompositeActionStmt {
146+ private class CompositeActionTree extends StandardPreOrderTree instanceof CompositeAction {
147147 override ControlFlowTree getChildNode ( int i ) {
148148 result =
149- rank [ i ] ( Expression child , Location l |
149+ rank [ i ] ( AstNode child , Location l |
150150 (
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 ( )
154154 ) and
155155 l = child .getLocation ( )
156156 |
@@ -161,21 +161,21 @@ private class CompositeActionTree extends StandardPreOrderTree instanceof Compos
161161 }
162162}
163163
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 ) }
166166}
167167
168- private class WorkflowTree extends StandardPreOrderTree instanceof WorkflowStmt {
168+ private class WorkflowTree extends StandardPreOrderTree instanceof Workflow {
169169 override ControlFlowTree getChildNode ( int i ) {
170- if this instanceof ReusableWorkflowStmt
170+ if this instanceof ReusableWorkflow
171171 then
172172 result =
173- rank [ i ] ( Expression child , Location l |
173+ rank [ i ] ( AstNode child , Location l |
174174 (
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 ( )
179179 ) and
180180 l = child .getLocation ( )
181181 |
@@ -185,10 +185,10 @@ private class WorkflowTree extends StandardPreOrderTree instanceof WorkflowStmt
185185 )
186186 else
187187 result =
188- rank [ i ] ( Expression child , Location l |
188+ rank [ i ] ( AstNode child , Location l |
189189 (
190- child = super .getAJobStmt ( ) or
191- child = super .getStrategyStmt ( )
190+ child = super .getAJob ( ) or
191+ child = super .getStrategy ( )
192192 ) and
193193 l = child .getLocation ( )
194194 |
@@ -199,10 +199,10 @@ private class WorkflowTree extends StandardPreOrderTree instanceof WorkflowStmt
199199 }
200200}
201201
202- private class InputsTree extends StandardPreOrderTree instanceof InputsStmt {
202+ private class InputsTree extends StandardPreOrderTree instanceof Inputs {
203203 override ControlFlowTree getChildNode ( int i ) {
204204 result =
205- rank [ i ] ( Expression child , Location l |
205+ rank [ i ] ( AstNode child , Location l |
206206 child = super .getInputExpr ( _) and l = child .getLocation ( )
207207 |
208208 child
@@ -212,12 +212,10 @@ private class InputsTree extends StandardPreOrderTree instanceof InputsStmt {
212212 }
213213}
214214
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 {
218216 override ControlFlowTree getChildNode ( int i ) {
219217 result =
220- rank [ i ] ( Expression child , Location l |
218+ rank [ i ] ( AstNode child , Location l |
221219 child = super .getOutputExpr ( _) and l = child .getLocation ( )
222220 |
223221 child
@@ -227,12 +225,10 @@ private class OutputsTree extends StandardPreOrderTree instanceof OutputsStmt {
227225 }
228226}
229227
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 {
233229 override ControlFlowTree getChildNode ( int i ) {
234230 result =
235- rank [ i ] ( Expression child , Location l |
231+ rank [ i ] ( AstNode child , Location l |
236232 child = super .getMatrixVariableExpr ( _) and l = child .getLocation ( )
237233 |
238234 child
@@ -242,17 +238,15 @@ private class StrategyTree extends StandardPreOrderTree instanceof StrategyStmt
242238 }
243239}
244240
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 {
248242 override ControlFlowTree getChildNode ( int i ) {
249243 result =
250- rank [ i ] ( Expression child , Location l |
244+ rank [ i ] ( AstNode child , Location l |
251245 (
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 ( )
256250 ) and
257251 l = child .getLocation ( )
258252 |
@@ -263,12 +257,10 @@ private class JobTree extends StandardPreOrderTree instanceof JobStmt {
263257 }
264258}
265259
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 {
269261 override ControlFlowTree getChildNode ( int i ) {
270262 result =
271- rank [ i ] ( Expression child , Location l |
263+ rank [ i ] ( AstNode child , Location l |
272264 ( child = super .getArgumentExpr ( _) or child = super .getEnvExpr ( _) ) and
273265 l = child .getLocation ( )
274266 |
@@ -279,11 +271,10 @@ private class UsesTree extends StandardPreOrderTree instanceof UsesExpr {
279271 }
280272}
281273
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 {
284275 override ControlFlowTree getChildNode ( int i ) {
285276 result =
286- rank [ i ] ( Expression child , Location l |
277+ rank [ i ] ( AstNode child , Location l |
287278 ( child = super .getEnvExpr ( _) or child = super .getScriptExpr ( ) ) and
288279 l = child .getLocation ( )
289280 |
@@ -294,4 +285,16 @@ private class RunTree extends StandardPreOrderTree instanceof RunExpr {
294285 }
295286}
296287
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