cprover
goto_convert.cpp File Reference

Program Transformation. More...

#include "goto_convert.h"
#include <cassert>
#include <util/arith_tools.h>
#include <util/cprover_prefix.h>
#include <util/expr_util.h>
#include <util/fresh_symbol.h>
#include <util/prefix.h>
#include <util/simplify_expr.h>
#include <util/std_expr.h>
#include <util/symbol_table.h>
#include <util/c_types.h>
#include "goto_convert_class.h"
#include "destructor.h"
#include "remove_skip.h"
Include dependency graph for goto_convert.cpp:

Go to the source code of this file.

Functions

static bool is_empty (const goto_programt &goto_program)
 
static void finish_catch_push_targets (goto_programt &dest)
 Populate the CATCH instructions with the targets corresponding to their associated labels. More...
 
static bool is_size_one (const goto_programt &g)
 This is (believed to be) faster than using std::list.size. More...
 
static bool has_and_or (const exprt &expr)
 if(guard) goto target; More...
 
void goto_convert (const codet &code, symbol_table_baset &symbol_table, goto_programt &dest, message_handlert &message_handler, const irep_idt &mode)
 
void goto_convert (symbol_table_baset &symbol_table, goto_programt &dest, message_handlert &message_handler)
 

Detailed Description

Program Transformation.

Definition in file goto_convert.cpp.

Function Documentation

◆ finish_catch_push_targets()

static void finish_catch_push_targets ( goto_programt dest)
static

Populate the CATCH instructions with the targets corresponding to their associated labels.

Definition at line 42 of file goto_convert.cpp.

References code_push_catcht::exception_list(), Forall_goto_program_instructions, and to_code_push_catch().

Referenced by goto_convertt::goto_convert_rec().

◆ goto_convert() [1/2]

◆ goto_convert() [2/2]

void goto_convert ( symbol_table_baset symbol_table,
goto_programt dest,
message_handlert message_handler 
)

◆ has_and_or()

static bool has_and_or ( const exprt expr)
static

if(guard) goto target;

Definition at line 1762 of file goto_convert.cpp.

References forall_operands, and irept::id().

Referenced by goto_convertt::generate_conditional_branch().

◆ is_empty()

static bool is_empty ( const goto_programt goto_program)
static

◆ is_size_one()

static bool is_size_one ( const goto_programt g)
inlinestatic

This is (believed to be) faster than using std::list.size.

parameters: Goto program 'g'
Returns
True if 'g' has one instruction

Definition at line 1607 of file goto_convert.cpp.

References goto_programt::instructions.

Referenced by goto_convertt::generate_ifthenelse().