CBMC
remove_returns.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Remove function returns
4 
5 Author: Daniel Kroening
6 
7 Date: September 2009
8 
9 \*******************************************************************/
10 
13 
70 
71 #ifndef CPROVER_GOTO_PROGRAMS_REMOVE_RETURNS_H
72 #define CPROVER_GOTO_PROGRAMS_REMOVE_RETURNS_H
73 
74 #include <util/irep.h>
75 
76 #include "goto_program.h"
77 
78 #include <functional>
79 
80 class goto_functionst;
82 class goto_modelt;
83 class symbol_table_baset;
84 class symbol_exprt;
85 
87 
88 typedef std::function<bool(const irep_idt &)> function_is_stubt;
89 
91 
93 
94 // reverse the above operations
96 
98 
102 
106 
109 bool is_return_value_identifier(const irep_idt &id);
110 
113 bool is_return_value_symbol(const symbol_exprt &symbol_expr);
114 
119  const goto_programt::instructiont &function_call);
120 
121 #endif // CPROVER_GOTO_PROGRAMS_REMOVE_RETURNS_H
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:38
A collection of goto functions.
Interface providing access to a single function in a GOTO model, plus its associated symbol table.
Definition: goto_model.h:190
This class represents an instruction in the GOTO intermediate representation.
Definition: goto_program.h:181
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition: namespace.h:94
Expression to hold a symbol (variable)
Definition: std_expr.h:131
The symbol table base class interface.
Concrete Goto Program.
bool is_return_value_identifier(const irep_idt &id)
Returns true if id is a special return-value symbol produced by return_value_identifier.
bool does_function_call_return(const goto_programt::instructiont &function_call)
Check if the function_call returns anything.
void restore_returns(symbol_table_baset &, goto_functionst &)
std::function< bool(const irep_idt &)> function_is_stubt
bool is_return_value_symbol(const symbol_exprt &symbol_expr)
Returns true if symbol_expr is a special return-value symbol produced by return_value_symbol.
symbol_exprt return_value_symbol(const irep_idt &, const namespacet &)
produces the symbol that is used to store the return value of the function with the given identifier
irep_idt return_value_identifier(const irep_idt &)
produces the identifier that is used to store the return value of the function with the given identif...
void remove_returns(symbol_table_baset &, goto_functionst &)
removes returns