cprover
code_typet Class Reference

Base type of functions. More...

#include <std_types.h>

Inheritance diagram for code_typet:
[legend]
Collaboration diagram for code_typet:
[legend]

Classes

class  parametert
 

Public Types

typedef std::vector< parametertparameterst
 
typedef std::unordered_map< irep_idt, std::size_t > parameter_indicest
 
- Public Types inherited from typet
typedef std::vector< typetsubtypest
 
- Public Types inherited from irept
typedef std::vector< ireptsubt
 
typedef std::map< irep_namet, ireptnamed_subt
 

Public Member Functions

 code_typet (parameterst &&_parameters, typet &&_return_type)
 Constructs a new code type, i.e. More...
 
 code_typet (parameterst &&_parameters, const typet &_return_type)
 Constructs a new code type, i.e. More...
 
 code_typet ()
 
bool has_ellipsis () const
 
bool has_this () const
 
const parametertget_this () const
 
bool is_KnR () const
 
void make_ellipsis ()
 
void remove_ellipsis ()
 
const typetreturn_type () const
 
typetreturn_type ()
 
const parameterstparameters () const
 
parameterstparameters ()
 
bool get_inlined () const
 
void set_inlined (bool value)
 
const irep_idtget_access () const
 
void set_access (const irep_idt &access)
 
bool get_is_constructor () const
 
void set_is_constructor ()
 
std::vector< irep_idtparameter_identifiers () const
 
parameter_indicest parameter_indices () const
 Get a map from parameter name to its index. More...
 
- Public Member Functions inherited from typet
 typet ()
 
 typet (const irep_idt &_id)
 
 typet (const irep_idt &_id, const typet &_subtype)
 
const typetsubtype () const
 
typetsubtype ()
 
subtypestsubtypes ()
 
const subtypestsubtypes () const
 
bool has_subtypes () const
 
bool has_subtype () const
 
void remove_subtype ()
 
void move_to_subtypes (typet &type)
 
void copy_to_subtypes (const typet &type)
 
const source_locationtsource_location () const
 
source_locationtadd_source_location ()
 
typetadd_type (const irep_namet &name)
 
const typetfind_type (const irep_namet &name) const
 
- Public Member Functions inherited from irept
bool is_nil () const
 
bool is_not_nil () const
 
 irept (const irep_idt &_id)
 
 irept ()
 
 irept (const irept &irep)
 
 irept (irept &&irep)
 
ireptoperator= (const irept &irep)
 
ireptoperator= (irept &&irep)
 
 ~irept ()
 
const irep_idtid () const
 
const std::string & id_string () const
 
void id (const irep_idt &_data)
 
const ireptfind (const irep_namet &name) const
 
ireptadd (const irep_namet &name)
 
ireptadd (const irep_namet &name, const irept &irep)
 
const std::string & get_string (const irep_namet &name) const
 
const irep_idtget (const irep_namet &name) const
 
bool get_bool (const irep_namet &name) const
 
signed int get_int (const irep_namet &name) const
 
unsigned int get_unsigned_int (const irep_namet &name) const
 
std::size_t get_size_t (const irep_namet &name) const
 
long long get_long_long (const irep_namet &name) const
 
void set (const irep_namet &name, const irep_idt &value)
 
void set (const irep_namet &name, const irept &irep)
 
void set (const irep_namet &name, const long long value)
 
void remove (const irep_namet &name)
 
void move_to_sub (irept &irep)
 
void move_to_named_sub (const irep_namet &name, irept &irep)
 
bool operator== (const irept &other) const
 
bool operator!= (const irept &other) const
 
void swap (irept &irep)
 
bool operator< (const irept &other) const
 defines ordering on the internal representation More...
 
bool ordering (const irept &other) const
 defines ordering on the internal representation More...
 
int compare (const irept &i) const
 defines ordering on the internal representation More...
 
void clear ()
 
void make_nil ()
 
subtget_sub ()
 
const subtget_sub () const
 
named_subtget_named_sub ()
 
const named_subtget_named_sub () const
 
named_subtget_comments ()
 
const named_subtget_comments () const
 
std::size_t hash () const
 
std::size_t full_hash () const
 
