Class Brick

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

    public class Brick
    extends java.lang.Object
    implements it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<Brick>
    The brick string abstract domain.
    See Also:
    https://link.springer.com/chapter/10.1007/978-3-642-24559-6_34
    • 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
      Brick()
      Builds the top brick abstract element.
      Brick​(int min, int max, java.util.Set<java.lang.String> strings)
      Builds a brick abstract element.
      Brick​(it.unive.lisa.util.numeric.IntInterval interval, java.util.Set<java.lang.String> strings)
      Builds a brick abstract element.
      Brick​(it.unive.lisa.util.numeric.MathNumber min, it.unive.lisa.util.numeric.MathNumber max, java.util.Set<java.lang.String> strings)
      Builds a brick abstract element.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Brick bottom()  
      boolean equals​(java.lang.Object o)  
      it.unive.lisa.util.numeric.MathNumber getMax()
      Yields the max of this abstract value.
      it.unive.lisa.util.numeric.MathNumber getMin()
      Yields the min of this abstract value.
      java.util.Set<java.lang.String> getReps()
      Yields all the possible concatenations between min and max of the strings set.
      java.util.Set<java.lang.String> getStrings()
      Yields the set of strings of this abstract value.
      int hashCode()  
      boolean isFinite()
      Helper method to determine if the maximum of the Brick is Finite or not.
      boolean isTop()  
      boolean lessOrEqualAux​(Brick other)  
      Brick lubAux​(Brick other)  
      it.unive.lisa.util.representation.StructuredRepresentation representation()  
      Brick top()  
      java.lang.String toString()  
      Brick wideningAux​(Brick other)  
      • 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

        assume, assumeBinaryExpression, 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 it.unive.lisa.analysis.Lattice

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

        fixedVariable, unknownVariable
    • Constructor Detail

      • Brick

        public Brick()
        Builds the top brick abstract element.
      • Brick

        public Brick​(int min,
                     int max,
                     java.util.Set<java.lang.String> strings)
        Builds a brick abstract element.
        Parameters:
        min - a positive integer that represents the minimum concatenations of the strings set
        max - a positive integer that represents the maximum concatenations of the strings set
        strings - the set of strings
        Throws:
        java.lang.IllegalArgumentException - if min or max are negative numbers.
      • Brick

        public Brick​(it.unive.lisa.util.numeric.MathNumber min,
                     it.unive.lisa.util.numeric.MathNumber max,
                     java.util.Set<java.lang.String> strings)
        Builds a brick abstract element.
        Parameters:
        min - a MathNumber that represents the minimum concatenations of the strings set
        max - a MathNumber that represents the maximum concatenations of the strings set
        strings - the set of strings
      • Brick

        public Brick​(it.unive.lisa.util.numeric.IntInterval interval,
                     java.util.Set<java.lang.String> strings)
        Builds a brick abstract element.
        Parameters:
        interval - an interval that yields the minimum of the brick and the maximum of the brick respectively
        strings - the set of strings
    • Method Detail

      • lubAux

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

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

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

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

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

        public it.unive.lisa.util.numeric.MathNumber getMin()
        Yields the min of this abstract value.
        Returns:
        the min of this abstract value
      • getMax

        public it.unive.lisa.util.numeric.MathNumber getMax()
        Yields the max of this abstract value.
        Returns:
        the max of this abstract value
      • getStrings

        public java.util.Set<java.lang.String> getStrings()
        Yields the set of strings of this abstract value.
        Returns:
        the set of strings of this abstract value
      • top

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

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

        public boolean isTop()
        Specified by:
        isTop in interface it.unive.lisa.analysis.Lattice<Brick>
      • isFinite

        public boolean isFinite()
        Helper method to determine if the maximum of the Brick is Finite or not.
        Returns:
        true if the maximum of the Brick is Finite, false otherwise.
      • getReps

        public java.util.Set<java.lang.String> getReps()
        Yields all the possible concatenations between min and max of the strings set.
        Returns:
        the set of strings with all possible concatenations between min and max.
        Throws:
        java.lang.IllegalStateException - if the brick is not finite.
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface it.unive.lisa.analysis.BaseLattice<Brick>
        Overrides:
        toString in class java.lang.Object
      • representation

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