@@ -74,7 +74,7 @@ float getAnUpperBound(Expr expr) {
74
74
result = getAnUpperBound ( greater .asExpr ( ) ) + bias
75
75
)
76
76
else
77
- //If not, find the coresponding `SsaDefinition`, then call `getAnSsaUpperBound` on it.
77
+ //If not, find the corresponding `SsaDefinition`, then call `getAnSsaUpperBound` on it.
78
78
result = getAnSsaUpperBound ( v .getDefinition ( ) )
79
79
)
80
80
)
@@ -231,7 +231,7 @@ float getALowerBound(Expr expr) {
231
231
result = lbs - bias
232
232
)
233
233
else
234
- //find coresponding SSA definition and calls `getAnSsaLowerBound` on it.
234
+ //find corresponding SSA definition and calls `getAnSsaLowerBound` on it.
235
235
result = getAnSsaLowerBound ( v .getDefinition ( ) )
236
236
)
237
237
)
@@ -351,7 +351,7 @@ float getAnSsaUpperBound(SsaDefinition def) {
351
351
(
352
352
def instanceof SsaExplicitDefinition and
353
353
exists ( SsaExplicitDefinition explicitDef | explicitDef = def |
354
- //SSA definition coresponding to a `SimpleAssignStmt`
354
+ //SSA definition corresponding to a `SimpleAssignStmt`
355
355
if explicitDef .getInstruction ( ) instanceof IR:: AssignInstruction
356
356
then
357
357
exists ( IR:: AssignInstruction assignInstr , SimpleAssignStmt simpleAssign |
@@ -360,15 +360,15 @@ float getAnSsaUpperBound(SsaDefinition def) {
360
360
result = getAnUpperBound ( simpleAssign .getRhs ( ) )
361
361
)
362
362
or
363
- //SSA definition coresponding to a ValueSpec(used in a variable declaration)
363
+ //SSA definition corresponding to a ValueSpec(used in a variable declaration)
364
364
exists ( IR:: AssignInstruction declInstr , ValueSpec vs , int i , Expr init |
365
365
declInstr = explicitDef .getInstruction ( ) and
366
366
declInstr = IR:: initInstruction ( vs , i ) and
367
367
init = vs .getInit ( i ) and
368
368
result = getAnUpperBound ( init )
369
369
)
370
370
or
371
- //SSA definition coresponding to an `AddAssignStmt` (x += y) or `SubAssignStmt` (x -= y)
371
+ //SSA definition corresponding to an `AddAssignStmt` (x += y) or `SubAssignStmt` (x -= y)
372
372
exists (
373
373
IR:: AssignInstruction assignInstr , SsaExplicitDefinition prevDef ,
374
374
CompoundAssignStmt compoundAssign , float prevBound , float delta
@@ -388,7 +388,7 @@ float getAnSsaUpperBound(SsaDefinition def) {
388
388
)
389
389
)
390
390
else
391
- //SSA definition coresponding to an `IncDecStmt`
391
+ //SSA definition corresponding to an `IncDecStmt`
392
392
if explicitDef .getInstruction ( ) instanceof IR:: IncDecInstruction
393
393
then
394
394
exists ( IncDecStmt incOrDec , IR:: IncDecInstruction instr , float exprLB |
@@ -521,21 +521,21 @@ float getAnSsaLowerBound(SsaDefinition def) {
521
521
* The structure of this function needs to be same as `getAnSsaLowerBound`
522
522
*/
523
523
predicate ssaDependsOnSsa ( SsaDefinition nextDef , SsaDefinition prevDef ) {
524
- //SSA definition coresponding to a `SimpleAssignStmt`
524
+ //SSA definition corresponding to a `SimpleAssignStmt`
525
525
exists ( SimpleAssignStmt simpleAssign |
526
526
nextDef .( SsaExplicitDefinition ) .getInstruction ( ) = IR:: assignInstruction ( simpleAssign , _) and
527
527
ssaDependsOnExpr ( prevDef , simpleAssign .getRhs ( ) )
528
528
)
529
529
or
530
- //SSA definition coresponding to a `ValueSpec`(used in variable declaration)
530
+ //SSA definition corresponding to a `ValueSpec`(used in variable declaration)
531
531
exists ( IR:: AssignInstruction declInstr , ValueSpec vs , int i , Expr init |
532
532
declInstr = nextDef .( SsaExplicitDefinition ) .getInstruction ( ) and
533
533
declInstr = IR:: initInstruction ( vs , i ) and
534
534
init = vs .getInit ( i ) and
535
535
ssaDependsOnExpr ( prevDef , init )
536
536
)
537
537
or
538
- //SSA definition coresponding to a `AddAssignStmt` or `SubAssignStmt`
538
+ //SSA definition corresponding to a `AddAssignStmt` or `SubAssignStmt`
539
539
exists ( CompoundAssignStmt compoundAssign |
540
540
( compoundAssign instanceof AddAssignStmt or compoundAssign instanceof SubAssignStmt ) and
541
541
nextDef .( SsaExplicitDefinition ) .getInstruction ( ) = IR:: assignInstruction ( compoundAssign , 0 ) and
@@ -545,7 +545,7 @@ predicate ssaDependsOnSsa(SsaDefinition nextDef, SsaDefinition prevDef) {
545
545
)
546
546
)
547
547
or
548
- //SSA definition coresponding to a `IncDecStmt`
548
+ //SSA definition corresponding to a `IncDecStmt`
549
549
exists ( IncDecStmt incDec |
550
550
nextDef
551
551
.( SsaExplicitDefinition )
@@ -557,7 +557,7 @@ predicate ssaDependsOnSsa(SsaDefinition nextDef, SsaDefinition prevDef) {
557
557
ssaDependsOnExpr ( prevDef , incDec .getOperand ( ) )
558
558
)
559
559
or
560
- //if `nextDef` coresponding to the init of a parameter, there is no coresponding `prevDef`
560
+ //if `nextDef` corresponding to the init of a parameter, there is no corresponding `prevDef`
561
561
//if `nextDef` is a phi node and `prevDef` is one of the input of the phi node, then `nextDef` depends on `prevDef` directly.
562
562
exists ( SsaPhiNode phi | nextDef = phi and phi .getAnInput ( ) .getDefinition ( ) = prevDef )
563
563
}
0 commit comments