Package it.unive.lisa.analysis.dataflow
Class DefiniteDataflowDomain<E extends DataflowElement<DefiniteDataflowDomain<E>,E>>
- java.lang.Object
-
- it.unive.lisa.analysis.dataflow.DataflowDomain<DefiniteDataflowDomain<E>,E>
-
- it.unive.lisa.analysis.dataflow.DefiniteDataflowDomain<E>
-
- Type Parameters:
E
- the type ofDataflowElement
contained in this domain
- All Implemented Interfaces:
BaseLattice<DefiniteDataflowDomain<E>>
,Lattice<DefiniteDataflowDomain<E>>
,ScopedObject<DefiniteDataflowDomain<E>>
,SemanticDomain<DefiniteDataflowDomain<E>,ValueExpression,Identifier>
,ValueDomain<DefiniteDataflowDomain<E>>
,ValueOracle
,StructuredObject
public class DefiniteDataflowDomain<E extends DataflowElement<DefiniteDataflowDomain<E>,E>> extends DataflowDomain<DefiniteDataflowDomain<E>,E>
ADataflowDomain
for definite dataflow analysis. Being definite means that this domain is an instance ofInverseSetLattice
, i.e., is a set whose join operation is the set intersection.
-
-
Field Summary
-
Fields inherited from class it.unive.lisa.analysis.dataflow.DataflowDomain
domain
-
Fields inherited from interface it.unive.lisa.analysis.Lattice
BOTTOM_STRING, TOP_STRING
-
-
Constructor Summary
Constructors Constructor Description DefiniteDataflowDomain(E domain)
Builds an empty domain.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefiniteDataflowDomain<E>
glbAux(DefiniteDataflowDomain<E> other)
Performs the greatest lower bound operation between this lattice element and the given one, assuming that base cases have already been handled.boolean
lessOrEqualAux(DefiniteDataflowDomain<E> other)
Yieldstrue
if and only if this lattice element is in relation with (usually represented through ≤) the given one, assuming that base cases have already been handled.DefiniteDataflowDomain<E>
lubAux(DefiniteDataflowDomain<E> other)
Performs the least upper bound operation between this lattice element and the given one, assuming that base cases have already been handled.DefiniteDataflowDomain<E>
mk(E domain, java.util.Set<E> elements, boolean isTop, boolean isBottom)
Utility for creating a concrete instance ofDataflowDomain
given its core fields.-
Methods inherited from class it.unive.lisa.analysis.dataflow.DataflowDomain
assign, assume, bottom, equals, forgetIdentifier, forgetIdentifiersIf, getDataflowElements, hashCode, isBottom, isTop, knowsIdentifier, popScope, pushScope, representation, satisfies, smallStepSemantics, top, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface it.unive.lisa.analysis.BaseLattice
glb, lessOrEqual, lub, narrowing, narrowingAux, widening, wideningAux
-
Methods inherited from interface it.unive.lisa.analysis.SemanticDomain
forgetIdentifiers, getAllDomainInstances, getDomainInstance
-
Methods inherited from interface it.unive.lisa.analysis.value.ValueDomain
applyReplacement
-
-
-
-
Constructor Detail
-
DefiniteDataflowDomain
public DefiniteDataflowDomain(E domain)
Builds an empty domain.- Parameters:
domain
- a singleton instance to be used during semantic operations to perform kill and gen operations
-
-
Method Detail
-
mk
public DefiniteDataflowDomain<E> mk(E domain, java.util.Set<E> elements, boolean isTop, boolean isBottom)
Description copied from class:DataflowDomain
Utility for creating a concrete instance ofDataflowDomain
given its core fields.- Specified by:
mk
in classDataflowDomain<DefiniteDataflowDomain<E extends DataflowElement<DefiniteDataflowDomain<E>,E>>,E extends DataflowElement<DefiniteDataflowDomain<E>,E>>
- Parameters:
domain
- the underlying domainelements
- the elements contained in the instance to be createdisTop
- whether the created domain is the top element of the latticeisBottom
- whether the created domain is the bottom element of the lattice- Returns:
- the concrete instance of domain
-
lubAux
public DefiniteDataflowDomain<E> lubAux(DefiniteDataflowDomain<E> other) throws SemanticException
Description copied from interface:BaseLattice
Performs the least upper bound operation between this lattice element and the given one, assuming that base cases have already been handled. In particular, it is guaranteed that:other
is notnull
other
is neither top nor bottomthis
is neither top nor bottomthis
andother
are not the same object (according both to==
and toObject.equals(Object)
)
- Parameters:
other
- the other lattice element- Returns:
- the least upper bound between this and other
- Throws:
SemanticException
- if an error occurs during the computation
-
lessOrEqualAux
public boolean lessOrEqualAux(DefiniteDataflowDomain<E> other) throws SemanticException
Description copied from interface:BaseLattice
Yieldstrue
if and only if this lattice element is in relation with (usually represented through ≤) the given one, assuming that base cases have already been handled. In particular, it is guaranteed that:other
is notnull
other
is neither top nor bottomthis
is neither top nor bottomthis
andother
are not the same object (according both to==
and toObject.equals(Object)
)
- Parameters:
other
- the other lattice element- Returns:
true
if and only if that condition holds- Throws:
SemanticException
- if an error occurs during the computation
-
glbAux
public DefiniteDataflowDomain<E> glbAux(DefiniteDataflowDomain<E> other) throws SemanticException
Description copied from interface:BaseLattice
Performs the greatest lower bound operation between this lattice element and the given one, assuming that base cases have already been handled. In particular, it is guaranteed that:other
is notnull
other
is neither top nor bottomthis
is neither top nor bottomthis
andother
are not the same object (according both to==
and toObject.equals(Object)
)
- Parameters:
other
- the other lattice element- Returns:
- the greatest lower bound between this and other
- Throws:
SemanticException
- if an error occurs during the computation
-
-