cprover
reaching_definitions_analysist Class Reference

#include <reaching_definitions.h>

+ Inheritance diagram for reaching_definitions_analysist:
+ Collaboration diagram for reaching_definitions_analysist:

Public Member Functions

 reaching_definitions_analysist (const namespacet &_ns)
 
virtual ~reaching_definitions_analysist ()
 
void initialize (const goto_functionst &goto_functions) override
 Initialize all the abstract states for a whole program. More...
 
statetget_state (locationt l) override
 Get the state for the given location, creating it in a default way if it doesn't exist. More...
 
value_setstget_value_sets () const
 
const is_threadedtget_is_threaded () const
 
const dirtytget_is_dirty () const
 
- Public Member Functions inherited from concurrency_aware_ait< rd_range_domaint >
 concurrency_aware_ait ()
 
bool merge_shared (const statet &src, locationt from, locationt to, const namespacet &ns) override
 This function should not be implemented in sequential analyses. More...
 
- Public Member Functions inherited from ait< rd_range_domaint >
 ait ()
 
rd_range_domaintoperator[] (locationt l)
 
const rd_range_domaintoperator[] (locationt l) const
 
std::unique_ptr< statetabstract_state_before (locationt t) const override
 Get a copy of the abstract state before the given instruction, without needing to know what kind of domain or history is used. More...
 
void clear () override
 Reset the abstract state. More...
 
- Public Member Functions inherited from ai_baset
 ai_baset ()
 
virtual ~ai_baset ()
 
void operator() (const irep_idt &function_identifier, const goto_programt &goto_program, const namespacet &ns)
 Run abstract interpretation on a single function. More...
 
void operator() (const goto_functionst &goto_functions, const namespacet &ns)
 Run abstract interpretation on a whole program. More...
 
void operator() (const goto_modelt &goto_model)
 Run abstract interpretation on a whole program. More...
 
void operator() (const irep_idt &function_identifier, const goto_functionst::goto_functiont &goto_function, const namespacet &ns)
 Run abstract interpretation on a single function. More...
 
virtual std::unique_ptr< statetabstract_state_after (locationt l) const
 Get a copy of the abstract state after the given instruction, without needing to know what kind of domain or history is used. More...
 
virtual void output (const namespacet &ns, const goto_functionst &goto_functions, std::ostream &out) const
 Output the abstract states for a whole program. More...
 
void output (const goto_modelt &goto_model, std::ostream &out) const
 Output the abstract states for a whole program. More...
 
void output (const namespacet &ns, const goto_programt &goto_program, std::ostream &out) const
 Output the abstract states for a function. More...
 
void output (const namespacet &ns, const goto_functionst::goto_functiont &goto_function, std::ostream &out) const
 Output the abstract states for a function. More...
 
virtual jsont output_json (const namespacet &ns, const goto_functionst &goto_functions) const
 Output the abstract states for the whole program as JSON. More...
 
jsont output_json (const goto_modelt &goto_model) const
 Output the abstract states for a whole program as JSON. More...
 
jsont output_json (const namespacet &ns, const goto_programt &goto_program) const
 Output the abstract states for a single function as JSON. More...
 
jsont output_json (const namespacet &ns, const goto_functionst::goto_functiont &goto_function) const
 Output the abstract states for a single function as JSON. More...
 
virtual xmlt output_xml (const namespacet &ns, const goto_functionst &goto_functions) const
 Output the abstract states for the whole program as XML. More...
 
xmlt output_xml (const goto_modelt &goto_model) const
 Output the abstract states for the whole program as XML. More...
 
xmlt output_xml (const namespacet &ns, const goto_programt &goto_program) const
 Output the abstract states for a single function as XML. More...
 
xmlt output_xml (const namespacet &ns, const goto_functionst::goto_functiont &goto_function) const
 Output the abstract states for a single function as XML. More...
 
- Public Member Functions inherited from sparse_bitvector_analysist< reaching_definitiont >
const reaching_definitiontget (const std::size_t value_index) const
 
std::size_t add (const reaching_definitiont &value)
 
void clear ()
 

Protected Attributes

const namespacetns
 
std::unique_ptr< value_setstvalue_sets
 
std::unique_ptr< is_threadedtis_threaded
 
std::unique_ptr< dirtytis_dirty
 
- Protected Attributes inherited from ait< rd_range_domaint >
state_mapt state_map
 
- Protected Attributes inherited from sparse_bitvector_analysist< reaching_definitiont >
std::vector< typename inner_mapt::const_iterator > values
 It is a map from an ID to the corresponding reaching_definitiont instance inside the map value_map. More...
 
std::unordered_map< irep_idt, inner_maptvalue_map
 A map from names of program variables to a set of pairs (reaching_definitiont, ID). More...
 

Additional Inherited Members

- Public Types inherited from concurrency_aware_ait< rd_range_domaint >
using statet = typename ait< rd_range_domaint >::statet
 
using locationt = typename statet::locationt
 
- Public Types inherited from ait< rd_range_domaint >
typedef goto_programt::const_targett locationt
 
- Public Types inherited from ai_baset
typedef ai_domain_baset statet
 
typedef goto_programt::const_targett locationt
 
- Protected Types inherited from ait< rd_range_domaint >
typedef std::unordered_map< locationt, rd_range_domaint, const_target_hash, pointee_address_equaltstate_mapt
 
- Protected Types inherited from ai_baset
typedef std::map< unsigned, locationtworking_sett
 The work queue, sorted by location number. More...
 
