Package it.unive.lisa.imp.expressions
Class IMPNewObj
- java.lang.Object
-
- it.unive.lisa.program.cfg.statement.Statement
-
- it.unive.lisa.program.cfg.statement.Expression
-
- it.unive.lisa.program.cfg.statement.NaryExpression
-
- it.unive.lisa.imp.expressions.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 theUnitType
representing the created class. This expression corresponds to aMemoryAllocation
that is used as first parameter (i.e.,this
) for theUnresolvedCall
targeting the invoked constructor. All parameters of the constructor call are provided to theUnresolvedCall
.
-
-
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
-
-
-
-
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
- theCFG
where this operation liessourceFile
- the source file name where this operation is definedline
- the line number where this operation is definedcol
- the column where this operation is definedtype
- the type of the object that is being createdstaticallyAllocated
- if this allocation is static or notparameters
- the parameters of the constructor call
-
-
Method Detail
-
compareSameClassAndParams
protected int compareSameClassAndParams(it.unive.lisa.program.cfg.statement.Statement o)
- Specified by:
compareSameClassAndParams
in classit.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 classit.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 classit.unive.lisa.program.cfg.statement.NaryExpression
- Throws:
it.unive.lisa.analysis.SemanticException
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classit.unive.lisa.program.cfg.statement.NaryExpression
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classit.unive.lisa.program.cfg.statement.NaryExpression
-
-