Class TruncatedParamsCall
- 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.program.cfg.statement.call.Call
-
- it.unive.lisa.program.cfg.statement.call.TruncatedParamsCall
-
- All Implemented Interfaces:
ProgramPoint
,ResolvedCall
,CodeElement
,CodeNode<CFG,Statement,Edge>
,Node<CFG,Statement,Edge>
,java.lang.Comparable<Statement>
public class TruncatedParamsCall extends Call implements ResolvedCall
A call that wraps another one that has been created throughCanRemoveReceiver.removeFirstParameter()
. The purpose of this class is to remove the first parameter also during the semantic computation, before forwarding the call to the actual implementation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class it.unive.lisa.program.cfg.statement.call.Call
Call.CallType
-
-
Constructor Summary
Constructors Constructor Description TruncatedParamsCall(Call call)
Builds the call.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
compareCallAux(Call o)
Auxiliary method forStatement.compareTo(Statement)
that can safely assume that the two calls happen at the sameCodeLocation
, are instances of the same class, have the same parameters according to their implementation ofStatement.compareTo(Statement)
, and have all fields defined in theCall
class equal according to theirComparable.compareTo(Object)
.boolean
equals(java.lang.Object obj)
<A extends AbstractState<A>>
AnalysisState<A>forwardSemanticsAux(InterproceduralAnalysis<A> interprocedural, AnalysisState<A> state, ExpressionSet[] params, StatementStore<A> expressions)
Computes the forward semantics of the expression, after the semantics of all sub-expressions have been computed.Call
getInnerCall()
Yields the original call that this one was created from.java.util.Collection<CodeMember>
getTargets()
Yields the targets of theCall
.int
hashCode()
void
setSource(UnresolvedCall source)
Sets the call that this call originated from.-
Methods inherited from class it.unive.lisa.program.cfg.statement.call.Call
compareSameClassAndParams, getCallType, getFullTargetName, getParameters, getQualifier, getSource, getTargetName, parameterTypes, toString
-
Methods inherited from class it.unive.lisa.program.cfg.statement.NaryExpression
accept, backwardSemantics, backwardSemanticsAux, compareSameClass, forwardSemantics, getConstructName, getOrder, getStatementEvaluatedAfter, getStatementEvaluatedBefore, getSubExpressions
-
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
-
TruncatedParamsCall
public TruncatedParamsCall(Call call)
Builds the call.- Parameters:
call
- the call to be wrapped
-
-
Method Detail
-
setSource
public void setSource(UnresolvedCall source)
Description copied from class:Call
Sets the call that this call originated from. A call r originates from a call u if:- u is an
UnresolvedCall
, while r is not, and - a
CallGraph
resolved u to r, or - a
CallGraph
resolved u to a call c (e.g. aMultiCall
), and its semantics generated the call u
- u is an
-
compareCallAux
protected int compareCallAux(Call o)
Description copied from class:Call
Auxiliary method forStatement.compareTo(Statement)
that can safely assume that the two calls happen at the sameCodeLocation
, are instances of the same class, have the same parameters according to their implementation ofStatement.compareTo(Statement)
, and have all fields defined in theCall
class equal according to theirComparable.compareTo(Object)
. This method is thus responsible for only comparing the implementation-specific fields.- Specified by:
compareCallAux
in classCall
- Parameters:
o
- the other call- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object
-
forwardSemanticsAux
public <A extends AbstractState<A>> AnalysisState<A> forwardSemanticsAux(InterproceduralAnalysis<A> interprocedural, AnalysisState<A> state, ExpressionSet[] params, StatementStore<A> expressions) throws SemanticException
Description copied from class:NaryExpression
Computes the forward semantics of the expression, after the semantics of all sub-expressions have been computed. Meta variables from the sub-expressions will be forgotten after this call returns.- Specified by:
forwardSemanticsAux
in classNaryExpression
- Type Parameters:
A
- the type ofAbstractState
- Parameters:
interprocedural
- the interprocedural analysis of the program to analyzestate
- the state where the expression is to be evaluatedparams
- the symbolic expressions representing the computed values of the sub-expressions of this expressionexpressions
- the cache where analysis states of intermediate expressions are stored and that can be accessed to query for post-states of parameters expressions- Returns:
- the
AnalysisState
representing the abstract result of the execution of this expression - Throws:
SemanticException
- if something goes wrong during the computation
-
getTargets
public java.util.Collection<CodeMember> getTargets()
Description copied from interface:ResolvedCall
Yields the targets of theCall
.- Specified by:
getTargets
in interfaceResolvedCall
- Returns:
- the targets
-
getInnerCall
public Call getInnerCall()
Yields the original call that this one was created from.- Returns:
- the call
-
-