Class IMPNewArray

  • All Implemented Interfaces:
    it.unive.lisa.program.cfg.ProgramPoint, 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>

    public class IMPNewArray
    extends it.unive.lisa.program.cfg.statement.NaryExpression
    An expression modeling the array allocation operation (new type[...]). The type of this expression is the Type of the array's elements. Note that the dimensions of the array are ignored. This expression corresponds to a MemoryAllocation.
    • Field Summary

      • Fields inherited from class it.unive.lisa.program.cfg.statement.Statement

        offset
    • Constructor Summary

      Constructors 
      Constructor Description
      IMPNewArray​(it.unive.lisa.program.cfg.CFG cfg, java.lang.String sourceFile, int line, int col, it.unive.lisa.type.Type type, boolean staticallyAllocated, it.unive.lisa.program.cfg.statement.Expression[] dimensions)
      Builds the array allocation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <A extends it.unive.lisa.analysis.AbstractState<A>>
      it.unive.lisa.analysis.AnalysisState<A>
      backwardSemanticsAux​(it.unive.lisa.interprocedural.InterproceduralAnalysis<A> interprocedural, it.unive.lisa.analysis.AnalysisState<A> state, it.unive.lisa.analysis.lattices.ExpressionSet[] params, it.unive.lisa.analysis.StatementStore<A> expressions)  
      boolean equals​(java.lang.Object obj)  
      <A extends it.unive.lisa.analysis.AbstractState<A>>
      it.unive.lisa.analysis.AnalysisState<A>
      forwardSemanticsAux​(it.unive.lisa.interprocedural.InterproceduralAnalysis<A> interprocedural, it.unive.lisa.analysis.AnalysisState<A> state, it.unive.lisa.analysis.lattices.ExpressionSet[] params, it.unive.lisa.analysis.StatementStore<A> expressions)  
      int hashCode()  
      • Methods inherited from class it.unive.lisa.program.cfg.statement.NaryExpression

        accept, backwardSemantics, forwardSemantics, getConstructName, getOrder, getStatementEvaluatedAfter, getStatementEvaluatedBefore, getSubExpressions, setOffset, 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, getOffset, 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
    • Constructor Detail

      • IMPNewArray

        public IMPNewArray​(it.unive.lisa.program.cfg.CFG cfg,
                           java.lang.String sourceFile,
                           int line,
                           int col,
                           it.unive.lisa.type.Type type,
                           boolean staticallyAllocated,
                           it.unive.lisa.program.cfg.statement.Expression[] dimensions)
        Builds the array allocation.
        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
        type - the type of the array's elements
        staticallyAllocated - if this allocation is static or not
        dimensions - the dimensions of the array
    • Method Detail

      • forwardSemanticsAux

        public <A extends it.unive.lisa.analysis.AbstractState<A>> it.unive.lisa.analysis.AnalysisState<A> forwardSemanticsAux​(it.unive.lisa.interprocedural.InterproceduralAnalysis<A> interprocedural,
                                                                                                                               it.unive.lisa.analysis.AnalysisState<A> state,
                                                                                                                               it.unive.lisa.analysis.lattices.ExpressionSet[] params,
                                                                                                                               it.unive.lisa.analysis.StatementStore<A> expressions)
                                                                                                                        throws it.unive.lisa.analysis.SemanticException
        Specified by:
        forwardSemanticsAux in class it.unive.lisa.program.cfg.statement.NaryExpression
        Throws:
        it.unive.lisa.analysis.SemanticException
      • backwardSemanticsAux

        public <A extends it.unive.lisa.analysis.AbstractState<A>> it.unive.lisa.analysis.AnalysisState<A> backwardSemanticsAux​(it.unive.lisa.interprocedural.InterproceduralAnalysis<A> interprocedural,
                                                                                                                                it.unive.lisa.analysis.AnalysisState<A> state,
                                                                                                                                it.unive.lisa.analysis.lattices.ExpressionSet[] params,
                                                                                                                                it.unive.lisa.analysis.StatementStore<A> expressions)
                                                                                                                         throws it.unive.lisa.analysis.SemanticException
        Overrides:
        backwardSemanticsAux in class it.unive.lisa.program.cfg.statement.NaryExpression
        Throws:
        it.unive.lisa.analysis.SemanticException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class it.unive.lisa.program.cfg.statement.NaryExpression
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class it.unive.lisa.program.cfg.statement.NaryExpression