public class ShimpleLocalDefs extends Object implements LocalDefs
This implementation can be considered a small demo for how SSA can be put to good use since it is much simpler than soot.toolkits.scalar.SimpleLocalDefs. Shimple can often be treated as Jimple with the added benefits of SSA assumptions.
In addition to the interface required by LocalDefs, ShimpleLocalDefs also provides a method for obtaining the definition Unit given only the Local.
ShimpleLocalUses
,
SimpleLocalDefs
,
SimpleLocalUses
LocalDefs.Factory
Modifier and Type | Field and Description |
---|---|
protected Map<Value,List<Unit>> |
localToDefs |
Constructor and Description |
---|
ShimpleLocalDefs(ShimpleBody sb)
Build a LocalDefs interface from a ShimpleBody.
|
Modifier and Type | Method and Description |
---|---|
List<Unit> |
getDefsOf(Local l)
Unconditionally returns the definition site of a local (as a
singleton list).
|
List<Unit> |
getDefsOfAt(Local l,
Unit s)
Returns the definition site for a Local at a certain point
(Unit) in a method as a singleton list.
|
public ShimpleLocalDefs(ShimpleBody sb)
public List<Unit> getDefsOf(Local l)
This method is currently not required by the LocalDefs interface.
public List<Unit> getDefsOfAt(Local l, Unit s)
getDefsOfAt
in interface LocalDefs
l
- the Local in question.s
- a unit that specifies the method context (location) to
query for the definitions of the Local.