class documentation

class DiscreteStridedIntervalSet(StridedInterval): (source)

View In Hierarchy

A DiscreteStridedIntervalSet represents one or more discrete StridedInterval instances.

Method __add__ Operation +
Method __and__ Operation &
Method __eq__ Operation ==
Method __floordiv__ Operation /
Method __gt__ Operation >
Method __hash__ Undocumented
Method __init__ Undocumented
Method __invert__ Operation ~
Method __le__ Operation <=
Method __lshift__ Operation <<
Method __lt__ Operation <
Method __mod__ Operation %
Method __ne__ Operation !=
Method __neg__ Operation ~
Method __or__ Operation |
Method __radd__ Undocumented
Method __rand__ Undocumented
Method __repr__ Undocumented
Method __rfloordiv__ Undocumented
Method __rmod__ Undocumented
Method __ror__ Undocumented
Method __rshift__ Operation >>
Method __rsub__ Undocumented
Method __rtruediv__ Undocumented
Method __rxor__ Undocumented
Method __sub__ Operation -
Method __truediv__ Undocumented
Method __xor__ Operation ^
Method collapse Collapse into a StridedInterval instance.
Method concat Operation concat
Method copy Undocumented
Method eval :param n: :param signed: :return:
Method extract Operation extract
Method intersection Undocumented
Method normalize Return the collapsed object if ``should_collapse()`` is True, otherwise return self.
Method reverse Operation Reverse
Method should_collapse Undocumented
Method sign_extend Operation SignExt
Method union The union operation. It might return a DiscreteStridedIntervalSet to allow for better precision in analysis.
Method widen Widening operator.
Method zero_extend Operation ZeroExt
Property cardinality This is an over-approximation of the cardinality of this DSIS.
Property number_of_values Undocumented
Property stride Undocumented
Method _intersection_with_dsis Intersection with another :class:`DiscreteStridedIntervalSet`.
Method _intersection_with_si Intersection with another :class:`StridedInterval`.
Method _union_with_dsis Union with another DiscreteStridedIntervalSet.
Method _union_with_si Union with another StridedInterval.
Method _update_bits Undocumented
Method _update_bounds Undocumented
Instance Variable _bits Undocumented
Instance Variable _lower_bound Undocumented
Instance Variable _max_cardinality Undocumented
Instance Variable _si_set Undocumented
Instance Variable _upper_bound Undocumented

Inherited from StridedInterval:

