@@ -192,21 +192,22 @@ private predicate sourceVariableHasBaseAndIndex(SourceVariable v, BaseSourceVari
192192 v .getIndirection ( ) = ind
193193}
194194
195- class DefImpl extends DefOrUseImpl , TDefImpl {
195+ abstract class DefImpl extends DefOrUseImpl {
196196 Operand address ;
197197 int ind ;
198198
199- DefImpl ( ) { this = TDefImpl ( address , ind ) }
199+ bindingset [ ind]
200+ DefImpl ( ) { any ( ) }
200201
201- override BaseSourceVariableInstruction getBase ( ) { isDef ( _ , _ , address , result , _ , _ ) }
202+ abstract int getIndirection ( ) ;
202203
203- Operand getAddressOperand ( ) { result = address }
204+ abstract Node0Impl getValue ( ) ;
204205
205- int getIndirection ( ) { isDef ( _ , _ , address , _ , result , ind ) }
206+ abstract predicate isCertain ( ) ;
206207
207- override int getIndirectionIndex ( ) { result = ind }
208+ Operand getAddressOperand ( ) { result = address }
208209
209- Node0Impl getValue ( ) { isDef ( _ , result , address , _ , _ , _ ) }
210+ override int getIndirectionIndex ( ) { result = ind }
210211
211212 override string toString ( ) { result = "DefImpl" }
212213
@@ -217,15 +218,28 @@ class DefImpl extends DefOrUseImpl, TDefImpl {
217218 final override predicate hasIndexInBlock ( IRBlock block , int index ) {
218219 this .getAddressOperand ( ) .getUse ( ) = block .getInstruction ( index )
219220 }
221+ }
222+
223+ private class DirectDef extends DefImpl , TDefImpl {
224+ DirectDef ( ) { this = TDefImpl ( address , ind ) }
225+
226+ override BaseSourceVariableInstruction getBase ( ) { isDef ( _, _, address , result , _, _) }
227+
228+ override int getIndirection ( ) { isDef ( _, _, address , _, result , ind ) }
229+
230+ override Node0Impl getValue ( ) { isDef ( _, result , address , _, _, _) }
231+
232+ override predicate isCertain ( ) { isDef ( true , _, address , _, _, ind ) }
220233
221234 predicate isCertain ( ) { isDef ( true , _, address , _, _, ind ) }
222235}
223236
224- class UseImpl extends DefOrUseImpl , TUseImpl {
237+ abstract class UseImpl extends DefOrUseImpl {
225238 Operand operand ;
226239 int ind ;
227240
228- UseImpl ( ) { this = TUseImpl ( operand , ind ) }
241+ bindingset [ ind]
242+ UseImpl ( ) { any ( ) }
229243
230244 Operand getOperand ( ) { result = operand }
231245
@@ -239,13 +253,21 @@ class UseImpl extends DefOrUseImpl, TUseImpl {
239253
240254 final override Cpp:: Location getLocation ( ) { result = operand .getLocation ( ) }
241255
242- final int getIndirection ( ) { isUse ( _, operand , _, result , ind ) }
243-
244256 override int getIndirectionIndex ( ) { result = ind }
245257
258+ abstract int getIndirection ( ) ;
259+
260+ abstract predicate isCertain ( ) ;
261+ }
262+
263+ private class DirectUse extends UseImpl , TUseImpl {
264+ DirectUse ( ) { this = TUseImpl ( operand , ind ) }
265+
266+ override int getIndirection ( ) { isUse ( _, operand , _, result , ind ) }
267+
246268 override BaseSourceVariableInstruction getBase ( ) { isUse ( _, operand , result , _, ind ) }
247269
248- predicate isCertain ( ) { isUse ( true , operand , _, _, ind ) }
270+ override predicate isCertain ( ) { isUse ( true , operand , _, _, ind ) }
249271}
250272
251273/**
0 commit comments