PandA-2024.02
|
This is an interval that contains a symbolic limit, which is given by the bounds of a program name, e.g. More...
Public Member Functions | |
SymbRange (const RangeConstRef &range, const tree_nodeConstRef &bound, kind pred) | |
~SymbRange () override=default | |
SymbRange (const SymbRange &)=delete | |
SymbRange (SymbRange &&)=delete | |
SymbRange & | operator= (const SymbRange &)=delete |
SymbRange & | operator= (SymbRange &&)=delete |
ValueRangeType | getValueId () const override |
kind | getOperation () const |
Returns the opcode of the operation that create this interval. More... | |
const tree_nodeConstRef & | getBound () const |
Returns the node which is the bound of this interval. More... | |
RangeConstRef | solveFuture (const VarNode *bound, const VarNode *sink) const |
Replace symbolic bound with hard-wired constants. More... | |
void | print (std::ostream &OS) const override |
Prints the content of the interval. More... | |
Public Member Functions inherited from ValueRange | |
ValueRange (const RangeConstRef &range) | |
virtual | ~ValueRange ()=default |
ValueRange (const ValueRange &)=delete | |
ValueRange (ValueRange &&)=delete | |
ValueRange & | operator= (const ValueRange &)=delete |
ValueRange & | operator= (ValueRange &&)=delete |
RangeConstRef | getRange () const |
Returns the range of this interval. More... | |
void | setRange (const RangeConstRef &newRange) |
Sets the range of this interval to another range. More... | |
std::string | ToString () const |
Static Public Member Functions | |
static bool | classof (SymbRange const *) |
static bool | classof (ValueRange const *BI) |
Static Public Member Functions inherited from ValueRange | |
static bool | classof (ValueRange const *) |
Private Attributes | |
const tree_nodeConstRef | bound |
The bound. It is a node which limits the interval of this range. More... | |
kind | pred |
The predicate of the operation in which this interval takes part. More... | |
This is an interval that contains a symbolic limit, which is given by the bounds of a program name, e.g.
: [-inf, ub(b) + 1].
Definition at line 1605 of file Range_Analysis.cpp.
SymbRange::SymbRange | ( | const RangeConstRef & | range, |
const tree_nodeConstRef & | bound, | ||
kind | pred | ||
) |
Definition at line 1654 of file Range_Analysis.cpp.
|
overridedefault |
|
delete |
|
delete |
Definition at line 1628 of file Range_Analysis.cpp.
|
inlinestatic |
Definition at line 1632 of file Range_Analysis.cpp.
References ValueRange::getValueId(), and SymbRangeId.
|
inline |
Returns the node which is the bound of this interval.
Definition at line 1643 of file Range_Analysis.cpp.
References ValueRange::print().
Referenced by print().
|
inline |
Returns the opcode of the operation that create this interval.
Definition at line 1638 of file Range_Analysis.cpp.
Referenced by print(), and solveFuture().
|
inlineoverridevirtual |
Reimplemented from ValueRange.
Definition at line 1624 of file Range_Analysis.cpp.
References SymbRangeId.
|
overridevirtual |
Prints the content of the interval.
Pretty print.
Reimplemented from ValueRange.
Definition at line 1838 of file Range_Analysis.cpp.
References CASE_CPP_NODES, CASE_CST_NODES, CASE_DECL_NODES, CASE_FAKE_NODES, CASE_GIMPLE_NODES, CASE_MISCELLANEOUS, CASE_PRAGMA_NODES, CASE_QUATERNARY_EXPRESSION, CASE_TERNARY_EXPRESSION, CASE_TYPE_NODES, CASE_UNARY_EXPRESSION, getBound(), and getOperation().
Referenced by OpNode::getSink().
Replace symbolic bound with hard-wired constants.
Definition at line 1659 of file Range_Analysis.cpp.
References CASE_CPP_NODES, CASE_CST_NODES, CASE_DECL_NODES, CASE_FAKE_NODES, CASE_GIMPLE_NODES, CASE_MISCELLANEOUS, CASE_PRAGMA_NODES, CASE_QUATERNARY_EXPRESSION, CASE_TERNARY_EXPRESSION, CASE_TYPE_NODES, CASE_UNARY_EXPRESSION, Empty, getOperation(), VarNode::getRange(), ValueRange::getRange(), APInt::getSignedMaxValue(), APInt::getSignedMinValue(), tree_node::GetString(), VarNode::getValue(), Range::Max, Range::Min, Regular, THROW_ASSERT, and THROW_UNREACHABLE.
Referenced by OpNode::getInstruction().
|
private |
The bound. It is a node which limits the interval of this range.
Definition at line 1609 of file Range_Analysis.cpp.
|
private |
The predicate of the operation in which this interval takes part.
It is useful to know how we can constrain this interval after we fix the intersects.
Definition at line 1613 of file Range_Analysis.cpp.