Class Bricks
- java.lang.Object
-
- it.unive.lisa.analysis.string.bricks.Bricks
-
- All Implemented Interfaces:
it.unive.lisa.analysis.BaseLattice<Bricks>
,it.unive.lisa.analysis.Lattice<Bricks>
,it.unive.lisa.analysis.nonrelational.NonRelationalDomain<Bricks,it.unive.lisa.symbolic.value.ValueExpression,it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<Bricks>>
,it.unive.lisa.analysis.nonrelational.NonRelationalElement<Bricks,it.unive.lisa.symbolic.value.ValueExpression,it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<Bricks>>
,it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<Bricks>
,it.unive.lisa.analysis.nonrelational.value.NonRelationalValueDomain<Bricks>
,it.unive.lisa.analysis.SemanticEvaluator
,ContainsCharProvider
,it.unive.lisa.util.representation.StructuredObject
public class Bricks extends java.lang.Object implements it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<Bricks>, ContainsCharProvider
The bricks string abstract domain.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Bricks
bottom()
it.unive.lisa.analysis.lattices.Satisfiability
containsChar(char c)
Simplified semantics of the string contains operator, checking a single character is part of the string.boolean
equals(java.lang.Object object)
Bricks
evalBinaryExpression(it.unive.lisa.symbolic.value.operator.binary.BinaryOperator operator, Bricks left, Bricks right, it.unive.lisa.program.cfg.ProgramPoint pp, it.unive.lisa.analysis.SemanticOracle oracle)
Bricks
evalNonNullConstant(it.unive.lisa.symbolic.value.Constant constant, it.unive.lisa.program.cfg.ProgramPoint pp, it.unive.lisa.analysis.SemanticOracle oracle)
int
hashCode()
it.unive.lisa.util.numeric.IntInterval
indexOf(Bricks s)
Yields theIntInterval
containing the minimum and maximum index ofs
inthis
.it.unive.lisa.util.numeric.IntInterval
length()
Yields theIntInterval
containing the minimum and maximum length of this abstract value.boolean
lessOrEqualAux(Bricks other)
Bricks
lubAux(Bricks other)
void
normBricks()
The normalization method of the bricks domain.java.util.List<Brick>
padList(Bricks other)
Pads the shortest brick list and adds empty brick elements to it, in order to make it the same size of the longer brick list, while maintaining the same position of equals elements between the two lists.it.unive.lisa.util.representation.StructuredRepresentation
representation()
it.unive.lisa.analysis.lattices.Satisfiability
satisfiesBinaryExpression(it.unive.lisa.symbolic.value.operator.binary.BinaryOperator operator, Bricks left, Bricks right, it.unive.lisa.program.cfg.ProgramPoint pp, it.unive.lisa.analysis.SemanticOracle oracle)
Bricks
substring(long e, long b)
The substring method of the bricks domain.Bricks
top()
java.lang.String
toString()
Bricks
wideningAux(Bricks 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, evalIdentifier, evalNullConstant, evalPushAny, evalPushInv, evalSkip, evalTernaryExpression, evalTypeCast, evalTypeConv, evalUnaryExpression, evalValueExpression, satisfies, satisfiesAbstractValue, satisfiesNonNullConstant, satisfiesNullConstant, satisfiesTernaryExpression, satisfiesUnaryExpression
-
-
-
-
Constructor Detail
-
Bricks
public Bricks()
Builds the top brick abstract element.
-
Bricks
public Bricks(java.util.List<Brick> bricks)
Builds a bricks abstract element.- Parameters:
bricks
- the list of brick
-
-
Method Detail
-
lubAux
public Bricks lubAux(Bricks other) throws it.unive.lisa.analysis.SemanticException
- Specified by:
lubAux
in interfaceit.unive.lisa.analysis.BaseLattice<Bricks>
- Throws:
it.unive.lisa.analysis.SemanticException
-
lessOrEqualAux
public boolean lessOrEqualAux(Bricks other) throws it.unive.lisa.analysis.SemanticException
- Specified by:
lessOrEqualAux
in interfaceit.unive.lisa.analysis.BaseLattice<Bricks>
- Throws:
it.unive.lisa.analysis.SemanticException
-
wideningAux
public Bricks wideningAux(Bricks other) throws it.unive.lisa.analysis.SemanticException
- Specified by:
wideningAux
in interfaceit.unive.lisa.analysis.BaseLattice<Bricks>
- Throws:
it.unive.lisa.analysis.SemanticException
-
evalBinaryExpression
public Bricks evalBinaryExpression(it.unive.lisa.symbolic.value.operator.binary.BinaryOperator operator, Bricks left, Bricks right, it.unive.lisa.program.cfg.ProgramPoint pp, it.unive.lisa.analysis.SemanticOracle oracle) throws it.unive.lisa.analysis.SemanticException
- Specified by:
evalBinaryExpression
in interfaceit.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<Bricks>
- Throws:
it.unive.lisa.analysis.SemanticException
-
evalNonNullConstant
public Bricks evalNonNullConstant(it.unive.lisa.symbolic.value.Constant constant, it.unive.lisa.program.cfg.ProgramPoint pp, it.unive.lisa.analysis.SemanticOracle oracle) throws it.unive.lisa.analysis.SemanticException
- Specified by:
evalNonNullConstant
in interfaceit.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<Bricks>
- Throws:
it.unive.lisa.analysis.SemanticException
-
satisfiesBinaryExpression
public it.unive.lisa.analysis.lattices.Satisfiability satisfiesBinaryExpression(it.unive.lisa.symbolic.value.operator.binary.BinaryOperator operator, Bricks left, Bricks right, it.unive.lisa.program.cfg.ProgramPoint pp, it.unive.lisa.analysis.SemanticOracle oracle) throws it.unive.lisa.analysis.SemanticException
- Specified by:
satisfiesBinaryExpression
in interfaceit.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<Bricks>
- Throws:
it.unive.lisa.analysis.SemanticException
-
equals
public boolean equals(java.lang.Object object)
- Specified by:
equals
in interfaceit.unive.lisa.analysis.BaseLattice<Bricks>
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceit.unive.lisa.analysis.BaseLattice<Bricks>
- Overrides:
hashCode
in classjava.lang.Object
-
bottom
public Bricks bottom()
- Specified by:
bottom
in interfaceit.unive.lisa.analysis.Lattice<Bricks>
-
toString
public java.lang.String toString()
- Specified by:
toString
in interfaceit.unive.lisa.analysis.BaseLattice<Bricks>
- 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
-
normBricks
public void normBricks()
The normalization method of the bricks domain. Modify bricks to its normalized form.
-
substring
public Bricks substring(long e, long b)
The substring method of the bricks domain.- Parameters:
e
- The beginning index of the substringb
- The ending index of the substring- Returns:
- A new Bricks with all possible substrings if the conditions are met or TOP.
-
padList
public java.util.List<Brick> padList(Bricks other)
Pads the shortest brick list and adds empty brick elements to it, in order to make it the same size of the longer brick list, while maintaining the same position of equals elements between the two lists.- Parameters:
other
- the other bricks object, which has to yield the longer list- Returns:
- the shorter list with empty brick in it
- Throws:
java.lang.IllegalArgumentException
- if the other brick list is longer or equal than the caller bricks object
-
length
public it.unive.lisa.util.numeric.IntInterval length()
Yields theIntInterval
containing the minimum and maximum length of this abstract value.- Returns:
- the minimum and maximum length of this abstract value
-
indexOf
public it.unive.lisa.util.numeric.IntInterval indexOf(Bricks s)
Yields theIntInterval
containing the minimum and maximum index ofs
inthis
.- Parameters:
s
- the string to be searched- Returns:
- the minimum and maximum index of
s
inthis
-
containsChar
public it.unive.lisa.analysis.lattices.Satisfiability containsChar(char c) throws it.unive.lisa.analysis.SemanticException
Description copied from interface:ContainsCharProvider
Simplified semantics of the string contains operator, checking a single character is part of the string.- Specified by:
containsChar
in interfaceContainsCharProvider
- Parameters:
c
- the character to check- Returns:
- whether or not the character is part of the string
- Throws:
it.unive.lisa.analysis.SemanticException
- if something goes wrong during the computation
-
-