ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
array_type2t Class Reference

Array type. More...

#include <irep2_type.h>

Inheritance diagram for array_type2t:
[legend]

Classes

class  array_size_excp
 Common base for the two array-sizing exceptions thrown by array_type2t::get_width (and friends). More...
class  inf_sized_array_excp
 Exception for invalid manipulations of an infinitely sized array. More...
class  dyn_sized_array_excp
 Exception for invalid manipulations of dynamically sized arrays. More...

Public Member Functions

 array_type2t (const type2tc &_subtype, const expr2tc &size, bool inf)
 Primary constructor.
 array_type2t (const array_type2t &ref)=default
virtual ~array_type2t ()=default
unsigned int get_width () const
Public Member Functions inherited from type2t
virtual ~type2t ()=default
unsigned int get_width () const
 Fetch bit width of this type.
bool operator== (const type2t &ref) const
bool operator!= (const type2t &ref) const
bool operator< (const type2t &ref) const
std::string pretty (unsigned int indent=0) const
 Produce a human-readable string representation of type.
DUMP_METHOD void dump () const
 Dump object string representation to stdout.
size_t crc () const
 Produce a checksum/hash of the current object.
bool cmp (const type2t &ref) const
 Structural comparison.
int lt (const type2t &ref) const
 Trinary structural ordering.
list_of_memberst tostring (unsigned int indent) const
 Extract a list of members from type as strings.
type2tc clone () const
 Clone method.
template<typename T>
void foreach_subtype (T &&t) const
template<typename T>
void Foreach_subtype (T &&t)
Public Member Functions inherited from irep2t
 irep2t () noexcept
 irep2t (const irep2t &) noexcept
irep2t & operator= (const irep2t &)=delete
virtual ~irep2t ()=default
void mark_writer () const noexcept
void clear_writer () const noexcept

Public Attributes

type2tc subtype
expr2tc array_size
bool size_is_infinite
Public Attributes inherited from type2t
const type_ids type_id
 Instance of type_ids recording this types type.
std::atomic< size_t > crc_val
Public Attributes inherited from irep2t
std::atomic< unsigned int > refcount
std::atomic< std::uintptr_t > writer_thread

Static Public Attributes

static constexpr auto fields
static std::string field_names [esbmct::num_type_fields]

Additional Inherited Members

Public Types inherited from type2t
enum  type_ids { end_type_id }
 Enumeration identifying each sort of type. More...
typedef esbmct::function_ref< void(const type2tc &)> const_subtype_delegate
typedef esbmct::function_ref< void(type2tc &)> subtype_delegate
typedef type2tc container_type
typedef type2t base_type
Static Public Member Functions inherited from irep2t
static std::uintptr_t current_thread_tag () noexcept
Protected Member Functions inherited from type2t
 type2t (type_ids id)
 Primary constructor.
 type2t (const type2t &ref)
 Copy constructor.
void foreach_subtype_impl_const (const_subtype_delegate &t) const
void foreach_subtype_impl (subtype_delegate &t)

Detailed Description

Array type.

Comes with a subtype of the array and a size that might be constant, might be nondeterministic, might be infinite. These facts are recorded in the array_size and size_is_infinite fields.

If size_is_infinite is true, array_size will be null. If array_size is not a constant number, then it's a dynamically sized array.

Constructor & Destructor Documentation

◆ array_type2t() [1/2]

array_type2t::array_type2t ( const type2tc & _subtype,
const expr2tc & size,
bool inf )
inline

Primary constructor.

Parameters
subtypeType of elements in this array.
sizeSize of this array.
infWhether or not this array is infinitely sized

◆ array_type2t() [2/2]

array_type2t::array_type2t ( const array_type2t & ref)
default

◆ ~array_type2t()

virtual array_type2t::~array_type2t ( )
virtualdefault

Member Function Documentation

◆ get_width()

unsigned int array_type2t::get_width ( ) const

Member Data Documentation

◆ array_size

expr2tc array_type2t::array_size

◆ field_names

std::string array_type2t::field_names
static
Initial value:
=
{"subtype", "array_size", "size_is_infinite", "", ""}

◆ fields

auto array_type2t::fields
staticconstexpr
Initial value:
= std::make_tuple(
expr2tc array_size
Definition irep2_type.h:505
type2tc subtype
Definition irep2_type.h:504
bool size_is_infinite
Definition irep2_type.h:506

◆ size_is_infinite

bool array_type2t::size_is_infinite

◆ subtype

type2tc array_type2t::subtype

The documentation for this class was generated from the following files: