Class StringConstantPropagation

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

    public class StringConstantPropagation
    extends java.lang.Object
    implements it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<StringConstantPropagation>
    The string constant propagation abstract domain, tracking if a certain string value has constant value or not. Top and bottom cases for least upper bounds, widening and less or equals operations are handled by BaseLattice in BaseLattice.lub(L), BaseLattice.widening(L) and BaseLattice.lessOrEqual(L), respectively.
    • Constructor Detail

      • StringConstantPropagation

        public StringConstantPropagation()
        Builds the top abstract value.
      • StringConstantPropagation

        public StringConstantPropagation​(java.lang.String value)
        Builds the abstract value for the given constant.
        Parameters:
        value - the constant
    • Method Detail

      • isTop

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

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

        public StringConstantPropagation evalNullConstant​(it.unive.lisa.program.cfg.ProgramPoint pp,
                                                          it.unive.lisa.analysis.SemanticOracle oracle)
        Specified by:
        evalNullConstant in interface it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<StringConstantPropagation>
      • evalNonNullConstant

        public StringConstantPropagation evalNonNullConstant​(it.unive.lisa.symbolic.value.Constant constant,
                                                             it.unive.lisa.program.cfg.ProgramPoint pp,
                                                             it.unive.lisa.analysis.SemanticOracle oracle)
        Specified by:
        evalNonNullConstant in interface it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<StringConstantPropagation>
      • evalUnaryExpression

        public StringConstantPropagation evalUnaryExpression​(it.unive.lisa.symbolic.value.operator.unary.UnaryOperator operator,
                                                             StringConstantPropagation arg,
                                                             it.unive.lisa.program.cfg.ProgramPoint pp,
                                                             it.unive.lisa.analysis.SemanticOracle oracle)
        Specified by:
        evalUnaryExpression in interface it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<StringConstantPropagation>
      • lessOrEqualAux

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

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

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

        public it.unive.lisa.analysis.lattices.Satisfiability satisfiesBinaryExpression​(it.unive.lisa.symbolic.value.operator.binary.BinaryOperator operator,
                                                                                        StringConstantPropagation left,
                                                                                        StringConstantPropagation right,
                                                                                        it.unive.lisa.program.cfg.ProgramPoint pp,
                                                                                        it.unive.lisa.analysis.SemanticOracle oracle)
        Specified by:
        satisfiesBinaryExpression in interface it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<StringConstantPropagation>
      • getValue

        protected java.lang.String getValue()
                                     throws it.unive.lisa.analysis.SemanticException
        Returns the abstract value of the domain.
        Returns:
        the string representing the constant value
        Throws:
        it.unive.lisa.analysis.SemanticException - if the method is called on a top or bottom element