@@ -10,7 +10,7 @@ private import CIL
1010 */
1111class BasicBlock extends Cached:: TBasicBlockStart {
1212 /** Gets an immediate successor of this basic block, if any. */
13- BasicBlock getASuccessor ( ) { result .getFirstNode ( ) = getLastNode ( ) .getASuccessor ( ) }
13+ BasicBlock getASuccessor ( ) { result .getFirstNode ( ) = this . getLastNode ( ) .getASuccessor ( ) }
1414
1515 /** Gets an immediate predecessor of this basic block, if any. */
1616 BasicBlock getAPredecessor ( ) { result .getASuccessor ( ) = this }
@@ -31,7 +31,7 @@ class BasicBlock extends Cached::TBasicBlockStart {
3131 * The basic block on line 2 is an immediate `true` successor of the
3232 * basic block on line 1.
3333 */
34- BasicBlock getATrueSuccessor ( ) { result .getFirstNode ( ) = getLastNode ( ) .getTrueSuccessor ( ) }
34+ BasicBlock getATrueSuccessor ( ) { result .getFirstNode ( ) = this . getLastNode ( ) .getTrueSuccessor ( ) }
3535
3636 /**
3737 * Gets an immediate `false` successor, if any.
@@ -49,22 +49,22 @@ class BasicBlock extends Cached::TBasicBlockStart {
4949 * The basic block on line 2 is an immediate `false` successor of the
5050 * basic block on line 1.
5151 */
52- BasicBlock getAFalseSuccessor ( ) { result .getFirstNode ( ) = getLastNode ( ) .getFalseSuccessor ( ) }
52+ BasicBlock getAFalseSuccessor ( ) { result .getFirstNode ( ) = this . getLastNode ( ) .getFalseSuccessor ( ) }
5353
5454 /** Gets the control flow node at a specific (zero-indexed) position in this basic block. */
55- ControlFlowNode getNode ( int pos ) { Cached:: bbIndex ( getFirstNode ( ) , result , pos ) }
55+ ControlFlowNode getNode ( int pos ) { Cached:: bbIndex ( this . getFirstNode ( ) , result , pos ) }
5656
5757 /** Gets a control flow node in this basic block. */
58- ControlFlowNode getANode ( ) { result = getNode ( _) }
58+ ControlFlowNode getANode ( ) { result = this . getNode ( _) }
5959
6060 /** Gets the first control flow node in this basic block. */
6161 ControlFlowNode getFirstNode ( ) { this = Cached:: TBasicBlockStart ( result ) }
6262
6363 /** Gets the last control flow node in this basic block. */
64- ControlFlowNode getLastNode ( ) { result = getNode ( length ( ) - 1 ) }
64+ ControlFlowNode getLastNode ( ) { result = this . getNode ( this . length ( ) - 1 ) }
6565
6666 /** Gets the length of this basic block. */
67- int length ( ) { result = strictcount ( getANode ( ) ) }
67+ int length ( ) { result = strictcount ( this . getANode ( ) ) }
6868
6969 /**
7070 * Holds if this basic block strictly dominates basic block `bb`.
@@ -114,7 +114,7 @@ class BasicBlock extends Cached::TBasicBlockStart {
114114 */
115115 predicate dominates ( BasicBlock bb ) {
116116 bb = this or
117- strictlyDominates ( bb )
117+ this . strictlyDominates ( bb )
118118 }
119119
120120 /**
@@ -140,14 +140,14 @@ class BasicBlock extends Cached::TBasicBlockStart {
140140 * does not dominate the basic block on line 6.
141141 */
142142 predicate inDominanceFrontier ( BasicBlock df ) {
143- dominatesPredecessor ( df ) and
144- not strictlyDominates ( df )
143+ this . dominatesPredecessor ( df ) and
144+ not this . strictlyDominates ( df )
145145 }
146146
147147 /**
148148 * Holds if this basic block dominates a predecessor of `df`.
149149 */
150- private predicate dominatesPredecessor ( BasicBlock df ) { dominates ( df .getAPredecessor ( ) ) }
150+ private predicate dominatesPredecessor ( BasicBlock df ) { this . dominates ( df .getAPredecessor ( ) ) }
151151
152152 /**
153153 * Gets the basic block that immediately dominates this basic block, if any.
@@ -226,7 +226,7 @@ class BasicBlock extends Cached::TBasicBlockStart {
226226 * post-dominates itself.
227227 */
228228 predicate postDominates ( BasicBlock bb ) {
229- strictlyPostDominates ( bb ) or
229+ this . strictlyPostDominates ( bb ) or
230230 this = bb
231231 }
232232
@@ -239,7 +239,7 @@ class BasicBlock extends Cached::TBasicBlockStart {
239239 predicate inLoop ( ) { this .getASuccessor + ( ) = this }
240240
241241 /** Gets a textual representation of this basic block. */
242- string toString ( ) { result = getFirstNode ( ) .toString ( ) }
242+ string toString ( ) { result = this . getFirstNode ( ) .toString ( ) }
243243
244244 /** Gets the location of this basic block. */
245245 Location getLocation ( ) { result = this .getFirstNode ( ) .getLocation ( ) }
@@ -325,16 +325,16 @@ private predicate exitBB(BasicBlock bb) { not exists(bb.getLastNode().getASucces
325325 * A basic block with more than one predecessor.
326326 */
327327class JoinBlock extends BasicBlock {
328- JoinBlock ( ) { getFirstNode ( ) .isJoin ( ) }
328+ JoinBlock ( ) { this . getFirstNode ( ) .isJoin ( ) }
329329}
330330
331331/** A basic block that terminates in a condition, splitting the subsequent control flow. */
332332class ConditionBlock extends BasicBlock {
333333 ConditionBlock ( ) {
334334 exists ( BasicBlock succ |
335- succ = getATrueSuccessor ( )
335+ succ = this . getATrueSuccessor ( )
336336 or
337- succ = getAFalseSuccessor ( )
337+ succ = this . getAFalseSuccessor ( )
338338 )
339339 }
340340
@@ -380,16 +380,16 @@ class ConditionBlock extends BasicBlock {
380380 */
381381
382382 exists ( BasicBlock succ |
383- isCandidateSuccessor ( succ , testIsTrue ) and
383+ this . isCandidateSuccessor ( succ , testIsTrue ) and
384384 succ .dominates ( controlled )
385385 )
386386 }
387387
388388 private predicate isCandidateSuccessor ( BasicBlock succ , boolean testIsTrue ) {
389389 (
390- testIsTrue = true and succ = getATrueSuccessor ( )
390+ testIsTrue = true and succ = this . getATrueSuccessor ( )
391391 or
392- testIsTrue = false and succ = getAFalseSuccessor ( )
392+ testIsTrue = false and succ = this . getAFalseSuccessor ( )
393393 ) and
394394 forall ( BasicBlock pred | pred = succ .getAPredecessor ( ) and pred != this | succ .dominates ( pred ) )
395395 }
0 commit comments