Class 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
    • Nested Class Summary

      • Nested classes/interfaces inherited from class it.unive.lisa.analysis.nonrelational.inference.BaseInferredValue

        it.unive.lisa.analysis.nonrelational.inference.BaseInferredValue.EvaluationVisitor
      • Nested classes/interfaces inherited from interface it.unive.lisa.analysis.nonrelational.inference.InferredValue

        it.unive.lisa.analysis.nonrelational.inference.InferredValue.InferredPair<T extends it.unive.lisa.analysis.nonrelational.inference.InferredValue<T>>
    • 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 for HIGH_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 for LOW_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.
      • Fields inherited from interface it.unive.lisa.analysis.Lattice

        BOTTOM_STRING, TOP_STRING
    • 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()
      Yields true if and only if this instance represents a high value for the confidentiality non interference analysis.
      boolean isHighIntegrity()
      Yields true if and only if this instance represents a high value for the integrity non interference analysis.
      boolean isLowConfidentiality()
      Yields true if and only if this instance represents a low value for the confidentiality non interference analysis.
      boolean isLowIntegrity()
      Yields true if and only if this instance represents a low 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
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface it.unive.lisa.analysis.Lattice

        lessOrEqual, lub, widening
    • 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 for LOW_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 for HIGH_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 value
        integrity - the integrity value
    • Method Detail

      • isTop

        public boolean isTop()
      • isBottom

        public boolean isBottom()
      • isHighConfidentiality

        public boolean isHighConfidentiality()
        Yields true if and only if this instance represents a high value for the confidentiality non interference analysis.
        Returns:
        true if this is a high confidentiality element
      • isLowConfidentiality

        public boolean isLowConfidentiality()
        Yields true if and only if this instance represents a low value for the confidentiality non interference analysis.
        Returns:
        true if this is a low confidentiality element
      • isHighIntegrity

        public boolean isHighIntegrity()
        Yields true if and only if this instance represents a high value for the integrity non interference analysis.
        Returns:
        true if this is a high integrity element
      • isLowIntegrity

        public boolean isLowIntegrity()
        Yields true if and only if this instance represents a low 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 class it.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 class it.unive.lisa.analysis.BaseLattice<NonInterference>
        Throws:
        it.unive.lisa.analysis.SemanticException
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in class it.unive.lisa.analysis.BaseLattice<NonInterference>
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in class it.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 class it.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 class it.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 class it.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 class it.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 class it.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 class it.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 interface it.unive.lisa.analysis.SemanticEvaluator
        Overrides:
        tracksIdentifiers in class it.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 interface it.unive.lisa.analysis.nonrelational.NonRelationalElement<NonInterference,​it.unive.lisa.symbolic.value.ValueExpression,​it.unive.lisa.analysis.nonrelational.inference.InferenceSystem<NonInterference>>
        Overrides:
        assume in class it.unive.lisa.analysis.nonrelational.inference.BaseInferredValue<NonInterference>
        Throws:
        it.unive.lisa.analysis.SemanticException