Class CFGCall
- 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.CFGCall
-
- All Implemented Interfaces:
ProgramPoint,MetaVariableCreator,CodeElement,Node<Statement,Edge,CFG>,java.lang.Comparable<Statement>
public class CFGCall extends Call implements MetaVariableCreator
A call to one or more of the CFGs under analysis.
-
-
Constructor Summary
Constructors Constructor Description CFGCall(CFG cfg, CodeLocation location, java.lang.String qualifiedName, CFG target, Expression... parameters)Builds the CFG call, happening at the given location in the program.CFGCall(CFG cfg, CodeLocation location, java.lang.String qualifiedName, java.util.Collection<CFG> targets, 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)IdentifiergetMetaVariable()Yields the meta variable that is introduced during the evaluation of the semantics of this object to store information about the value produced by this object.java.lang.StringgetQualifiedName()Yields the qualified name of the static target of this call.java.util.Collection<CFG>getTargets()Yields the CFGs that are targeted by this CFG call.inthashCode()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
-
CFGCall
public CFGCall(CFG cfg, CodeLocation location, java.lang.String qualifiedName, CFG target, Expression... parameters)
Builds the CFG call, happening at the given location in the program.- Parameters:
cfg- the cfg that this expression belongs tolocation- the location where the expression is defined within the source file. If unknown, usenullqualifiedName- the qualified name of the static target of this calltarget- the CFG that is targeted by this CFG callparameters- the parameters of this call
-
CFGCall
public CFGCall(CFG cfg, CodeLocation location, java.lang.String qualifiedName, java.util.Collection<CFG> targets, Expression... parameters)
Builds the CFG call, happening at the given location in the program.- Parameters:
cfg- the cfg that this expression belongs tolocation- the location where this expression is defined within the source file. If unknown, usenullqualifiedName- the qualified name of the static target of this calltargets- the CFGs that are targeted by this CFG callparameters- the parameters of this call
-
-
Method Detail
-
getTargets
public java.util.Collection<CFG> getTargets()
Yields the CFGs that are targeted by this CFG call.- Returns:
- the target CFG
-
getQualifiedName
public java.lang.String getQualifiedName()
Yields the qualified name of the static target of this call.- Returns:
- the qualified name
-
getMetaVariable
public final Identifier getMetaVariable()
Description copied from interface:MetaVariableCreatorYields the meta variable that is introduced during the evaluation of the semantics of this object to store information about the value produced by this object. Since the meta variable simulates a value pushed on the stack, it should be forgotten after it is consumed.- Specified by:
getMetaVariablein interfaceMetaVariableCreator- Returns:
- the meta variable introduced by this object
-
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
-
-