Package it.unive.lisa.analysis.dataflow
Interface DataflowElement<D extends DataflowDomain<D,E>,E extends DataflowElement<D,E>>
-
- Type Parameters:
D
- the concrete type ofDataflowDomain
that contains instances of this elementE
- the concrete type ofDataflowElement
- All Superinterfaces:
ScopedObject<E>
,SemanticEvaluator
,StructuredObject
public interface DataflowElement<D extends DataflowDomain<D,E>,E extends DataflowElement<D,E>> extends SemanticEvaluator, StructuredObject, ScopedObject<E>
An element of the dataflow domain, that contains a collection ofIdentifier
s in its definition. A domain element implements standard dataflow gen (gen(Identifier, ValueExpression, ProgramPoint, DataflowDomain)
,gen(ValueExpression, ProgramPoint, DataflowDomain)
) and kill (kill(Identifier, ValueExpression, ProgramPoint, DataflowDomain)
,kill(ValueExpression, ProgramPoint, DataflowDomain)
) operations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
canProcess(SymbolicExpression expression, ProgramPoint pp, SemanticOracle oracle)
Yieldstrue
if the domain can processexpression
,false
otherwise.java.util.Collection<E>
gen(Identifier id, ValueExpression expression, ProgramPoint pp, D domain)
The dataflow gen operation, yielding the dataflow elements that are generated by the assignment of the givenexpression
to the givenid
.java.util.Collection<E>
gen(ValueExpression expression, ProgramPoint pp, D domain)
The dataflow gen operation, yielding the dataflow elements that are generated by evaluating the given non-assigningexpression
.java.util.Collection<Identifier>
getInvolvedIdentifiers()
Yields all theIdentifier
s that are involved in the definition of this element.java.util.Collection<E>
kill(Identifier id, ValueExpression expression, ProgramPoint pp, D domain)
The dataflow kill operation, yielding the dataflow elements that are killed by the assignment of the givenexpression
to the givenid
.java.util.Collection<E>
kill(ValueExpression expression, ProgramPoint pp, D domain)
The dataflow kill operation, yielding the dataflow elements that are killed by evaluating the given non-assigningexpression
.-
Methods inherited from interface it.unive.lisa.analysis.ScopedObject
popScope, pushScope
-
Methods inherited from interface it.unive.lisa.util.representation.StructuredObject
representation
-
-
-
-
Method Detail
-
getInvolvedIdentifiers
java.util.Collection<Identifier> getInvolvedIdentifiers()
Yields all theIdentifier
s that are involved in the definition of this element.- Returns:
- the identifiers
-
gen
java.util.Collection<E> gen(Identifier id, ValueExpression expression, ProgramPoint pp, D domain) throws SemanticException
The dataflow gen operation, yielding the dataflow elements that are generated by the assignment of the givenexpression
to the givenid
.- Parameters:
id
- theIdentifier
being assignedexpression
- the expressions that is being assigned toid
pp
- the program point where this operation happensdomain
- theDataflowDomain
that is being used to track instances of this element- Returns:
- the collection of dataflow elements that are generated by the assignment
- Throws:
SemanticException
- if an error occurs during the computation
-
gen
java.util.Collection<E> gen(ValueExpression expression, ProgramPoint pp, D domain) throws SemanticException
The dataflow gen operation, yielding the dataflow elements that are generated by evaluating the given non-assigningexpression
.- Parameters:
expression
- the expressions that is being evaluatedpp
- the program point where this operation happensdomain
- theDataflowDomain
that is being used to track instances of this element- Returns:
- the collection of dataflow elements that are generated by the expression
- Throws:
SemanticException
- if an error occurs during the computation
-
kill
java.util.Collection<E> kill(Identifier id, ValueExpression expression, ProgramPoint pp, D domain) throws SemanticException
The dataflow kill operation, yielding the dataflow elements that are killed by the assignment of the givenexpression
to the givenid
.- Parameters:
id
- theIdentifier
being assignedexpression
- the expressions that is being assigned toid
pp
- the program point where this operation happensdomain
- theDataflowDomain
that is being used to track instances of this element- Returns:
- the collection of dataflow elements that are killed by the assignment
- Throws:
SemanticException
- if an error occurs during the computation
-
kill
java.util.Collection<E> kill(ValueExpression expression, ProgramPoint pp, D domain) throws SemanticException
The dataflow kill operation, yielding the dataflow elements that are killed by evaluating the given non-assigningexpression
.- Parameters:
expression
- the expressions that is being evaluatedpp
- the program point where this operation happensdomain
- theDataflowDomain
that is being used to track instances of this element- Returns:
- the collection of dataflow elements that are killed by the expression
- Throws:
SemanticException
- if an error occurs during the computation
-
canProcess
default boolean canProcess(SymbolicExpression expression, ProgramPoint pp, SemanticOracle oracle)
Description copied from interface:SemanticEvaluator
Yieldstrue
if the domain can processexpression
,false
otherwise.- Specified by:
canProcess
in interfaceSemanticEvaluator
- Parameters:
expression
- the expressionpp
- the program point where this method is queriedoracle
- the oracle for inter-domain communication- Returns:
true
if the domain can processexpression
,false
otherwise.
-
-