@@ -16,7 +16,7 @@ class DisjunctionChain extends Disjunction {
1616 Formula getOperand ( int i ) {
1717 result =
1818 rank [ i + 1 ] ( Formula operand , Location l |
19- operand = getAnOperand * ( ) and
19+ operand = this . getAnOperand * ( ) and
2020 not operand instanceof Disjunction and
2121 l = operand .getLocation ( )
2222 |
@@ -33,16 +33,16 @@ class DisjunctionChain extends Disjunction {
3333 */
3434class EqualsLiteral extends ComparisonFormula {
3535 EqualsLiteral ( ) {
36- getOperator ( ) = "=" and
37- getAnOperand ( ) instanceof Literal
36+ this . getOperator ( ) = "=" and
37+ this . getAnOperand ( ) instanceof Literal
3838 }
3939
4040 AstNode getOther ( ) {
41- result = getAnOperand ( ) and
41+ result = this . getAnOperand ( ) and
4242 not result instanceof Literal
4343 }
4444
45- Literal getLiteral ( ) { result = getAnOperand ( ) }
45+ Literal getLiteral ( ) { result = this . getAnOperand ( ) }
4646}
4747
4848/**
@@ -60,29 +60,33 @@ class DisjunctionEqualsLiteral extends DisjunctionChain {
6060 DisjunctionEqualsLiteral ( ) {
6161 // VarAccess on the same variable
6262 exists ( VarDef v |
63- forex ( Formula f | f = getOperand ( _) |
63+ forex ( Formula f | f = this . getOperand ( _) |
6464 f .( EqualsLiteral ) .getAnOperand ( ) .( VarAccess ) .getDeclaration ( ) = v
6565 ) and
66- firstOperand = getOperand ( 0 ) .( EqualsLiteral ) .getAnOperand ( ) and
66+ firstOperand = this . getOperand ( 0 ) .( EqualsLiteral ) .getAnOperand ( ) and
6767 firstOperand .( VarAccess ) .getDeclaration ( ) = v
6868 )
6969 or
7070 // FieldAccess on the same variable
7171 exists ( FieldDecl v |
72- forex ( Formula f | f = getOperand ( _) |
72+ forex ( Formula f | f = this . getOperand ( _) |
7373 f .( EqualsLiteral ) .getAnOperand ( ) .( FieldAccess ) .getDeclaration ( ) = v
7474 ) and
75- firstOperand = getOperand ( 0 ) .( EqualsLiteral ) .getAnOperand ( ) and
75+ firstOperand = this . getOperand ( 0 ) .( EqualsLiteral ) .getAnOperand ( ) and
7676 firstOperand .( FieldAccess ) .getDeclaration ( ) = v
7777 )
7878 or
7979 // ThisAccess
80- forex ( Formula f | f = getOperand ( _) | f .( EqualsLiteral ) .getAnOperand ( ) instanceof ThisAccess ) and
81- firstOperand = getOperand ( 0 ) .( EqualsLiteral ) .getAnOperand ( ) .( ThisAccess )
80+ forex ( Formula f | f = this .getOperand ( _) |
81+ f .( EqualsLiteral ) .getAnOperand ( ) instanceof ThisAccess
82+ ) and
83+ firstOperand = this .getOperand ( 0 ) .( EqualsLiteral ) .getAnOperand ( ) .( ThisAccess )
8284 or
8385 // ResultAccess
84- forex ( Formula f | f = getOperand ( _) | f .( EqualsLiteral ) .getAnOperand ( ) instanceof ResultAccess ) and
85- firstOperand = getOperand ( 0 ) .( EqualsLiteral ) .getAnOperand ( ) .( ResultAccess )
86+ forex ( Formula f | f = this .getOperand ( _) |
87+ f .( EqualsLiteral ) .getAnOperand ( ) instanceof ResultAccess
88+ ) and
89+ firstOperand = this .getOperand ( 0 ) .( EqualsLiteral ) .getAnOperand ( ) .( ResultAccess )
8690 // (in principle something like GlobalValueNumbering could be used to generalize this)
8791 }
8892
@@ -100,8 +104,8 @@ class DisjunctionEqualsLiteral extends DisjunctionChain {
100104 */
101105class CallLiteral extends Call {
102106 CallLiteral ( ) {
103- getNumberOfArguments ( ) = 1 and
104- getArgument ( 0 ) instanceof Literal
107+ this . getNumberOfArguments ( ) = 1 and
108+ this . getArgument ( 0 ) instanceof Literal
105109 }
106110}
107111
@@ -118,7 +122,7 @@ class DisjunctionPredicateLiteral extends DisjunctionChain {
118122 DisjunctionPredicateLiteral ( ) {
119123 // Call to the same target
120124 exists ( PredicateOrBuiltin target |
121- forex ( Formula f | f = getOperand ( _) | f .( CallLiteral ) .getTarget ( ) = target )
125+ forex ( Formula f | f = this . getOperand ( _) | f .( CallLiteral ) .getTarget ( ) = target )
122126 )
123127 }
124128}
0 commit comments