Class TernaryNativeCall
- 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.TernaryNativeCall
-
- All Implemented Interfaces:
ProgramPoint,CodeElement,Node<Statement,Edge,CFG>,java.lang.Comparable<Statement>
public abstract class TernaryNativeCall extends NativeCall
ANativeCallwith a exactly three arguments.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTernaryNativeCall(CFG cfg, CodeLocation location, java.lang.String constructName, Expression left, Expression middle, Expression right)Builds the untyped native call, happening at the given location in the program.protectedTernaryNativeCall(CFG cfg, CodeLocation location, java.lang.String constructName, Type staticType, Expression left, Expression middle, Expression right)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>ternarySemantics(AnalysisState<A,H,V> entryState, InterproceduralAnalysis<A,H,V> interprocedural, AnalysisState<A,H,V> leftState, SymbolicExpression leftExp, AnalysisState<A,H,V> middleState, SymbolicExpression middleExp, AnalysisState<A,H,V> rightState, SymbolicExpression rightExp)Computes the semantics of the call, after the semantics of the parameters have 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
-
TernaryNativeCall
protected TernaryNativeCall(CFG cfg, CodeLocation location, java.lang.String constructName, Expression left, Expression middle, Expression right)
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 callleft- the first parameter of this callmiddle- the second parameter of this callright- the second parameter of this call
-
TernaryNativeCall
protected TernaryNativeCall(CFG cfg, CodeLocation location, java.lang.String constructName, Type staticType, Expression left, Expression middle, Expression right)
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 callleft- the first parameter of this callmiddle- the second parameter of this callright- the second 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
-
ternarySemantics
protected abstract <A extends AbstractState<A,H,V>,H extends HeapDomain<H>,V extends ValueDomain<V>> AnalysisState<A,H,V> ternarySemantics(AnalysisState<A,H,V> entryState, InterproceduralAnalysis<A,H,V> interprocedural, AnalysisState<A,H,V> leftState, SymbolicExpression leftExp, AnalysisState<A,H,V> middleState, SymbolicExpression middleExp, AnalysisState<A,H,V> rightState, SymbolicExpression rightExp) throws SemanticException
Computes the semantics of the call, after the semantics of the parameters have been computed. Meta variables from the parameters 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 binary callinterprocedural- the interprocedural analysis of the program to analyzeleftState- the state obtained by evaluatingleftinentryStateleftExp- the symbolic expression representing the computed value of the first parameter of this callmiddleState- the state obtained by evaluatingmiddleinleftStatemiddleExp- the symbolic expression representing the computed value of the second parameter of this callrightState- the state obtained by evaluatingrightinmiddleStaterightExp- the symbolic expression representing the computed value of the third 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
-
-