Package it.unive.lisa.analysis.string
Class Prefix
- java.lang.Object
-
- it.unive.lisa.analysis.string.Prefix
-
- All Implemented Interfaces:
it.unive.lisa.analysis.BaseLattice<Prefix>
,it.unive.lisa.analysis.Lattice<Prefix>
,it.unive.lisa.analysis.nonrelational.NonRelationalDomain<Prefix,it.unive.lisa.symbolic.value.ValueExpression,it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<Prefix>>
,it.unive.lisa.analysis.nonrelational.NonRelationalElement<Prefix,it.unive.lisa.symbolic.value.ValueExpression,it.unive.lisa.analysis.nonrelational.value.ValueEnvironment<Prefix>>
,it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<Prefix>
,it.unive.lisa.analysis.nonrelational.value.NonRelationalValueDomain<Prefix>
,it.unive.lisa.analysis.SemanticEvaluator
,ContainsCharProvider
,it.unive.lisa.util.representation.StructuredObject
public class Prefix extends java.lang.Object implements it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<Prefix>, ContainsCharProvider
The prefix string abstract domain.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Prefix
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 o)
Prefix
evalBinaryExpression(it.unive.lisa.symbolic.value.operator.binary.BinaryOperator operator, Prefix left, Prefix right, it.unive.lisa.program.cfg.ProgramPoint pp, it.unive.lisa.analysis.SemanticOracle oracle)
Prefix
evalNonNullConstant(it.unive.lisa.symbolic.value.Constant constant, it.unive.lisa.program.cfg.ProgramPoint pp, it.unive.lisa.analysis.SemanticOracle oracle)
Prefix
evalTernaryExpression(it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator operator, Prefix left, Prefix middle, Prefix right, it.unive.lisa.program.cfg.ProgramPoint pp, it.unive.lisa.analysis.SemanticOracle oracle)
java.lang.String
getPrefix()
Yields the prefix of this abstract value.int
hashCode()
it.unive.lisa.util.numeric.IntInterval
indexOf(Prefix 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(Prefix other)
Prefix
lubAux(Prefix other)
it.unive.lisa.util.representation.StructuredRepresentation
representation()
Prefix
substring(long begin, long end)
Yields the prefix corresponding to the substring of this prefix between two indexes.Prefix
top()
-
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, glbAux, lessOrEqual, lub, narrowing, narrowingAux, toString, widening, wideningAux
-
Methods inherited from interface it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain
assume, assumeBinaryExpression, assumeTernaryExpression, assumeUnaryExpression, canProcess, eval, evalIdentifier, evalNullConstant, evalPushAny, evalPushInv, evalSkip, evalTypeCast, evalTypeConv, evalUnaryExpression, evalValueExpression, satisfies, satisfiesAbstractValue, satisfiesBinaryExpression, satisfiesNonNullConstant, satisfiesNullConstant, satisfiesTernaryExpression, satisfiesUnaryExpression
-
-
-
-
Method Detail
-
lubAux
public Prefix lubAux(Prefix other) throws it.unive.lisa.analysis.SemanticException
- Specified by:
lubAux
in interfaceit.unive.lisa.analysis.BaseLattice<Prefix>
- Throws:
it.unive.lisa.analysis.SemanticException
-
lessOrEqualAux
public boolean lessOrEqualAux(Prefix other) throws it.unive.lisa.analysis.SemanticException
- Specified by:
lessOrEqualAux
in interfaceit.unive.lisa.analysis.BaseLattice<Prefix>
- Throws:
it.unive.lisa.analysis.SemanticException
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interfaceit.unive.lisa.analysis.BaseLattice<Prefix>
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceit.unive.lisa.analysis.BaseLattice<Prefix>
- Overrides:
hashCode
in classjava.lang.Object
-
bottom
public Prefix bottom()
- Specified by:
bottom
in interfaceit.unive.lisa.analysis.Lattice<Prefix>
-
representation
public it.unive.lisa.util.representation.StructuredRepresentation representation()
- Specified by:
representation
in interfaceit.unive.lisa.util.representation.StructuredObject
-
evalNonNullConstant
public Prefix evalNonNullConstant(it.unive.lisa.symbolic.value.Constant constant, it.unive.lisa.program.cfg.ProgramPoint pp, it.unive.lisa.analysis.SemanticOracle oracle)
- Specified by:
evalNonNullConstant
in interfaceit.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<Prefix>
-
evalBinaryExpression
public Prefix evalBinaryExpression(it.unive.lisa.symbolic.value.operator.binary.BinaryOperator operator, Prefix left, Prefix right, it.unive.lisa.program.cfg.ProgramPoint pp, it.unive.lisa.analysis.SemanticOracle oracle)
- Specified by:
evalBinaryExpression
in interfaceit.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<Prefix>
-
evalTernaryExpression
public Prefix evalTernaryExpression(it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator operator, Prefix left, Prefix middle, Prefix right, it.unive.lisa.program.cfg.ProgramPoint pp, it.unive.lisa.analysis.SemanticOracle oracle) throws it.unive.lisa.analysis.SemanticException
- Specified by:
evalTernaryExpression
in interfaceit.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain<Prefix>
- Throws:
it.unive.lisa.analysis.SemanticException
-
getPrefix
public java.lang.String getPrefix()
Yields the prefix of this abstract value.- Returns:
- the prefix of this abstract value.
-
substring
public Prefix substring(long begin, long end)
Yields the prefix corresponding to the substring of this prefix between two indexes.- Parameters:
begin
- where the substring startsend
- where the substring ends- Returns:
- the prefix corresponding to the substring of this prefix between two indexes
-
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(Prefix 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)
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
-
-