|
CBMC
|
#include "remove_returns.h"#include <util/std_code.h>#include <util/std_expr.h>#include <util/suffix.h>#include "goto_model.h"#include "remove_skip.h"
Include dependency graph for remove_returns.cpp:Go to the source code of this file.
Classes | |
| class | remove_returnst |
Macros | |
| #define | RETURN_VALUE_SUFFIX "#return_value" |
Functions | |
| void | remove_returns (symbol_table_baset &symbol_table, goto_functionst &goto_functions) |
| removes returns More... | |
| void | remove_returns (goto_model_functiont &goto_model_function, function_is_stubt function_is_stub) |
| Removes returns from a single function. More... | |
| void | remove_returns (goto_modelt &goto_model) |
| removes returns More... | |
| void | restore_returns (goto_modelt &goto_model) |
| restores return statements More... | |
| irep_idt | return_value_identifier (const irep_idt &identifier) |
| produces the identifier that is used to store the return value of the function with the given identifier More... | |
| symbol_exprt | return_value_symbol (const irep_idt &identifier, const namespacet &ns) |
| produces the symbol that is used to store the return value of the function with the given identifier More... | |
| bool | is_return_value_identifier (const irep_idt &id) |
Returns true if id is a special return-value symbol produced by return_value_identifier. More... | |
| 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. More... | |
| bool | does_function_call_return (const goto_programt::instructiont &function_call) |
Check if the function_call returns anything. More... | |
Replace function returns by assignments to global variables
Definition in file remove_returns.cpp.
| #define RETURN_VALUE_SUFFIX "#return_value" |
Definition at line 24 of file remove_returns.cpp.
| bool does_function_call_return | ( | const goto_programt::instructiont & | function_call | ) |
Check if the function_call returns anything.
| function_call | the function call to be investigated |
Definition at line 426 of file remove_returns.cpp.
| bool is_return_value_identifier | ( | const irep_idt & | id | ) |
Returns true if id is a special return-value symbol produced by return_value_identifier.
Definition at line 416 of file remove_returns.cpp.
| 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.
Definition at line 421 of file remove_returns.cpp.
| void remove_returns | ( | goto_model_functiont & | goto_model_function, |
| function_is_stubt | function_is_stub | ||
| ) |
Removes returns from a single function.
Only usable with Java programs at the moment; to use it with other languages, they must annotate their stub functions with ID_C_incomplete as currently done in java_bytecode_convert_method.cpp.
This will generate #return_value variables, if not already present, for both the function being altered and any callees.
| goto_model_function | function to transform |
| function_is_stub | function that will be used to test whether a given callee has been or will be given a body. It should return true if so, or false if the function will remain a bodyless stub. |
Definition at line 274 of file remove_returns.cpp.
| void remove_returns | ( | goto_modelt & | goto_model | ) |
removes returns
Definition at line 283 of file remove_returns.cpp.
| void remove_returns | ( | symbol_table_baset & | symbol_table, |
| goto_functionst & | goto_functions | ||
| ) |
removes returns
Definition at line 255 of file remove_returns.cpp.
| void restore_returns | ( | goto_modelt & | goto_model | ) |
restores return statements
Definition at line 397 of file remove_returns.cpp.
produces the identifier that is used to store the return value of the function with the given identifier
Definition at line 403 of file remove_returns.cpp.
| symbol_exprt return_value_symbol | ( | const irep_idt & | identifier, |
| const namespacet & | ns | ||
| ) |
produces the symbol that is used to store the return value of the function with the given identifier
Definition at line 409 of file remove_returns.cpp.