Class: AdLint::Cc1::UnlimitedValueDomain

Inherits:
ValueDomain show all
Defined in:
lib/adlint/cc1/domain.rb

Direct Known Subclasses

NaN

Instance Method Summary collapse

Methods inherited from ValueDomain

#%, #-, #<=, #<=>, #>, #>=, #_narrow_by_ge, #_narrow_by_le, #_widen_by_eq, #_widen_by_ge, #_widen_by_gt, #_widen_by_le, #_widen_by_lt, #_widen_by_ne, #contain?, #eql?, #hash, #initialize, #logical_shr?, #narrow, #widen

Methods included from ValueDomainFactory

#_create_intersection, #_create_union, #clear_memos, #equal_to, #greater_than, #greater_than_or_equal_to, #less_than, #less_than_or_equal_to, #not_equal_to, #of_ambiguous, #of_false, #of_intersection, #of_nan, #of_nil, #of_true, #of_undefined, #of_union, #of_unlimited

Constructor Details

This class inherits a constructor from AdLint::Cc1::ValueDomain

Instance Method Details

#!Object



2501
2502
2503
2504
2505
2506
# File 'lib/adlint/cc1/domain.rb', line 2501

def !
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, logical negation of UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  ValueDomain.of_unlimited(logical_shr?)
end

#!=(rhs_dom) ⇒ Object



2584
2585
2586
# File 'lib/adlint/cc1/domain.rb', line 2584

def !=(rhs_dom)
  rhs_dom._not_equal_unlimited(self)
end

#&(rhs_dom) ⇒ Object



2294
2295
2296
# File 'lib/adlint/cc1/domain.rb', line 2294

def &(rhs_dom)
  rhs_dom.coerce_to_integer._and_unlimited(coerce_to_integer)
end

#*(rhs_dom) ⇒ Object



2211
2212
2213
# File 'lib/adlint/cc1/domain.rb', line 2211

def *(rhs_dom)
  rhs_dom._mul_unlimited(self)
end

#+(rhs_dom) ⇒ Object



2170
2171
2172
# File 'lib/adlint/cc1/domain.rb', line 2170

def +(rhs_dom)
  rhs_dom._add_unlimited(self)
end

#+@Object



2156
2157
2158
2159
2160
2161
# File 'lib/adlint/cc1/domain.rb', line 2156

def +@
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  self
end

#-@Object



2163
2164
2165
2166
2167
2168
# File 'lib/adlint/cc1/domain.rb', line 2163

def -@
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  self
end

#/(rhs_dom) ⇒ Object



2252
2253
2254
# File 'lib/adlint/cc1/domain.rb', line 2252

def /(rhs_dom)
  rhs_dom._div_unlimited(self)
end

#<(rhs_dom) ⇒ Object



2508
2509
2510
# File 'lib/adlint/cc1/domain.rb', line 2508

def <(rhs_dom)
  rhs_dom._less_unlimited(self)
end

#<<(rhs_dom) ⇒ Object



2417
2418
2419
# File 'lib/adlint/cc1/domain.rb', line 2417

def <<(rhs_dom)
  rhs_dom.coerce_to_integer._shl_unlimited(coerce_to_integer)
end

#==(rhs_dom) ⇒ Object



2546
2547
2548
# File 'lib/adlint/cc1/domain.rb', line 2546

def ==(rhs_dom)
  rhs_dom._equal_unlimited(self)
end

#>>(rhs_dom) ⇒ Object



2459
2460
2461
# File 'lib/adlint/cc1/domain.rb', line 2459

def >>(rhs_dom)
  rhs_dom.coerce_to_integer._shr_unlimited(coerce_to_integer)
end

#^(rhs_dom) ⇒ Object



2376
2377
2378
# File 'lib/adlint/cc1/domain.rb', line 2376

def ^(rhs_dom)
  rhs_dom.coerce_to_integer._xor_unlimited(coerce_to_integer)
end

#_add_equal_to(lhs_dom, rhs_dom = self) ⇒ Object



2190
2191
2192
2193
2194
2195
# File 'lib/adlint/cc1/domain.rb', line 2190