bool full_eq (const irept &other) const
 
std::string pretty (unsigned indent=0, unsigned max_indent=0) const
 
const dtread () const
 
dtwrite ()
 

Additional Inherited Members

- Protected Member Functions inherited from irept
void detach ()
 
- Static Protected Member Functions inherited from irept
static bool is_comment (const irep_namet &name)
 
static void remove_ref (dt *old_data)
 
static void nonrecursive_destructor (dt *old_data)
 Does the same as remove_ref, but using an explicit stack instead of recursion. More...
 
- Protected Attributes inherited from irept
dtdata
 
- Static Protected Attributes inherited from irept
static dt empty_d
 

Detailed Description

Base type of functions.

Definition at line 764 of file std_types.h.

Member Typedef Documentation

◆ parameter_indicest

typedef std::unordered_map<irep_idt, std::size_t> code_typet::parameter_indicest

Definition at line 957 of file std_types.h.

◆ parameterst

typedef std::vector<parametert> code_typet::parameterst

Definition at line 767 of file std_types.h.

Constructor & Destructor Documentation

◆ code_typet() [1/3]

code_typet::code_typet ( parameterst &&  _parameters,
typet &&  _return_type 
)
inline

Constructs a new code type, i.e.

function type

Parameters
_parametersthe vector of function parameters
_return_typethe return type

Definition at line 773 of file std_types.h.

References parameters(), return_type(), and irept::swap().

◆ code_typet() [2/3]

code_typet::code_typet ( parameterst &&  _parameters,
const typet _return_type 
)
inline

Constructs a new code type, i.e.

function type

Parameters
_parametersthe vector of function parameters
_return_typethe return type

Definition at line 782 of file std_types.h.

References parameters(), and return_type().

◆ code_typet() [3/3]

code_typet::code_typet ( )
inline
Deprecated:

Definition at line 791 of file std_types.h.

References irept::add(), and typet::add_type().

Member Function Documentation

◆ get_access()

const irep_idt& code_typet::get_access ( ) const
inline

Definition at line 925 of file std_types.h.

◆ get_inlined()

bool code_typet::get_inlined ( ) const
inline

◆ get_is_constructor()

bool code_typet::get_is_constructor ( ) const
inline

◆ get_this()

const parametert* code_typet::get_this ( ) const
inline

Definition at line 871 of file std_types.h.

References parameters().

Referenced by has_this().

◆ has_ellipsis()

◆ has_this()

◆ is_KnR()

bool code_typet::is_KnR ( ) const
inline

Definition at line 880 of file std_types.h.

References irept::get_bool().

Referenced by c_typecheck_baset::typecheck_function_call_arguments().

◆ make_ellipsis()

◆ parameter_identifiers()

std::vector<irep_idt> code_typet::parameter_identifiers ( ) const
inline

Definition at line 946 of file std_types.h.

References parameters().

◆ parameter_indices()

parameter_indicest code_typet::parameter_indices ( ) const
inline

Get a map from parameter name to its index.

Definition at line 960 of file std_types.h.

References irept::id(), and parameters().

◆ parameters() [1/2]

const parameterst& code_typet::parameters ( ) const
inline

Definition at line 905 of file std_types.h.

References irept::find(), and irept::get_sub().

