Class OpenCall
- 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.OpenCall
-
- All Implemented Interfaces:
ProgramPoint,MetaVariableCreator,CodeElement,Node<Statement,Edge,CFG>,java.lang.Comparable<Statement>
public class OpenCall extends Call implements MetaVariableCreator
A call to a CFG that is not under analysis.
-
-
Constructor Summary
Constructors Constructor Description OpenCall(CFG cfg, CodeLocation location, java.lang.String targetName, Type staticType, Expression... parameters)Builds the open 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.StringgetTargetName()Yields the name of the target of this open 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
-
OpenCall
public OpenCall(CFG cfg, CodeLocation location, java.lang.String targetName, Type staticType, Expression... parameters)
Builds the open 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, usenulltargetName- the name of the target of this open callparameters- the parameters of this callstaticType- the static type of this call
-
-
Method Detail
-
getTargetName
public java.lang.String getTargetName()
Yields the name of the target of this open call.- Returns:
- the name of the target
-
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
-
-