Package it.unive.lisa.analysis.numeric
Class UpperBounds
- java.lang.Object
-
- it.unive.lisa.analysis.numeric.UpperBounds
-
- All Implemented Interfaces:
it.unive.lisa.analysis.BaseLattice<UpperBounds>
,it.unive.lisa.analysis.Lattice<UpperBounds>
,it.unive.lisa.analysis.nonrelational.NonRelationalDomain<UpperBounds,it.unive.lisa.symbolic.value.ValueExpression,it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<UpperBounds>>
,it.unive.lisa.analysis.nonrelational.NonRelationalElement<UpperBounds,it.unive.lisa.symbolic.value.ValueExpression,it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<UpperBounds>>
,it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<UpperBounds>
,it.unive.lisa.analysis.nonrelational.value.NonRelationalValueDomain<UpperBounds>
,it.unive.lisa.analysis.SemanticEvaluator
,it.unive.lisa.util.representation.StructuredObject
,java.lang.Iterable<it.unive.lisa.symbolic.value.Identifier>
public class UpperBounds extends java.lang.Object implements it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<UpperBounds>, java.lang.Iterable<it.unive.lisa.symbolic.value.Identifier>
The upper bounds abstract domain. It is implemented as aBaseNonRelationalValueDomain
.
-
-
Constructor Summary
Constructors Constructor Description UpperBounds()
Builds the upper bounds.UpperBounds(boolean isTop)
Builds the upper bounds.UpperBounds(java.util.Set<it.unive.lisa.symbolic.value.Identifier> bounds)
Builds the upper bounds.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UpperBounds
add(it.unive.lisa.symbolic.value.Identifier id)
Adds the specified identifier of a program variable in the bounds.it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<UpperBounds>
assumeBinaryExpression(it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<UpperBounds> 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)
UpperBounds
bottom()
boolean
contains(it.unive.lisa.symbolic.value.Identifier id)
Checks if this bounds contains a specified identifier of a program variable.boolean
equals(java.lang.Object obj)
UpperBounds
glbAux(UpperBounds other)
int
hashCode()
boolean
isBottom()
java.util.Iterator<it.unive.lisa.symbolic.value.Identifier>
iterator()
boolean
lessOrEqualAux(UpperBounds other)
UpperBounds
lubAux(UpperBounds other)
it.unive.lisa.util.representation.StructuredRepresentation
representation()
UpperBounds
top()
UpperBounds
wideningAux(UpperBounds other)
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface it.unive.lisa.analysis.BaseLattice
glb, lessOrEqual, lub, narrowing, narrowingAux, toString, widening
-
Methods inherited from interface it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain
assume, assumeTernaryExpression, assumeUnaryExpression, canProcess, eval, evalBinaryExpression, evalIdentifier, evalNonNullConstant, evalNullConstant, evalPushAny, evalPushInv, evalSkip, evalTernaryExpression, evalTypeCast, evalTypeConv, evalUnaryExpression, evalValueExpression, satisfies, satisfiesAbstractValue, satisfiesBinaryExpression, satisfiesNonNullConstant, satisfiesNullConstant, satisfiesTernaryExpression, satisfiesUnaryExpression
-
-
-
-
Constructor Detail
-
UpperBounds
public UpperBounds()
Builds the upper bounds.
-
UpperBounds
public UpperBounds(boolean isTop)
Builds the upper bounds.- Parameters:
isTop
-true
if the abstract domain is top; otherwisefalse
.
-
UpperBounds
public UpperBounds(java.util.Set<it.unive.lisa.symbolic.value.Identifier> bounds)
Builds the upper bounds.- Parameters:
bounds
- the bounds to set
-
-
Method Detail
-
representation
public it.unive.lisa.util.representation.StructuredRepresentation representation()
- Specified by:
representation
in interfaceit.unive.lisa.util.representation.StructuredObject
-
top
public UpperBounds top()
- Specified by:
top
in interfaceit.unive.lisa.analysis.Lattice<UpperBounds>
-
bottom
public UpperBounds bottom()
- Specified by:
bottom
in interfaceit.unive.lisa.analysis.Lattice<UpperBounds>
-
isBottom
public boolean isBottom()
- Specified by:
isBottom
in interfaceit.unive.lisa.analysis.Lattice<UpperBounds>
-
lubAux
public UpperBounds lubAux(UpperBounds other) throws it.unive.lisa.analysis.SemanticException
- Specified by:
lubAux
in interfaceit.unive.lisa.analysis.BaseLattice<UpperBounds>
- Throws:
it.unive.lisa.analysis.SemanticException
-
glbAux
public UpperBounds glbAux(UpperBounds other) throws it.unive.lisa.analysis.SemanticException
- Specified by:
glbAux
in interfaceit.unive.lisa.analysis.BaseLattice<UpperBounds>
- Throws:
it.unive.lisa.analysis.SemanticException
-
lessOrEqualAux
public boolean lessOrEqualAux(UpperBounds other) throws it.unive.lisa.analysis.SemanticException
- Specified by:
lessOrEqualAux
in interfaceit.unive.lisa.analysis.BaseLattice<UpperBounds>
- Throws:
it.unive.lisa.analysis.SemanticException
-
wideningAux
public UpperBounds wideningAux(UpperBounds other) throws it.unive.lisa.analysis.SemanticException
- Specified by:
wideningAux
in interfaceit.unive.lisa.analysis.BaseLattice<UpperBounds>
- Throws:
it.unive.lisa.analysis.SemanticException
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfaceit.unive.lisa.analysis.BaseLattice<UpperBounds>
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceit.unive.lisa.analysis.BaseLattice<UpperBounds>
- Overrides:
hashCode
in classjava.lang.Object
-
assumeBinaryExpression
public it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<UpperBounds> assumeBinaryExpression(it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<UpperBounds> 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
- Specified by:
assumeBinaryExpression
in interfaceit.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<UpperBounds>
- Throws:
it.unive.lisa.analysis.SemanticException
-
iterator
public java.util.Iterator<it.unive.lisa.symbolic.value.Identifier> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<it.unive.lisa.symbolic.value.Identifier>
-
contains
public boolean contains(it.unive.lisa.symbolic.value.Identifier id)
Checks if this bounds contains a specified identifier of a program variable.- Parameters:
id
- the identifier to check- Returns:
true
if this bounds contains the specified identifier; otherwise,false
.
-
add
public UpperBounds add(it.unive.lisa.symbolic.value.Identifier id)
Adds the specified identifier of a program variable in the bounds.- Parameters:
id
- the identifier to add in the bounds.- Returns:
- the updated bounds.
-
-