Class StartsWith
- java.lang.Object
-
- it.unive.lisa.program.cfg.statement.Statement
-
- it.unive.lisa.program.cfg.statement.Expression
-
- it.unive.lisa.program.cfg.statement.NaryExpression
-
- it.unive.lisa.program.cfg.statement.BinaryExpression
-
- it.unive.lisa.program.cfg.statement.string.StartsWith
-
- All Implemented Interfaces:
it.unive.lisa.program.cfg.ProgramPoint,it.unive.lisa.program.CodeElement,it.unive.lisa.util.datastructures.graph.code.CodeNode<it.unive.lisa.program.cfg.CFG,it.unive.lisa.program.cfg.statement.Statement,it.unive.lisa.program.cfg.edge.Edge>,it.unive.lisa.util.datastructures.graph.Node<it.unive.lisa.program.cfg.CFG,it.unive.lisa.program.cfg.statement.Statement,it.unive.lisa.program.cfg.edge.Edge>,java.lang.Comparable<it.unive.lisa.program.cfg.statement.Statement>
public class StartsWith extends it.unive.lisa.program.cfg.statement.BinaryExpressionAn expression modeling the string startsWith operation. The type of both operands must beStringType. The type of this expression is theBooleanType.
Since in most languages string operations are provided through calls to library functions, this class contains a fieldoriginatingwhose purpose is to optionally store aStatementthat is rewritten to an instance of this class (i.e., a call to aNativeCFGmodeling the library function). If present, such statement will be used asProgramPointfor semantics computations. This allows subclasses to implementPluggableStatementeasily without redefining the semantics provided by this class.
-
-
Field Summary
Fields Modifier and Type Field Description protected it.unive.lisa.program.cfg.statement.StatementoriginatingStatement that has been rewritten to this operation, if any.
-
Constructor Summary
Constructors Constructor Description StartsWith(it.unive.lisa.program.cfg.CFG cfg, it.unive.lisa.program.cfg.CodeLocation location, it.unive.lisa.program.cfg.statement.Expression left, it.unive.lisa.program.cfg.statement.Expression right)Builds the startsWith.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <A extends it.unive.lisa.analysis.AbstractState<A,H,V,T>,H extends it.unive.lisa.analysis.heap.HeapDomain<H>,V extends it.unive.lisa.analysis.value.ValueDomain<V>,T extends it.unive.lisa.analysis.value.TypeDomain<T>>
it.unive.lisa.analysis.AnalysisState<A,H,V,T>binarySemantics(it.unive.lisa.interprocedural.InterproceduralAnalysis<A,H,V,T> interprocedural, it.unive.lisa.analysis.AnalysisState<A,H,V,T> state, it.unive.lisa.symbolic.SymbolicExpression left, it.unive.lisa.symbolic.SymbolicExpression right, it.unive.lisa.analysis.StatementStore<A,H,V,T> expressions)-
Methods inherited from class it.unive.lisa.program.cfg.statement.BinaryExpression
expressionSemantics, getLeft, getRight
-
Methods inherited from class it.unive.lisa.program.cfg.statement.NaryExpression
accept, equals, getConstructName, getOrder, getStatementEvaluatedBefore, getSubExpressions, hashCode, semantics, setOffset, toString
-
Methods inherited from class it.unive.lisa.program.cfg.statement.Expression
getMetaVariables, getParentStatement, getRootStatement, getStaticType, setParentStatement
-
Methods inherited from class it.unive.lisa.program.cfg.statement.Statement
compareTo, getCFG, getEvaluationPredecessor, getLocation, getOffset, stopsExecution, throwsError
-
-
-
-
Field Detail
-
originating
protected it.unive.lisa.program.cfg.statement.Statement originating
Statement that has been rewritten to this operation, if any. This is to accomodate the fact that, in most languages, string operations are performed through calls, and one might want to provide the semantics of those calls throughNativeCFGthat rewrites to instances of this class.
-
-
Constructor Detail
-
StartsWith
public StartsWith(it.unive.lisa.program.cfg.CFG cfg, it.unive.lisa.program.cfg.CodeLocation location, it.unive.lisa.program.cfg.statement.Expression left, it.unive.lisa.program.cfg.statement.Expression right)Builds the startsWith.- Parameters:
cfg- theCFGwhere this operation lieslocation- the code location where this operation is definedleft- the left-hand side of this operationright- the right-hand side of this operation
-
-
Method Detail
-
binarySemantics
public <A extends it.unive.lisa.analysis.AbstractState<A,H,V,T>,H extends it.unive.lisa.analysis.heap.HeapDomain<H>,V extends it.unive.lisa.analysis.value.ValueDomain<V>,T extends it.unive.lisa.analysis.value.TypeDomain<T>> it.unive.lisa.analysis.AnalysisState<A,H,V,T> binarySemantics(it.unive.lisa.interprocedural.InterproceduralAnalysis<A,H,V,T> interprocedural, it.unive.lisa.analysis.AnalysisState<A,H,V,T> state, it.unive.lisa.symbolic.SymbolicExpression left, it.unive.lisa.symbolic.SymbolicExpression right, it.unive.lisa.analysis.StatementStore<A,H,V,T> expressions) throws it.unive.lisa.analysis.SemanticException- Specified by:
binarySemanticsin classit.unive.lisa.program.cfg.statement.BinaryExpression- Throws:
it.unive.lisa.analysis.SemanticException
-
-