Static Method diop_natural_solution_linear It finds the fist natural solution of the diophantine equation a*x + b*y = c. Some lines of this code are taken from the project sympy.
Static Method empty Undocumented
Static Method extended_euclid It calculates the GCD of a and b, and two values x and y such that: a*x + b*y = GCD(a,b). This code has been taken from the project sympy.
Static Method gcd Get the greatest common divisor.
Static Method highbit Undocumented
Static Method igcd :param a: First integer :param b: Second integer :return: the integer GCD between a and b
Static Method lcm Get the least common multiple.
Static Method least_upper_bound Pseudo least upper bound. Join the given set of intervals into a big interval. The resulting strided interval is the one which in all the possible joins of the presented SI, presented the least number of values.
Static Method lower :return:
Static Method max_int Undocumented
Static Method min_bits Undocumented
Static Method min_int Undocumented
Static Method pseudo_join It two intervals in a way that the resulting SI is the one that has the least SI cardinality (i.e., which represents the least number of elements) possible if the smart_join flag is enabled, otherwise it just joins the SI according the order they are passed to the function.
Static Method sign Undocumented
Static Method signed_max_int Undocumented
Static Method signed_min_int Undocumented
Static Method top Get a TOP StridedInterval.
Static Method upper :return:
Method __ge__ Unsigned greater than or equal to
Method __len__ Get the length in bits of this variable. :return:
Method __mul__ Undocumented
Method add Binary operation: add
Method agnostic_extend Unary operation: SignExtend
Method bitwise_and Binary operation: logical and
Method bitwise_not Unary operation: bitwise not
Method bitwise_or Binary operation: logical or
Method bitwise_xor Operation xor
Method cast_low Undocumented
Method eq Equal
Method identical Used to make exact comparisons between two StridedIntervals. Usually it is only used in test cases.
Method lower_bound.setter Undocumented
Method lshift Undocumented
Method LShR Logical shift right. :param StridedInterval shift_amount: The amount of shifting :return: The shifted StridedInterval object :rtype: StridedInterval
Method mul Binary operation: multiplication
Method nameless_copy Undocumented
Method neg Unary operation: neg
Method rshift_arithmetic Arithmetic shift right.
Method rshift_logical Logical shift right.
Method sdiv Binary operation: signed division
Method SGE Signed greater than or equal to.
Method SGT Signed greater than.
Method SLE Signed less than or equal to.
Method SLT Signed less than
Method solution Checks whether an integer is solution of the current strided Interval :param b: integer to check :return: True if b belongs to the current Strided Interval, False otherwhise
Method stride.setter Undocumented
Method sub Binary operation: sub
Method udiv Binary operation: unsigned division
Method UGE Unsigned greater than or equal to.
Method UGT Signed greater than.
Method ULE Unsigned less than or equal to.
Method ULT Unsigned less than.
Method upper_bound.setter Undocumented
Instance Variable uninitialized Undocumented
Property bits Undocumented
Property complement Return the complement of the interval Refer section 3.1 augmented for managing strides
Property is_bottom Whether this StridedInterval is a BOTTOM, in other words, describes an empty set of integers.
Property is_empty The same as is_bottom :return: True/False
Property is_integer If this is an integer, i.e. self.lower_bound == self.upper_bound.
Property is_interval Undocumented
Property is_top If this is a TOP value.
Property lower_bound Undocumented
Property max Treat this StridedInterval as a set of unsigned numbers, and return the greatest one
Property min Treat this StridedInterval as a set of unsigned numbers, and return the smallest one
Property n_values Undocumented
Property name Undocumented
Property reversed Undocumented
Property size Undocumented
Property unique Undocumented
Property upper_bound Undocumented
Static Method _bigger Return interval with bigger cardinality Refer Section 3.1
Static Method _gap Refer section 3.1; gap function.
Static Method _get_msb Get the MSB (most significant bit).
Static Method _is_msb_one Checks if the most significant bit is one (i.e. is the integer negative under signed arithmetic).
Static Method _is_msb_zero Checks if the most significant bit is zero (i.e. is the integer positive under signed arithmetic).
Static Method _lex_lt Lexicographical LT comparison
Static Method _lex_lte Lexicographical LTE comparison
Static Method _minimal_common_integer Calculates the minimal integer that appears in both StridedIntervals. As a wrapper method of _minimal_common_integer_splitted(), this method takes arbitrary StridedIntervals. For more information, please refer to the comment of _minimal_common_integer_splitted().
Static Method _minimal_common_integer_splitted Calculates the minimal integer that appears in both StridedIntervals. It's equivalent to finding an integral solution for equation `ax + b = cy + d` that makes `ax + b` minimal si_0.stride, si_1.stride being a and c, and si_0...
Static Method _modular_add Undocumented
Static Method _modular_mul Undocumented
Static Method _modular_sub Undocumented
Static Method _ntz Get the number of consecutive zeros :param x: :return:
Static Method _to_negative Undocumented
Static Method _unsigned_to_signed Convert an unsigned integer to a signed integer.
Static Method _wrapped_cardinality Return the cardinality for a set of number (| x, y |) on the wrapped-interval domain.
Static Method _wrapped_overflow_add Determines if an overflow happens during the addition of `a` and `b`.
Static Method _wrapped_overflow_sub Determines if an overflow happens during the subtraction of `a` and `b`.
Static Method _wrapped_signed_div Perform wrapped unsigned division on two StridedIntervals.
Static Method _wrapped_signed_mul Perform wrapped signed multiplication on two StridedIntervals.
Static Method _wrapped_unsigned_div Perform wrapped unsigned division on two StridedIntervals.
Static Method _wrapped_unsigned_mul Perform wrapped unsigned multiplication on two StridedIntervals.
Method _involuted_reverse This method reverses the StridedInterval object for real. Do expect loss of precision for most cases!
Method _is_surrounded Perform a wrapped LTE comparison only considering the SI bounds
Method _min_bits Undocumented
Method _multi_valued_intersection Undocumented
Method _normalize_top Undocumented
Method _nsplit Split `self` at the north pole, which is the same as in signed arithmetic.
Method _pre_shift Undocumented
Method _psplit Split `self` at both north and south poles.
Method _reverse This method reverses the StridedInterval object for real. Do expect loss of precision for most cases!
Method _rshift_arithmetic Arithmetic shift right with a concrete shift amount
Method _rshift_logical Logical shift right with a concrete shift amount
Method _signed_bounds Get lower bound and upper bound for `self` in signed arithmetic.
Method _ssplit Split `self` at the south pole, which is the same as in unsigned arithmetic. When returning two StridedIntervals (which means a splitting occurred), it is guaranteed that the first StridedInterval is on the right side of the south pole.
Method _surrounds_member Undocumented
Method _union Undocumented
Method _unrev_cast_low Undocumented
Method _unrev_extract Undocumented
Method _unrev_rshift_logical Logical shift right.
Method _unsigned_bounds Get lower bound and upper bound for `self` in unsigned arithmetic.
Instance Variable _is_bottom Undocumented
Instance Variable _name Undocumented
Instance Variable _reversed Undocumented
Instance Variable _stride Undocumented

