ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
solidity_bytes.c File Reference
#include <stddef.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include "solidity_types.h"
Include dependency graph for solidity_bytes.c:

Classes

struct  BytesPool
struct  BytesStatic

Typedefs

typedef struct BytesPool BytesPool
typedef struct BytesStatic BytesStatic

Functions

void bytes_dynamic_init_check (const int initialized)
void bytes_dynamic_bounds_check (size_t index, size_t length)
unsigned char hex_char_to_nibble (char c)
BytesStatic bytes_static_from_hex (const char *hex_str, size_t len)
BytesStatic bytes_static_from_string (const char *str, size_t len)
BytesStatic bytes_static_truncate (const BytesStatic *src, size_t new_len)
BytesStatic bytes_static_and (const BytesStatic *a, const BytesStatic *b)
BytesStatic bytes_static_or (const BytesStatic *a, const BytesStatic *b)
BytesStatic bytes_static_xor (const BytesStatic *a, const BytesStatic *b)
uint256_t bytes_static_to_uint (const BytesStatic *b)
BytesStatic bytes_static_from_uint (uint256_t val, size_t len)
BytesStatic bytes_static_shl (const BytesStatic *src, uint256_t shift_bits)
BytesStatic bytes_static_shr (const BytesStatic *src, uint256_t shift_bits)
uint256_t bytes_static_to_mapping_key (const BytesStatic *b)
BytesStatic bytes_static_init_zero (size_t len)
BytesDynamic bytes_dynamic_init_zero (size_t len, BytesPool *pool)
void bytes_dynamic_init (BytesDynamic *b, const unsigned char *input, size_t len, BytesPool *pool)
void bytes_dynamic_ensure_capacity (BytesDynamic *b, size_t required, BytesPool *pool)
BytesDynamic bytes_dynamic_from_static (const BytesStatic *s, BytesPool *pool)
BytesDynamic bytes_dynamic_from_string (const char *str, BytesPool *pool)
BytesDynamic bytes_dynamic_from_hex (const char *hex_str, size_t len, BytesPool *pool)
BytesStatic bytes_static_truncate_from_dynamic (const BytesDynamic *src, size_t new_len, const BytesPool *pool)
BytesDynamic bytes_dynamic_concat (BytesDynamic a, BytesDynamic b, BytesPool *pool)
BytesDynamic bytes_dynamic_copy (const BytesDynamic *src, BytesPool *pool)
void bytes_static_set (BytesStatic *b, size_t index, BytesStatic value)
void bytes_dynamic_set (BytesDynamic *b, size_t index, BytesStatic value, BytesPool *pool)
BytesStatic bytes_static_get (const BytesStatic *b, size_t index)
BytesStatic bytes_dynamic_get (const BytesDynamic *b, const BytesPool *pool, size_t index)
bool bytes_static_equal (const BytesStatic *a, const BytesStatic *b)
bool bytes_dynamic_equal (const BytesDynamic *a, const BytesDynamic *b, const BytesPool *pool)
uint256_t bytes_dynamic_to_mapping_key (const BytesDynamic *b, const BytesPool *pool)
void bytes_dynamic_push (BytesDynamic *b, unsigned char value, BytesPool *pool)
void bytes_dynamic_pop (BytesDynamic *b, BytesPool *pool)
uint256_t bytes_dynamic_to_uint (const BytesDynamic *b, const BytesPool *pool)
char * bytes_static_to_string (const BytesStatic *b)
char * bytes_dynamic_to_string (const BytesDynamic *b, const BytesPool *pool)
BytesStatic bytes_static_extend (const BytesStatic *src, size_t new_len)
BytesStatic bytes_static_resize (const BytesStatic *src, size_t new_len)
BytesStatic bytes_static_extend_from_dynamic (const BytesDynamic *src, size_t new_len, const BytesPool *pool)
BytesStatic bytes_static_resize_from_dynamic (const BytesDynamic *src, size_t new_len, const BytesPool *pool)
BytesPool bytes_pool_init (unsigned char *pool_data)

Typedef Documentation

◆ BytesPool

typedef struct BytesPool BytesPool

◆ BytesStatic

typedef struct BytesStatic BytesStatic

Function Documentation

◆ bytes_dynamic_bounds_check()

void bytes_dynamic_bounds_check ( size_t index,
size_t length )

◆ bytes_dynamic_concat()

BytesDynamic bytes_dynamic_concat ( BytesDynamic a,
BytesDynamic b,
BytesPool * pool )

◆ bytes_dynamic_copy()

BytesDynamic bytes_dynamic_copy ( const BytesDynamic * src,
BytesPool * pool )

◆ bytes_dynamic_ensure_capacity()

void bytes_dynamic_ensure_capacity ( BytesDynamic * b,
size_t required,
BytesPool * pool )

◆ bytes_dynamic_equal()

