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 Bricksbottom()it.unive.lisa.analysis.lattices.SatisfiabilitycontainsChar(char c)Simplified semantics of the string contains operator, checking a single character is part of the string.booleanequals(java.lang.Object object)BricksevalBinaryExpression(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)BricksevalNonNullConstant(it.unive.lisa.symbolic.value.Constant constant, it.unive.lisa.program.cfg.ProgramPoint pp, it.unive.lisa.analysis.SemanticOracle oracle)inthashCode()it.unive.lisa.util.numeric.IntIntervalindexOf(Bricks s)Yields theIntIntervalcontaining the minimum and maximum index ofsinthis.it.unive.lisa.util.numeric.IntIntervallength()Yields theIntIntervalcontaining the minimum and maximum length of this abstract value.booleanlessOrEqualAux(Bricks other)BrickslubAux(Bricks other)voidnormBricks()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.StructuredRepresentationrepresentation()it.unive.lisa.analysis.lattices.SatisfiabilitysatisfiesBinaryExpression(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)Brickssubstring(long e, long b)The substring method of the bricks domain.Brickstop()java.lang.StringtoString()BrickswideningAux(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, 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:
lubAuxin 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:
lessOrEqualAuxin 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:
wideningAuxin 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:
evalBinaryExpressionin 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:
evalNonNullConstantin 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:
satisfiesBinaryExpressionin interfaceit.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<Bricks>- Throws:
it.unive.lisa.analysis.SemanticException
-
equals
public boolean equals(java.lang.Object object)
- Specified by:
equalsin interfaceit.unive.lisa.analysis.BaseLattice<Bricks>- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceit.unive.lisa.analysis.BaseLattice<Bricks>- Overrides:
hashCodein classjava.lang.Object
-
bottom
public Bricks bottom()
- Specified by:
bottomin interfaceit.unive.lisa.analysis.Lattice<Bricks>
-
toString
public java.lang.String toString()
- Specified by:
toStringin interfaceit.unive.lisa.analysis.BaseLattice<Bricks>- Overrides:
toStringin classjava.lang.Object
-
representation
public it.unive.lisa.util.representation.StructuredRepresentation representation()
- Specified by:
representationin 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 theIntIntervalcontaining 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 theIntIntervalcontaining the minimum and maximum index ofsinthis.- Parameters:
s- the string to be searched- Returns:
- the minimum and maximum index of
sinthis
-
containsChar
public it.unive.lisa.analysis.lattices.Satisfiability containsChar(char c) throws it.unive.lisa.analysis.SemanticExceptionDescription copied from interface:ContainsCharProviderSimplified semantics of the string contains operator, checking a single character is part of the string.- Specified by:
containsCharin 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
-
-