Inherited from BackendObject (via StridedInterval):

Method to_claripy Claripy calls this to retrieve something that it can directly reason about.
Class Variable __slots__ Undocumented

Operation + :param o: The other operand. :return:

Operation & :param o: The other operand. :return: An instance of DiscreteStridedIntervalSet.

Operation == :param o: The other operand. :return: An instance of BoolResult.

Operation / :param o: The other operand. :return:

Operation > :param o: The other operand. :return: An instance of BoolResult.

def __init__(self, name=None, bits=0, si_set=None, max_cardinality=None): (source)
def __invert__(self): (source)

Operation ~ :return: The negated value.

Operation <= :param o: The other operand. :return: An instance of BoolResult.

@apply_on_each_si
def __lshift__(self, o): (source)

Operation << :param o: The other operand. :return: An instance of DiscreteStridedIntervalSet.

Operation < :param o: The other operand. :return: An instance of BoolResult.

Operation % :param o: The other operand. :return:

Operation != :param o: The other operand. :return: An instance of BoolResult.

def __neg__(self): (source)

Operation ~ :return: The negated value.

Operation | :param o: The other operand. :return: An instance of DiscreteStridedIntervalSet.

def __rfloordiv__(self, o): (source)

Undocumented

def __rmod__(self, o): (source)

Undocumented

def __ror__(self, o): (source)

Undocumented

@apply_on_each_si
def __rshift__(self, o): (source)

Operation >> :param o: The other operand. :return: An instance of DiscreteStridedIntervalSet.

def __rtruediv__(self, o): (source)

Undocumented

Operation - :param o: The other operand. :return:

Operation ^ :param o: The other operand. :return: An instance of DiscreteStridedIntervalSet.

def collapse(self): (source)

Collapse into a StridedInterval instance. :return: A new StridedInterval instance.

@apply_on_each_si
def concat(self, b): (source)

Operation concat :param b: The other operand to concatenate with. :return: The concatenated value.

def eval(self, n, signed=False): (source)

:param n: :param signed: :return:

def extract(self, high_bit, low_bit): (source)

Operation extract :param high_bit: The highest bit to begin extraction. :param low_bit: The lowest bit to end extraction. :return: Extracted bits.

def normalize(self): (source)

Return the collapsed object if ``should_collapse()`` is True, otherwise return self. :return: A DiscreteStridedIntervalSet object.

@apply_on_each_si
def reverse(self): (source)

Operation Reverse :return: None

def should_collapse(self): (source)

Undocumented

@apply_on_each_si
def sign_extend(self, new_length): (source)

Operation SignExt :param new_length: The length to extend to. :return: SignExtended value.

def union(self, b): (source)

The union operation. It might return a DiscreteStridedIntervalSet to allow for better precision in analysis. :param b: Operand :return: A new DiscreteStridedIntervalSet, or a new StridedInterval.

@collapse_operand
def widen(self, b): (source)

Widening operator. :param b: The other operand. :return: The widened result.

@apply_on_each_si
def zero_extend(self, new_length): (source)

Operation ZeroExt :param new_length: The length to extend to. :return: ZeroExtended value.

@property
cardinality = (source)

This is an over-approximation of the cardinality of this DSIS. :return:

@property
number_of_values = (source)

Undocumented

def _intersection_with_dsis(self, dsis): (source)

Intersection with another :class:`DiscreteStridedIntervalSet`. :param dsis: The other operand. :return:

def _intersection_with_si(self, si): (source)

Intersection with another :class:`StridedInterval`. :param si: The other operand :return:

def _union_with_dsis(self, dsis): (source)

Union with another DiscreteStridedIntervalSet. :param dsis: :return:

def _union_with_si(self, si): (source)

Union with another StridedInterval. :param si: :return:

def _update_bits(self, val): (source)

Undocumented

def _update_bounds(self, val): (source)

Undocumented

_max_cardinality = (source)

Undocumented

Undocumented