bool bytes_dynamic_equal ( const BytesDynamic * a,
const BytesDynamic * b,
const BytesPool * pool )

◆ bytes_dynamic_from_hex()

BytesDynamic bytes_dynamic_from_hex ( const char * hex_str,
size_t len,
BytesPool * pool )

◆ bytes_dynamic_from_static()

BytesDynamic bytes_dynamic_from_static ( const BytesStatic * s,
BytesPool * pool )

◆ bytes_dynamic_from_string()

BytesDynamic bytes_dynamic_from_string ( const char * str,
BytesPool * pool )

◆ bytes_dynamic_get()

BytesStatic bytes_dynamic_get ( const BytesDynamic * b,
const BytesPool * pool,
size_t index )

◆ bytes_dynamic_init()

void bytes_dynamic_init ( BytesDynamic * b,
const unsigned char * input,
size_t len,
BytesPool * pool )

◆ bytes_dynamic_init_check()

void bytes_dynamic_init_check ( const int initialized)

◆ bytes_dynamic_init_zero()

BytesDynamic bytes_dynamic_init_zero ( size_t len,
BytesPool * pool )

◆ bytes_dynamic_pop()

void bytes_dynamic_pop ( BytesDynamic * b,
BytesPool * pool )

◆ bytes_dynamic_push()

void bytes_dynamic_push ( BytesDynamic * b,
unsigned char value,
BytesPool * pool )

◆ bytes_dynamic_set()

void bytes_dynamic_set ( BytesDynamic * b,
size_t index,
BytesStatic value,
BytesPool * pool )

◆ bytes_dynamic_to_mapping_key()

uint256_t bytes_dynamic_to_mapping_key ( const BytesDynamic * b,
const BytesPool * pool )

◆ bytes_dynamic_to_string()

char * bytes_dynamic_to_string ( const BytesDynamic * b,
const BytesPool * pool )

◆ bytes_dynamic_to_uint()

uint256_t bytes_dynamic_to_uint ( const BytesDynamic * b,
const BytesPool * pool )

◆ bytes_pool_init()

BytesPool bytes_pool_init ( unsigned char * pool_data)

◆ bytes_static_and()

BytesStatic bytes_static_and ( const BytesStatic * a,
const BytesStatic * b )

◆ bytes_static_equal()

bool bytes_static_equal ( const BytesStatic * a,
const BytesStatic * b )

◆ bytes_static_extend()

BytesStatic bytes_static_extend ( const BytesStatic * src,
size_t new_len )

◆ bytes_static_extend_from_dynamic()

BytesStatic bytes_static_extend_from_dynamic ( const BytesDynamic * src,
size_t new_len,
const BytesPool * pool )

◆ bytes_static_from_hex()

BytesStatic bytes_static_from_hex ( const char * hex_str,
size_t len )

◆ bytes_static_from_string()

BytesStatic bytes_static_from_string ( const char * str,
size_t len )

◆ bytes_static_from_uint()

BytesStatic bytes_static_from_uint ( uint256_t val,
size_t len )

◆ bytes_static_get()

BytesStatic bytes_static_get ( const BytesStatic * b,
size_t index )

◆ bytes_static_init_zero()

BytesStatic bytes_static_init_zero ( size_t len)

◆ bytes_static_or()

BytesStatic bytes_static_or ( const BytesStatic * a,
const BytesStatic * b )

◆ bytes_static_resize()

BytesStatic bytes_static_resize ( const BytesStatic * src,
size_t new_len )

◆ bytes_static_resize_from_dynamic()

BytesStatic bytes_static_resize_from_dynamic ( const BytesDynamic * src,
size_t new_len,
const BytesPool * pool )

◆ bytes_static_set()

void bytes_static_set ( BytesStatic * b,
size_t index,
BytesStatic value )

◆ bytes_static_shl()

BytesStatic bytes_static_shl ( const BytesStatic * src,
uint256_t shift_bits )

◆ bytes_static_shr()

BytesStatic bytes_static_shr ( const BytesStatic * src,
uint256_t shift_bits )

◆ bytes_static_to_mapping_key()

uint256_t bytes_static_to_mapping_key ( const BytesStatic * b)

◆ bytes_static_to_string()

char * bytes_static_to_string ( const BytesStatic * b)

◆ bytes_static_to_uint()

uint256_t bytes_static_to_uint ( const BytesStatic * b)

◆ bytes_static_truncate()

BytesStatic bytes_static_truncate ( const BytesStatic * src,
size_t new_len )

◆ bytes_static_truncate_from_dynamic()

BytesStatic bytes_static_truncate_from_dynamic ( const BytesDynamic * src,
size_t new_len,
const BytesPool * pool )

◆ bytes_static_xor()

BytesStatic bytes_static_xor ( const BytesStatic * a,
const BytesStatic * b )

◆ hex_char_to_nibble()

unsigned char hex_char_to_nibble ( char c)