Class NullLiteral
- java.lang.Object
-
- it.unive.lisa.program.cfg.statement.Statement
-
- it.unive.lisa.program.cfg.statement.Expression
-
- it.unive.lisa.program.cfg.statement.Literal
-
- it.unive.lisa.program.cfg.statement.NullLiteral
-
- All Implemented Interfaces:
ProgramPoint,CodeElement,Node<Statement,Edge,CFG>,java.lang.Comparable<Statement>
public class NullLiteral extends Literal
A literal representing thenullconstant.
-
-
Constructor Summary
Constructors Constructor Description NullLiteral(CFG cfg, CodeLocation location)Builds the null literal, happening at the given location in the program.
-
Method Summary
All Methods Instance 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>semantics(AnalysisState<A,H,V> entryState, InterproceduralAnalysis<A,H,V> interprocedural, StatementStore<A,H,V> expressions)Computes the semantics of the statement, expressing how semantic information is transformed by the execution of this statement.java.lang.StringtoString()-
Methods inherited from class it.unive.lisa.program.cfg.statement.Literal
accept, equals, getValue, hashCode, 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
-
NullLiteral
public NullLiteral(CFG cfg, CodeLocation location)
Builds the null literal, happening at the given location in the program. The type of a null literal isNullType.- Parameters:
cfg- the cfg that this expression belongs tolocation- the location where the expression is defined within the source file. If unknown, usenull
-
-
Method Detail
-
semantics
public <A extends AbstractState<A,H,V>,H extends HeapDomain<H>,V extends ValueDomain<V>> AnalysisState<A,H,V> semantics(AnalysisState<A,H,V> entryState, InterproceduralAnalysis<A,H,V> interprocedural, StatementStore<A,H,V> expressions) throws SemanticException
Description copied from class:StatementComputes the semantics of the statement, expressing how semantic information is transformed by the execution of this statement. This method is also responsible for recursively invoking theStatement.semantics(AnalysisState, InterproceduralAnalysis, StatementStore)of each nestedExpression, saving the result of each call inexpressions.- Overrides:
semanticsin classLiteral- Type Parameters:
A- the type ofAbstractStateH- the type of theHeapDomainV- the type of theValueDomain- Parameters:
entryState- the entry state that represents the abstract values of each program variable and memory location when the execution reaches this statementinterprocedural- the interprocedural analysis of the program to analyzeexpressions- the cache where analysis states of intermediate expressions must be stored- Returns:
- the
AnalysisStaterepresenting the abstract result of the execution of this statement - Throws:
SemanticException- if something goes wrong during the computation
-
-