Class SameFieldReductionStrategy

java.lang.Object
soot.jimple.infoflow.data.accessPaths.SameFieldReductionStrategy
All Implemented Interfaces:
IAccessPathReductionStrategy

public class SameFieldReductionStrategy extends Object implements IAccessPathReductionStrategy

AccessPath reduction strategy that removes sub-chains that return to exactly the same field.

The following example access path can be shortened by removing the first two fragments.

 <java.lang.Thread: java.lang.ThreadGroup group>
 <java.lang.ThreadGroup: java.lang.Thread[] threads>
 <java.lang.Thread: java.lang.ThreadGroup group>
 <java.lang.ThreadGroup: java.lang.Thread[] threads> *
 
Author:
Steven Arzt
  • Constructor Details

    • SameFieldReductionStrategy

      public SameFieldReductionStrategy()
  • Method Details

    • reduceAccessPath

      public AccessPathFragment[] reduceAccessPath(soot.Value base, AccessPathFragment[] fragments)
      Description copied from interface: IAccessPathReductionStrategy
      Reduces the given sequence of access path fragments
      Specified by:
      reduceAccessPath in interface IAccessPathReductionStrategy
      Parameters:
      base - The local in which the access path is rooted
      fragments - The sequence of access path fragments to reduce
      Returns:
      The reduced sequence of access path fragments if the reduction was applicable, otherwise the original sequence