83 virtual ~Range() =
default;
96 virtual std::deque<bit_lattice>
getBitValues(
bool isSigned)
const;
97 virtual RangeRef
getAnti()
const;
104 virtual bool isReal()
const;
107 bool isSameType(
const RangeConstRef& other)
const;
108 virtual bool isSameRange(
const RangeConstRef& other)
const;
113 virtual void print(std::ostream& OS)
const;
117 RangeRef
add(
const RangeConstRef& other)
const;
118 RangeRef
sat_add(
const RangeConstRef& other)
const;
119 RangeRef
usat_add(
const RangeConstRef& other)
const;
120 RangeRef
sub(
const RangeConstRef& other)
const;
121 RangeRef
sat_sub(
const RangeConstRef& other)
const;
122 RangeRef
usat_sub(
const RangeConstRef& other)
const;
123 RangeRef
mul(
const RangeConstRef& other)
const;
124 RangeRef
udiv(
const RangeConstRef& other)
const;
125 RangeRef
sdiv(
const RangeConstRef& other)
const;
126 RangeRef
urem(
const RangeConstRef& other)
const;
127 RangeRef
srem(
const RangeConstRef& other)
const;
128 RangeRef
shl(
const RangeConstRef& other)
const;
129 RangeRef
shr(
const RangeConstRef& other,
bool sign)
const;
130 virtual RangeRef
abs()
const;
131 virtual RangeRef
negate()
const;
134 RangeRef
Not()
const;
135 RangeRef
And(
const RangeConstRef& other)
const;
136 RangeRef
Or(
const RangeConstRef& other)
const;
137 RangeRef
Xor(
const RangeConstRef& other)
const;
140 virtual RangeRef
Eq(
const RangeConstRef& other,
bw_t bw)
const;
141 virtual RangeRef
Ne(
const RangeConstRef& other,
bw_t bw)
const;
142 RangeRef
Ugt(
const RangeConstRef& other,
bw_t bw)
const;
143 RangeRef
Uge(
const RangeConstRef& other,
bw_t bw)
const;
144 RangeRef
Ult(
const RangeConstRef& other,
bw_t bw)
const;
145 RangeRef
Ule(
const RangeConstRef& other,
bw_t bw)
const;
146 RangeRef
UMin(
const RangeConstRef& other)
const;
147 RangeRef
UMax(
const RangeConstRef& other)
const;
148 RangeRef
Sgt(
const RangeConstRef& other,
bw_t bw)
const;
149 RangeRef
Sge(
const RangeConstRef& other,
bw_t bw)
const;
150 RangeRef
Slt(
const RangeConstRef& other,
bw_t bw)
const;
151 RangeRef
Sle(
const RangeConstRef& other,
bw_t bw)
const;
152 RangeRef
SMin(
const RangeConstRef& other)
const;
153 RangeRef
SMax(
const RangeConstRef& other)
const;
158 virtual RangeRef
intersectWith(
const RangeConstRef& other)
const;
159 virtual RangeRef
unionWith(
const RangeConstRef& other)
const;
167 static RangeRef
fromBitValues(
const std::deque<bit_lattice>& bv,
bw_t bitwidth,
bool isSigned);
181 RealRange(
const RangeConstRef& s,
const RangeConstRef& e,
const RangeConstRef& f);
182 explicit RealRange(
const RangeConstRef& vc);
188 RangeRef getRange()
const;
190 RangeRef getSign()
const;
191 RangeRef getExponent()
const;
192 RangeRef getSignificand()
const;
193 std::deque<bit_lattice>
getBitValues(
bool)
const override;
194 RangeRef
getAnti()
const override;
195 void setSign(
const RangeConstRef& s);
196 void setExponent(
const RangeConstRef& e);
197 void setSignificand(
const RangeConstRef& f);
198 bool isSameRange(
const RangeConstRef& other)
const override;
205 bool isReal()
const override;
207 void print(std::ostream& OS)
const override;
209 RangeRef
abs()
const override;
210 RangeRef
negate()
const override;
212 RangeRef
Eq(
const RangeConstRef& other,
bw_t bw)
const override;
213 RangeRef
Ne(
const RangeConstRef& other,
bw_t bw)
const override;
215 RangeRef
intersectWith(
const RangeConstRef& other)
const override;
216 RangeRef
unionWith(
const RangeConstRef& other)
const override;
217 RangeRef toFloat64()
const;
218 RangeRef toFloat32()
const;
virtual bool isSameRange(const RangeConstRef &other) const
RangeRef zextOrTrunc(bw_t bitwidth) const
RangeRef srem(const RangeConstRef &other) const
APInt l
The lower bound of the range.
virtual void print(std::ostream &OS) const
virtual bool isConstant() const
APInt getSignedMin() const
RangeRef Ugt(const RangeConstRef &other, bw_t bw) const
RangeRef usat_add(const RangeConstRef &other) const
APInt getSignedMax() const
RangeRef Sgt(const RangeConstRef &other, bw_t bw) const
virtual bool isFullSet() const
RangeRef SMax(const RangeConstRef &other) const
virtual RangeRef negate() const
std::string ToString() const
const APInt & getUpper() const
bool isSameType(const RangeConstRef &other) const
RangeRef shl(const RangeConstRef &other) const
static const APInt MinDelta
RangeRef add(const RangeConstRef &other) const
APInt u
The upper bound of the range.
RangeRef Xor(const RangeConstRef &other) const
CONSTREF_FORWARD_DECL(Range)
RangeRef Ult(const RangeConstRef &other, bw_t bw) const
std::ostream & operator<<(std::ostream &OS, const Range &R)
RangeRef And(const RangeConstRef &other) const
virtual bool isUnknown() const
virtual RangeRef abs() const
This C++ header file contains common macros for the tree structure.
static RangeRef makeSatisfyingCmpRegion(kind pred, const RangeConstRef &Other)
virtual bool isSingleElement() const
RangeRef udiv(const RangeConstRef &other) const
void normalizeRange(const APInt &lb, const APInt &ub, RangeType rType)
RangeRef sub(const RangeConstRef &other) const
static const bw_t max_digits
APInt getUnsignedMin() const
virtual void setUnknown()
RangeRef mul(const RangeConstRef &other) const
RangeRef Sge(const RangeConstRef &other, bw_t bw) const
bool operator==(const Range &other) const =delete
RangeRef Or(const RangeConstRef &other) const
bw_t bw
the range bit-width
bool operator!=(const Range &other) const =delete
virtual RangeRef intersectWith(const RangeConstRef &other) const
RangeType type
the range type
Template definition of refcount.
RangeRef truncate(bw_t bitwidth) const
RangeRef sextOrTrunc(bw_t bitwidth) const
RangeRef UMin(const RangeConstRef &other) const
RangeRef shr(const RangeConstRef &other, bool sign) const
virtual RangeRef Eq(const RangeConstRef &other, bw_t bw) const
RangeRef Uge(const RangeConstRef &other, bw_t bw) const
RangeRef SMin(const RangeConstRef &other) const
Range(RangeType type, bw_t bw)
APInt getUnsignedMax() const
virtual RangeRef unionWith(const RangeConstRef &other) const
RangeRef Slt(const RangeConstRef &other, bw_t bw) const
static bw_t neededBits(const APInt &a, const APInt &b, bool sign)
RangeRef UMax(const RangeConstRef &other) const
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
RangeRef usat_sub(const RangeConstRef &other) const
RangeRef urem(const RangeConstRef &other) const
const APInt & getLower() const
RangeRef Ule(const RangeConstRef &other, bw_t bw) const
RangeRef sat_sub(const RangeConstRef &other) const
RangeRef Sle(const RangeConstRef &other, bw_t bw) const
virtual bool isEmpty() const
virtual RangeRef Ne(const RangeConstRef &other, bw_t bw) const
static RangeRef fromBitValues(const std::deque< bit_lattice > &bv, bw_t bitwidth, bool isSigned)
virtual bool isReal() const
virtual RangeRef getAnti() const
Range & operator=(const Range &other)=default
RangeRef sdiv(const RangeConstRef &other) const
virtual Range * clone() const
virtual std::deque< bit_lattice > getBitValues(bool isSigned) const
RangeRef sat_add(const RangeConstRef &other) const