Class IMPNewObj

  • 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 IMPNewObj
    extends it.unive.lisa.program.cfg.statement.NaryExpression
    An expression modeling the object allocation and initialization operation (new className(...)). The type of this expression is the UnitType representing the created class. This expression corresponds to a MemoryAllocation that is used as first parameter (i.e., this) for the UnresolvedCall targeting the invoked constructor. All parameters of the constructor call are provided to the UnresolvedCall.
    • Constructor Summary

      Constructors 
      Constructor Description
      IMPNewObj​(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... parameters)
      Builds the object allocation and initialization.
    • 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)  
      protected int compareSameClassAndParams​(it.unive.lisa.program.cfg.statement.Statement o)  
      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, compareSameClass, forwardSemantics, getConstructName, getOrder, getStatementEvaluatedAfter, getStatementEvaluatedBefore, getSubExpressions, 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
    • Constructor Detail

      • IMPNewObj

        public IMPNewObj​(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... parameters)
        Builds the object allocation and initialization.
        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 object that is being created
        staticallyAllocated - if this allocation is static or not
        parameters - the parameters of the constructor call
    • Method Detail

      • compareSameClassAndParams

        protected int compareSameClassAndParams​(it.unive.lisa.program.cfg.statement.Statement o)
        Specified by:
        compareSameClassAndParams in class it.unive.lisa.program.cfg.statement.NaryExpression
      • 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