Class NonRedundantPowersetOfInterval
- java.lang.Object
-
- it.unive.lisa.analysis.nonRedundantSet.NonRedundantPowersetOfBaseNonRelationalValueDomain<NonRedundantPowersetOfInterval,Interval>
-
- it.unive.lisa.analysis.nonRedundantSet.NonRedundantPowersetOfInterval
-
- All Implemented Interfaces:
it.unive.lisa.analysis.BaseLattice<NonRedundantPowersetOfInterval>
,it.unive.lisa.analysis.Lattice<NonRedundantPowersetOfInterval>
,it.unive.lisa.analysis.nonrelational.NonRelationalDomain<NonRedundantPowersetOfInterval,it.unive.lisa.symbolic.value.ValueExpression,it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<NonRedundantPowersetOfInterval>>
,it.unive.lisa.analysis.nonrelational.NonRelationalElement<NonRedundantPowersetOfInterval,it.unive.lisa.symbolic.value.ValueExpression,it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<NonRedundantPowersetOfInterval>>
,it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<NonRedundantPowersetOfInterval>
,it.unive.lisa.analysis.nonrelational.value.NonRelationalValueDomain<NonRedundantPowersetOfInterval>
,it.unive.lisa.analysis.SemanticEvaluator
,it.unive.lisa.util.representation.StructuredObject
public class NonRedundantPowersetOfInterval extends NonRedundantPowersetOfBaseNonRelationalValueDomain<NonRedundantPowersetOfInterval,Interval>
The finite non redundant powerset ofInterval
abstract domain approximating integer values as a non redundant set of interval. It is implemented as aNonRedundantPowersetOfBaseNonRelationalValueDomain
, which handles most of the basic operation (such aslub
,glb
,widening
and others operations needed to calculate the previous ones).
-
-
Field Summary
-
Fields inherited from class it.unive.lisa.analysis.nonRedundantSet.NonRedundantPowersetOfBaseNonRelationalValueDomain
elementsSet, valueDomain
-
-
Constructor Summary
Constructors Constructor Description NonRedundantPowersetOfInterval()
Constructs an empty non redundant set of intervals.NonRedundantPowersetOfInterval(java.util.SortedSet<Interval> elements)
Constructs a non redundant set of intervals with the given intervals.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<NonRedundantPowersetOfInterval>
assumeBinaryExpression(it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<NonRedundantPowersetOfInterval> environment, it.unive.lisa.symbolic.value.operator.binary.BinaryOperator operator, it.unive.lisa.symbolic.value.ValueExpression left, it.unive.lisa.symbolic.value.ValueExpression right, it.unive.lisa.program.cfg.ProgramPoint src, it.unive.lisa.program.cfg.ProgramPoint dest, it.unive.lisa.analysis.SemanticOracle oracle)
protected NonRedundantPowersetOfInterval
EgliMilnerConnector(NonRedundantPowersetOfInterval other)
This specific Egli-Milner connector follows this definition:
given two subsets S1 and S2 of a domain of a lattice:protected it.unive.lisa.util.numeric.MathNumber
middlePoint(Interval interval)
Yields the middle point of anInterval
.protected NonRedundantPowersetOfInterval
mk(java.util.SortedSet<Interval> elements)
Utility for creating a concrete instance ofNonRedundantPowersetOfBaseNonRelationalValueDomain
given a set.-
Methods inherited from class it.unive.lisa.analysis.nonRedundantSet.NonRedundantPowersetOfBaseNonRelationalValueDomain
bottom, equals, evalBinaryExpression, evalNonNullConstant, evalUnaryExpression, extrapolationHeuristic, glbAux, hashCode, isBottom, isTop, lessOrEqualAux, lessOrEqualEgliMilner, lubAux, removeOverlapping, removeOverlappingBetweenElements, removeRedundancy, representation, satisfiesBinaryExpression, top, toString, wideningAux
-
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
-
Methods inherited from interface it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain
assume, assumeTernaryExpression, assumeUnaryExpression, canProcess, eval, evalIdentifier, evalNullConstant, evalPushAny, evalPushInv, evalSkip, evalTernaryExpression, evalTypeCast, evalTypeConv, evalValueExpression, satisfies, satisfiesAbstractValue, satisfiesNonNullConstant, satisfiesNullConstant, satisfiesTernaryExpression, satisfiesUnaryExpression
-
-
-
-
Constructor Detail
-
NonRedundantPowersetOfInterval
public NonRedundantPowersetOfInterval()
Constructs an empty non redundant set of intervals.
-
NonRedundantPowersetOfInterval
public NonRedundantPowersetOfInterval(java.util.SortedSet<Interval> elements)
Constructs a non redundant set of intervals with the given intervals.- Parameters:
elements
- the set of intervals
-
-
Method Detail
-
EgliMilnerConnector
protected NonRedundantPowersetOfInterval EgliMilnerConnector(NonRedundantPowersetOfInterval other) throws it.unive.lisa.analysis.SemanticException
This specific Egli-Milner connector follows this definition:
given two subsets S1 and S2 of a domain of a lattice:S1 +EM S2 = {s2 ∋ S2 | ∃ s1 ∋ S1 : s1 ≤ s2} ∪ {lub(s'1, s2) | s'1 ∋ S1, s2 ∋ S2, NOT ∃ s1 ∋ S1 : s1 ≤ s2}
s'1 can be chosen randomly but in this case is chosen to be the closest interval to s2 (closest based onmiddle point
).- Overrides:
EgliMilnerConnector
in classNonRedundantPowersetOfBaseNonRelationalValueDomain<NonRedundantPowersetOfInterval,Interval>
- Parameters:
other
- the other concrete element- Returns:
- a new set that is ≤EM than both this and other
- Throws:
it.unive.lisa.analysis.SemanticException
- if an error occurs during the computation
-
middlePoint
protected it.unive.lisa.util.numeric.MathNumber middlePoint(Interval interval)
Yields the middle point of anInterval
. If both extremes are non-infinite the middle point is the sum of the two divided by two. If only one of the two extreme is infinite the middle point is said to be the non-infinite extreme. If both the extremes are infinite the middle point is said to be 0.- Parameters:
interval
- the interval to calculate the middle point of- Returns:
- the middle point of the interval
-
assumeBinaryExpression
public it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<NonRedundantPowersetOfInterval> assumeBinaryExpression(it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<NonRedundantPowersetOfInterval> environment, it.unive.lisa.symbolic.value.operator.binary.BinaryOperator operator, it.unive.lisa.symbolic.value.ValueExpression left, it.unive.lisa.symbolic.value.ValueExpression right, it.unive.lisa.program.cfg.ProgramPoint src, it.unive.lisa.program.cfg.ProgramPoint dest, it.unive.lisa.analysis.SemanticOracle oracle) throws it.unive.lisa.analysis.SemanticException
- Throws:
it.unive.lisa.analysis.SemanticException
-
mk
protected NonRedundantPowersetOfInterval mk(java.util.SortedSet<Interval> elements)
Description copied from class:NonRedundantPowersetOfBaseNonRelationalValueDomain
Utility for creating a concrete instance ofNonRedundantPowersetOfBaseNonRelationalValueDomain
given a set.- Specified by:
mk
in classNonRedundantPowersetOfBaseNonRelationalValueDomain<NonRedundantPowersetOfInterval,Interval>
- Parameters:
elements
- the set containing the elements that must be included in the lattice instance- Returns:
- a new concrete instance of
NonRedundantPowerset
containing the elements of the given set
-
-