cprover
goto_functionst Class Reference

A collection of goto functions. More...

#include <goto_functions.h>

+ Collaboration diagram for goto_functionst:

Public Types

using goto_functiont = ::goto_functiont
 
typedef std::map< irep_idt, goto_functiontfunction_mapt
 

Public Member Functions

 goto_functionst ()
 
 goto_functionst (const goto_functionst &)=delete
 
goto_functionstoperator= (const goto_functionst &)=delete
 
 goto_functionst (goto_functionst &&other)
 
goto_functionstoperator= (goto_functionst &&other)
 
void unload (const irep_idt &name)
 Remove function from the function map. More...
 
void clear ()
 
void compute_location_numbers ()
 
void compute_location_numbers (goto_programt &)
 
void compute_loop_numbers ()
 
void compute_target_numbers ()
 
void compute_incoming_edges ()
 
void update_instructions_function ()
 update the function member in each instruction by setting it to the goto function's identifier More...
 
void update ()
 
void swap (goto_functionst &other)
 
void copy_from (const goto_functionst &other)
 
std::vector< function_mapt::const_iterator > sorted () const
 returns a vector of the iterators in alphabetical order More...
 
std::vector< function_mapt::iterator > sorted ()
 returns a vector of the iterators in alphabetical order More...
 
void validate (const namespacet &ns, const validation_modet vm) const
 Check that the goto functions are well-formed. More...
 

Static Public Member Functions

static irep_idt entry_point ()
 Get the identifier of the entry point to a goto model. More...
 

Public Attributes

function_mapt function_map
 

Private Attributes

unsigned unused_location_number
 A location number such that numbers in the interval [unused_location_number, MAX_UINT] are all unused. More...
 

Detailed Description

A collection of goto functions.

Definition at line 22 of file goto_functions.h.

Member Typedef Documentation

◆ function_mapt

Definition at line 26 of file goto_functions.h.

◆ goto_functiont

Definition at line 25 of file goto_functions.h.

Constructor & Destructor Documentation

◆ goto_functionst() [1/3]

goto_functionst::goto_functionst ( )
inline

Definition at line 38 of file goto_functions.h.

◆ goto_functionst() [2/3]

goto_functionst::goto_functionst ( const goto_functionst )
delete

◆ goto_functionst() [3/3]

goto_functionst::goto_functionst ( goto_functionst &&  other)
inline

Definition at line 54 of file goto_functions.h.

Member Function Documentation

◆ clear()

void goto_functionst::clear ( void  )
inline

Definition at line 70 of file goto_functions.h.

◆ compute_incoming_edges()

void goto_functionst::compute_incoming_edges ( )

Definition at line 36 of file goto_functions.cpp.

◆ compute_location_numbers() [1/2]

void goto_functionst::compute_location_numbers ( )

Definition at line 18 of file goto_functions.cpp.

◆ compute_location_numbers() [2/2]

void goto_functionst::compute_location_numbers ( goto_programt program)

Definition at line 28 of file goto_functions.cpp.

◆ compute_loop_numbers()

void goto_functionst::compute_loop_numbers ( )

Definition at line 52 of file goto_functions.cpp.

◆ compute_target_numbers()

void goto_functionst::compute_target_numbers ( )

Definition at line 44 of file goto_functions.cpp.

◆ copy_from()

void goto_functionst::copy_from ( const goto_functionst other)
inline

Definition at line 112 of file goto_functions.h.

◆ entry_point()

static irep_idt goto_functionst::entry_point ( )
inlinestatic

Get the identifier of the entry point to a goto model.

Definition at line 101 of file goto_functions.h.

◆ operator=() [1/2]

goto_functionst& goto_functionst::operator= ( const goto_functionst )
delete

◆ operator=() [2/2]

goto_functionst& goto_functionst::operator= ( goto_functionst &&  other)
inline

Definition at line 60 of file goto_functions.h.

◆ sorted() [1/2]

std::vector< goto_functionst::function_mapt::const_iterator > goto_functionst::sorted ( ) const

returns a vector of the iterators in alphabetical order

Definition at line 62 of file goto_functions.cpp.

◆ sorted() [2/2]

std::vector< goto_functionst::function_mapt::iterator > goto_functionst::sorted ( )

returns a vector of the iterators in alphabetical order

Definition at line 82 of file goto_functions.cpp.

◆ swap()

void goto_functionst::swap ( goto_functionst other)
inline

Definition at line 107 of file goto_functions.h.

◆ unload()

void goto_functionst::unload ( const irep_idt name)
inline

Remove function from the function map.

Definition at line 68 of file goto_functions.h.

◆ update()

void goto_functionst::update ( )
inline

Definition at line 91 of file goto_functions.h.

◆ update_instructions_function()

void goto_functionst::update_instructions_function ( )
inline

update the function member in each instruction by setting it to the goto function's identifier

Definition at line 83 of file goto_functions.h.

◆ validate()

void goto_functionst::validate ( const namespacet ns,
const validation_modet  vm 
) const
inline

Check that the goto functions are well-formed.

The validation mode indicates whether well-formedness check failures are reported via DATA_INVARIANT violations or exceptions.

Definition at line 125 of file goto_functions.h.

Member Data Documentation

◆ function_map

function_mapt goto_functionst::function_map

Definition at line 27 of file goto_functions.h.

◆ unused_location_number

unsigned goto_functionst::unused_location_number
private

A location number such that numbers in the interval [unused_location_number, MAX_UINT] are all unused.

There might still be unused numbers below this. If numbering a new function or renumbering a function, starting from this number is safe.

Definition at line 35 of file goto_functions.h.


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