Package it.unive.lisa.analysis.taint
Class ThreeLevelsTaint
- java.lang.Object
-
- it.unive.lisa.analysis.taint.BaseTaint<ThreeLevelsTaint>
-
- it.unive.lisa.analysis.taint.ThreeLevelsTaint
-
- All Implemented Interfaces:
it.unive.lisa.analysis.BaseLattice<ThreeLevelsTaint>
,it.unive.lisa.analysis.Lattice<ThreeLevelsTaint>
,it.unive.lisa.analysis.nonrelational.NonRelationalDomain<ThreeLevelsTaint,it.unive.lisa.symbolic.value.ValueExpression,it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<ThreeLevelsTaint>>
,it.unive.lisa.analysis.nonrelational.NonRelationalElement<ThreeLevelsTaint,it.unive.lisa.symbolic.value.ValueExpression,it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<ThreeLevelsTaint>>
,it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<ThreeLevelsTaint>
,it.unive.lisa.analysis.nonrelational.value.NonRelationalValueDomain<ThreeLevelsTaint>
,it.unive.lisa.analysis.SemanticEvaluator
,it.unive.lisa.util.representation.StructuredObject
public class ThreeLevelsTaint extends BaseTaint<ThreeLevelsTaint>
ABaseTaint
implementation with three level of taintedness: clean, tainted and top. As such, this class distinguishes values that are always clean, always tainted, or tainted in at least one execution path.
-
-
Field Summary
-
Fields inherited from class it.unive.lisa.analysis.taint.BaseTaint
CLEAN_ANNOTATION, CLEAN_MATCHER, TAINTED_ANNOTATION, TAINTED_MATCHER
-
-
Constructor Summary
Constructors Constructor Description ThreeLevelsTaint()
Builds a new instance of taint.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThreeLevelsTaint
bottom()
protected ThreeLevelsTaint
clean()
Yields the domain element that represents clean values.boolean
equals(java.lang.Object obj)
ThreeLevelsTaint
evalBinaryExpression(it.unive.lisa.symbolic.value.operator.binary.BinaryOperator operator, ThreeLevelsTaint left, ThreeLevelsTaint right, it.unive.lisa.program.cfg.ProgramPoint pp, it.unive.lisa.analysis.SemanticOracle oracle)
ThreeLevelsTaint
evalTernaryExpression(it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator operator, ThreeLevelsTaint left, ThreeLevelsTaint middle, ThreeLevelsTaint right, it.unive.lisa.program.cfg.ProgramPoint pp, it.unive.lisa.analysis.SemanticOracle oracle)
int
hashCode()
boolean
isAlwaysTainted()
Yieldstrue
if this instance represents information that is definitely tainted across all execution paths.boolean
isPossiblyTainted()
Yieldstrue
if this instance represents information that is definitely tainted in at least one execution path.boolean
lessOrEqualAux(ThreeLevelsTaint other)
ThreeLevelsTaint
lubAux(ThreeLevelsTaint other)
it.unive.lisa.util.representation.StructuredRepresentation
representation()
protected ThreeLevelsTaint
tainted()
Yields the domain element that represents tainted values.ThreeLevelsTaint
top()
java.lang.String
toString()
ThreeLevelsTaint
wideningAux(ThreeLevelsTaint other)
-
Methods inherited from class it.unive.lisa.analysis.taint.BaseTaint
assume, defaultApprox, evalIdentifier, evalNonNullConstant, evalNullConstant, evalPushAny, evalTypeCast, evalTypeConv, evalUnaryExpression, fixedVariable, isAlwaysClean, isPossiblyClean, satisfies
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface it.unive.lisa.analysis.BaseLattice
glb, glbAux, lessOrEqual, lub, narrowing, narrowingAux, widening
-
Methods inherited from interface it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain
assumeBinaryExpression, assumeTernaryExpression, assumeUnaryExpression, canProcess, eval, evalPushInv, evalSkip, evalValueExpression, satisfiesAbstractValue, satisfiesBinaryExpression, satisfiesNonNullConstant, satisfiesNullConstant, satisfiesTernaryExpression, satisfiesUnaryExpression
-
-
-
-
Method Detail
-
tainted
protected ThreeLevelsTaint tainted()
Description copied from class:BaseTaint
Yields the domain element that represents tainted values.- Specified by:
tainted
in classBaseTaint<ThreeLevelsTaint>
- Returns:
- the tainted domain element
-
clean
protected ThreeLevelsTaint clean()
Description copied from class:BaseTaint
Yields the domain element that represents clean values.- Specified by:
clean
in classBaseTaint<ThreeLevelsTaint>
- Returns:
- the clean domain element
-
isAlwaysTainted
public boolean isAlwaysTainted()
Description copied from class:BaseTaint
Yieldstrue
if this instance represents information that is definitely tainted across all execution paths.- Specified by:
isAlwaysTainted
in classBaseTaint<ThreeLevelsTaint>
- Returns:
true
if that condition holds
-
isPossiblyTainted
public boolean isPossiblyTainted()
Description copied from class:BaseTaint
Yieldstrue
if this instance represents information that is definitely tainted in at least one execution path.- Specified by:
isPossiblyTainted
in classBaseTaint<ThreeLevelsTaint>
- Returns:
true
if that condition holds
-
representation
public it.unive.lisa.util.representation.StructuredRepresentation representation()
-
top
public ThreeLevelsTaint top()
-
bottom
public ThreeLevelsTaint bottom()
-
evalBinaryExpression
public ThreeLevelsTaint evalBinaryExpression(it.unive.lisa.symbolic.value.operator.binary.BinaryOperator operator, ThreeLevelsTaint left, ThreeLevelsTaint right, it.unive.lisa.program.cfg.ProgramPoint pp, it.unive.lisa.analysis.SemanticOracle oracle) throws it.unive.lisa.analysis.SemanticException
- Specified by:
evalBinaryExpression
in interfaceit.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<ThreeLevelsTaint>
- Overrides:
evalBinaryExpression
in classBaseTaint<ThreeLevelsTaint>
- Throws:
it.unive.lisa.analysis.SemanticException
-
evalTernaryExpression
public ThreeLevelsTaint evalTernaryExpression(it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator operator, ThreeLevelsTaint left, ThreeLevelsTaint middle, ThreeLevelsTaint right, it.unive.lisa.program.cfg.ProgramPoint pp, it.unive.lisa.analysis.SemanticOracle oracle) throws it.unive.lisa.analysis.SemanticException
- Specified by:
evalTernaryExpression
in interfaceit.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<ThreeLevelsTaint>
- Overrides:
evalTernaryExpression
in classBaseTaint<ThreeLevelsTaint>
- Throws:
it.unive.lisa.analysis.SemanticException
-
lubAux
public ThreeLevelsTaint lubAux(ThreeLevelsTaint other) throws it.unive.lisa.analysis.SemanticException
- Throws:
it.unive.lisa.analysis.SemanticException
-
wideningAux
public ThreeLevelsTaint wideningAux(ThreeLevelsTaint other) throws it.unive.lisa.analysis.SemanticException
- Throws:
it.unive.lisa.analysis.SemanticException
-
lessOrEqualAux
public boolean lessOrEqualAux(ThreeLevelsTaint other) throws it.unive.lisa.analysis.SemanticException
- Throws:
it.unive.lisa.analysis.SemanticException
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceit.unive.lisa.analysis.BaseLattice<ThreeLevelsTaint>
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfaceit.unive.lisa.analysis.BaseLattice<ThreeLevelsTaint>
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Specified by:
toString
in interfaceit.unive.lisa.analysis.BaseLattice<ThreeLevelsTaint>
- Overrides:
toString
in classjava.lang.Object
-
-