CBMC
configt Class Reference

Globally accessible architectural configuration. More...

#include <config.h>

+ Collaboration diagram for configt:

Classes

struct  ansi_ct
 
struct  bv_encodingt
 
struct  cppt
 
struct  javat
 
struct  verilogt
 

Public Member Functions

void set_arch (const irep_idt &)
 
void set_from_symbol_table (const symbol_table_baset &)
 
bool set (const cmdlinet &cmdline)
 
void set_object_bits_from_symbol_table (const symbol_table_baset &)
 Sets the number of bits used for object addresses. More...
 
std::string object_bits_info ()
 
mp_integer max_malloc_size () const
 The maximum allocation size is determined by the number of bits that are left in the pointer of width ansi_c.pointer_width. More...
 

Static Public Member Functions

static irep_idt this_architecture ()
 
static irep_idt this_operating_system ()
 

Public Attributes

struct configt::ansi_ct ansi_c
 
struct configt::cppt cpp
 
struct configt::verilogt verilog
 
struct configt::javat java
 
struct configt::bv_encodingt bv_encoding
 
std::optional< std::string > main
 

Private Member Functions

void set_classpath (const std::string &cp)
 

Detailed Description

Globally accessible architectural configuration.

Definition at line 131 of file config.h.

Member Function Documentation

◆ max_malloc_size()

mp_integer configt::max_malloc_size ( ) const

The maximum allocation size is determined by the number of bits that are left in the pointer of width ansi_c.pointer_width.

The allocation size cannot exceed the number represented by the (signed) offset, otherwise it would not be possible to store a pointer into a valid bit of memory. Therefore, the max allocation size is 2^(offset_bits - 1), where the offset bits is the number of bits left in the pointer after the object bits.

The offset must be signed, as a pointer can point to the end of the memory block, and needs to be able to point back to the start.

Returns
The size in bytes of the maximum allocation supported.

Definition at line 1587 of file config.cpp.

◆ object_bits_info()

std::string configt::object_bits_info ( )

Definition at line 1431 of file config.cpp.

◆ set()

bool configt::set ( const cmdlinet cmdline)

Definition at line 863 of file config.cpp.

◆ set_arch()

void configt::set_arch ( const irep_idt arch)

Definition at line 763 of file config.cpp.

◆ set_classpath()

void configt::set_classpath ( const std::string &  cp)
private

Definition at line 1530 of file config.cpp.

◆ set_from_symbol_table()

void configt::set_from_symbol_table ( const symbol_table_baset symbol_table)

Definition at line 1347 of file config.cpp.

◆ set_object_bits_from_symbol_table()

void configt::set_object_bits_from_symbol_table ( const symbol_table_baset symbol_table)

Sets the number of bits used for object addresses.

Parameters
symbol_tableThe symbol table

Definition at line 1406 of file config.cpp.

◆ this_architecture()

irep_idt configt::this_architecture ( )
static

Definition at line 1442 of file config.cpp.

◆ this_operating_system()

irep_idt configt::this_operating_system ( )
static

Definition at line 1546 of file config.cpp.

Member Data Documentation

◆ ansi_c

struct configt::ansi_ct configt::ansi_c

◆ bv_encoding

struct configt::bv_encodingt configt::bv_encoding

◆ cpp

struct configt::cppt configt::cpp

◆ java

struct configt::javat configt::java

◆ main

std::optional<std::string> configt::main

Definition at line 360 of file config.h.

◆ verilog

struct configt::verilogt configt::verilog

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