Class UnresolvedCall
- java.lang.Object
-
- it.unive.lisa.program.cfg.statement.Statement
-
- it.unive.lisa.program.cfg.statement.Expression
-
- it.unive.lisa.program.cfg.statement.Call
-
- it.unive.lisa.program.cfg.statement.UnresolvedCall
-
- All Implemented Interfaces:
ProgramPoint,CodeElement,Node<Statement,Edge,CFG>,java.lang.Comparable<Statement>
public class UnresolvedCall extends Call
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUnresolvedCall.ResolutionStrategyAn enum defining the different types of resolution strategies for call signatures.
-
Constructor Summary
Constructors Constructor Description UnresolvedCall(CFG cfg, CodeLocation location, UnresolvedCall.ResolutionStrategy strategy, boolean instanceCall, java.lang.String targetName, Expression... parameters)Builds the CFG call, happening at the given location in the program.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <A extends AbstractState<A,H,V>,H extends HeapDomain<H>,V extends ValueDomain<V>>
AnalysisState<A,H,V>callSemantics(AnalysisState<A,H,V> entryState, InterproceduralAnalysis<A,H,V> interprocedural, AnalysisState<A,H,V>[] computedStates, ExpressionSet<SymbolicExpression>[] params)Computes the semantics of the call, after the semantics of all parameters have been computed.booleanequals(java.lang.Object obj)UnresolvedCall.ResolutionStrategygetStrategy()Yields theUnresolvedCall.ResolutionStrategyof the parameters of this call.java.lang.StringgetTargetName()Yields the name of the target of this call.inthashCode()voidinheritRuntimeTypesFrom(Expression other)Updates this call's runtime types to match the ones of the given expression.booleanisInstanceCall()Yields whether or not this is a call to an instance method of a unit (that can be overridden) or not.java.lang.StringtoString()-
Methods inherited from class it.unive.lisa.program.cfg.statement.Call
accept, getParameters, semantics, setOffset
-
Methods inherited from class it.unive.lisa.program.cfg.statement.Expression
getDynamicType, getMetaVariables, getParentStatement, getRootStatement, getRuntimeTypes, getStaticType, setParentStatement, setRuntimeTypes
-
Methods inherited from class it.unive.lisa.program.cfg.statement.Statement
compareTo, getCFG, getLocation, getOffset, stopsExecution, throwsError
-
-
-
-
Constructor Detail
-
UnresolvedCall
public UnresolvedCall(CFG cfg, CodeLocation location, UnresolvedCall.ResolutionStrategy strategy, boolean instanceCall, java.lang.String targetName, Expression... parameters)
Builds the CFG call, happening at the given location in the program. The static type of this CFGCall is the one return type of the descriptor oftarget.- Parameters:
cfg- the cfg that this expression belongs tolocation- the location where the expression is defined within the source file. If unknown, usenullstrategy- theUnresolvedCall.ResolutionStrategyof the parameters of this callinstanceCall- whether or not this is a call to an instance method of a unit (that can be overridden) or not.targetName- the name of the target of this callparameters- the parameters of this call
-
-
Method Detail
-
getStrategy
public UnresolvedCall.ResolutionStrategy getStrategy()
Yields theUnresolvedCall.ResolutionStrategyof the parameters of this call.- Returns:
- the resolution strategy
-
getTargetName
public java.lang.String getTargetName()
Yields the name of the target of this call.- Returns:
- the name of the target
-
isInstanceCall
public boolean isInstanceCall()
Yields whether or not this is a call to an instance method of a unit (that can be overridden) or not.- Returns:
trueif this call targets instance cfgs,falseotherwise
-
callSemantics
public <A extends AbstractState<A,H,V>,H extends HeapDomain<H>,V extends ValueDomain<V>> AnalysisState<A,H,V> callSemantics(AnalysisState<A,H,V> entryState, InterproceduralAnalysis<A,H,V> interprocedural, AnalysisState<A,H,V>[] computedStates, ExpressionSet<SymbolicExpression>[] params) throws SemanticException
Description copied from class:CallComputes the semantics of the call, after the semantics of all parameters have been computed. Meta variables from the parameters will be forgotten after this call returns.- Specified by:
callSemanticsin classCall- Type Parameters:
A- the type ofAbstractStateH- the type of theHeapDomainV- the type of theValueDomain- Parameters:
entryState- the entry state of this callinterprocedural- the interprocedural analysis of the program to analyzecomputedStates- the array of states chaining the parameters' semantics evaluation starting fromentryState, namelycomputedState[i]corresponds to the state obtained by the evaluation ofparams[i]in the statecomputedState[i-1](params[0]is evaluated inentryState)params- the symbolic expressions representing the computed values of the parameters of this call- Returns:
- the
AnalysisStaterepresenting the abstract result of the execution of this call - Throws:
SemanticException- if something goes wrong during the computation
-
inheritRuntimeTypesFrom
public void inheritRuntimeTypesFrom(Expression other)
Updates this call's runtime types to match the ones of the given expression.- Parameters:
other- the expression to inherit from
-
-