Class SmashAllContainerStrategy
java.lang.Object
soot.jimple.infoflow.collections.strategies.containers.SmashAllContainerStrategy
- All Implemented Interfaces:
IContainerStrategy
A container strategy that smashed all containers, i.e., emulates FlowDroid's
behavior without container models
- Author:
- Steven Arzt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend(ContainerContext[] ctxt1, ContainerContext[] ctxt2) Return the union of the given contextsgetFirstPosition(soot.Value lst, soot.jimple.Stmt stmt) Retrieves a context given an implicit key before the given statement (i.e. a list where the key is dependent on the number of add calls before)getIndexContext(soot.Value index, soot.jimple.Stmt stmt) Retrieves a context for a given indexgetKeyContext(soot.Value key, soot.jimple.Stmt stmt) Retrieves a context for a given keygetLastPosition(soot.Value lst, soot.jimple.Stmt stmt) Retrieves a context given an implicit key before the given statement (i.e. a list where the key is dependent on the number of add calls before)getNextPosition(soot.Value lst, soot.jimple.Stmt stmt) Retrieves a context given an implicit key after the given statement (i.e. a list where the key is dependent on the number of add calls before)intersect(ContainerContext apKey, ContainerContext stmtKey) Checks whether the two arguments intersectbooleanisReadOnly(soot.Unit unit) Returns whether the given value is used in a read-only fashionlessThanEqual(ContainerContext ctxt1, ContainerContext ctxt2) Returns whether ctxt1 is less than ctxt2shift(ContainerContext ctxt, int n, boolean exact) Shifts the ctxt to the rightbooleanshouldSmash(ContainerContext[] ctxts) Returns whether the context is still useful or not
-
Constructor Details
-
SmashAllContainerStrategy
public SmashAllContainerStrategy()
-
-
Method Details
-
intersect
Description copied from interface:IContainerStrategyChecks whether the two arguments intersect- Specified by:
intersectin interfaceIContainerStrategy- Parameters:
apKey- key from the access pathstmtKey- key from the statement- Returns:
- true if args fully intersects, maybe on part match and false on definitely no match
-
append
Description copied from interface:IContainerStrategyReturn the union of the given contexts- Specified by:
appendin interfaceIContainerStrategy- Parameters:
ctxt1- key from the access pathctxt2- key from the statement- Returns:
- new context definition
-
getKeyContext
Description copied from interface:IContainerStrategyRetrieves a context for a given key- Specified by:
getKeyContextin interfaceIContainerStrategy- Parameters:
key- requested valuestmt- statement containing key- Returns:
- new context definition
-
getIndexContext
Description copied from interface:IContainerStrategyRetrieves a context for a given index- Specified by:
getIndexContextin interfaceIContainerStrategy- Parameters:
index- requested valuestmt- statement containing index- Returns:
- new context definition
-
getNextPosition
Description copied from interface:IContainerStrategyRetrieves a context given an implicit key after the given statement (i.e. a list where the key is dependent on the number of add calls before)- Specified by:
getNextPositionin interfaceIContainerStrategy- Parameters:
lst- liststmt- statement that uses value- Returns:
- new context definition
-
getFirstPosition
Description copied from interface:IContainerStrategyRetrieves a context given an implicit key before the given statement (i.e. a list where the key is dependent on the number of add calls before)- Specified by:
getFirstPositionin interfaceIContainerStrategy- Parameters:
lst- liststmt- statement that uses value- Returns:
- new context definition
-
getLastPosition
Description copied from interface:IContainerStrategyRetrieves a context given an implicit key before the given statement (i.e. a list where the key is dependent on the number of add calls before)- Specified by:
getLastPositionin interfaceIContainerStrategy- Parameters:
lst- liststmt- statement that uses value- Returns:
- new context definition
-
lessThanEqual
Description copied from interface:IContainerStrategyReturns whether ctxt1 is less than ctxt2- Specified by:
lessThanEqualin interfaceIContainerStrategy- Parameters:
ctxt1- first contextctxt2- second context- Returns:
- true ctxt1 is less than ctxt2
-
shift
Description copied from interface:IContainerStrategyShifts the ctxt to the right- Specified by:
shiftin interfaceIContainerStrategy- Parameters:
ctxt- current context- Returns:
- new context definition
-
shouldSmash
Description copied from interface:IContainerStrategyReturns whether the context is still useful or not- Specified by:
shouldSmashin interfaceIContainerStrategy- Parameters:
ctxts- contexts- Returns:
- true if context contains no useful information and thus, the collection should be smashed
-
isReadOnly
public boolean isReadOnly(soot.Unit unit) Description copied from interface:IContainerStrategyReturns whether the given value is used in a read-only fashion- Specified by:
isReadOnlyin interfaceIContainerStrategy- Parameters:
unit- current statement- Returns:
- true if is read-only
-