- Protected Types inherited from sparse_bitvector_analysist< reaching_definitiont >
typedef std::map< reaching_definitiont, std::size_t > inner_mapt
 
- Protected Member Functions inherited from concurrency_aware_ait< rd_range_domaint >
void fixedpoint (const goto_functionst &goto_functions, const namespacet &ns) override
 
- Protected Member Functions inherited from ait< rd_range_domaint >
const statetfind_state (locationt l) const override
 Get the state for the given location if it already exists; throw an exception if it doesn't. More...
 
bool merge (const statet &src, locationt from, locationt to) override
 
std::unique_ptr< statetmake_temporary_state (const statet &s) override
 Make a copy of a state. More...
 
- Protected Member Functions inherited from ai_baset
virtual void initialize (const goto_programt &goto_program)
 Initialize all the abstract states for a single function. More...
 
virtual void initialize (const goto_functionst::goto_functiont &goto_function)
 Initialize all the abstract states for a single function. More...
 
virtual void finalize ()
 Override this to add a cleanup or post-processing step after fixedpoint has run. More...
 
void entry_state (const goto_programt &goto_program)
 Set the abstract state of the entry location of a single function to the entry state required by the analysis. More...
 
void entry_state (const goto_functionst &goto_functions)
 Set the abstract state of the entry location of a whole program to the entry state required by the analysis. More...
 
virtual void output (const namespacet &ns, const goto_programt &goto_program, const irep_idt &identifier, std::ostream &out) const
 Output the abstract states for a single function. More...
 
virtual jsont output_json (const namespacet &ns, const goto_programt &goto_program, const irep_idt &identifier) const
 Output the abstract states for a single function as JSON. More...
 
virtual xmlt output_xml (const namespacet &ns, const goto_programt &goto_program, const irep_idt &identifier) const
 Output the abstract states for a single function as XML. More...
 
locationt get_next (working_sett &working_set)
 Get the next location from the work queue. More...
 
void put_in_working_set (working_sett &working_set, locationt l)
 
bool fixedpoint (const irep_idt &function_identifier, const goto_programt &goto_program, const goto_functionst &goto_functions, const namespacet &ns)
 Run the fixedpoint algorithm until it reaches a fixed point. More...
 
void sequential_fixedpoint (const goto_functionst &goto_functions, const namespacet &ns)
 
void concurrent_fixedpoint (const goto_functionst &goto_functions, const namespacet &ns)
 
bool visit (const irep_idt &function_identifier, locationt l, working_sett &working_set, const goto_programt &goto_program, const goto_functionst &goto_functions, const namespacet &ns)
 Perform one step of abstract interpretation from location l Depending on the instruction type it may compute a number of "edges" or applications of the abstract transformer. More...
 
bool do_function_call_rec (const irep_idt &calling_function_identifier, locationt l_call, locationt l_return, const exprt &function, const exprt::operandst &arguments, const goto_functionst &goto_functions, const namespacet &ns)
 
bool do_function_call (const irep_idt &calling_function_identifier, locationt l_call, locationt l_return, const goto_functionst &goto_functions, const goto_functionst::function_mapt::const_iterator f_it, const exprt::operandst &arguments, const namespacet &ns)
 

Detailed Description

Definition at line 340 of file reaching_definitions.h.

Constructor & Destructor Documentation

◆ reaching_definitions_analysist()

reaching_definitions_analysist::reaching_definitions_analysist ( const namespacet _ns)
explicit

Definition at line 29 of file reaching_definitions.cpp.

◆ ~reaching_definitions_analysist()

reaching_definitions_analysist::~reaching_definitions_analysist ( )
virtualdefault

Member Function Documentation

◆ get_is_dirty()

const dirtyt& reaching_definitions_analysist::get_is_dirty ( ) const
inline

Definition at line 379 of file reaching_definitions.h.

◆ get_is_threaded()

const is_threadedt& reaching_definitions_analysist::get_is_threaded ( ) const
inline

Definition at line 373 of file reaching_definitions.h.

◆ get_state()

statet& reaching_definitions_analysist::get_state ( locationt  l)
inlineoverridevirtual

Get the state for the given location, creating it in a default way if it doesn't exist.

Reimplemented from ait< rd_range_domaint >.

Definition at line 352 of file reaching_definitions.h.

◆ get_value_sets()

value_setst& reaching_definitions_analysist::get_value_sets ( ) const
inline

Definition at line 367 of file reaching_definitions.h.

◆ initialize()

void reaching_definitions_analysist::initialize ( const goto_functionst goto_functions)
overridevirtual

Initialize all the abstract states for a whole program.

Override this to do custom per-analysis initialization.

Reimplemented from ai_baset.

Definition at line 745 of file reaching_definitions.cpp.

Member Data Documentation

◆ is_dirty

std::unique_ptr<dirtyt> reaching_definitions_analysist::is_dirty
protected

Definition at line 389 of file reaching_definitions.h.

◆ is_threaded

std::unique_ptr<is_threadedt> reaching_definitions_analysist::is_threaded
protected

Definition at line 388 of file reaching_definitions.h.

◆ ns

const namespacet& reaching_definitions_analysist::ns
protected

Definition at line 386 of file reaching_definitions.h.

◆ value_sets

std::unique_ptr<value_setst> reaching_definitions_analysist::value_sets
protected

Definition at line 387 of file reaching_definitions.h.


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