Referenced by string_abstractiont::abstract_function_call(), c_typecheck_baset::add_argc_argv(), string_abstractiont::add_str_arguments(), cpp_typecheckt::add_this_to_method_type(), c_typecheck_baset::apply_asm_label(), code_contractst::apply_contract(), cpp_typecheck_resolvet::apply_template_args(), assign_parameter_names(), base_type_eqt::base_type_eq_rec(), localst::build(), local_may_aliast::build(), goto_program2codet::cleanup_expr(), dump_ct::cleanup_expr(), goto_program2codet::cleanup_function_call(), dump_ct::cleanup_type(), code_typet(), dump_ct::collect_typedefs_rec(), cpp_declarator_convertert::combine_types(), java_bytecode_convert_methodt::convert(), cpp_typecheckt::convert_function(), cpp_typecheckt::convert_initializer(), java_bytecode_convert_methodt::convert_instructions(), java_bytecode_convert_methodt::convert_invoke(), java_bytecode_convert_methodt::convert_invoke_dynamic(), java_bytecode_convert_methodt::convert_monitorenter(), java_bytecode_convert_methodt::convert_monitorexit(), cpp_typecheckt::convert_parameters(), expr2ct::convert_rec(), expr2cppt::convert_rec(), expr2javat::convert_rec(), cpp_type2name(), compilet::cprover_macro_arities(), java_simple_method_stubst::create_method_stub(), linkingt::detailed_conflict_report_rec(), cpp_typecheck_resolvet::disambiguate_functions(), goto_convertt::do_cpp_new(), value_set_fit::do_function_call(), value_set_fivrnst::do_function_call(), value_set_fivrt::do_function_call(), value_sett::do_function_call(), goto_convertt::do_function_call_symbol(), parameter_assignmentst::do_function_calls(), cpp_typecheckt::do_virtual_table(), linkingt::duplicate_code_symbol(), interpretert::execute_function_call(), cpp_typecheckt::find_assignop(), cpp_typecheckt::find_cpctor(), find_symbols(), smt2_convt::find_symbols_rec(), remove_function_pointerst::fix_argument_types(), cpp_typecheckt::function_identifier(), function_to_call(), c_typecheck_baset::gcc_types_compatible_p(), generate_ansi_c_start_function(), languaget::generate_opaque_parameter_symbols(), java_bytecode_parsert::get_class_refs_rec(), get_dependencies_from_generic_parameters_rec(), get_destructor(), get_local_identifiers(), get_symbols_rec(), get_this(), rename_symbolt::have_to_rename(), replace_symbolt::have_to_replace(), escape_analysist::insert_cleanup(), taint_analysist::instrument(), is_java_main(), remove_function_pointerst::is_type_compatible(), java_build_arguments(), java_bytecode_convert_method_lazy(), java_bytecode_initialize_parameter_names(), java_method_parameter_slots(), java_record_outputs(), jsil_internal_additions(), java_string_library_preprocesst::make_assign_and_return_function_from_call(), java_string_library_preprocesst::make_copy_constructor_code(), java_string_library_preprocesst::make_copy_string_code(), java_string_library_preprocesst::make_equals_function_code(), java_string_library_preprocesst::make_float_to_string_code(), java_string_library_preprocesst::make_function_from_call(), java_string_library_preprocesst::make_init_from_array_code(), java_string_library_preprocesst::make_init_function_from_call(), java_string_library_preprocesst::make_object_get_class_code(), java_string_library_preprocesst::make_string_format_code(), java_string_library_preprocesst::make_string_length_code(), java_string_library_preprocesst::make_string_returning_function_from_call(), cpp_typecheck_fargst::match(), member_type_lazy(), mm_io(), model_argc_argv(), mutex_init_instrumentation(), dump_ct::operator()(), goto_inlinet::parameter_assignments(), goto_symext::parameter_assignments(), goto_inlinet::parameter_destruction(), parameter_identifiers(), parameter_indices(), pretty_signature(), cpp_typecheckt::reference_binding(), remove_function_pointerst::remove_function_pointer(), rename_symbolt::rename(), replace_symbolt::replace(), require_type::require_code(), require_type::require_parameter(), Parser::rTypeNameOrFunctionType(), goto_program2codet::scan_for_varargs(), cpp_typecheck_resolvet::show_identifiers(), cpp_typecheckt::standard_conversion_pointer_to_member(), static_lifetime_init(), constant_propagator_domaint::transform(), custom_bitvector_domaint::transform(), rd_range_domaint::transform_end_function(), type2name(), c_typecheck_baset::typecheck_code_type(), cpp_typecheckt::typecheck_compound_declarator(), cpp_typecheckt::typecheck_expr_address_of(), c_typecheck_baset::typecheck_expr_trinary(), c_typecheck_baset::typecheck_function_body(), c_typecheck_baset::typecheck_function_call_arguments(), cpp_typecheckt::typecheck_function_call_arguments(), cpp_typecheckt::typecheck_member_initializer(), cpp_typecheckt::typecheck_method_application(), c_typecheck_baset::typecheck_new_symbol(), c_typecheck_baset::typecheck_redefinition_non_type(), c_typecheck_baset::typecheck_side_effect_function_call(), java_bytecode_typecheckt::typecheck_type(), jsil_typecheckt::typecheck_type(), cpp_typecheckt::typecheck_type(), and yyjsilparse().

