Package it.unive.lisa.analysis.dataflow
Interface DataflowElement<D extends DataflowDomain<D,E>,E extends DataflowElement<D,E>>
-
- Type Parameters:
D- the concrete type ofDataflowDomainthat 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 ofIdentifiers 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 booleancanProcess(SymbolicExpression expression, ProgramPoint pp, SemanticOracle oracle)Yieldstrueif the domain can processexpression,falseotherwise.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 givenexpressionto 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 theIdentifiers 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 givenexpressionto 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 theIdentifiers 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 givenexpressionto the givenid.- Parameters:
id- theIdentifierbeing assignedexpression- the expressions that is being assigned toidpp- the program point where this operation happensdomain- theDataflowDomainthat 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- theDataflowDomainthat 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 givenexpressionto the givenid.- Parameters:
id- theIdentifierbeing assignedexpression- the expressions that is being assigned toidpp- the program point where this operation happensdomain- theDataflowDomainthat 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- theDataflowDomainthat 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:SemanticEvaluatorYieldstrueif the domain can processexpression,falseotherwise.- Specified by:
canProcessin interfaceSemanticEvaluator- Parameters:
expression- the expressionpp- the program point where this method is queriedoracle- the oracle for inter-domain communication- Returns:
trueif the domain can processexpression,falseotherwise.
-
-