[cfe-dev] [analyzer] What is RangeSet::Negate idea
Artem Dergachev via cfe-dev
cfe-dev at lists.llvm.org
Mon Apr 6 12:56:36 PDT 2020
Yup, and Negate() flips this sequence of segments around zero, i.e.
[/a/, /b]/ U [/c/, /d/] => [-/d/, -/c/] U [-/b/, -/a/]. In other words,
if R is the range for $x, then R.Negate() is the range for -x.
Negate() also handles MIN differently because -MIN is unrepresentable
for most integer types.
On 4/6/20 6:22 PM, Denis Petrov via cfe-dev wrote:
>
> Hi, community.
>
>
> Who can explain the main idea of *RangeSet::Negate*? And how does
> *RangeSet*work?
>
>
> As I understand *RangeSet* may hold several constraint ranges
> /(e.g. [MIN,10] U [20,30] U [40,MAX])/ or may be empty /(no
> constraints, in other words, holds everything [MIN, MAX])/,
>
> when MIN and MAX are kinda *numeric**_limits<*/type //which
> corresponds to particular SymExpr/*>::min/max()*.
>
> Am I correct? If I am not, please explain.
>
>
> P.S. fixed wrong subject format.
>
>
> ------------------------------------------------------------------------
> *Denys Petrov*
> Senior С++ Developer | Kharkiv, Ukraine
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list