Class UnaryNativeCall
- 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.NativeCall
-
- it.unive.lisa.program.cfg.statement.UnaryNativeCall
-
- All Implemented Interfaces:
ProgramPoint,CodeElement,Node<Statement,Edge,CFG>,java.lang.Comparable<Statement>
public abstract class UnaryNativeCall extends NativeCall
ANativeCallwith a single argument.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedUnaryNativeCall(CFG cfg, CodeLocation location, java.lang.String constructName, Expression parameter)Builds the untyped native call, happening at the given location in the program.protectedUnaryNativeCall(CFG cfg, CodeLocation location, java.lang.String constructName, Type staticType, Expression parameter)Builds the native call, happening at the given location in the program.
-
Method Summary
All Methods Instance Methods Abstract 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.protected abstract <A extends AbstractState<A,H,V>,H extends HeapDomain<H>,V extends ValueDomain<V>>
AnalysisState<A,H,V>unarySemantics(AnalysisState<A,H,V> entryState, InterproceduralAnalysis<A,H,V> interprocedural, AnalysisState<A,H,V> exprState, SymbolicExpression expr)Computes the semantics of the call, after the semantics of the parameter has been computed.-
Methods inherited from class it.unive.lisa.program.cfg.statement.NativeCall
equals, getConstructName, hashCode, toString
-
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
-
UnaryNativeCall
protected UnaryNativeCall(CFG cfg, CodeLocation location, java.lang.String constructName, Expression parameter)
Builds the untyped native call, happening at the given location in the program. The static type of this call isUntyped.- Parameters:
cfg- the cfg that this expression belongs tolocation- the location where the expression is defined within the source file. If unknown, usenullconstructName- the name of the construct invoked by this native callparameter- the parameter of this call
-
UnaryNativeCall
protected UnaryNativeCall(CFG cfg, CodeLocation location, java.lang.String constructName, Type staticType, Expression parameter)
Builds the native 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, usenullconstructName- the name of the construct invoked by this native callstaticType- the static type of this callparameter- the parameter of this call
-
-
Method Detail
-
callSemantics
public final <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
-
unarySemantics
protected abstract <A extends AbstractState<A,H,V>,H extends HeapDomain<H>,V extends ValueDomain<V>> AnalysisState<A,H,V> unarySemantics(AnalysisState<A,H,V> entryState, InterproceduralAnalysis<A,H,V> interprocedural, AnalysisState<A,H,V> exprState, SymbolicExpression expr) throws SemanticException
Computes the semantics of the call, after the semantics of the parameter has been computed. Meta variables from the parameter will be forgotten after this call returns.- Type Parameters:
A- the type ofAbstractStateH- the type of theHeapDomainV- the type of theValueDomain- Parameters:
entryState- the entry state of this unary callinterprocedural- the interprocedural analysis of the program to analyzeexprState- the state obtained by evaluatingexprinentryStateexpr- the symbolic expressions representing the computed value of the parameter of this call- Returns:
- the
AnalysisStaterepresenting the abstract result of the execution of this call - Throws:
SemanticException- if something goes wrong during the computation
-
-