PandA-2024.02
|
#include <Range.hpp>
Public Member Functions | |
RealRange (const Range &s, const Range &e, const Range &f) | |
RealRange (const RangeConstRef &s, const RangeConstRef &e, const RangeConstRef &f) | |
RealRange (const RangeConstRef &vc) | |
~RealRange () override=default | |
RealRange (const RealRange &other)=default | |
RealRange (RealRange &&)=default | |
RealRange & | operator= (const RealRange &other)=default |
RealRange & | operator= (RealRange &&)=default |
RangeRef | getRange () const |
RangeRef | getSign () const |
RangeRef | getExponent () const |
RangeRef | getSignificand () const |
std::deque< bit_lattice > | getBitValues (bool) const override |
RangeRef | getAnti () const override |
void | setSign (const RangeConstRef &s) |
void | setExponent (const RangeConstRef &e) |
void | setSignificand (const RangeConstRef &f) |
bool | isSameRange (const RangeConstRef &other) const override |
bool | isFullSet () const override |
bool | isUnknown () const override |
void | setUnknown () override |
bool | isSingleElement () const override |
bool | isConstant () const override |
bool | isEmpty () const override |
bool | isReal () const override |
Range * | clone () const override |
void | print (std::ostream &OS) const override |
RangeRef | abs () const override |
RangeRef | negate () const override |
RangeRef | Eq (const RangeConstRef &other, bw_t bw) const override |
RangeRef | Ne (const RangeConstRef &other, bw_t bw) const override |
RangeRef | intersectWith (const RangeConstRef &other) const override |
RangeRef | unionWith (const RangeConstRef &other) const override |
RangeRef | toFloat64 () const |
RangeRef | toFloat32 () const |
Public Member Functions inherited from Range | |
Range (RangeType type, bw_t bw) | |
Range (RangeType rType, bw_t bw, const APInt &lb, const APInt &ub) | |
virtual | ~Range ()=default |
Range (const Range &other)=default | |
Range (Range &&)=default | |
Range & | operator= (const Range &other)=default |
Range & | operator= (Range &&)=default |
bw_t | getBitWidth () const |
const APInt & | getLower () const |
const APInt & | getUpper () const |
APInt | getSignedMax () const |
APInt | getSignedMin () const |
APInt | getUnsignedMax () const |
APInt | getUnsignedMin () const |
APInt | getSpan () const |
bool | isRegular () const |
bool | isAnti () const |
bool | operator== (const Range &other) const =delete |
bool | operator!= (const Range &other) const =delete |
bool | isSameType (const RangeConstRef &other) const |
std::string | ToString () const |
RangeRef | add (const RangeConstRef &other) const |
RangeRef | sat_add (const RangeConstRef &other) const |
RangeRef | usat_add (const RangeConstRef &other) const |
RangeRef | sub (const RangeConstRef &other) const |
RangeRef | sat_sub (const RangeConstRef &other) const |
RangeRef | usat_sub (const RangeConstRef &other) const |
RangeRef | mul (const RangeConstRef &other) const |
RangeRef | udiv (const RangeConstRef &other) const |
RangeRef | sdiv (const RangeConstRef &other) const |
RangeRef | urem (const RangeConstRef &other) const |
RangeRef | srem (const RangeConstRef &other) const |
RangeRef | shl (const RangeConstRef &other) const |
RangeRef | shr (const RangeConstRef &other, bool sign) const |
RangeRef | Not () const |
RangeRef | And (const RangeConstRef &other) const |
RangeRef | Or (const RangeConstRef &other) const |
RangeRef | Xor (const RangeConstRef &other) const |
RangeRef | Ugt (const RangeConstRef &other, bw_t bw) const |
RangeRef | Uge (const RangeConstRef &other, bw_t bw) const |
RangeRef | Ult (const RangeConstRef &other, bw_t bw) const |
RangeRef | Ule (const RangeConstRef &other, bw_t bw) const |
RangeRef | UMin (const RangeConstRef &other) const |
RangeRef | UMax (const RangeConstRef &other) const |
RangeRef | Sgt (const RangeConstRef &other, bw_t bw) const |
RangeRef | Sge (const RangeConstRef &other, bw_t bw) const |
RangeRef | Slt (const RangeConstRef &other, bw_t bw) const |
RangeRef | Sle (const RangeConstRef &other, bw_t bw) const |
RangeRef | SMin (const RangeConstRef &other) const |
RangeRef | SMax (const RangeConstRef &other) const |
RangeRef | sextOrTrunc (bw_t bitwidth) const |
RangeRef | zextOrTrunc (bw_t bitwidth) const |
RangeRef | truncate (bw_t bitwidth) const |
Static Public Member Functions | |
static refcount< RealRange > | fromBitValues (const std::deque< bit_lattice > &bv) |
Static Public Member Functions inherited from Range | |
static RangeRef | makeSatisfyingCmpRegion (kind pred, const RangeConstRef &Other) |
static bw_t | neededBits (const APInt &a, const APInt &b, bool sign) |
static RangeRef | fromBitValues (const std::deque< bit_lattice > &bv, bw_t bitwidth, bool isSigned) |
Private Attributes | |
RangeRef | sign |
RangeRef | exponent |
RangeRef | significand |
Additional Inherited Members | |
Public Types inherited from Range | |
using | bw_t = APInt::bw_t |
Static Public Attributes inherited from Range | |
static const bw_t | max_digits = static_cast<bw_t>(std::numeric_limits<APInt::number>::digits) |
static const APInt | Min = APInt::getSignedMinValue(Range::max_digits) |
static const APInt | Max = APInt::getSignedMaxValue(Range::max_digits) |
static const APInt | MinDelta |
Definition at line 2662 of file Range.cpp.
References Range::getBitWidth(), Range::isReal(), STR, THROW_ASSERT, and Range::ToString().
Referenced by abs(), clone(), fromBitValues(), getAnti(), intersectWith(), negate(), toFloat32(), toFloat64(), and unionWith().
RealRange::RealRange | ( | const RangeConstRef & | s, |
const RangeConstRef & | e, | ||
const RangeConstRef & | f | ||
) |
Definition at line 2674 of file Range.cpp.
References Range::getBitWidth(), STR, and THROW_ASSERT.
|
explicit |
Definition at line 2686 of file Range.cpp.
References exponent, Range::max_digits, Range::Range(), Regular, significand, and THROW_UNREACHABLE.
|
overridedefault |
|
default |
|
default |
|
overridevirtual |
Reimplemented from Range.
Definition at line 2842 of file Range.cpp.
References exponent, Range::Range(), RealRange(), Regular, and significand.
|
overridevirtual |
Reimplemented from Range.
Definition at line 2837 of file Range.cpp.
References exponent, RealRange(), sign, and significand.
Referenced by negate(), toFloat32(), and toFloat64().
|
overridevirtual |
Reimplemented from Range.
Definition at line 2857 of file Range.cpp.
References Range::And(), exponent, Range::Range(), Regular, sign, significand, and Range::zextOrTrunc().
Referenced by Ne().
|
static |
Definition at line 2968 of file Range.cpp.
References Range::fromBitValues(), RealRange(), and THROW_ASSERT.
|
overridevirtual |
Reimplemented from Range.
Definition at line 2758 of file Range.cpp.
References exponent, RealRange(), sign, and significand.
|
overridevirtual |
Reimplemented from Range.
Definition at line 2739 of file Range.cpp.
References exponent, Range::getBitWidth(), sign, BitLatticeManipulator::sign_extend_bitstring(), significand, and THROW_ASSERT.
RangeRef RealRange::getExponent | ( | ) | const |
RangeRef RealRange::getRange | ( | ) | const |
Definition at line 2705 of file Range.cpp.
References exponent, Range::getBitWidth(), Range::max_digits, Range::Range(), Regular, sign, significand, and THROW_UNREACHABLE.
RangeRef RealRange::getSignificand | ( | ) | const |
Definition at line 2734 of file Range.cpp.
References significand.
|
overridevirtual |
Reimplemented from Range.
Definition at line 2886 of file Range.cpp.
References exponent, PRINT_MSG, RealRange(), sign, significand, and THROW_ASSERT.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Reimplemented from Range.
Definition at line 2778 of file Range.cpp.
References exponent, Range::getBitWidth(), sign, and significand.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Reimplemented from Range.
Definition at line 2847 of file Range.cpp.
References clone(), exponent, Range::Range(), RealRange(), Regular, sign, and significand.
|
overridevirtual |
Reimplemented from Range.
Definition at line 2826 of file Range.cpp.
References exponent, Range::getBitWidth(), sign, significand, and STR.
void RealRange::setExponent | ( | const RangeConstRef & | e | ) |
void RealRange::setSign | ( | const RangeConstRef & | s | ) |
void RealRange::setSignificand | ( | const RangeConstRef & | f | ) |
Definition at line 2773 of file Range.cpp.
References significand.
|
overridevirtual |
RangeRef RealRange::toFloat32 | ( | ) | const |
Definition at line 2935 of file Range.cpp.
References clone(), exponent, Range::getBitWidth(), APInt::getMaxValue(), max, min, Range::Range(), RealRange(), Regular, sign, and significand.
RangeRef RealRange::toFloat64 | ( | ) | const |
Definition at line 2908 of file Range.cpp.
References clone(), exponent, Range::getBitWidth(), Range::Range(), RealRange(), Regular, sign, and significand.
|
overridevirtual |
Reimplemented from Range.
Definition at line 2897 of file Range.cpp.
References exponent, PRINT_MSG, RealRange(), sign, significand, and THROW_ASSERT.
|
private |
Definition at line 176 of file Range.hpp.
Referenced by abs(), clone(), Eq(), getAnti(), getBitValues(), getExponent(), getRange(), intersectWith(), isConstant(), isEmpty(), isFullSet(), isSameRange(), isSingleElement(), isUnknown(), negate(), print(), RealRange(), setExponent(), setUnknown(), toFloat32(), toFloat64(), and unionWith().
|
private |
Definition at line 175 of file Range.hpp.
Referenced by clone(), Eq(), getAnti(), getBitValues(), getRange(), getSign(), intersectWith(), isConstant(), isEmpty(), isFullSet(), isSameRange(), isSingleElement(), isUnknown(), negate(), print(), setSign(), setUnknown(), toFloat32(), toFloat64(), and unionWith().
|
private |
Definition at line 177 of file Range.hpp.
Referenced by abs(), clone(), Eq(), getAnti(), getBitValues(), getRange(), getSignificand(), intersectWith(), isConstant(), isEmpty(), isFullSet(), isSameRange(), isSingleElement(), isUnknown(), negate(), print(), RealRange(), setSignificand(), setUnknown(), toFloat32(), toFloat64(), and unionWith().