PandA-2024.02
Public Member Functions | Static Public Member Functions | Private Attributes
RealRange Class Reference

#include <Range.hpp>

Inheritance diagram for RealRange:
Inheritance graph
[legend]
Collaboration diagram for RealRange:
Collaboration graph
[legend]

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
 
RealRangeoperator= (const RealRange &other)=default
 
RealRangeoperator= (RealRange &&)=default
 
RangeRef getRange () const
 
RangeRef getSign () const
 
RangeRef getExponent () const
 
RangeRef getSignificand () const
 
std::deque< bit_latticegetBitValues (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
 
Rangeclone () 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
 
Rangeoperator= (const Range &other)=default
 
Rangeoperator= (Range &&)=default
 
bw_t getBitWidth () const
 
const APIntgetLower () const
 
const APIntgetUpper () 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< RealRangefromBitValues (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
 

Detailed Description

Definition at line 172 of file Range.hpp.

Constructor & Destructor Documentation

◆ RealRange() [1/5]

RealRange::RealRange ( const Range s,
const Range e,
const Range f 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RealRange() [2/5]

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.

Here is the call graph for this function:

◆ RealRange() [3/5]

RealRange::RealRange ( const RangeConstRef &  vc)
explicit

Definition at line 2686 of file Range.cpp.

References exponent, Range::max_digits, Range::Range(), Regular, significand, and THROW_UNREACHABLE.

Here is the call graph for this function:

◆ ~RealRange()

RealRange::~RealRange ( )
overridedefault

◆ RealRange() [4/5]

RealRange::RealRange ( const RealRange other)
default

◆ RealRange() [5/5]

RealRange::RealRange ( RealRange &&  )
default

Member Function Documentation

◆ abs()

RangeRef RealRange::abs ( ) const
overridevirtual

Reimplemented from Range.

Definition at line 2842 of file Range.cpp.

References exponent, Range::Range(), RealRange(), Regular, and significand.

Here is the call graph for this function:

◆ clone()

Range * RealRange::clone ( ) const
overridevirtual

Reimplemented from Range.

Definition at line 2837 of file Range.cpp.

References exponent, RealRange(), sign, and significand.

Referenced by negate(), toFloat32(), and toFloat64().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Eq()

RangeRef RealRange::Eq ( const RangeConstRef &  other,
bw_t  bw 
) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fromBitValues()

refcount< RealRange > RealRange::fromBitValues ( const std::deque< bit_lattice > &  bv)
static

Definition at line 2968 of file Range.cpp.

References Range::fromBitValues(), RealRange(), and THROW_ASSERT.

Here is the call graph for this function:

◆ getAnti()

RangeRef RealRange::getAnti ( ) const
overridevirtual

Reimplemented from Range.

Definition at line 2758 of file Range.cpp.

References exponent, RealRange(), sign, and significand.

Here is the call graph for this function:

◆ getBitValues()

std::deque< bit_lattice > RealRange::getBitValues ( bool  ) const
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.

Here is the call graph for this function:

◆ getExponent()

RangeRef RealRange::getExponent ( ) const

Definition at line 2729 of file Range.cpp.

References exponent.

◆ getRange()

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.

Here is the call graph for this function:

◆ getSign()

RangeRef RealRange::getSign ( ) const

Definition at line 2724 of file Range.cpp.

References sign.

◆ getSignificand()

RangeRef RealRange::getSignificand ( ) const

Definition at line 2734 of file Range.cpp.

References significand.

◆ intersectWith()

RangeRef RealRange::intersectWith ( const RangeConstRef &  other) const
overridevirtual

Reimplemented from Range.

Definition at line 2886 of file Range.cpp.

References exponent, PRINT_MSG, RealRange(), sign, significand, and THROW_ASSERT.

Here is the call graph for this function:

◆ isConstant()

bool RealRange::isConstant ( ) const
overridevirtual

Reimplemented from Range.

Definition at line 2816 of file Range.cpp.

References exponent, sign, and significand.

◆ isEmpty()

bool RealRange::isEmpty ( ) const
overridevirtual

Reimplemented from Range.

Definition at line 2789 of file Range.cpp.

References exponent, sign, and significand.

◆ isFullSet()

bool RealRange::isFullSet ( ) const
overridevirtual

Reimplemented from Range.

Definition at line 2806 of file Range.cpp.

References exponent, sign, and significand.

◆ isReal()

bool RealRange::isReal ( ) const
overridevirtual

Reimplemented from Range.

Definition at line 2821 of file Range.cpp.

◆ isSameRange()

bool RealRange::isSameRange ( const RangeConstRef &  other) const
overridevirtual

Reimplemented from Range.

Definition at line 2778 of file Range.cpp.

References exponent, Range::getBitWidth(), sign, and significand.

Here is the call graph for this function:

◆ isSingleElement()

bool RealRange::isSingleElement ( ) const
overridevirtual

Reimplemented from Range.

Definition at line 2811 of file Range.cpp.

References exponent, sign, and significand.

◆ isUnknown()

bool RealRange::isUnknown ( ) const
overridevirtual

Reimplemented from Range.

Definition at line 2794 of file Range.cpp.

References exponent, sign, and significand.

◆ Ne()

RangeRef RealRange::Ne ( const RangeConstRef &  other,
bw_t  bw 
) const
overridevirtual

Reimplemented from Range.

Definition at line 2881 of file Range.cpp.

References Eq().

Here is the call graph for this function:

◆ negate()

RangeRef RealRange::negate ( ) const
overridevirtual

Reimplemented from Range.

Definition at line 2847 of file Range.cpp.

References clone(), exponent, Range::Range(), RealRange(), Regular, sign, and significand.

Here is the call graph for this function:

◆ operator=() [1/2]

RealRange& RealRange::operator= ( const RealRange other)
default

◆ operator=() [2/2]

RealRange& RealRange::operator= ( RealRange &&  )
default

◆ print()

void RealRange::print ( std::ostream &  OS) const
overridevirtual

Reimplemented from Range.

Definition at line 2826 of file Range.cpp.

References exponent, Range::getBitWidth(), sign, significand, and STR.

Here is the call graph for this function:

◆ setExponent()

void RealRange::setExponent ( const RangeConstRef &  e)

Definition at line 2768 of file Range.cpp.

References exponent.

◆ setSign()

void RealRange::setSign ( const RangeConstRef &  s)

Definition at line 2763 of file Range.cpp.

References sign.

◆ setSignificand()

void RealRange::setSignificand ( const RangeConstRef &  f)

Definition at line 2773 of file Range.cpp.

References significand.

◆ setUnknown()

void RealRange::setUnknown ( )
overridevirtual

Reimplemented from Range.

Definition at line 2799 of file Range.cpp.

References exponent, sign, and significand.

◆ toFloat32()

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.

Here is the call graph for this function:

◆ toFloat64()

RangeRef RealRange::toFloat64 ( ) const

Definition at line 2908 of file Range.cpp.

References clone(), exponent, Range::getBitWidth(), Range::Range(), RealRange(), Regular, sign, and significand.

Here is the call graph for this function:

◆ unionWith()

RangeRef RealRange::unionWith ( const RangeConstRef &  other) const
overridevirtual

Reimplemented from Range.

Definition at line 2897 of file Range.cpp.

References exponent, PRINT_MSG, RealRange(), sign, significand, and THROW_ASSERT.

Here is the call graph for this function:

Field Documentation

◆ exponent

RangeRef RealRange::exponent
private

◆ sign

RangeRef RealRange::sign
private

◆ significand

RangeRef RealRange::significand
private

The documentation for this class was generated from the following files:

Generated on Mon Feb 12 2024 13:04:02 for PandA-2024.02 by doxygen 1.8.13