def _add_equal_to(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  rhs_dom
end

#_add_greater_than(lhs_dom, rhs_dom = self) ⇒ Object



2204
2205
2206
2207
2208
2209
# File 'lib/adlint/cc1/domain.rb', line 2204

def _add_greater_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  rhs_dom
end

#_add_less_than(lhs_dom, rhs_dom = self) ⇒ Object



2197
2198
2199
2200
2201
2202
# File 'lib/adlint/cc1/domain.rb', line 2197

def _add_less_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  rhs_dom
end

#_add_nil(lhs_dom, rhs_dom = self) ⇒ Object



2174
2175
2176
2177
2178
# File 'lib/adlint/cc1/domain.rb', line 2174

def _add_nil(lhs_dom, rhs_dom = self)
  # NOTE: `LHS + RHS' equals to `RHS + LHS'.
  #       This method invokes NilValueDomain#_add_unlimited.
  rhs_dom + lhs_dom
end

#_add_unlimited(lhs_dom, rhs_dom = self) ⇒ Object



2180
2181
2182
2183
2184
2185
2186
2187
2188
# File 'lib/adlint/cc1/domain.rb', line 2180

def _add_unlimited(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  # NOTE: NaN is a subclass of UnlimitedValueDomain.
  #       Arithmetic operation with UnlimitedValueDomain should make
  #       UnlimitedValueDomain, and with NaN should make NaN.
  lhs_dom.nan? ? lhs_dom : rhs_dom
end

#_and_equal_to(lhs_dom, rhs_dom = self) ⇒ Object



2314
2315
2316
2317
2318
2319
# File 'lib/adlint/cc1/domain.rb', line 2314

def _and_equal_to(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  rhs_dom
end

#_and_greater_than(lhs_dom, rhs_dom = self) ⇒ Object



2328
2329
2330
2331
2332
2333
# File 'lib/adlint/cc1/domain.rb', line 2328

def _and_greater_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  rhs_dom
end

#_and_less_than(lhs_dom, rhs_dom = self) ⇒ Object



2321
2322
2323
2324
2325
2326
# File 'lib/adlint/cc1/domain.rb', line 2321

def _and_less_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  rhs_dom
end

#_and_nil(lhs_dom, rhs_dom = self) ⇒ Object



2298
2299
2300
2301
2302
# File 'lib/adlint/cc1/domain.rb', line 2298

def _and_nil(lhs_dom, rhs_dom = self)
  # NOTE: `LHS & RHS' equals to `RHS & LHS'.
  #       This method invokes NilValueDomain#_and_unlimited.
  rhs_dom & lhs_dom
end

#_and_unlimited(lhs_dom, rhs_dom = self) ⇒ Object



2304
2305
2306
2307
2308
2309
2310
2311
2312
# File 'lib/adlint/cc1/domain.rb', line 2304

def _and_unlimited(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  # NOTE: NaN is a subclass of UnlimitedValueDomain.
  #       Arithmetic operation with UnlimitedValueDomain should make
  #       UnlimitedValueDomain, and with NaN should make NaN.
  lhs_dom.nan? ? lhs_dom : rhs_dom
end

#_contain_equal_to?(lhs_dom, rhs_dom = self) ⇒ Boolean

Returns:

  • (Boolean)


1931
1932
1933
# File 'lib/adlint/cc1/domain.rb', line 1931

def _contain_equal_to?(lhs_dom, rhs_dom = self)
  false
end

#_contain_greater_than?(lhs_dom, rhs_dom = self) ⇒ Boolean

Returns:

  • (Boolean)


1939
1940
1941
# File 'lib/adlint/cc1/domain.rb', line 1939

def _contain_greater_than?(lhs_dom, rhs_dom = self)
  false
end

#_contain_intersection?(lhs_dom, rhs_dom = self) ⇒ Boolean

Returns:

  • (Boolean)


1943
1944
1945
# File 'lib/adlint/cc1/domain.rb', line 1943

def _contain_intersection?(lhs_dom, rhs_dom = self)
  false
end

#_contain_less_than?(lhs_dom, rhs_dom = self) ⇒ Boolean

Returns:

  • (Boolean)


1935
1936
1937
# File 'lib/adlint/cc1/domain.rb', line 1935

def _contain_less_than?(lhs_dom, rhs_dom = self)
  false
end

#_contain_nil?(lhs_dom, rhs_dom = self) ⇒ Boolean

Returns:

  • (Boolean)


1923
1924
1925
# File 'lib/adlint/cc1/domain.rb', line 1923

def _contain_nil?(lhs_dom, rhs_dom = self)
  false
end

#_contain_union?(lhs_dom, rhs_dom = self) ⇒ Boolean

Returns:

  • (Boolean)


1947
1948
1949
# File 'lib/adlint/cc1/domain.rb', line 1947

def _contain_union?(lhs_dom, rhs_dom = self)
  false
end

#_contain_unlimited?(lhs_dom, rhs_dom = self) ⇒ Boolean

Returns:

  • (Boolean)


1927
1928
1929
# File 'lib/adlint/cc1/domain.rb', line 1927

def _contain_unlimited?(lhs_dom, rhs_dom = self)
  true
end

#_div_equal_to(lhs_dom, rhs_dom = self) ⇒ Object



2273
2274
2275
2276
2277
2278
# File 'lib/adlint/cc1/domain.rb', line 2273

def _div_equal_to(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  rhs_dom
end

#_div_greater_than(lhs_dom, rhs_dom = self) ⇒ Object



2287
2288
2289
2290
2291
2292
# File 'lib/adlint/cc1/domain.rb', line 2287

def _div_greater_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  rhs_dom
end

#_div_less_than(lhs_dom, rhs_dom = self) ⇒ Object



2280
2281
2282
2283
2284
2285
# File 'lib/adlint/cc1/domain.rb', line 2280

def _div_less_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  rhs_dom
end

#_div_nil(lhs_dom, rhs_dom = self) ⇒ Object



2256
2257
2258
2259
2260
2261
# File 'lib/adlint/cc1/domain.rb', line 2256

def _div_nil(lhs_dom, rhs_dom = self)
  # NOTE: NilValueDomain contains no values.
  #       So, any arithmetic operation with NilValueDomain makes
  #       NilValueDomain.
  lhs_dom
end

#_div_unlimited(lhs_dom, rhs_dom = self) ⇒ Object



2263
2264
2265
2266
2267
2268
2269
2270
2271
# File 'lib/adlint/cc1/domain.rb', line 2263

def _div_unlimited(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  # NOTE: NaN is a subclass of UnlimitedValueDomain.
  #       Arithmetic operation with UnlimitedValueDomain should make
  #       UnlimitedValueDomain, and with NaN should make NaN.
  lhs_dom.nan? ? lhs_dom : rhs_dom
end

#_equal_equal_to(lhs_dom, rhs_dom = self) ⇒ Object



2563
2564
2565
2566
2567
2568
# File 'lib/adlint/cc1/domain.rb', line 2563

def _equal_equal_to(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, any comparison with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  ValueDomain.of_unlimited(logical_shr?)
end

#_equal_greater_than(lhs_dom, rhs_dom = self) ⇒ Object



2577
2578
2579
2580
2581
2582
# File 'lib/adlint/cc1/domain.rb', line 2577

def _equal_greater_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, any comparison with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  ValueDomain.of_unlimited(logical_shr?)
end

#_equal_less_than(lhs_dom, rhs_dom = self) ⇒ Object



2570
2571
2572
2573
2574
2575
# File 'lib/adlint/cc1/domain.rb', line 2570

def _equal_less_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, any comparison with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  ValueDomain.of_unlimited(logical_shr?)
end

#_equal_nil(lhs_dom, rhs_dom = self) ⇒ Object



2550
2551
2552
2553
2554
# File 'lib/adlint/cc1/domain.rb', line 2550

def _equal_nil(lhs_dom, rhs_dom = self)
  # NOTE: `LHS == RHS' equals to `RHS == LHS'.
  #       This method invokes NilValueDomain#_equal_unlimited.
  rhs_dom == lhs_dom
end

#_equal_unlimited(lhs_dom, rhs_dom = self) ⇒ Object



2556
2557
2558
2559
2560
2561
# File 'lib/adlint/cc1/domain.rb', line 2556

def _equal_unlimited(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, any comparison with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  ValueDomain.of_unlimited(logical_shr?)
end

#_intersect_equal_to?(lhs_dom, rhs_dom = self) ⇒ Boolean

Returns:

  • (Boolean)


1965
1966
1967
# File 'lib/adlint/cc1/domain.rb', line 1965

def _intersect_equal_to?(lhs_dom, rhs_dom = self)
  true
end

#_intersect_greater_than?(lhs_dom, rhs_dom = self) ⇒ Boolean

Returns:

  • (Boolean)


1973
1974
1975
# File 'lib/adlint/cc1/domain.rb', line 1973

def _intersect_greater_than?(lhs_dom, rhs_dom = self)
  true
end

#_intersect_less_than?(lhs_dom, rhs_dom = self) ⇒ Boolean

Returns:

  • (Boolean)


1969
1970
1971
# File 'lib/adlint/cc1/domain.rb', line 1969

def _intersect_less_than?(lhs_dom, rhs_dom = self)
  true
end

#_intersect_nil?(lhs_dom, rhs_dom = self) ⇒ Boolean

Returns:

  • (Boolean)


1955
1956
1957
1958
1959
# File 'lib/adlint/cc1/domain.rb', line 1955

def _intersect_nil?(lhs_dom, rhs_dom = self)
  # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'.
  #       This method invokes NilValueDomain#_intersect_unlimited?.
  rhs_dom.intersect?(lhs_dom)
end

#_intersect_unlimited?(lhs_dom, rhs_dom = self) ⇒ Boolean

Returns:

  • (Boolean)


1961
1962
1963
# File 'lib/adlint/cc1/domain.rb', line 1961

def _intersect_unlimited?(lhs_dom, rhs_dom = self)
  true
end

#_intersection_equal_to(lhs_dom, rhs_dom = self) ⇒ Object



2728
2729
2730
# File 'lib/adlint/cc1/domain.rb', line 2728

def _intersection_equal_to(lhs_dom, rhs_dom = self)
  lhs_dom
end

#_intersection_greater_than(lhs_dom, rhs_dom = self) ⇒ Object



2736
2737
2738
# File 'lib/adlint/cc1/domain.rb', line 2736

def _intersection_greater_than(lhs_dom, rhs_dom = self)
  lhs_dom
end

#_intersection_less_than(lhs_dom, rhs_dom = self) ⇒ Object



2732
2733
2734
# File 'lib/adlint/cc1/domain.rb', line 2732

def _intersection_less_than(lhs_dom, rhs_dom = self)
  lhs_dom
end

#_intersection_nil(lhs_dom, rhs_dom = self) ⇒ Object



2718
2719
2720
2721
2722
# File 'lib/adlint/cc1/domain.rb', line 2718

def _intersection_nil(lhs_dom, rhs_dom = self)
  # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'.
  #       This method invokes NilValueDomain#_intersection_unlimited.
  rhs_dom.intersection(lhs_dom)
end

#_intersection_unlimited(lhs_dom, rhs_dom = self) ⇒ Object



2724
2725
2726
# File 'lib/adlint/cc1/domain.rb', line 2724

def _intersection_unlimited(lhs_dom, rhs_dom = self)
  lhs_dom
end

#_less_equal_to(lhs_dom, rhs_dom = self) ⇒ Object



2525
2526
2527
2528
2529
2530
# File 'lib/adlint/cc1/domain.rb', line 2525

def _less_equal_to(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, any comparison with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  ValueDomain.of_unlimited(logical_shr?)
end

#_less_greater_than(lhs_dom, rhs_dom = self) ⇒ Object



2539
2540
2541
2542
2543
2544
# File 'lib/adlint/cc1/domain.rb', line 2539

def _less_greater_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, any comparison with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  ValueDomain.of_unlimited(logical_shr?)
end

#_less_less_than(lhs_dom, rhs_dom = self) ⇒ Object



2532
2533
2534
2535
2536
2537
# File 'lib/adlint/cc1/domain.rb', line 2532

def _less_less_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, any comparison with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  ValueDomain.of_unlimited(logical_shr?)
end

#_less_nil(lhs_dom, rhs_dom = self) ⇒ Object



2512
2513
2514
2515
2516
# File 'lib/adlint/cc1/domain.rb', line 2512

def _less_nil(lhs_dom, rhs_dom = self)
  # NOTE: NilValueDomain contains no values.
  #       So, any comparison with NilValueDomain makes no sense.
  ValueDomain.of_nil(logical_shr?)
end

#_less_unlimited(lhs_dom, rhs_dom = self) ⇒ Object



2518
2519
2520
2521
2522
2523
# File 'lib/adlint/cc1/domain.rb', line 2518

def _less_unlimited(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, any comparison with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  ValueDomain.of_unlimited(logical_shr?)
end

#_logical_and_equal_to(lhs_dom, rhs_dom = self) ⇒ Object



2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
# File 'lib/adlint/cc1/domain.rb', line 2639

def _logical_and_equal_to(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       If the value-domain of the other side of UnlimitedValueDomain
  #       contains only zero value, the logical AND makes false.
  if lhs_dom.value == 0
    ValueDomain.of_false(logical_shr?)
  else
    ValueDomain.of_unlimited(logical_shr?)
  end
end

#_logical_and_greater_than(lhs_dom, rhs_dom = self) ⇒ Object



2657
2658
2659
2660
2661
2662
# File 'lib/adlint/cc1/domain.rb', line 2657

def _logical_and_greater_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       If the value-domain of the other side of UnlimitedValueDomain
  #       contains only zero value, the logical AND makes false.
  ValueDomain.of_unlimited(logical_shr?)
end

#_logical_and_less_than(lhs_dom, rhs_dom = self) ⇒ Object



2650
2651
2652
2653
2654
2655
# File 'lib/adlint/cc1/domain.rb', line 2650

def _logical_and_less_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       If the value-domain of the other side of UnlimitedValueDomain
  #       contains only zero value, the logical AND makes false.
  ValueDomain.of_unlimited(logical_shr?)
end

#_logical_and_nil(lhs_dom, rhs_dom = self) ⇒ Object



2626
2627
2628
2629
2630
# File 'lib/adlint/cc1/domain.rb', line 2626

def _logical_and_nil(lhs_dom, rhs_dom = self)
  # NOTE: `LHS && RHS' equals to `RHS && LHS'.
  #       This method invokes NilValueDomain#_logical_and_unlimited.
  rhs_dom.logical_and(lhs_dom)
end

#_logical_and_unlimited(lhs_dom, rhs_dom = self) ⇒ Object



2632
2633
2634
2635
2636
2637
# File 'lib/adlint/cc1/domain.rb', line 2632

def _logical_and_unlimited(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       If the value-domain of the other side of UnlimitedValueDomain
  #       contains only zero value, the logical AND makes false.
  ValueDomain.of_unlimited(logical_shr?)
end

#_logical_or_equal_to(lhs_dom, rhs_dom = self) ⇒ Object



2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
# File 'lib/adlint/cc1/domain.rb', line 2681

def _logical_or_equal_to(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       If the value-domain of the other side of UnlimitedValueDomain
  #       contains only non-zero values, the logical OR makes true.
  if lhs_dom.value == 0
    ValueDomain.of_unlimited(logical_shr?)
  else
    ValueDomain.of_true(logical_shr?)
  end
end

#_logical_or_greater_than(lhs_dom, rhs_dom = self) ⇒ Object



2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
# File 'lib/adlint/cc1/domain.rb', line 2703

def _logical_or_greater_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       If the value-domain of the other side of UnlimitedValueDomain
  #       contains only non-zero values, the logical OR makes true.
  if lhs_dom.min_value <= 0
    ValueDomain.of_unlimited(logical_shr?)
  else
    ValueDomain.of_true(logical_shr?)
  end
end

#_logical_or_less_than(lhs_dom, rhs_dom = self) ⇒ Object



2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
# File 'lib/adlint/cc1/domain.rb', line 2692

def _logical_or_less_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       If the value-domain of the other side of UnlimitedValueDomain
  #       contains only non-zero values, the logical OR makes true.
  if lhs_dom.max_value >= 0
    ValueDomain.of_unlimited(logical_shr?)
  else
    ValueDomain.of_true(logical_shr?)
  end
end

#_logical_or_nil(lhs_dom, rhs_dom = self) ⇒ Object



2668
2669
2670
2671
2672
# File 'lib/adlint/cc1/domain.rb', line 2668

def _logical_or_nil(lhs_dom, rhs_dom = self)
  # NOTE: `LHS || RHS' equals to `RHS || LHS'.
  #       This method invokes NilValueDomain#_logical_or_unlimited.
  rhs_dom.logical_or(lhs_dom)
end

#_logical_or_unlimited(lhs_dom, rhs_dom = self) ⇒ Object



2674
2675
2676
2677
2678
2679
# File 'lib/adlint/cc1/domain.rb', line 2674

def _logical_or_unlimited(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       If the value-domain of the other side of UnlimitedValueDomain
  #       contains only non-zero values, the logical OR makes true.
  ValueDomain.of_unlimited(logical_shr?)
end

#_mul_equal_to(lhs_dom, rhs_dom = self) ⇒ Object



2231
2232
2233
2234
2235
2236
# File 'lib/adlint/cc1/domain.rb', line 2231

def _mul_equal_to(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  rhs_dom
end

#_mul_greater_than(lhs_dom, rhs_dom = self) ⇒ Object



2245
2246
2247
2248
2249
2250
# File 'lib/adlint/cc1/domain.rb', line 2245

def _mul_greater_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  rhs_dom
end

#_mul_less_than(lhs_dom, rhs_dom = self) ⇒ Object



2238
2239
2240
2241
2242
2243
# File 'lib/adlint/cc1/domain.rb', line 2238

def _mul_less_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  rhs_dom
end

#_mul_nil(lhs_dom, rhs_dom = self) ⇒ Object



2215
2216
2217
2218
2219
# File 'lib/adlint/cc1/domain.rb', line 2215

def _mul_nil(lhs_dom, rhs_dom = self)
  # NOTE: `LHS * RHS' equals to `RHS * LHS'.
  #       This method invokes NilValueDomain#_mul_unlimited.
  rhs_dom * lhs_dom
end

#_mul_unlimited(lhs_dom, rhs_dom = self) ⇒ Object



2221
2222
2223
2224
2225
2226
2227
2228
2229
# File 'lib/adlint/cc1/domain.rb', line 2221

def _mul_unlimited(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  # NOTE: NaN is a subclass of UnlimitedValueDomain.
  #       Arithmetic operation with UnlimitedValueDomain should make
  #       UnlimitedValueDomain, and with NaN should make NaN.
  lhs_dom.nan? ? lhs_dom : rhs_dom
end

#_narrow_by_eq(rhs_dom, lhs_dom = self) ⇒ Object



1977
1978
1979
# File 'lib/adlint/cc1/domain.rb', line 1977

def _narrow_by_eq(rhs_dom, lhs_dom = self)
  rhs_dom._narrow_unlimited_by_eq(lhs_dom)
end

#_narrow_by_gt(rhs_dom, lhs_dom = self) ⇒ Object



2103
2104
2105
# File 'lib/adlint/cc1/domain.rb', line 2103

def _narrow_by_gt(rhs_dom, lhs_dom = self)
  rhs_dom._narrow_unlimited_by_gt(lhs_dom)
end

#_narrow_by_lt(rhs_dom, lhs_dom = self) ⇒ Object



2061
2062
2063
# File 'lib/adlint/cc1/domain.rb', line 2061

def _narrow_by_lt(rhs_dom, lhs_dom = self)
  rhs_dom._narrow_unlimited_by_lt(lhs_dom)
end

#_narrow_by_ne(rhs_dom, lhs_dom = self) ⇒ Object



2019
2020
2021
# File 'lib/adlint/cc1/domain.rb', line 2019

def _narrow_by_ne(rhs_dom, lhs_dom = self)
  rhs_dom._narrow_unlimited_by_ne(lhs_dom)
end

#_narrow_equal_to_by_eq(lhs_dom, rhs_dom = self) ⇒ Object



1998
1999
2000
2001
2002
2003
# File 'lib/adlint/cc1/domain.rb', line 1998

def _narrow_equal_to_by_eq(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `== UnlimitedValueDomain' makes
  #       no effect to the target value-domain.
  lhs_dom
end

#_narrow_equal_to_by_gt(lhs_dom, rhs_dom = self) ⇒ Object



2124
2125
2126
2127
2128
2129
# File 'lib/adlint/cc1/domain.rb', line 2124

def _narrow_equal_to_by_gt(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `> UnlimitedValueDomain' makes
  #       NilValueDomain.
  ValueDomain.of_nil(logical_shr?)
end

#_narrow_equal_to_by_lt(lhs_dom, rhs_dom = self) ⇒ Object



2082
2083
2084
2085
2086
2087
# File 'lib/adlint/cc1/domain.rb', line 2082

def _narrow_equal_to_by_lt(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `< UnlimitedValueDomain' makes
  #       NilValueDomain.
  ValueDomain.of_nil(logical_shr?)
end

#_narrow_equal_to_by_ne(lhs_dom, rhs_dom = self) ⇒ Object



2040
2041
2042
2043
2044
2045
# File 'lib/adlint/cc1/domain.rb', line 2040

def _narrow_equal_to_by_ne(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `!= UnlimitedValueDomain' makes
  #       NilValueDomain.
  ValueDomain.of_nil(logical_shr?)
end

#_narrow_greater_than_by_eq(lhs_dom, rhs_dom = self) ⇒ Object



2012
2013
2014
2015
2016
2017
# File 'lib/adlint/cc1/domain.rb', line 2012

def _narrow_greater_than_by_eq(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `== UnlimitedValueDomain' makes
  #       no effect to the target value-domain.
  lhs_dom
end

#_narrow_greater_than_by_gt(lhs_dom, rhs_dom = self) ⇒ Object



2138
2139
2140
2141
2142
2143
# File 'lib/adlint/cc1/domain.rb', line 2138

def _narrow_greater_than_by_gt(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `> UnlimitedValueDomain' makes
  #       NilValueDomain.
  ValueDomain.of_nil(logical_shr?)
end

#_narrow_greater_than_by_lt(lhs_dom, rhs_dom = self) ⇒ Object



2096
2097
2098
2099
2100
2101
# File 'lib/adlint/cc1/domain.rb', line 2096

def _narrow_greater_than_by_lt(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `< UnlimitedValueDomain' makes
  #       NilValueDomain.
  ValueDomain.of_nil(logical_shr?)
end

#_narrow_greater_than_by_ne(lhs_dom, rhs_dom = self) ⇒ Object



2054
2055
2056
2057
2058
2059
# File 'lib/adlint/cc1/domain.rb', line 2054

def _narrow_greater_than_by_ne(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `!= UnlimitedValueDomain' makes
  #       NilValueDomain.
  ValueDomain.of_nil(logical_shr?)
end

#_narrow_less_than_by_eq(lhs_dom, rhs_dom = self) ⇒ Object



2005
2006
2007
2008
2009
2010
# File 'lib/adlint/cc1/domain.rb', line 2005

def _narrow_less_than_by_eq(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `== UnlimitedValueDomain' makes
  #       no effect to the target value-domain.
  lhs_dom
end

#_narrow_less_than_by_gt(lhs_dom, rhs_dom = self) ⇒ Object



2131
2132
2133
2134
2135
2136
# File 'lib/adlint/cc1/domain.rb', line 2131

def _narrow_less_than_by_gt(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `> UnlimitedValueDomain' makes
  #       NilValueDomain.
  ValueDomain.of_nil(logical_shr?)
end

#_narrow_less_than_by_lt(lhs_dom, rhs_dom = self) ⇒ Object



2089
2090
2091
2092
2093
2094
# File 'lib/adlint/cc1/domain.rb', line 2089

def _narrow_less_than_by_lt(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `< UnlimitedValueDomain' makes
  #       NilValueDomain.
  ValueDomain.of_nil(logical_shr?)
end

#_narrow_less_than_by_ne(lhs_dom, rhs_dom = self) ⇒ Object



2047
2048
2049
2050
2051
2052
# File 'lib/adlint/cc1/domain.rb', line 2047

def _narrow_less_than_by_ne(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `!= UnlimitedValueDomain' makes
  #       NilValueDomain.
  ValueDomain.of_nil(logical_shr?)
end

#_narrow_nil_by_eq(lhs_dom, rhs_dom = self) ⇒ Object



1981
1982
1983
1984
1985
1986
# File 'lib/adlint/cc1/domain.rb', line 1981

def _narrow_nil_by_eq(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `== UnlimitedValueDomain' makes
  #       no effect to the target value-domain.
  lhs_dom
end

#_narrow_nil_by_gt(lhs_dom, rhs_dom = self) ⇒ Object



2107
2108
2109
2110
2111
2112
# File 'lib/adlint/cc1/domain.rb', line 2107

def _narrow_nil_by_gt(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `> UnlimitedValueDomain' makes
  #       NilValueDomain.
  lhs_dom
end

#_narrow_nil_by_lt(lhs_dom, rhs_dom = self) ⇒ Object



2065
2066
2067
2068
2069
2070
# File 'lib/adlint/cc1/domain.rb', line 2065

def _narrow_nil_by_lt(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `< UnlimitedValueDomain' makes
  #       NilValueDomain.
  lhs_dom
end

#_narrow_nil_by_ne(lhs_dom, rhs_dom = self) ⇒ Object



2023
2024
2025
2026
2027
2028
# File 'lib/adlint/cc1/domain.rb', line 2023

def _narrow_nil_by_ne(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `!= UnlimitedValueDomain' makes
  #       NilValueDomain.
  lhs_dom
end

#_narrow_unlimited_by_eq(lhs_dom, rhs_dom = self) ⇒ Object



1988
1989
1990
1991
1992
1993
1994
1995
1996
# File 'lib/adlint/cc1/domain.rb', line 1988

def _narrow_unlimited_by_eq(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `== UnlimitedValueDomain' makes
  #       no effect to the target value-domain.
  # NOTE: NaN is a subclass of UnlimitedValueDomain.
  #       UnlimitedValueDomain should be narrowed to be
  #       UnlimitedValueDomain, and NaN should be narrowed to be NaN.
  lhs_dom
end

#_narrow_unlimited_by_gt(lhs_dom, rhs_dom = self) ⇒ Object



2114
2115
2116
2117
2118
2119
2120
2121
2122
# File 'lib/adlint/cc1/domain.rb', line 2114

def _narrow_unlimited_by_gt(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `> UnlimitedValueDomain' makes
  #       NilValueDomain.
  # NOTE: NaN is a subclass of UnlimitedValueDomain.
  #       UnlimitedValueDomain should be narrowed to be
  #       UnlimitedValueDomain, and NaN should be narrowed to be NaN.
  ValueDomain.of_nil(logical_shr?)
end

#_narrow_unlimited_by_lt(lhs_dom, rhs_dom = self) ⇒ Object



2072
2073
2074
2075
2076
2077
2078
2079
2080
# File 'lib/adlint/cc1/domain.rb', line 2072

def _narrow_unlimited_by_lt(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `< UnlimitedValueDomain' makes
  #       NilValueDomain.
  # NOTE: NaN is a subclass of UnlimitedValueDomain.
  #       UnlimitedValueDomain should be narrowed to be
  #       UnlimitedValueDomain, and NaN should be narrowed to be NaN.
  ValueDomain.of_nil(logical_shr?)
end

#_narrow_unlimited_by_ne(lhs_dom, rhs_dom = self) ⇒ Object



2030
2031
2032
2033
2034
2035
2036
2037
2038
# File 'lib/adlint/cc1/domain.rb', line 2030

def _narrow_unlimited_by_ne(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, narrowing any value-domain by `!= UnlimitedValueDomain' makes
  #       NilValueDomain.
  # NOTE: NaN is a subclass of UnlimitedValueDomain.
  #       UnlimitedValueDomain should be narrowed to be
  #       UnlimitedValueDomain, and NaN should be narrowed to be NaN.
  ValueDomain.of_nil(logical_shr?)
end

#_not_equal_equal_to(lhs_dom, rhs_dom = self) ⇒ Object



2601
2602
2603
2604
2605
2606
# File 'lib/adlint/cc1/domain.rb', line 2601

def _not_equal_equal_to(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, any comparison with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  ValueDomain.of_unlimited(logical_shr?)
end

#_not_equal_greater_than(lhs_dom, rhs_dom = self) ⇒ Object



2615
2616
2617
2618
2619
2620
# File 'lib/adlint/cc1/domain.rb', line 2615

def _not_equal_greater_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, any comparison with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  ValueDomain.of_unlimited(logical_shr?)
end

#_not_equal_less_than(lhs_dom, rhs_dom = self) ⇒ Object



2608
2609
2610
2611
2612
2613
# File 'lib/adlint/cc1/domain.rb', line 2608

def _not_equal_less_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, any comparison with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  ValueDomain.of_unlimited(logical_shr?)
end

#_not_equal_nil(lhs_dom, rhs_dom = self) ⇒ Object



2588
2589
2590
2591
2592
# File 'lib/adlint/cc1/domain.rb', line 2588

def _not_equal_nil(lhs_dom, rhs_dom = self)
  # NOTE: `LHS != RHS' equals to `RHS != LHS'.
  #       This method invokes NilValueDomain#_not_equal_nil.
  rhs_dom != lhs_dom
end

#_not_equal_unlimited(lhs_dom, rhs_dom = self) ⇒ Object



2594
2595
2596
2597
2598
2599
# File 'lib/adlint/cc1/domain.rb', line 2594

def _not_equal_unlimited(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, any comparison with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  ValueDomain.of_unlimited(logical_shr?)
end

#_or_equal_to(lhs_dom, rhs_dom = self) ⇒ Object



2355
2356
2357
2358
2359
2360
# File 'lib/adlint/cc1/domain.rb', line 2355

def _or_equal_to(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  rhs_dom
end

#_or_greater_than(lhs_dom, rhs_dom = self) ⇒ Object



2369
2370
2371
2372
2373
2374
# File 'lib/adlint/cc1/domain.rb', line 2369

def _or_greater_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  rhs_dom
end

#_or_less_than(lhs_dom, rhs_dom = self) ⇒ Object



2362
2363
2364
2365
2366
2367
# File 'lib/adlint/cc1/domain.rb', line 2362

def _or_less_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  rhs_dom
end

#_or_nil(lhs_dom, rhs_dom = self) ⇒ Object



2339
2340
2341
2342
2343
# File 'lib/adlint/cc1/domain.rb', line 2339

def _or_nil(lhs_dom, rhs_dom = self)
  # NOTE: `LHS | RHS' equals to `RHS | LHS'.
  #       This method invokes NilValueDomain#_or_unlimited.
  rhs_dom | lhs_dom
end

#_or_unlimited(lhs_dom, rhs_dom = self) ⇒ Object



2345
2346
2347
2348
2349
2350
2351
2352
2353
# File 'lib/adlint/cc1/domain.rb', line 2345

def _or_unlimited(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  # NOTE: NaN is a subclass of UnlimitedValueDomain.
  #       Arithmetic operation with UnlimitedValueDomain should make
  #       UnlimitedValueDomain, and with NaN should make NaN.
  lhs_dom.nan? ? lhs_dom : rhs_dom
end

#_shl_equal_to(lhs_dom, rhs_dom = self) ⇒ Object



2438
2439
2440
2441
2442
2443
# File 'lib/adlint/cc1/domain.rb', line 2438

def _shl_equal_to(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain because of the bit-overflow.
  rhs_dom
end

#_shl_greater_than(lhs_dom, rhs_dom = self) ⇒ Object



2452
2453
2454
2455
2456
2457
# File 'lib/adlint/cc1/domain.rb', line 2452

def _shl_greater_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain because of the bit-overflow.
  rhs_dom
end

#_shl_less_than(lhs_dom, rhs_dom = self) ⇒ Object



2445
2446
2447
2448
2449
2450
# File 'lib/adlint/cc1/domain.rb', line 2445

def _shl_less_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain because of the bit-overflow.
  rhs_dom
end

#_shl_nil(lhs_dom, rhs_dom = self) ⇒ Object



2421
2422
2423
2424
2425
2426
# File 'lib/adlint/cc1/domain.rb', line 2421

def _shl_nil(lhs_dom, rhs_dom = self)
  # NOTE: NilValueDomain contains no values.
  #       So, any arithmetic operation with NilValueDomain makes
  #       NilValueDomain.
  lhs_dom
end

#_shl_unlimited(lhs_dom, rhs_dom = self) ⇒ Object



2428
2429
2430
2431
2432
2433
2434
2435
2436
# File 'lib/adlint/cc1/domain.rb', line 2428

def _shl_unlimited(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain because of the bit-overflow.
  # NOTE: NaN is a subclass of UnlimitedValueDomain.
  #       Arithmetic operation with UnlimitedValueDomain should make
  #       UnlimitedValueDomain, and with NaN should make NaN.
  lhs_dom.nan? ? lhs_dom : rhs_dom
end

#_shr_equal_to(lhs_dom, rhs_dom = self) ⇒ Object



2480
2481
2482
2483
2484
2485
# File 'lib/adlint/cc1/domain.rb', line 2480

def _shr_equal_to(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain because of the bit-underflow.
  rhs_dom
end

#_shr_greater_than(lhs_dom, rhs_dom = self) ⇒ Object



2494
2495
2496
2497
2498
2499
# File 'lib/adlint/cc1/domain.rb', line 2494

def _shr_greater_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain because of the bit-underflow.
  rhs_dom
end

#_shr_less_than(lhs_dom, rhs_dom = self) ⇒ Object



2487
2488
2489
2490
2491
2492
# File 'lib/adlint/cc1/domain.rb', line 2487

def _shr_less_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain because of the bit-underflow.
  rhs_dom
end

#_shr_nil(lhs_dom, rhs_dom = self) ⇒ Object



2463
2464
2465
2466
2467
2468
# File 'lib/adlint/cc1/domain.rb', line 2463

def _shr_nil(lhs_dom, rhs_dom = self)
  # NOTE: NilValueDomain contains no values.
  #       So, any arithmetic operation with NilValueDomain makes
  #       NilValueDomain.
  lhs_dom
end

#_shr_unlimited(lhs_dom, rhs_dom = self) ⇒ Object



2470
2471
2472
2473
2474
2475
2476
2477
2478
# File 'lib/adlint/cc1/domain.rb', line 2470

def _shr_unlimited(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain because of the bit-underflow.
  # NOTE: NaN is a subclass of UnlimitedValueDomain.
  #       Arithmetic operation with UnlimitedValueDomain should make
  #       UnlimitedValueDomain, and with NaN should make NaN.
  lhs_dom.nan? ? lhs_dom : rhs_dom
end

#_union_equal_to(lhs_dom, rhs_dom = self) ⇒ Object



2754
2755
2756
# File 'lib/adlint/cc1/domain.rb', line 2754

def _union_equal_to(lhs_dom, rhs_dom = self)
  rhs_dom
end

#_union_greater_than(lhs_dom, rhs_dom = self) ⇒ Object



2762
2763
2764
# File 'lib/adlint/cc1/domain.rb', line 2762

def _union_greater_than(lhs_dom, rhs_dom = self)
  rhs_dom
end

#_union_less_than(lhs_dom, rhs_dom = self) ⇒ Object



2758
2759
2760
# File 'lib/adlint/cc1/domain.rb', line 2758

def _union_less_than(lhs_dom, rhs_dom = self)
  rhs_dom
end

#_union_nil(lhs_dom, rhs_dom = self) ⇒ Object



2744
2745
2746
2747
2748
# File 'lib/adlint/cc1/domain.rb', line 2744

def _union_nil(lhs_dom, rhs_dom = self)
  # NOTE: `LHS union RHS' equals to `RHS union LHS'.
  #       This method invokes NilValueDomain#_union_unlimited.
  rhs_dom.union(lhs_dom)
end

#_union_unlimited(lhs_dom, rhs_dom = self) ⇒ Object



2750
2751
2752
# File 'lib/adlint/cc1/domain.rb', line 2750

def _union_unlimited(lhs_dom, rhs_dom = self)
  rhs_dom
end

#_xor_equal_to(lhs_dom, rhs_dom = self) ⇒ Object



2396
2397
2398
2399
2400
2401
# File 'lib/adlint/cc1/domain.rb', line 2396

def _xor_equal_to(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  rhs_dom
end

#_xor_greater_than(lhs_dom, rhs_dom = self) ⇒ Object



2410
2411
2412
2413
2414
2415
# File 'lib/adlint/cc1/domain.rb', line 2410

def _xor_greater_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  rhs_dom
end

#_xor_less_than(lhs_dom, rhs_dom = self) ⇒ Object



2403
2404
2405
2406
2407
2408
# File 'lib/adlint/cc1/domain.rb', line 2403

def _xor_less_than(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  rhs_dom
end

#_xor_nil(lhs_dom, rhs_dom = self) ⇒ Object



2380
2381
2382
2383
2384
# File 'lib/adlint/cc1/domain.rb', line 2380

def _xor_nil(lhs_dom, rhs_dom = self)
  # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'.
  #       This method invokes NilValueDomain#_or_unlimited.
  rhs_dom ^ lhs_dom
end

#_xor_unlimited(lhs_dom, rhs_dom = self) ⇒ Object



2386
2387
2388
2389
2390
2391
2392
2393
2394
# File 'lib/adlint/cc1/domain.rb', line 2386

def _xor_unlimited(lhs_dom, rhs_dom = self)
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  # NOTE: NaN is a subclass of UnlimitedValueDomain.
  #       Arithmetic operation with UnlimitedValueDomain should make
  #       UnlimitedValueDomain, and with NaN should make NaN.
  lhs_dom.nan? ? lhs_dom : rhs_dom
end

#ambiguous?Boolean

Returns:

  • (Boolean)


1915
1916
1917
# File 'lib/adlint/cc1/domain.rb', line 1915

def ambiguous?
  false
end

#coerce_to_integerObject



2766
2767
2768
# File 'lib/adlint/cc1/domain.rb', line 2766

def coerce_to_integer
  self
end

#coerce_to_realObject



2770
2771
2772
# File 'lib/adlint/cc1/domain.rb', line 2770

def coerce_to_real
  self
end

#complexityObject



2800
2801
2802
# File 'lib/adlint/cc1/domain.rb', line 2800

def complexity
  1
end

#contain_value_domain?(rhs_dom) ⇒ Boolean

Returns:

  • (Boolean)


1919
1920
1921
# File 'lib/adlint/cc1/domain.rb', line 1919

def contain_value_domain?(rhs_dom)
  rhs_dom._contain_unlimited?(self)
end

#each_sampleObject



2782
2783
2784
2785
2786
2787
2788
2789
# File 'lib/adlint/cc1/domain.rb', line 2782

def each_sample
  if block_given?
    yield(0)
    self
  else
    to_enum(:each_sample)
  end
end

#empty?Boolean

Returns:

  • (Boolean)


1903
1904
1905
# File 'lib/adlint/cc1/domain.rb', line 1903

def empty?
  false
end

#intersect?(rhs_dom) ⇒ Boolean

Returns:

  • (Boolean)


1951
1952
1953
# File 'lib/adlint/cc1/domain.rb', line 1951

def intersect?(rhs_dom)
  rhs_dom._intersect_unlimited?(self)
end

#intersection(rhs_dom) ⇒ Object



2714
2715
2716
# File 'lib/adlint/cc1/domain.rb', line 2714

def intersection(rhs_dom)
  rhs_dom._intersection_unlimited(self)
end

#inversionObject



2145
2146
2147
# File 'lib/adlint/cc1/domain.rb', line 2145

def inversion
  ValueDomain.of_nil(logical_shr?)
end

#logical_and(rhs_dom) ⇒ Object



2622
2623
2624
# File 'lib/adlint/cc1/domain.rb', line 2622

def logical_and(rhs_dom)
  rhs_dom._logical_and_unlimited(self)
end

#logical_or(rhs_dom) ⇒ Object



2664
2665
2666
# File 'lib/adlint/cc1/domain.rb', line 2664

def logical_or(rhs_dom)
  rhs_dom._logical_or_unlimited(self)
end

#max_valueObject



2778
2779
2780
# File 'lib/adlint/cc1/domain.rb', line 2778

def max_value
  nil
end

#min_valueObject



2774
2775
2776
# File 'lib/adlint/cc1/domain.rb', line 2774

def min_value
  nil
end

#nan?Boolean

Returns:

  • (Boolean)


1907
1908
1909
# File 'lib/adlint/cc1/domain.rb', line 1907

def nan?
  false
end

#to_defined_domainObject



2791
2792
2793
# File 'lib/adlint/cc1/domain.rb', line 2791

def to_defined_domain
  self
end

#to_sObject



2795
2796
2797
# File 'lib/adlint/cc1/domain.rb', line 2795

def to_s
  "(== Unlimited)"
end

#undefined?Boolean

Returns:

  • (Boolean)


1911
1912
1913
# File 'lib/adlint/cc1/domain.rb', line 1911

def undefined?
  false
end

#union(rhs_dom) ⇒ Object



2740
2741
2742
# File 'lib/adlint/cc1/domain.rb', line 2740

def union(rhs_dom)
  rhs_dom._union_unlimited(self)
end

#|(rhs_dom) ⇒ Object



2335
2336
2337
# File 'lib/adlint/cc1/domain.rb', line 2335

def |(rhs_dom)
  rhs_dom.coerce_to_integer._or_unlimited(coerce_to_integer)
end

#~Object



2149
2150
2151
2152
2153
2154
# File 'lib/adlint/cc1/domain.rb', line 2149

def ~
  # NOTE: UnlimitedValueDomain contains everything.
  #       So, this arithmetic operation with UnlimitedValueDomain makes
  #       UnlimitedValueDomain.
  self
end