@@ -16,7 +16,7 @@ class DisjunctionChain extends Disjunction {
16
16
Formula getOperand ( int i ) {
17
17
result =
18
18
rank [ i + 1 ] ( Formula operand , Location l |
19
- operand = getAnOperand * ( ) and
19
+ operand = this . getAnOperand * ( ) and
20
20
not operand instanceof Disjunction and
21
21
l = operand .getLocation ( )
22
22
|
@@ -33,16 +33,16 @@ class DisjunctionChain extends Disjunction {
33
33
*/
34
34
class EqualsLiteral extends ComparisonFormula {
35
35
EqualsLiteral ( ) {
36
- getOperator ( ) = "=" and
37
- getAnOperand ( ) instanceof Literal
36
+ this . getOperator ( ) = "=" and
37
+ this . getAnOperand ( ) instanceof Literal
38
38
}
39
39
40
40
AstNode getOther ( ) {
41
- result = getAnOperand ( ) and
41
+ result = this . getAnOperand ( ) and
42
42
not result instanceof Literal
43
43
}
44
44
45
- Literal getLiteral ( ) { result = getAnOperand ( ) }
45
+ Literal getLiteral ( ) { result = this . getAnOperand ( ) }
46
46
}
47
47
48
48
/**
@@ -60,29 +60,33 @@ class DisjunctionEqualsLiteral extends DisjunctionChain {
60
60
DisjunctionEqualsLiteral ( ) {
61
61
// VarAccess on the same variable
62
62
exists ( VarDef v |
63
- forex ( Formula f | f = getOperand ( _) |
63
+ forex ( Formula f | f = this . getOperand ( _) |
64
64
f .( EqualsLiteral ) .getAnOperand ( ) .( VarAccess ) .getDeclaration ( ) = v
65
65
) and
66
- firstOperand = getOperand ( 0 ) .( EqualsLiteral ) .getAnOperand ( ) and
66
+ firstOperand = this . getOperand ( 0 ) .( EqualsLiteral ) .getAnOperand ( ) and
67
67
firstOperand .( VarAccess ) .getDeclaration ( ) = v
68
68
)
69
69
or
70
70
// FieldAccess on the same variable
71
71
exists ( FieldDecl v |
72
- forex ( Formula f | f = getOperand ( _) |
72
+ forex ( Formula f | f = this . getOperand ( _) |
73
73
f .( EqualsLiteral ) .getAnOperand ( ) .( FieldAccess ) .getDeclaration ( ) = v
74
74
) and
75
- firstOperand = getOperand ( 0 ) .( EqualsLiteral ) .getAnOperand ( ) and
75
+ firstOperand = this . getOperand ( 0 ) .( EqualsLiteral ) .getAnOperand ( ) and
76
76
firstOperand .( FieldAccess ) .getDeclaration ( ) = v
77
77
)
78
78
or
79
79
// 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 )
82
84
or
83
85
// 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 )
86
90
// (in principle something like GlobalValueNumbering could be used to generalize this)
87
91
}
88
92
@@ -100,8 +104,8 @@ class DisjunctionEqualsLiteral extends DisjunctionChain {
100
104
*/
101
105
class CallLiteral extends Call {
102
106
CallLiteral ( ) {
103
- getNumberOfArguments ( ) = 1 and
104
- getArgument ( 0 ) instanceof Literal
107
+ this . getNumberOfArguments ( ) = 1 and
108
+ this . getArgument ( 0 ) instanceof Literal
105
109
}
106
110
}
107
111
@@ -118,7 +122,7 @@ class DisjunctionPredicateLiteral extends DisjunctionChain {
118
122
DisjunctionPredicateLiteral ( ) {
119
123
// Call to the same target
120
124
exists ( PredicateOrBuiltin target |
121
- forex ( Formula f | f = getOperand ( _) | f .( CallLiteral ) .getTarget ( ) = target )
125
+ forex ( Formula f | f = this . getOperand ( _) | f .( CallLiteral ) .getTarget ( ) = target )
122
126
)
123
127
}
124
128
}
0 commit comments