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.Annotation
HIGH_INT_ANNOTATION
The annotation used to mark high integrity variables.static it.unive.lisa.program.annotations.matcher.AnnotationMatcher
HIGH_INT_MATCHER
AnnotationMatcher
forHIGH_INT_ANNOTATION
.static it.unive.lisa.program.annotations.Annotation
LOW_CONF_ANNOTATION
The annotation used to mark low confidentiality variables.static it.unive.lisa.program.annotations.matcher.AnnotationMatcher
LOW_CONF_MATCHER
AnnotationMatcher
forLOW_CONF_ANNOTATION
.static byte
NI_BOTTOM
The value to use for bottom non interference levels.static byte
NI_HIGH
The value to use for high non interference levels.static byte
NI_LOW
The 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)
NonInterference
bottom()
boolean
equals(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)
int
hashCode()
boolean
isBottom()
boolean
isHighConfidentiality()
Yieldstrue
if and only if this instance represents ahigh
value for the confidentiality non interference analysis.boolean
isHighIntegrity()
Yieldstrue
if and only if this instance represents ahigh
value for the integrity non interference analysis.boolean
isLowConfidentiality()
Yieldstrue
if and only if this instance represents alow
value for the confidentiality non interference analysis.boolean
isLowIntegrity()
Yieldstrue
if and only if this instance represents alow
value for the integrity non interference analysis.boolean
isTop()
boolean
lessOrEqualAux(NonInterference other)
NonInterference
lubAux(NonInterference other)
it.unive.lisa.analysis.representation.DomainRepresentation
representation()
NonInterference
top()
boolean
tracksIdentifiers(it.unive.lisa.symbolic.value.Identifier id)
NonInterference
variable(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
AnnotationMatcher
forLOW_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
AnnotationMatcher
forHIGH_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()
Yieldstrue
if and only if this instance represents ahigh
value for the confidentiality non interference analysis.- Returns:
true
if this is a high confidentiality element
-
isLowConfidentiality
public boolean isLowConfidentiality()
Yieldstrue
if and only if this instance represents alow
value for the confidentiality non interference analysis.- Returns:
true
if this is a low confidentiality element
-
isHighIntegrity
public boolean isHighIntegrity()
Yieldstrue
if and only if this instance represents ahigh
value for the integrity non interference analysis.- Returns:
true
if this is a high integrity element
-
isLowIntegrity
public boolean isLowIntegrity()
Yieldstrue
if and only if this instance represents alow
value for the integrity non interference analysis.- Returns:
true
if this is a low integrity element
-
lubAux
public NonInterference lubAux(NonInterference other) throws it.unive.lisa.analysis.SemanticException
- Specified by:
lubAux
in 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:
lessOrEqualAux
in classit.unive.lisa.analysis.BaseLattice<NonInterference>
- Throws:
it.unive.lisa.analysis.SemanticException
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classit.unive.lisa.analysis.BaseLattice<NonInterference>
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in 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:
evalNullConstant
in 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:
evalNonNullConstant
in 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:
evalUnaryExpression
in 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:
evalBinaryExpression
in 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:
evalTernaryExpression
in 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:
evalIdentifier
in 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:
tracksIdentifiers
in interfaceit.unive.lisa.analysis.SemanticEvaluator
- Overrides:
tracksIdentifiers
in 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:
assume
in interfaceit.unive.lisa.analysis.nonrelational.NonRelationalElement<NonInterference,it.unive.lisa.symbolic.value.ValueExpression,it.unive.lisa.analysis.nonrelational.inference.InferenceSystem<NonInterference>>
- Overrides:
assume
in classit.unive.lisa.analysis.nonrelational.inference.BaseInferredValue<NonInterference>
- Throws:
it.unive.lisa.analysis.SemanticException
-
-