Class Brick
- java.lang.Object
-
- it.unive.lisa.analysis.string.bricks.Brick
-
- All Implemented Interfaces:
it.unive.lisa.analysis.BaseLattice<Brick>
,it.unive.lisa.analysis.Lattice<Brick>
,it.unive.lisa.analysis.nonrelational.NonRelationalDomain<Brick,it.unive.lisa.symbolic.value.ValueExpression,it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<Brick>>
,it.unive.lisa.analysis.nonrelational.NonRelationalElement<Brick,it.unive.lisa.symbolic.value.ValueExpression,it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<Brick>>
,it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<Brick>
,it.unive.lisa.analysis.nonrelational.value.NonRelationalValueDomain<Brick>
,it.unive.lisa.analysis.SemanticEvaluator
,it.unive.lisa.util.representation.StructuredObject
public class Brick extends java.lang.Object implements it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<Brick>
The brick string abstract domain.
-
-
Constructor Summary
Constructors Constructor Description Brick()
Builds the top brick abstract element.Brick(int min, int max, java.util.Set<java.lang.String> strings)
Builds a brick abstract element.Brick(it.unive.lisa.util.numeric.IntInterval interval, java.util.Set<java.lang.String> strings)
Builds a brick abstract element.Brick(it.unive.lisa.util.numeric.MathNumber min, it.unive.lisa.util.numeric.MathNumber max, java.util.Set<java.lang.String> strings)
Builds a brick abstract element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Brick
bottom()
boolean
equals(java.lang.Object o)
it.unive.lisa.util.numeric.MathNumber
getMax()
Yields the max of this abstract value.it.unive.lisa.util.numeric.MathNumber
getMin()
Yields the min of this abstract value.java.util.Set<java.lang.String>
getReps()
Yields all the possible concatenations between min and max of the strings set.java.util.Set<java.lang.String>
getStrings()
Yields the set of strings of this abstract value.int
hashCode()
boolean
isFinite()
Helper method to determine if the maximum of the Brick is Finite or not.boolean
isTop()
boolean
lessOrEqualAux(Brick other)
Brick
lubAux(Brick other)
it.unive.lisa.util.representation.StructuredRepresentation
representation()
Brick
top()
java.lang.String
toString()
Brick
wideningAux(Brick other)
-
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, glbAux, lessOrEqual, lub, narrowing, narrowingAux, widening
-
Methods inherited from interface it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain
assume, assumeBinaryExpression, 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
-
Brick
public Brick()
Builds the top brick abstract element.
-
Brick
public Brick(int min, int max, java.util.Set<java.lang.String> strings)
Builds a brick abstract element.- Parameters:
min
- a positive integer that represents the minimum concatenations of the strings setmax
- a positive integer that represents the maximum concatenations of the strings setstrings
- the set of strings- Throws:
java.lang.IllegalArgumentException
- if min or max are negative numbers.
-
Brick
public Brick(it.unive.lisa.util.numeric.MathNumber min, it.unive.lisa.util.numeric.MathNumber max, java.util.Set<java.lang.String> strings)
Builds a brick abstract element.- Parameters:
min
- a MathNumber that represents the minimum concatenations of the strings setmax
- a MathNumber that represents the maximum concatenations of the strings setstrings
- the set of strings
-
Brick
public Brick(it.unive.lisa.util.numeric.IntInterval interval, java.util.Set<java.lang.String> strings)
Builds a brick abstract element.- Parameters:
interval
- an interval that yields the minimum of the brick and the maximum of the brick respectivelystrings
- the set of strings
-
-
Method Detail
-
lubAux
public Brick lubAux(Brick other) throws it.unive.lisa.analysis.SemanticException
- Specified by:
lubAux
in interfaceit.unive.lisa.analysis.BaseLattice<Brick>
- Throws:
it.unive.lisa.analysis.SemanticException
-
lessOrEqualAux
public boolean lessOrEqualAux(Brick other) throws it.unive.lisa.analysis.SemanticException
- Specified by:
lessOrEqualAux
in interfaceit.unive.lisa.analysis.BaseLattice<Brick>
- Throws:
it.unive.lisa.analysis.SemanticException
-
wideningAux
public Brick wideningAux(Brick other) throws it.unive.lisa.analysis.SemanticException
- Specified by:
wideningAux
in interfaceit.unive.lisa.analysis.BaseLattice<Brick>
- Throws:
it.unive.lisa.analysis.SemanticException
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interfaceit.unive.lisa.analysis.BaseLattice<Brick>
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceit.unive.lisa.analysis.BaseLattice<Brick>
- Overrides:
hashCode
in classjava.lang.Object
-
getMin
public it.unive.lisa.util.numeric.MathNumber getMin()
Yields the min of this abstract value.- Returns:
- the min of this abstract value
-
getMax
public it.unive.lisa.util.numeric.MathNumber getMax()
Yields the max of this abstract value.- Returns:
- the max of this abstract value
-
getStrings
public java.util.Set<java.lang.String> getStrings()
Yields the set of strings of this abstract value.- Returns:
- the set of strings of this abstract value
-
bottom
public Brick bottom()
- Specified by:
bottom
in interfaceit.unive.lisa.analysis.Lattice<Brick>
-
isTop
public boolean isTop()
- Specified by:
isTop
in interfaceit.unive.lisa.analysis.Lattice<Brick>
-
isFinite
public boolean isFinite()
Helper method to determine if the maximum of the Brick is Finite or not.- Returns:
- true if the maximum of the Brick is Finite, false otherwise.
-
getReps
public java.util.Set<java.lang.String> getReps()
Yields all the possible concatenations between min and max of the strings set.- Returns:
- the set of strings with all possible concatenations between min and max.
- Throws:
java.lang.IllegalStateException
- if the brick is not finite.
-
toString
public java.lang.String toString()
- Specified by:
toString
in interfaceit.unive.lisa.analysis.BaseLattice<Brick>
- Overrides:
toString
in classjava.lang.Object
-
representation
public it.unive.lisa.util.representation.StructuredRepresentation representation()
- Specified by:
representation
in interfaceit.unive.lisa.util.representation.StructuredObject
-
-