Class Subtraction
- java.lang.Object
-
- it.unive.lisa.program.cfg.statement.Statement
-
- it.unive.lisa.program.cfg.statement.Expression
-
- it.unive.lisa.program.cfg.statement.call.Call
-
- it.unive.lisa.program.cfg.statement.call.NativeCall
-
- it.unive.lisa.program.cfg.statement.call.BinaryNativeCall
-
- it.unive.lisa.program.cfg.statement.numeric.Subtraction
-
- All Implemented Interfaces:
ProgramPoint,CodeElement,Node<Statement,Edge,CFG>,java.lang.Comparable<Statement>
public class Subtraction extends BinaryNativeCall
An expression modeling the subtraction operation (-). Both operands' types must be instances ofNumericType. The type of this expression is the common numerical type of its operands, according to the type inference.
-
-
Constructor Summary
Constructors Constructor Description Subtraction(CFG cfg, CodeLocation location, Expression left, Expression right)Builds the subtraction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <A extends AbstractState<A,H,V>,H extends HeapDomain<H>,V extends ValueDomain<V>>
AnalysisState<A,H,V>binarySemantics(AnalysisState<A,H,V> entryState, InterproceduralAnalysis<A,H,V> interprocedural, AnalysisState<A,H,V> leftState, SymbolicExpression left, AnalysisState<A,H,V> rightState, SymbolicExpression right)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.call.BinaryNativeCall
callSemantics
-
Methods inherited from class it.unive.lisa.program.cfg.statement.call.NativeCall
equals, getConstructName, hashCode, toString
-
Methods inherited from class it.unive.lisa.program.cfg.statement.call.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
-
Subtraction
public Subtraction(CFG cfg, CodeLocation location, Expression left, Expression right)
Builds the subtraction.- Parameters:
cfg- theCFGwhere this operation lieslocation- the location where this literal is definedleft- the left-hand side of this operationright- the right-hand side of this operation
-
-
Method Detail
-
binarySemantics
protected <A extends AbstractState<A,H,V>,H extends HeapDomain<H>,V extends ValueDomain<V>> AnalysisState<A,H,V> binarySemantics(AnalysisState<A,H,V> entryState, InterproceduralAnalysis<A,H,V> interprocedural, AnalysisState<A,H,V> leftState, SymbolicExpression left, AnalysisState<A,H,V> rightState, SymbolicExpression right) throws SemanticException
Description copied from class:BinaryNativeCallComputes 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.- Specified by:
binarySemanticsin classBinaryNativeCall- 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 evaluatingleftinentryStateleft- the symbolic expression representing the computed value of the first parameter of this callrightState- the state obtained by evaluatingrightinleftStateright- the symbolic expression representing the computed value of the second 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
-
-