Class UpperBounds

  • All Implemented Interfaces:
    it.unive.lisa.analysis.BaseLattice<UpperBounds>, it.unive.lisa.analysis.Lattice<UpperBounds>, it.unive.lisa.analysis.nonrelational.NonRelationalDomain<UpperBounds,​it.unive.lisa.symbolic.value.ValueExpression,​it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<UpperBounds>>, it.unive.lisa.analysis.nonrelational.NonRelationalElement<UpperBounds,​it.unive.lisa.symbolic.value.ValueExpression,​it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<UpperBounds>>, it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<UpperBounds>, it.unive.lisa.analysis.nonrelational.value.NonRelationalValueDomain<UpperBounds>, it.unive.lisa.analysis.SemanticEvaluator, it.unive.lisa.util.representation.StructuredObject, java.lang.Iterable<it.unive.lisa.symbolic.value.Identifier>

    public class UpperBounds
    extends java.lang.Object
    implements it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<UpperBounds>, java.lang.Iterable<it.unive.lisa.symbolic.value.Identifier>
    The upper bounds abstract domain. It is implemented as a BaseNonRelationalValueDomain.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain

        it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain.EvaluationVisitor<T extends it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<T>>
    • Field Summary

      • Fields inherited from interface it.unive.lisa.analysis.Lattice

        BOTTOM_STRING, TOP_STRING
    • Constructor Summary

      Constructors 
      Constructor Description
      UpperBounds()
      Builds the upper bounds.
      UpperBounds​(boolean isTop)
      Builds the upper bounds.
      UpperBounds​(java.util.Set<it.unive.lisa.symbolic.value.Identifier> bounds)
      Builds the upper bounds.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      UpperBounds add​(it.unive.lisa.symbolic.value.Identifier id)
      Adds the specified identifier of a program variable in the bounds.
      it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<UpperBounds> assumeBinaryExpression​(it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<UpperBounds> environment, it.unive.lisa.symbolic.value.operator.binary.BinaryOperator operator, it.unive.lisa.symbolic.value.ValueExpression left, it.unive.lisa.symbolic.value.ValueExpression right, it.unive.lisa.program.cfg.ProgramPoint src, it.unive.lisa.program.cfg.ProgramPoint dest, it.unive.lisa.analysis.SemanticOracle oracle)  
      UpperBounds bottom()  
      boolean contains​(it.unive.lisa.symbolic.value.Identifier id)
      Checks if this bounds contains a specified identifier of a program variable.
      boolean equals​(java.lang.Object obj)  
      UpperBounds glbAux​(UpperBounds other)  
      int hashCode()  
      boolean isBottom()  
      java.util.Iterator<it.unive.lisa.symbolic.value.Identifier> iterator()  
      boolean lessOrEqualAux​(UpperBounds other)  
      UpperBounds lubAux​(UpperBounds other)  
      it.unive.lisa.util.representation.StructuredRepresentation representation()  
      UpperBounds top()  
      UpperBounds wideningAux​(UpperBounds other)  
      • Methods inherited from class java.lang.Object

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

        glb, lessOrEqual, lub, narrowing, narrowingAux, toString, widening
      • Methods inherited from interface it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain

        assume, assumeTernaryExpression, assumeUnaryExpression, canProcess, eval, evalBinaryExpression, evalIdentifier, evalNonNullConstant, evalNullConstant, evalPushAny, evalPushInv, evalSkip, evalTernaryExpression, evalTypeCast, evalTypeConv, evalUnaryExpression, evalValueExpression, satisfies, satisfiesAbstractValue, satisfiesBinaryExpression, satisfiesNonNullConstant, satisfiesNullConstant, satisfiesTernaryExpression, satisfiesUnaryExpression
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
      • Methods inherited from interface it.unive.lisa.analysis.Lattice

        isTop
      • Methods inherited from interface it.unive.lisa.analysis.nonrelational.NonRelationalElement

        fixedVariable, unknownVariable
    • Constructor Detail

      • UpperBounds

        public UpperBounds()
        Builds the upper bounds.
      • UpperBounds

        public UpperBounds​(boolean isTop)
        Builds the upper bounds.
        Parameters:
        isTop - true if the abstract domain is top; otherwise false.
      • UpperBounds

        public UpperBounds​(java.util.Set<it.unive.lisa.symbolic.value.Identifier> bounds)
        Builds the upper bounds.
        Parameters:
        bounds - the bounds to set
    • Method Detail

      • representation

        public it.unive.lisa.util.representation.StructuredRepresentation representation()
        Specified by:
        representation in interface it.unive.lisa.util.representation.StructuredObject
      • bottom

        public UpperBounds bottom()
        Specified by:
        bottom in interface it.unive.lisa.analysis.Lattice<UpperBounds>
      • isBottom

        public boolean isBottom()
        Specified by:
        isBottom in interface it.unive.lisa.analysis.Lattice<UpperBounds>
      • lubAux

        public UpperBounds lubAux​(UpperBounds other)
                           throws it.unive.lisa.analysis.SemanticException
        Specified by:
        lubAux in interface it.unive.lisa.analysis.BaseLattice<UpperBounds>
        Throws:
        it.unive.lisa.analysis.SemanticException
      • glbAux

        public UpperBounds glbAux​(UpperBounds other)
                           throws it.unive.lisa.analysis.SemanticException
        Specified by:
        glbAux in interface it.unive.lisa.analysis.BaseLattice<UpperBounds>
        Throws:
        it.unive.lisa.analysis.SemanticException
      • lessOrEqualAux

        public boolean lessOrEqualAux​(UpperBounds other)
                               throws it.unive.lisa.analysis.SemanticException
        Specified by:
        lessOrEqualAux in interface it.unive.lisa.analysis.BaseLattice<UpperBounds>
        Throws:
        it.unive.lisa.analysis.SemanticException
      • wideningAux

        public UpperBounds wideningAux​(UpperBounds other)
                                throws it.unive.lisa.analysis.SemanticException
        Specified by:
        wideningAux in interface it.unive.lisa.analysis.BaseLattice<UpperBounds>
        Throws:
        it.unive.lisa.analysis.SemanticException
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface it.unive.lisa.analysis.BaseLattice<UpperBounds>
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface it.unive.lisa.analysis.BaseLattice<UpperBounds>
        Overrides:
        hashCode in class java.lang.Object
      • assumeBinaryExpression

        public it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<UpperBounds> assumeBinaryExpression​(it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<UpperBounds> environment,
                                                                                                               it.unive.lisa.symbolic.value.operator.binary.BinaryOperator operator,
                                                                                                               it.unive.lisa.symbolic.value.ValueExpression left,
                                                                                                               it.unive.lisa.symbolic.value.ValueExpression right,
                                                                                                               it.unive.lisa.program.cfg.ProgramPoint src,
                                                                                                               it.unive.lisa.program.cfg.ProgramPoint dest,
                                                                                                               it.unive.lisa.analysis.SemanticOracle oracle)
                                                                                                        throws it.unive.lisa.analysis.SemanticException
        Specified by:
        assumeBinaryExpression in interface it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<UpperBounds>
        Throws:
        it.unive.lisa.analysis.SemanticException
      • iterator

        public java.util.Iterator<it.unive.lisa.symbolic.value.Identifier> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<it.unive.lisa.symbolic.value.Identifier>
      • contains

        public boolean contains​(it.unive.lisa.symbolic.value.Identifier id)
        Checks if this bounds contains a specified identifier of a program variable.
        Parameters:
        id - the identifier to check
        Returns:
        true if this bounds contains the specified identifier; otherwise, false.
      • add

        public UpperBounds add​(it.unive.lisa.symbolic.value.Identifier id)
        Adds the specified identifier of a program variable in the bounds.
        Parameters:
        id - the identifier to add in the bounds.
        Returns:
        the updated bounds.