GCC Middle and Back End API Reference
ana::program_state Class Reference

#include <program-state.h>

Collaboration diagram for ana::program_state:

Public Member Functions

 program_state (const extrinsic_state &ext_state)
 program_state (const program_state &other)
program_stateoperator= (const program_state &other)
 program_state (program_state &&other)
 ~program_state ()
hashval_t hash () const
bool operator== (const program_state &other) const
bool operator!= (const program_state &other) const
void print (const extrinsic_state &ext_state, pretty_printer *pp) const
void dump_to_pp (const extrinsic_state &ext_state, bool simple, bool multiline, pretty_printer *pp) const
void dump_to_file (const extrinsic_state &ext_state, bool simple, bool multiline, FILE *outf) const
void dump (const extrinsic_state &ext_state, bool simple) const
json::objectto_json (const extrinsic_state &ext_state) const
void push_frame (const extrinsic_state &ext_state, const function &fun)
const functionget_current_function () const
void push_call (exploded_graph &eg, exploded_node *enode, const gcall *call_stmt, uncertainty_t *uncertainty)
void returning_call (exploded_graph &eg, exploded_node *enode, const gcall *call_stmt, uncertainty_t *uncertainty)
bool on_edge (exploded_graph &eg, exploded_node *enode, const superedge *succ, uncertainty_t *uncertainty)
program_state prune_for_point (exploded_graph &eg, const program_point &point, exploded_node *enode_for_diag, uncertainty_t *uncertainty) const
tree get_representative_tree (const svalue *sval) const
bool can_purge_p (const extrinsic_state &ext_state, const svalue *sval) const
bool can_purge_base_region_p (const extrinsic_state &ext_state, const region *base_reg) const
bool can_merge_with_p (const program_state &other, const extrinsic_state &ext_state, const program_point &point, program_state *out) const
void validate (const extrinsic_state &ext_state) const
bool replay_call_summary (call_summary_replay &r, const program_state &summary)
void impl_call_analyzer_dump_state (const gcall *call, const extrinsic_state &ext_state, region_model_context *ctxt)

Static Public Member Functions

static void detect_leaks (const program_state &src_state, const program_state &dest_state, const svalue *extra_sval, const extrinsic_state &ext_state, region_model_context *ctxt)

Data Fields

auto_delete_vec< sm_state_mapm_checker_states
bool m_valid

Detailed Description

A class for representing the state of interest at a given path of

Currently this is a combination of:
(a) a region_model, giving:
   (a.1) a hierarchy of memory regions
   (a.2) values for the regions
   (a.3) inequalities between values
(b) sm_state_maps per state machine, giving a sparse mapping of
    values to states.   

Constructor & Destructor Documentation

◆ program_state() [1/3]

ana::program_state::program_state ( const extrinsic_state & ext_state)

◆ program_state() [2/3]

ana::program_state::program_state ( const program_state & other)

◆ program_state() [3/3]

ana::program_state::program_state ( program_state && other)

◆ ~program_state()

ana::program_state::~program_state ( )

Member Function Documentation

◆ can_merge_with_p()

bool ana::program_state::can_merge_with_p ( const program_state & other,
const extrinsic_state & ext_state,
const program_point & point,
program_state * out ) const

◆ can_purge_base_region_p()

bool ana::program_state::can_purge_base_region_p ( const extrinsic_state & ext_state,
const region * base_reg ) const

◆ can_purge_p()

bool ana::program_state::can_purge_p ( const extrinsic_state & ext_state,
const svalue * sval ) const

◆ detect_leaks()

static void ana::program_state::detect_leaks ( const program_state & src_state,
const program_state & dest_state,
const svalue * extra_sval,
const extrinsic_state & ext_state,
region_model_context * ctxt )

◆ dump()

void ana::program_state::dump ( const extrinsic_state & ext_state,
bool simple ) const

◆ dump_to_file()

void ana::program_state::dump_to_file ( const extrinsic_state & ext_state,
bool simple,
bool multiline,
FILE * outf ) const

◆ dump_to_pp()

void ana::program_state::dump_to_pp ( const extrinsic_state & ext_state,
bool simple,
bool multiline,
pretty_printer * pp ) const

◆ get_current_function()

const function * ana::program_state::get_current_function ( ) const

◆ get_representative_tree()

tree ana::program_state::get_representative_tree ( const svalue * sval) const

◆ hash()

hashval_t ana::program_state::hash ( ) const

◆ impl_call_analyzer_dump_state()

void ana::program_state::impl_call_analyzer_dump_state ( const gcall * call,
const extrinsic_state & ext_state,
region_model_context * ctxt )

◆ on_edge()

bool ana::program_state::on_edge ( exploded_graph & eg,
exploded_node * enode,
const superedge * succ,
uncertainty_t * uncertainty )

◆ operator!=()

bool ana::program_state::operator!= ( const program_state & other) const

◆ operator=()

program_state & ana::program_state::operator= ( const program_state & other)

◆ operator==()

bool ana::program_state::operator== ( const program_state & other) const

◆ print()

void ana::program_state::print ( const extrinsic_state & ext_state,
pretty_printer * pp ) const

◆ prune_for_point()

program_state ana::program_state::prune_for_point ( exploded_graph & eg,
const program_point & point,
exploded_node * enode_for_diag,
uncertainty_t * uncertainty ) const

◆ push_call()

void ana::program_state::push_call ( exploded_graph & eg,
exploded_node * enode,
const gcall * call_stmt,
uncertainty_t * uncertainty )

◆ push_frame()

void ana::program_state::push_frame ( const extrinsic_state & ext_state,
const function & fun )

◆ replay_call_summary()

bool ana::program_state::replay_call_summary ( call_summary_replay & r,
const program_state & summary )

◆ returning_call()

void ana::program_state::returning_call ( exploded_graph & eg,
exploded_node * enode,
const gcall * call_stmt,
uncertainty_t * uncertainty )

◆ to_json()

json::object * ana::program_state::to_json ( const extrinsic_state & ext_state) const

◆ validate()

void ana::program_state::validate ( const extrinsic_state & ext_state) const

Field Documentation

◆ m_checker_states

auto_delete_vec<sm_state_map> ana::program_state::m_checker_states

Referenced by can_purge_p().

◆ m_region_model

region_model* ana::program_state::m_region_model

◆ m_valid

bool ana::program_state::m_valid

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