CBMC
|
This file contains functions, that should support test for underlying c types, in cases where this is required for analysis purpose. More...
#include "arith_tools.h"
#include "invariant.h"
#include "std_types.h"
#include "type.h"
#include <algorithm>
#include <string>
Go to the source code of this file.
Functions | |
bool | is_c_char_type (const typet &type) |
This function checks, whether this has been a char type in the c program. More... | |
bool | is_c_bool_type (const typet &type) |
This function checks, whether the type has been a bool type in the c program. More... | |
bool | is_c_integral_type (const typet &type) |
This function checks, whether the type has been some kind of integer type in the c program. More... | |
bool | is_c_char_pointer_type (const typet &type) |
This function checks, whether type is a pointer and the target type of the pointer has been a char type in the c program. More... | |
bool | is_c_integral_pointer_type (const typet &type) |
This function checks, whether type is a pointer and the target type has been some kind of int type in the c program. More... | |
bool | is_c_enum_type (const typet &type) |
This function checks, whether the type has been an enum type in the c program. More... | |
constant_exprt | convert_member_name_to_enum_value (const irep_idt &member_name, const c_enum_typet &c_enum) |
This function creates a constant representing the bitvector encoded integer value of a string in the enum. More... | |
bool | id2boolean (const std::string &bool_value) |
Convert id to a Boolean value. More... | |
constant_exprt | from_c_boolean_value (bool bool_value, const typet &type) |
This function creates a constant representing either 0 or 1 as value of type type. More... | |
This file contains functions, that should support test for underlying c types, in cases where this is required for analysis purpose.
Definition in file c_types_util.h.
|
inline |
This function creates a constant representing the bitvector encoded integer value of a string in the enum.
member_name | is a string that should be in the enum. |
c_enum | the enum type member_name is supposed to be part of. |
Definition at line 85 of file c_types_util.h.
|
inline |
This function creates a constant representing either 0 or 1 as value of type type.
bool_value | A Boolean value. |
type | The type, the resulting constant is supposed to have. |
type
with either 0 or 1 as value. Definition at line 122 of file c_types_util.h.
|
inline |
Convert id to a Boolean value.
bool_value | A string that is compared to "true" ignoring case. |
Definition at line 105 of file c_types_util.h.
|
inline |
This function checks, whether the type has been a bool type in the c program.
Definition at line 35 of file c_types_util.h.
|
inline |
This function checks, whether type is a pointer and the target type of the pointer has been a char type in the c program.
Definition at line 57 of file c_types_util.h.
|
inline |
This function checks, whether this has been a char type in the c program.
Definition at line 25 of file c_types_util.h.
|
inline |
This function checks, whether the type has been an enum type in the c program.
Definition at line 74 of file c_types_util.h.
|
inline |
This function checks, whether type is a pointer and the target type has been some kind of int type in the c program.
is_c_int_derivate answers is used for checking the int type.
Definition at line 66 of file c_types_util.h.
|
inline |
This function checks, whether the type has been some kind of integer type in the c program.
It considers the signed and unsigned verison of int, short, long and long long as integer types in c.
Definition at line 44 of file c_types_util.h.