Class ArrayLength.IMPArrayLength

  • All Implemented Interfaces:
    it.unive.lisa.program.cfg.ProgramPoint, it.unive.lisa.program.cfg.statement.PluggableStatement, it.unive.lisa.program.CodeElement, it.unive.lisa.util.datastructures.graph.code.CodeNode<it.unive.lisa.program.cfg.CFG,​it.unive.lisa.program.cfg.statement.Statement,​it.unive.lisa.program.cfg.edge.Edge>, it.unive.lisa.util.datastructures.graph.Node<it.unive.lisa.program.cfg.CFG,​it.unive.lisa.program.cfg.statement.Statement,​it.unive.lisa.program.cfg.edge.Edge>, java.lang.Comparable<it.unive.lisa.program.cfg.statement.Statement>
    Enclosing class:
    ArrayLength

    public static class ArrayLength.IMPArrayLength
    extends it.unive.lisa.program.cfg.statement.UnaryExpression
    implements it.unive.lisa.program.cfg.statement.PluggableStatement
    An expression modeling the array length operation. The type of the operand must be ArrayType. The type of this expression is the Int32Type.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected it.unive.lisa.program.cfg.statement.Statement originating
      The statement that originated this one.
    • Constructor Summary

      Constructors 
      Constructor Description
      IMPArrayLength​(it.unive.lisa.program.cfg.CFG cfg, it.unive.lisa.program.cfg.CodeLocation location, it.unive.lisa.program.cfg.statement.Expression parameter)
      Builds the length.
      IMPArrayLength​(it.unive.lisa.program.cfg.CFG cfg, java.lang.String sourceFile, int line, int col, it.unive.lisa.program.cfg.statement.Expression parameter)
      Builds the length.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ArrayLength.IMPArrayLength build​(it.unive.lisa.program.cfg.CFG cfg, it.unive.lisa.program.cfg.CodeLocation location, it.unive.lisa.program.cfg.statement.Expression... params)
      Builds a new instance of this native call, according to the PluggableStatement contract.
      protected int compareSameClassAndParams​(it.unive.lisa.program.cfg.statement.Statement o)  
      <A extends it.unive.lisa.analysis.AbstractState<A>>
      it.unive.lisa.analysis.AnalysisState<A>
      fwdUnarySemantics​(it.unive.lisa.interprocedural.InterproceduralAnalysis<A> interprocedural, it.unive.lisa.analysis.AnalysisState<A> state, it.unive.lisa.symbolic.SymbolicExpression expr, it.unive.lisa.analysis.StatementStore<A> expressions)  
      void setOriginatingStatement​(it.unive.lisa.program.cfg.statement.Statement st)  
      • Methods inherited from class it.unive.lisa.program.cfg.statement.UnaryExpression

        backwardSemanticsAux, bwdUnarySemantics, forwardSemanticsAux, getSubExpression
      • Methods inherited from class it.unive.lisa.program.cfg.statement.NaryExpression

        accept, backwardSemantics, compareSameClass, equals, forwardSemantics, getConstructName, getOrder, getStatementEvaluatedAfter, getStatementEvaluatedBefore, getSubExpressions, hashCode, toString
      • Methods inherited from class it.unive.lisa.program.cfg.statement.Expression

        getMetaVariables, getParentStatement, getRootStatement, getStaticType, setParentStatement
      • Methods inherited from class it.unive.lisa.program.cfg.statement.Statement

        compareTo, getCFG, getEvaluationPredecessor, getEvaluationSuccessor, getLocation, stopsExecution, throwsError
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface it.unive.lisa.program.cfg.ProgramPoint

        getProgram
    • Field Detail

      • originating

        protected it.unive.lisa.program.cfg.statement.Statement originating
        The statement that originated this one.
    • Constructor Detail

      • IMPArrayLength

        public IMPArrayLength​(it.unive.lisa.program.cfg.CFG cfg,
                              java.lang.String sourceFile,
                              int line,
                              int col,
                              it.unive.lisa.program.cfg.statement.Expression parameter)
        Builds the length.
        Parameters:
        cfg - the CFG where this operation lies
        sourceFile - the source file name where this operation is defined
        line - the line number where this operation is defined
        col - the column where this operation is defined
        parameter - the operand of this operation
      • IMPArrayLength

        public IMPArrayLength​(it.unive.lisa.program.cfg.CFG cfg,
                              it.unive.lisa.program.cfg.CodeLocation location,
                              it.unive.lisa.program.cfg.statement.Expression parameter)
        Builds the length.
        Parameters:
        cfg - the CFG where this operation lies
        location - the code location where this operation is defined
        parameter - the operand of this operation
    • Method Detail

      • build

        public static ArrayLength.IMPArrayLength build​(it.unive.lisa.program.cfg.CFG cfg,
                                                       it.unive.lisa.program.cfg.CodeLocation location,
                                                       it.unive.lisa.program.cfg.statement.Expression... params)
        Builds a new instance of this native call, according to the PluggableStatement contract.
        Parameters:
        cfg - the cfg where the native call happens
        location - the location where the native call happens
        params - the parameters of the native call
        Returns:
        the newly-built call
      • setOriginatingStatement

        public void setOriginatingStatement​(it.unive.lisa.program.cfg.statement.Statement st)
        Specified by:
        setOriginatingStatement in interface it.unive.lisa.program.cfg.statement.PluggableStatement
      • compareSameClassAndParams

        protected int compareSameClassAndParams​(it.unive.lisa.program.cfg.statement.Statement o)
        Specified by:
        compareSameClassAndParams in class it.unive.lisa.program.cfg.statement.NaryExpression
      • fwdUnarySemantics

        public <A extends it.unive.lisa.analysis.AbstractState<A>> it.unive.lisa.analysis.AnalysisState<A> fwdUnarySemantics​(it.unive.lisa.interprocedural.InterproceduralAnalysis<A> interprocedural,
                                                                                                                             it.unive.lisa.analysis.AnalysisState<A> state,
                                                                                                                             it.unive.lisa.symbolic.SymbolicExpression expr,
                                                                                                                             it.unive.lisa.analysis.StatementStore<A> expressions)
                                                                                                                      throws it.unive.lisa.analysis.SemanticException
        Specified by:
        fwdUnarySemantics in class it.unive.lisa.program.cfg.statement.UnaryExpression
        Throws:
        it.unive.lisa.analysis.SemanticException