class documentation

Base class that represent the AST of a String object and implements all the operation useful to create and modify the AST. Do not instantiate this class directly, instead use StringS or StringV to construct a symbol or value, and then use operations to construct more complicated expressions.

Method __getitem__ This is a big endian indexer that takes its arguments as bits but returns bytes. Returns the range of bits in self defined by: [rng.start, rng.end], indexed from the end The bit range may not internally divide any bytes; i...
Method __init__ :param length: The string byte length
Method indexOf Return the start index of the pattern inside the input string in a Bitvector representation, otherwise it returns -1 (always using a BitVector)
Method raw_to_bv A counterpart to FP.raw_to_bv - does nothing and returns itself.
Method raw_to_fp Converts this data's bit-pattern to an IEEE float.
Method strReplace Replace the first occurence of str_to_replace with replacement
Method toInt Convert the string to a bitvector holding the integer representation of the string
Constant GENERATED_BVS_IDENTIFIER Undocumented
Constant MAX_LENGTH Undocumented
Constant STRING_TYPE_IDENTIFIER Undocumented
Class Variable __slots__ Undocumented
Instance Variable string_length Undocumented
Static Method _from_BV Undocumented
Static Method _from_str Undocumented

Inherited from Bits:

Method make_like Undocumented
Method size :returns: The bit length of this AST
Static Method _check_replaceability Undocumented
Method _type_name Undocumented

Inherited from Base (via Bits):

Class Method __init_with_annotations__ Undocumented
Method __a_init__ Initializes an AST. Takes the same arguments as ``Base.__new__()``
Method __bool__ This prevents people from accidentally using an AST as a condition. For example, the following was previously common::
Method __getattr__ Undocumented
Method __hash__ Undocumented
Method __iter__ This prevents people from iterating over ASTs.
Method __new__ This is called when you create a new Base object, whether directly or through an operation. It finalizes the arguments (see the _finalize function, above) and then computes a hash. If an AST of this hash already exists, it returns that AST...
Method __reduce__ Undocumented
Method __repr__ Undocumented
Method annotate Appends annotations to this AST.
Method append_annotation Appends an annotation to this AST.
Method append_annotations Appends several annotations to this AST.
Method canonicalize Undocumented
Method children_asts Return an iterator over the nested children ASTs.
Method dbg_is_looped Undocumented
Method dbg_repr Returns a debug representation of this AST.
Method insert_annotation Inserts an annotation to this AST.
Method insert_annotations Inserts several annotations to this AST.
Method leaf_asts Return an iterator over the leaf ASTs.
Method remove_annotation Removes an annotation from this AST.
Method remove_annotations Removes several annotations from this AST.
Method replace Returns this AST but with the AST 'old' replaced with AST 'new' in its subexpressions.
Method replace_annotations Replaces annotations on this AST.
Method replace_dict Returns this AST with subexpressions replaced by those that can be found in `replacements` dict.
Method shallow_repr Returns a string representation of this AST, but with a maximum depth to prevent floods of text being printed.
Method split Splits the AST if its operation is `split_on` (i.e., return all the arguments). Otherwise, return a list with just the AST.
Method structurally_match Structurally compares two A objects, and check if their corresponding leaves are definitely the same A object (name-wise or hash-identity wise).
Method swap_args This returns the same AST, with the arguments swapped out for new_args.
Method to_claripy Returns itself. Provides compatibility with other classes (such as SimActionObject) which provide a similar method to unwrap to an AST.
Constant FULL_REPR Undocumented
Constant FULL_SIMPLIFY Undocumented
Constant LITE_REPR Undocumented
Constant LITE_SIMPLIFY Undocumented
Constant MID_REPR Undocumented
Constant UNSIMPLIFIED Undocumented
Instance Variable annotations Undocumented
Instance Variable args Undocumented
Instance Variable depth Undocumented
Instance Variable length Undocumented
Instance Variable op Undocumented
Instance Variable symbolic Undocumented
Instance Variable variables Undocumented
Property cache_key A key that refers to this AST - this value is appropriate for usage as a key in dictionaries.
Property cardinality Undocumented
Property concrete Undocumented
Property ite_burrowed Returns an equivalent AST that "burrows" the ITE expressions as deep as possible into the ast, for simpler printing.
Property ite_excavated Returns an equivalent AST that "excavates" the ITE expressions out as far as possible toward the root of the AST, for processing in static analyses.
Property multivalued Undocumented
Property recursive_children_asts DEPRECATED: Use children_asts() instead.
Property recursive_leaf_asts DEPRECATED: Use leaf_asts() instead.
Property singlevalued Undocumented
Property uc_alloc_depth The depth of allocation by lazy-initialization. It's only used in under-constrained symbolic execution mode.
Property uninitialized Whether this AST comes from an uninitialized dereference or not. It's only used in under-constrained symbolic execution mode.
Static Method _arg_serialize Undocumented
Static Method _ast_serialize Serialize the AST and get a bytestring for hashing.
Static Method _calc_hash Calculates the hash of an AST, given the operation, args, and kwargs.
Static Method _op_repr Undocumented
Method _apply_to_annotations Undocumented
Method _burrow_ite Undocumented
Method _excavate_ite Undocumented
Method _first_backend Undocumented
Method _identify_vars Undocumented
Method _rename Undocumented
Class Variable _hash_cache Undocumented
Class Variable _leaf_cache Undocumented
Instance Variable _burrowed Undocumented
Instance Variable _cache_key Undocumented
Instance Variable _cached_encoded_name Undocumented
Instance Variable _eager_backends Undocumented
Instance Variable _errored Undocumented
Instance Variable _excavated Undocumented
Instance Variable _hash Undocumented
Instance Variable _relocatable_annotations Undocumented
Instance Variable _simplified Undocumented
Instance Variable _uc_alloc_depth Undocumented
Instance Variable _uneliminatable_annotations Undocumented
Instance Variable _uninitialized Undocumented
Property _encoded_name Undocumented
def __getitem__(self, rng): (source)

