@@ -74,7 +74,7 @@ float getAnUpperBound(Expr expr) {
7474 result = getAnUpperBound ( greater .asExpr ( ) ) + bias
7575 )
7676 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.
7878 result = getAnSsaUpperBound ( v .getDefinition ( ) )
7979 )
8080 )
@@ -231,7 +231,7 @@ float getALowerBound(Expr expr) {
231231 result = lbs - bias
232232 )
233233 else
234- //find coresponding SSA definition and calls `getAnSsaLowerBound` on it.
234+ //find corresponding SSA definition and calls `getAnSsaLowerBound` on it.
235235 result = getAnSsaLowerBound ( v .getDefinition ( ) )
236236 )
237237 )
@@ -351,7 +351,7 @@ float getAnSsaUpperBound(SsaDefinition def) {
351351 (
352352 def instanceof SsaExplicitDefinition and
353353 exists ( SsaExplicitDefinition explicitDef | explicitDef = def |
354- //SSA definition coresponding to a `SimpleAssignStmt`
354+ //SSA definition corresponding to a `SimpleAssignStmt`
355355 if explicitDef .getInstruction ( ) instanceof IR:: AssignInstruction
356356 then
357357 exists ( IR:: AssignInstruction assignInstr , SimpleAssignStmt simpleAssign |
@@ -360,15 +360,15 @@ float getAnSsaUpperBound(SsaDefinition def) {
360360 result = getAnUpperBound ( simpleAssign .getRhs ( ) )
361361 )
362362 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)
364364 exists ( IR:: AssignInstruction declInstr , ValueSpec vs , int i , Expr init |
365365 declInstr = explicitDef .getInstruction ( ) and
366366 declInstr = IR:: initInstruction ( vs , i ) and
367367 init = vs .getInit ( i ) and
368368 result = getAnUpperBound ( init )
369369 )
370370 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)
372372 exists (
373373 IR:: AssignInstruction assignInstr , SsaExplicitDefinition prevDef ,
374374 CompoundAssignStmt compoundAssign , float prevBound , float delta
@@ -388,7 +388,7 @@ float getAnSsaUpperBound(SsaDefinition def) {
388388 )
389389 )
390390 else
391- //SSA definition coresponding to an `IncDecStmt`
391+ //SSA definition corresponding to an `IncDecStmt`
392392 if explicitDef .getInstruction ( ) instanceof IR:: IncDecInstruction
393393 then
394394 exists ( IncDecStmt incOrDec , IR:: IncDecInstruction instr , float exprLB |
@@ -521,21 +521,21 @@ float getAnSsaLowerBound(SsaDefinition def) {
521521 * The structure of this function needs to be same as `getAnSsaLowerBound`
522522 */
523523predicate ssaDependsOnSsa ( SsaDefinition nextDef , SsaDefinition prevDef ) {
524- //SSA definition coresponding to a `SimpleAssignStmt`
524+ //SSA definition corresponding to a `SimpleAssignStmt`
525525 exists ( SimpleAssignStmt simpleAssign |
526526 nextDef .( SsaExplicitDefinition ) .getInstruction ( ) = IR:: assignInstruction ( simpleAssign , _) and
527527 ssaDependsOnExpr ( prevDef , simpleAssign .getRhs ( ) )
528528 )
529529 or
530- //SSA definition coresponding to a `ValueSpec`(used in variable declaration)
530+ //SSA definition corresponding to a `ValueSpec`(used in variable declaration)
531531 exists ( IR:: AssignInstruction declInstr , ValueSpec vs , int i , Expr init |
532532 declInstr = nextDef .( SsaExplicitDefinition ) .getInstruction ( ) and
533533 declInstr = IR:: initInstruction ( vs , i ) and
534534 init = vs .getInit ( i ) and
535535 ssaDependsOnExpr ( prevDef , init )
536536 )
537537 or
538- //SSA definition coresponding to a `AddAssignStmt` or `SubAssignStmt`
538+ //SSA definition corresponding to a `AddAssignStmt` or `SubAssignStmt`
539539 exists ( CompoundAssignStmt compoundAssign |
540540 ( compoundAssign instanceof AddAssignStmt or compoundAssign instanceof SubAssignStmt ) and
541541 nextDef .( SsaExplicitDefinition ) .getInstruction ( ) = IR:: assignInstruction ( compoundAssign , 0 ) and
@@ -545,7 +545,7 @@ predicate ssaDependsOnSsa(SsaDefinition nextDef, SsaDefinition prevDef) {
545545 )
546546 )
547547 or
548- //SSA definition coresponding to a `IncDecStmt`
548+ //SSA definition corresponding to a `IncDecStmt`
549549 exists ( IncDecStmt incDec |
550550 nextDef
551551 .( SsaExplicitDefinition )
@@ -557,7 +557,7 @@ predicate ssaDependsOnSsa(SsaDefinition nextDef, SsaDefinition prevDef) {
557557 ssaDependsOnExpr ( prevDef , incDec .getOperand ( ) )
558558 )
559559 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`
561561 //if `nextDef` is a phi node and `prevDef` is one of the input of the phi node, then `nextDef` depends on `prevDef` directly.
562562 exists ( SsaPhiNode phi | nextDef = phi and phi .getAnInput ( ) .getDefinition ( ) = prevDef )
563563}
0 commit comments