◆ parameters() [2/2]

parameterst& code_typet::parameters ( )
inline

Definition at line 910 of file std_types.h.

References irept::add(), and irept::get_sub().

◆ remove_ellipsis()

void code_typet::remove_ellipsis ( )
inline

◆ return_type() [1/2]

const typet& code_typet::return_type ( ) const
inline

Definition at line 895 of file std_types.h.

References typet::find_type().

Referenced by code_contractst::apply_contract(), base_type_eqt::base_type_eq_rec(), goto_program2codet::cleanup_expr(), dump_ct::cleanup_type(), code_typet(), dump_ct::collect_typedefs_rec(), cpp_declarator_convertert::combine_types(), cpp_declarator_convertert::convert(), java_bytecode_convert_methodt::convert(), cpp_typecheckt::convert_function(), java_bytecode_convert_methodt::convert_invoke(), java_bytecode_convert_methodt::convert_invoke_dynamic(), java_bytecode_convert_methodt::convert_monitorenter(), java_bytecode_convert_methodt::convert_monitorexit(), expr2ct::convert_rec(), expr2javat::convert_rec(), expr2cppt::convert_rec(), java_bytecode_languaget::convert_single_method(), cpp_typecheckt::cpp_is_pod(), cpp_type2name(), java_simple_method_stubst::create_method_stub(), linkingt::detailed_conflict_report_rec(), cpp_typecheck_resolvet::disambiguate_functions(), goto_convertt::do_cpp_new(), linkingt::duplicate_code_symbol(), find_symbols(), remove_function_pointerst::fix_return_type(), function_to_call(), c_typecheck_baset::gcc_types_compatible_p(), generate_ansi_c_start_function(), generate_java_start_function(), java_bytecode_parsert::get_class_refs_rec(), get_dependencies_from_generic_parameters_rec(), get_destructor(), remove_returnst::get_or_create_return_value_symbol(), rename_symbolt::have_to_rename(), replace_symbolt::have_to_replace(), is_java_main(), remove_function_pointerst::is_type_compatible(), java_record_outputs(), cpp_declarator_convertert::main_function_rules(), java_string_library_preprocesst::make_copy_string_code(), java_string_library_preprocesst::make_equals_function_code(), java_string_library_preprocesst::make_float_to_string_code(), java_string_library_preprocesst::make_function_from_call(), java_string_library_preprocesst::make_string_format_code(), java_string_library_preprocesst::make_string_returning_function_from_call(), mm_io(), original_return_type(), record_function_outputs(), cpp_typecheckt::reference_binding(), remove_internal_symbols(), rename_symbolt::rename(), replace_symbolt::replace(), Parser::rTypeNameOrFunctionType(), cpp_typecheck_resolvet::show_identifiers(), static_lifetime_init(), type2name(), c_typecheck_baset::typecheck_code_type(), cpp_typecheckt::typecheck_compound_declarator(), c_typecheck_baset::typecheck_declaration(), c_typecheck_baset::typecheck_expr_builtin_va_arg(), c_typecheck_baset::typecheck_expr_trinary(), c_typecheck_baset::typecheck_function_body(), c_typecheck_baset::typecheck_side_effect_function_call(), java_bytecode_typecheckt::typecheck_type(), cpp_typecheckt::typecheck_type(), remove_returnst::undo_function_calls(), and ansi_c_convert_typet::write().

◆ return_type() [2/2]

typet& code_typet::return_type ( )
inline

Definition at line 900 of file std_types.h.

References typet::add_type().

◆ set_access()

void code_typet::set_access ( const irep_idt access)
inline

Definition at line 930 of file std_types.h.

Referenced by java_bytecode_convert_method_lazy().

◆ set_inlined()

void code_typet::set_inlined ( bool  value)
inline

Definition at line 920 of file std_types.h.

Referenced by cpp_declarator_convertert::combine_types().

◆ set_is_constructor()

void code_typet::set_is_constructor ( )
inline

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