This is a big endian indexer that takes its arguments as bits but returns bytes. Returns the range of bits in self defined by: [rng.start, rng.end], indexed from the end The bit range may not internally divide any bytes; i.e. low and (high+1) must both be divisible by 8 Examples: self[7:0] -- returns the last byte of self self[15:0] -- returns the last two bytes of self self[8:0] -- Error! [8:0] is 9 bits, it asks for individual bits of the second to last byte! self[8:1] -- Error! [8:1] asks for 1 bit from the second to last byte and 7 from the last byte!

def __init__(self, *args, length: int, **kwargs): (source)

:param length: The string byte length

def indexOf(self, pattern, start_idx, bitlength): (source)

Return the start index of the pattern inside the input string in a Bitvector representation, otherwise it returns -1 (always using a BitVector) :param bitlength: size of the biitvector holding the result

def raw_to_bv(self): (source)

A counterpart to FP.raw_to_bv - does nothing and returns itself.

def raw_to_fp(self): (source)

Converts this data's bit-pattern to an IEEE float.

def strReplace(self, str_to_replace, replacement): (source)

Replace the first occurence of str_to_replace with replacement :param claripy.ast.String str_to_replace: pattern that has to be replaced :param claripy.ast.String replacement: replacement pattern

def toInt(self, bitlength): (source)

Convert the string to a bitvector holding the integer representation of the string :param bitlength: size of the biitvector holding the result

GENERATED_BVS_IDENTIFIER: str = (source)

Undocumented

Value
'BVS_'
MAX_LENGTH: int = (source)

Undocumented

Value
10000
STRING_TYPE_IDENTIFIER: str = (source)

Undocumented

Value
'STRING_'
__slots__: tuple[str, ...] = (source)

Undocumented

string_length: int = (source)

Undocumented

@staticmethod
def _from_BV(like, value): (source)

Undocumented

@staticmethod
def _from_str(like, value): (source)

Undocumented