cprover
code_blockt Class Reference

Sequential composition. More...

#include <std_code.h>

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

Public Member Functions

 code_blockt ()
 
 code_blockt (const std::list< codet > &_list)
 
void move (codet &code)
 
void add (const codet &code)
 
void add (codet code, const source_locationt &loc)
 
void append (const code_blockt &extra_block)
 Add all the codets from extra_block to the current code_blockt. More...
 
source_locationt end_location () const
 
codet & find_last_statement ()
 
- Public Member Functions inherited from codet
 codet ()
 
 codet (const irep_idt &statement)
 
void set_statement (const irep_idt &statement)
 
const irep_idt & get_statement () const
 
codet & first_statement ()
 
const codet & first_statement () const
 
codet & last_statement ()
 
const codet & last_statement () const
 
class code_blockt & make_block ()
 
- Public Member Functions inherited from exprt
 exprt ()
 
 exprt (const irep_idt &_id)
 
 exprt (const irep_idt &_id, const typet &_type)
 
typet & type ()
 
const typet & type () const
 
bool has_operands () const
 
operandst & operands ()
 
const operandst & operands () const
 
exprt & op0 ()
 
exprt & op1 ()
 
exprt & op2 ()
 
exprt & op3 ()
 
const exprt & op0 () const
 
const exprt & op1 () const
 
const exprt & op2 () const
 
const exprt & op3 () const
 
void reserve_operands (operandst::size_type n)
 
void move_to_operands (exprt &expr)
 
void move_to_operands (exprt &e1, exprt &e2)
 
void move_to_operands (exprt &e1, exprt &e2, exprt &e3)
 
void copy_to_operands (const exprt &expr)
 
void copy_to_operands (const exprt &e1, const exprt &e2)
 
void copy_to_operands (const exprt &e1, const exprt &e2, const exprt &e3)
 
void make_typecast (const typet &_type)
 
void make_not ()
 
void make_true ()
 
void make_false ()
 
void make_bool (bool value)
 
bool is_constant () const
 
bool is_true () const
 
bool is_false () const
 
bool is_zero () const
 
bool is_one () const
 
bool is_boolean () const
 
const source_locationt & find_source_location () const
 
const source_locationt & source_location () const
 
source_locationt & add_source_location ()
 
exprt & add_expr (const irep_idt &name)
 
const exprt & find_expr (const irep_idt &name) const
 
void visit (class expr_visitort &visitor)
 
void visit (class const_expr_visitort &visitor) const
 
depth_iteratort depth_begin ()
 
depth_iteratort depth_end ()
 
const_depth_iteratort depth_begin () const
 
const_depth_iteratort depth_end () const
 
const_depth_iteratort depth_cbegin () const
 
const_depth_iteratort depth_cend () const
 
depth_iteratort depth_begin (std::function< exprt &()> mutate_root) const
 
const_unique_depth_iteratort unique_depth_begin () const
 
const_unique_depth_iteratort unique_depth_end () const
 
const_unique_depth_iteratort unique_depth_cbegin () const
 
const_unique_depth_iteratort unique_depth_cend () 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)
 
irept & operator= (const irept &irep)
 
irept & operator= (irept &&irep)
 
 ~irept ()
 
const irep_idt & id () const
 
const std::string & id_string () const
 
void id (const irep_idt &_data)
 
const irept & find (const irep_namet &name) const
 
irept & add (const irep_namet &name)
 
irept & add (const irep_namet &name, const irept &irep)
 
const std::string & get_string (const irep_namet &name) const
 
const irep_idt & get (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 ()
 
subt & get_sub ()
 
const subt & get_sub () const
 
named_subt & get_named_sub ()
 
const named_subt & get_named_sub () const
 
named_subt & get_comments ()
 
const named_subt & get_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 dt & read () const
 
dt & write ()
 

Additional Inherited Members

- Public Types inherited from exprt
typedef std::vector< exprt > operandst
 
- Public Types inherited from irept
typedef std::vector< irept > subt
 
typedef std::map< irep_namet, irept > named_subt
 
- 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
dt * data
 
- Static Protected Attributes inherited from irept
static dt empty_d
 

Detailed Description

Sequential composition.

Definition at line 89 of file std_code.h.

Constructor & Destructor Documentation

◆ code_blockt() [1/2]

code_blockt::code_blockt ( )
inline

Definition at line 92 of file std_code.h.

◆ code_blockt() [2/2]

code_blockt::code_blockt ( const std::list< codet > &  _list)
inlineexplicit

Definition at line 96 of file std_code.h.

References exprt::operands(), and exprt::reserve_operands().

Member Function Documentation

◆ add() [1/2]

void code_blockt::add ( const codet &  code)
inline

Definition at line 112 of file std_code.h.

References exprt::copy_to_operands().

Referenced by add(), add_array_to_length_association(), add_character_set_constraint(), add_pointer_to_array_association(), allocate_dynamic_object_with_decl(), java_string_library_preprocesst::allocate_fresh_array(), append(), java_bytecode_instrumentt::check_array_access(), dump_ct::cleanup_harness(), java_string_library_preprocesst::code_assign_java_string_to_string_expr(), java_bytecode_convert_methodt::convert_instructions(), goto_convertt::convert_label(), java_bytecode_convert_methodt::convert_switch(), java_string_library_preprocesst::decl_string_expr(), declare_created_symbols(), java_object_factoryt::gen_nondet_pointer_init(), java_object_factoryt::gen_nondet_struct_init(), java_string_library_preprocesst::get_primitive_value_of_object(), get_thread_safe_clinit_wrapper_body(), initialize_nondet_string_fields(), instrument_end_thread(), instrument_start_thread(), instrument_synchronized_code(), java_static_lifetime_init(), remove_instanceoft::lower_instanceof(), java_string_library_preprocesst::make_argument_for_format(), 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(), make_nondet_infinite_char_array(), java_string_library_preprocesst::make_nondet_string_expr(), java_string_library_preprocesst::make_object_get_class_code(), java_string_library_preprocesst::make_string_returning_function_from_call(), monitor_exits(), java_string_library_preprocesst::replace_char_array(), static_lifetime_init(), and java_string_library_preprocesst::string_expr_of_function().

◆ add() [2/2]

void code_blockt::add ( codet  code,
const source_locationt &  loc 
)
inline

Definition at line 117 of file std_code.h.

References add(), exprt::add_source_location(), and loc.

◆ append()

◆ end_location()

source_locationt code_blockt::end_location ( ) const
inline

◆ find_last_statement()

◆ move()


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