Class Division
- java.lang.Object
-
- it.unive.lisa.program.cfg.statement.Statement
-
- it.unive.lisa.program.cfg.statement.Expression
-
- it.unive.lisa.program.cfg.statement.NaryExpression
-
- it.unive.lisa.program.cfg.statement.BinaryExpression
-
- it.unive.lisa.program.cfg.statement.numeric.Division
-
- All Implemented Interfaces:
ProgramPoint,CodeElement,Node<Statement,Edge,CFG>,java.lang.Comparable<Statement>
public class Division extends BinaryExpression
An expression modeling the division 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 Division(CFG cfg, CodeLocation location, Expression left, Expression right)Builds the division.
-
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(InterproceduralAnalysis<A,H,V> interprocedural, AnalysisState<A,H,V> state, SymbolicExpression left, SymbolicExpression right)Computes the semantics of the expression, after the semantics of the sub-expressions have been computed.-
Methods inherited from class it.unive.lisa.program.cfg.statement.BinaryExpression
expressionSemantics, getLeft, getRight
-
Methods inherited from class it.unive.lisa.program.cfg.statement.NaryExpression
accept, equals, getConstructName, getSubExpressions, hashCode, semantics, setOffset, toString
-
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
-
Division
public Division(CFG cfg, CodeLocation location, Expression left, Expression right)
Builds the division.- 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(InterproceduralAnalysis<A,H,V> interprocedural, AnalysisState<A,H,V> state, SymbolicExpression left, SymbolicExpression right) throws SemanticException
Description copied from class:BinaryExpressionComputes the semantics of the expression, after the semantics of the sub-expressions have been computed. Meta variables from the sub-expressions will be forgotten after this expression returns.- Specified by:
binarySemanticsin classBinaryExpression- Type Parameters:
A- the type ofAbstractStateH- the type of theHeapDomainV- the type of theValueDomain- Parameters:
interprocedural- the interprocedural analysis of the program to analyzestate- the state where the expression is to be evaluatedleft- the symbolic expression representing the computed value of the first sub-expression of this expressionright- the symbolic expression representing the computed value of the second sub-expression of this expression- Returns:
- the
AnalysisStaterepresenting the abstract result of the execution of this expression - Throws:
SemanticException- if something goes wrong during the computation
-
-