|
ESBMC
Efficient SMT-based Context-Bounded Model Checker
|
A generic container class for a control flow graph for one function, in the form of a goto-program. More...
#include <goto_program.h>
Classes | |
| class | instructiont |
| Container for an instruction of the goto-program. More... | |
Public Types | |
| typedef std::list< class instructiont > | instructionst |
| typedef instructionst::iterator | targett |
| typedef instructionst::const_iterator | const_targett |
| typedef std::list< targett > | targetst |
| typedef std::list< const_targett > | const_targetst |
| typedef std::set< irep_idt > | decl_identifierst |
Public Member Functions | |
| goto_programt (const goto_programt &src) | |
| copy constructor | |
| goto_programt & | operator= (const goto_programt &src) |
| assignment operator | |
| void | get_successors (const_targett target, const_targetst &successors) const |
| void | insert_swap (targett target) |
| Insertion that preserves jumps to "target". | |
| void | insert_swap (targett target, instructiont &instruction) |
| void | insert_swap (targett target, goto_programt &p) |
| targett | insert (targett target) |
| void | destructive_append (goto_programt &p) |
| Appends the given program, which is destroyed. | |
| void | destructive_insert (targett target, goto_programt &p) |
| targett | add_instruction () |
| targett | add_instruction (instructiont &instruction) |
| targett | add_instruction (goto_program_instruction_typet type) |
| void | dump () const |
| Output goto program to given stream. | |
| std::ostream & | output (const namespacet &ns, const irep_idt &identifier, std::ostream &out) const |
| Output goto-program to given stream. | |
| void | update_instructions_function (const irep_idt &function_id, bool force=false) |
Sets the function member of each instruction if not yet set, or unconditionally when force is true (e.g. | |
| void | compute_target_numbers () |
| Compute the target numbers. | |
| void | compute_location_numbers (unsigned &nr) |
| Compute location numbers. | |
| void | compute_location_numbers () |
| Compute location numbers. | |
| void | compute_loop_numbers (unsigned int &num) |
| Compute loop numbers. | |
| void | update () |
| Update all indices. | |
| bool | empty () const |
| Is the program empty? | |
| goto_programt () | |
| Constructor. | |
| virtual | ~goto_programt ()=default |
| void | swap (goto_programt &program) |
| Swap the goto program. | |
| void | clear () |
| Clear the goto program. | |
| void | copy_from (const goto_programt &src) |
| Copy a full goto program, preserving targets. | |
| void | get_decl_identifiers (decl_identifierst &decl_identifiers) const |
| get the variables in decl statements | |
Public Attributes | |
| bool | hide |
| instructionst | instructions |
| The list of instructions in the goto program. | |
A generic container class for a control flow graph for one function, in the form of a goto-program.
| typedef std::list<const_targett> goto_programt::const_targetst |
| typedef instructionst::const_iterator goto_programt::const_targett |
| typedef std::set<irep_idt> goto_programt::decl_identifierst |
| typedef std::list<class instructiont> goto_programt::instructionst |
| typedef std::list<targett> goto_programt::targetst |
| typedef instructionst::iterator goto_programt::targett |
|
inline |
copy constructor
| [in] | src | the goto program to copy from |
|
inline |
Constructor.
|
virtualdefault |
|
inline |
Adds an instruction at the end.
|
inline |
Adds an instruction of given type at the end.
|
inline |
Adds a copy of the given instruction at the end.
|
inline |
Clear the goto program.
|
inline |
Compute location numbers.
|
inline |
Compute location numbers.
| void goto_programt::compute_loop_numbers | ( | unsigned int & | num | ) |
Compute loop numbers.
| void goto_programt::compute_target_numbers | ( | ) |
Compute the target numbers.
| void goto_programt::copy_from | ( | const goto_programt & | src | ) |
Copy a full goto program, preserving targets.
|
inline |
Appends the given program, which is destroyed.
|
inline |
Inserts the given program at the given location. The program is destroyed.
| void goto_programt::dump | ( | ) | const |
Output goto program to given stream.
|
inline |
Is the program empty?
| void goto_programt::get_decl_identifiers | ( | decl_identifierst & | decl_identifiers | ) | const |
get the variables in decl statements
| void goto_programt::get_successors | ( | const_targett | target, |
| const_targetst & | successors ) const |
Insertion before the given target
|
inline |
Insertion that preserves jumps to "target".
|
inline |
Insertion that preserves jumps to "target". The program p is destroyed.
|
inline |
Insertion that preserves jumps to "target". The instruction is destroyed.
|
inline |
assignment operator
| [in] | src | the goto program to copy from |
| std::ostream & goto_programt::output | ( | const namespacet & | ns, |
| const irep_idt & | identifier, | ||
| std::ostream & | out ) const |
Output goto-program to given stream.
|
inline |
Swap the goto program.
| void goto_programt::update | ( | ) |
Update all indices.
|
inline |
Sets the function member of each instruction if not yet set, or unconditionally when force is true (e.g.
to re-tag a body copied from another function, as contract renaming does). Note that a goto program need not be a goto function and therefore, we cannot do this in update(), but only at the level of of goto_functionst where goto programs are guaranteed to be named functions.
| bool goto_programt::hide |
| instructionst goto_programt::instructions |
The list of instructions in the goto program.