Class IntegerConstantPropagation

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

    public class IntegerConstantPropagation
    extends java.lang.Object
    implements it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<IntegerConstantPropagation>
    The overflow-insensitive basic integer constant propagation abstract domain, tracking if a certain integer value has constant value or not, implemented as a BaseNonRelationalValueDomain, handling top and bottom values for the expression evaluation and bottom values for the expression satisfiability. 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

      • IntegerConstantPropagation

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

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

      • representation

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

        public IntegerConstantPropagation 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<IntegerConstantPropagation>
      • evalNonNullConstant

        public IntegerConstantPropagation 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<IntegerConstantPropagation>
      • evalUnaryExpression

        public IntegerConstantPropagation evalUnaryExpression​(it.unive.lisa.symbolic.value.operator.unary.UnaryOperator operator,
                                                              IntegerConstantPropagation 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<IntegerConstantPropagation>
      • lessOrEqualAux

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

        public int hashCode()
        Specified by:
        hashCode in interface it.unive.lisa.analysis.BaseLattice<IntegerConstantPropagation>
        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<IntegerConstantPropagation>
        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,
                                                                                        IntegerConstantPropagation left,
                                                                                        IntegerConstantPropagation 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<IntegerConstantPropagation>
      • assumeBinaryExpression

        public it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<IntegerConstantPropagation> assumeBinaryExpression​(it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<IntegerConstantPropagation> 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<IntegerConstantPropagation>
        Throws:
        it.unive.lisa.analysis.SemanticException