Class NonInterference
- java.lang.Object
-
- it.unive.lisa.analysis.BaseLattice<T>
-
- it.unive.lisa.analysis.nonrelational.inference.BaseInferredValue<NonInterference>
-
- it.unive.lisa.analysis.nonInterference.NonInterference
-
- All Implemented Interfaces:
it.unive.lisa.analysis.Lattice<NonInterference>,it.unive.lisa.analysis.nonrelational.inference.InferredValue<NonInterference>,it.unive.lisa.analysis.nonrelational.NonRelationalElement<NonInterference,it.unive.lisa.symbolic.value.ValueExpression,it.unive.lisa.analysis.nonrelational.inference.InferenceSystem<NonInterference>>,it.unive.lisa.analysis.SemanticEvaluator
public class NonInterference extends it.unive.lisa.analysis.nonrelational.inference.BaseInferredValue<NonInterference>
The type-system based implementation of the non interference analysis.- See Also:
- Non-interference
-
-
Field Summary
Fields Modifier and Type Field Description static it.unive.lisa.program.annotations.AnnotationHIGH_INT_ANNOTATIONThe annotation used to mark high integrity variables.static it.unive.lisa.program.annotations.matcher.AnnotationMatcherHIGH_INT_MATCHERAnnotationMatcherforHIGH_INT_ANNOTATION.static it.unive.lisa.program.annotations.AnnotationLOW_CONF_ANNOTATIONThe annotation used to mark low confidentiality variables.static it.unive.lisa.program.annotations.matcher.AnnotationMatcherLOW_CONF_MATCHERAnnotationMatcherforLOW_CONF_ANNOTATION.static byteNI_BOTTOMThe value to use for bottom non interference levels.static byteNI_HIGHThe value to use for high non interference levels.static byteNI_LOWThe value to use for low non interference levels.
-
Constructor Summary
Constructors Constructor Description NonInterference()Builds a new instance of non interference, referring to the top element of the lattice.NonInterference(byte confidentiality, byte integrity)Builds the abstract value for the given confidentiality and integrity values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description it.unive.lisa.analysis.nonrelational.inference.InferenceSystem<NonInterference>assume(it.unive.lisa.analysis.nonrelational.inference.InferenceSystem<NonInterference> environment, it.unive.lisa.symbolic.value.ValueExpression expression, it.unive.lisa.program.cfg.ProgramPoint pp)NonInterferencebottom()booleanequals(java.lang.Object obj)it.unive.lisa.analysis.nonrelational.inference.InferredValue.InferredPair<NonInterference>evalBinaryExpression(it.unive.lisa.symbolic.value.operator.binary.BinaryOperator operator, NonInterference left, NonInterference right, NonInterference state, it.unive.lisa.program.cfg.ProgramPoint pp)it.unive.lisa.analysis.nonrelational.inference.InferredValue.InferredPair<NonInterference>evalIdentifier(it.unive.lisa.symbolic.value.Identifier id, it.unive.lisa.analysis.nonrelational.inference.InferenceSystem<NonInterference> environment, it.unive.lisa.program.cfg.ProgramPoint pp)it.unive.lisa.analysis.nonrelational.inference.InferredValue.InferredPair<NonInterference>evalNonNullConstant(it.unive.lisa.symbolic.value.Constant constant, NonInterference state, it.unive.lisa.program.cfg.ProgramPoint pp)it.unive.lisa.analysis.nonrelational.inference.InferredValue.InferredPair<NonInterference>evalNullConstant(NonInterference state, it.unive.lisa.program.cfg.ProgramPoint pp)it.unive.lisa.analysis.nonrelational.inference.InferredValue.InferredPair<NonInterference>evalTernaryExpression(it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator operator, NonInterference left, NonInterference middle, NonInterference right, NonInterference state, it.unive.lisa.program.cfg.ProgramPoint pp)it.unive.lisa.analysis.nonrelational.inference.InferredValue.InferredPair<NonInterference>evalUnaryExpression(it.unive.lisa.symbolic.value.operator.unary.UnaryOperator operator, NonInterference arg, NonInterference state, it.unive.lisa.program.cfg.ProgramPoint pp)inthashCode()booleanisBottom()booleanisHighConfidentiality()Yieldstrueif and only if this instance represents ahighvalue for the confidentiality non interference analysis.booleanisHighIntegrity()Yieldstrueif and only if this instance represents ahighvalue for the integrity non interference analysis.booleanisLowConfidentiality()Yieldstrueif and only if this instance represents alowvalue for the confidentiality non interference analysis.booleanisLowIntegrity()Yieldstrueif and only if this instance represents alowvalue for the integrity non interference analysis.booleanisTop()booleanlessOrEqualAux(NonInterference other)NonInterferencelubAux(NonInterference other)it.unive.lisa.analysis.representation.DomainRepresentationrepresentation()NonInterferencetop()booleantracksIdentifiers(it.unive.lisa.symbolic.value.Identifier id)NonInterferencevariable(it.unive.lisa.symbolic.value.Identifier id, it.unive.lisa.program.cfg.ProgramPoint pp)-
Methods inherited from class it.unive.lisa.analysis.nonrelational.inference.BaseInferredValue
canProcess, eval, evalPushAny, evalTypeCast, evalTypeConv, glb, glbAux, satisfies, satisfiesAbstractValue, satisfiesBinaryExpression, satisfiesNonNullConstant, satisfiesNullConstant, satisfiesPushAny, satisfiesTernaryExpression, satisfiesUnaryExpression, toString
-
Methods inherited from class it.unive.lisa.analysis.BaseLattice
lessOrEqual, lub, widening, wideningAux
-
-
-
-
Field Detail
-
LOW_CONF_ANNOTATION
public static final it.unive.lisa.program.annotations.Annotation LOW_CONF_ANNOTATION
The annotation used to mark low confidentiality variables.
-
LOW_CONF_MATCHER
public static final it.unive.lisa.program.annotations.matcher.AnnotationMatcher LOW_CONF_MATCHER
AnnotationMatcherforLOW_CONF_ANNOTATION.
-
HIGH_INT_ANNOTATION
public static final it.unive.lisa.program.annotations.Annotation HIGH_INT_ANNOTATION
The annotation used to mark high integrity variables.
-
HIGH_INT_MATCHER
public static final it.unive.lisa.program.annotations.matcher.AnnotationMatcher HIGH_INT_MATCHER
AnnotationMatcherforHIGH_INT_ANNOTATION.
-
NI_BOTTOM
public static final byte NI_BOTTOM
The value to use for bottom non interference levels.- See Also:
- Constant Field Values
-
NI_LOW
public static final byte NI_LOW
The value to use for low non interference levels.- See Also:
- Constant Field Values
-
NI_HIGH
public static final byte NI_HIGH
The value to use for high non interference levels.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NonInterference
public NonInterference()
Builds a new instance of non interference, referring to the top element of the lattice.
-
NonInterference
public NonInterference(byte confidentiality, byte integrity)Builds the abstract value for the given confidentiality and integrity values. Each of those can be either 0 for bottom (NI_BOTTOM), 1 for low (NI_LOW), or 2 for high (NI_HIGH).- Parameters:
confidentiality- the confidentiality valueintegrity- the integrity value
-
-
Method Detail
-
top
public NonInterference top()
-
isTop
public boolean isTop()
-
bottom
public NonInterference bottom()
-
isBottom
public boolean isBottom()
-
isHighConfidentiality
public boolean isHighConfidentiality()
Yieldstrueif and only if this instance represents ahighvalue for the confidentiality non interference analysis.- Returns:
trueif this is a high confidentiality element
-
isLowConfidentiality
public boolean isLowConfidentiality()
Yieldstrueif and only if this instance represents alowvalue for the confidentiality non interference analysis.- Returns:
trueif this is a low confidentiality element
-
isHighIntegrity
public boolean isHighIntegrity()
Yieldstrueif and only if this instance represents ahighvalue for the integrity non interference analysis.- Returns:
trueif this is a high integrity element
-
isLowIntegrity
public boolean isLowIntegrity()
Yieldstrueif and only if this instance represents alowvalue for the integrity non interference analysis.- Returns:
trueif this is a low integrity element
-
lubAux
public NonInterference lubAux(NonInterference other) throws it.unive.lisa.analysis.SemanticException
- Specified by:
lubAuxin classit.unive.lisa.analysis.BaseLattice<NonInterference>- Throws:
it.unive.lisa.analysis.SemanticException
-
lessOrEqualAux
public boolean lessOrEqualAux(NonInterference other) throws it.unive.lisa.analysis.SemanticException
- Specified by:
lessOrEqualAuxin classit.unive.lisa.analysis.BaseLattice<NonInterference>- Throws:
it.unive.lisa.analysis.SemanticException
-
hashCode
public int hashCode()
- Specified by:
hashCodein classit.unive.lisa.analysis.BaseLattice<NonInterference>
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin classit.unive.lisa.analysis.BaseLattice<NonInterference>
-
representation
public it.unive.lisa.analysis.representation.DomainRepresentation representation()
-
evalNullConstant
public it.unive.lisa.analysis.nonrelational.inference.InferredValue.InferredPair<NonInterference> evalNullConstant(NonInterference state, it.unive.lisa.program.cfg.ProgramPoint pp) throws it.unive.lisa.analysis.SemanticException
- Overrides:
evalNullConstantin classit.unive.lisa.analysis.nonrelational.inference.BaseInferredValue<NonInterference>- Throws:
it.unive.lisa.analysis.SemanticException
-
evalNonNullConstant
public it.unive.lisa.analysis.nonrelational.inference.InferredValue.InferredPair<NonInterference> evalNonNullConstant(it.unive.lisa.symbolic.value.Constant constant, NonInterference state, it.unive.lisa.program.cfg.ProgramPoint pp) throws it.unive.lisa.analysis.SemanticException
- Overrides:
evalNonNullConstantin classit.unive.lisa.analysis.nonrelational.inference.BaseInferredValue<NonInterference>- Throws:
it.unive.lisa.analysis.SemanticException
-
evalUnaryExpression
public it.unive.lisa.analysis.nonrelational.inference.InferredValue.InferredPair<NonInterference> evalUnaryExpression(it.unive.lisa.symbolic.value.operator.unary.UnaryOperator operator, NonInterference arg, NonInterference state, it.unive.lisa.program.cfg.ProgramPoint pp) throws it.unive.lisa.analysis.SemanticException
- Overrides:
evalUnaryExpressionin classit.unive.lisa.analysis.nonrelational.inference.BaseInferredValue<NonInterference>- Throws:
it.unive.lisa.analysis.SemanticException
-
evalBinaryExpression
public it.unive.lisa.analysis.nonrelational.inference.InferredValue.InferredPair<NonInterference> evalBinaryExpression(it.unive.lisa.symbolic.value.operator.binary.BinaryOperator operator, NonInterference left, NonInterference right, NonInterference state, it.unive.lisa.program.cfg.ProgramPoint pp) throws it.unive.lisa.analysis.SemanticException
- Overrides:
evalBinaryExpressionin classit.unive.lisa.analysis.nonrelational.inference.BaseInferredValue<NonInterference>- Throws:
it.unive.lisa.analysis.SemanticException
-
evalTernaryExpression
public it.unive.lisa.analysis.nonrelational.inference.InferredValue.InferredPair<NonInterference> evalTernaryExpression(it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator operator, NonInterference left, NonInterference middle, NonInterference right, NonInterference state, it.unive.lisa.program.cfg.ProgramPoint pp) throws it.unive.lisa.analysis.SemanticException
- Overrides:
evalTernaryExpressionin classit.unive.lisa.analysis.nonrelational.inference.BaseInferredValue<NonInterference>- Throws:
it.unive.lisa.analysis.SemanticException
-
evalIdentifier
public it.unive.lisa.analysis.nonrelational.inference.InferredValue.InferredPair<NonInterference> evalIdentifier(it.unive.lisa.symbolic.value.Identifier id, it.unive.lisa.analysis.nonrelational.inference.InferenceSystem<NonInterference> environment, it.unive.lisa.program.cfg.ProgramPoint pp) throws it.unive.lisa.analysis.SemanticException
- Overrides:
evalIdentifierin classit.unive.lisa.analysis.nonrelational.inference.BaseInferredValue<NonInterference>- Throws:
it.unive.lisa.analysis.SemanticException
-
variable
public NonInterference variable(it.unive.lisa.symbolic.value.Identifier id, it.unive.lisa.program.cfg.ProgramPoint pp)
-
tracksIdentifiers
public boolean tracksIdentifiers(it.unive.lisa.symbolic.value.Identifier id)
- Specified by:
tracksIdentifiersin interfaceit.unive.lisa.analysis.SemanticEvaluator- Overrides:
tracksIdentifiersin classit.unive.lisa.analysis.nonrelational.inference.BaseInferredValue<NonInterference>
-
assume
public it.unive.lisa.analysis.nonrelational.inference.InferenceSystem<NonInterference> assume(it.unive.lisa.analysis.nonrelational.inference.InferenceSystem<NonInterference> environment, it.unive.lisa.symbolic.value.ValueExpression expression, it.unive.lisa.program.cfg.ProgramPoint pp) throws it.unive.lisa.analysis.SemanticException
- Specified by:
assumein interfaceit.unive.lisa.analysis.nonrelational.NonRelationalElement<NonInterference,it.unive.lisa.symbolic.value.ValueExpression,it.unive.lisa.analysis.nonrelational.inference.InferenceSystem<NonInterference>>- Overrides:
assumein classit.unive.lisa.analysis.nonrelational.inference.BaseInferredValue<NonInterference>- Throws:
it.unive.lisa.analysis.SemanticException
-
-