Class Negation
- 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.UnaryNativeCall
-
- it.unive.lisa.program.cfg.statement.numeric.Negation
-
- All Implemented Interfaces:
ProgramPoint,CodeElement,Node<Statement,Edge,CFG>,java.lang.Comparable<Statement>
public class Negation extends UnaryNativeCall
An expression modeling the numerical negation operation (-). The operand's type must be instance ofNumericType. The type of this expression is the same as the one of its operand.
-
-
Constructor Summary
Constructors Constructor Description Negation(CFG cfg, CodeLocation location, Expression expression)Builds the numerical negation.
-
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>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.call.UnaryNativeCall
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
-
Negation
public Negation(CFG cfg, CodeLocation location, Expression expression)
Builds the numerical negation.- Parameters:
cfg- theCFGwhere this operation lieslocation- the location where this literal is definedexpression- the operand of this operation
-
-
Method Detail
-
unarySemantics
protected <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
Description copied from class:UnaryNativeCallComputes 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.- Specified by:
unarySemanticsin classUnaryNativeCall- 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
-
-