21#ifndef GCC_ANALYZER_PROGRAM_STATE_H
22#define GCC_ANALYZER_PROGRAM_STATE_H
24#include "text-art/widget.h"
58 std::unique_ptr<json::object>
to_json ()
const;
100 return !(*
this == other);
108 typedef hash_map <const svalue *, entry_t>
map_t;
116 bool simple,
bool multiline,
120 std::unique_ptr<json::object>
to_json ()
const;
122 std::unique_ptr<text_art::tree_widget>
133 return !(*
this == other);
221 return !(*
this == other);
230 bool multiline, FILE *
outf)
const;
234 std::unique_ptr<json::object>
237 std::unique_ptr<text_art::tree_widget>
245 const gcall *call_stmt,
250 const gcall *call_stmt,
283 const region *base_reg)
const;
332 const svalue *dst_origin_sval) = 0;
Definition call-summary.h:68
Definition region-model.h:1241
Definition constraint-manager.h:255
Definition exploded-graph.h:791
Definition exploded-graph.h:203
Definition program-state.h:31
void dump_to_file(FILE *outf) const
bool get_sm_idx_by_name(const char *name, unsigned *out) const
unsigned get_num_checkers() const
Definition program-state.h:50
logger * get_logger() const
Definition program-state.h:52
std::unique_ptr< json::object > to_json() const
const char * get_name(int idx) const
Definition program-state.h:45
logger * m_logger
Definition program-state.h:69
void dump_to_pp(pretty_printer *pp) const
region_model_manager * get_model_manager() const
engine * m_engine
Definition program-state.h:70
engine * get_engine() const
Definition program-state.h:60
extrinsic_state(auto_delete_vec< state_machine > &checkers, engine *eng, logger *logger=NULL)
Definition program-state.h:33
const state_machine & get_sm(int idx) const
Definition program-state.h:40
auto_delete_vec< state_machine > & m_checkers
Definition program-state.h:67
Definition exploded-graph.h:39
Definition analyzer-logging.h:34
Definition program-point.h:175
Definition program-state.h:209
void push_call(exploded_graph &eg, exploded_node *enode, const gcall *call_stmt, uncertainty_t *uncertainty)
bool can_purge_base_region_p(const extrinsic_state &ext_state, const region *base_reg) const
program_state prune_for_point(exploded_graph &eg, const program_point &point, exploded_node *enode_for_diag, uncertainty_t *uncertainty) const
std::unique_ptr< json::object > to_json(const extrinsic_state &ext_state) const
void dump(const extrinsic_state &ext_state, bool simple) const
bool operator!=(const program_state &other) const
Definition program-state.h:219
program_state(const program_state &other)
void push_frame(const extrinsic_state &ext_state, const function &fun)
bool operator==(const program_state &other) const
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)
void dump_to_file(const extrinsic_state &ext_state, bool simple, bool multiline, FILE *outf) const
void print(const extrinsic_state &ext_state, pretty_printer *pp) const
bool replay_call_summary(call_summary_replay &r, const program_state &summary)
program_state & operator=(const program_state &other)
bool on_edge(exploded_graph &eg, exploded_node *enode, const superedge *succ, uncertainty_t *uncertainty)
program_state(program_state &&other)
void validate(const extrinsic_state &ext_state) const
auto_delete_vec< sm_state_map > m_checker_states
Definition program-state.h:307
void impl_call_analyzer_dump_state(const gcall *call, const extrinsic_state &ext_state, region_model_context *ctxt)
bool can_merge_with_p(const program_state &other, const extrinsic_state &ext_state, const program_point &point, program_state *out) const
region_model * m_region_model
Definition program-state.h:306
bool can_purge_p(const extrinsic_state &ext_state, const svalue *sval) const
Definition program-state.h:266
void returning_call(exploded_graph &eg, exploded_node *enode, const gcall *call_stmt, uncertainty_t *uncertainty)
std::unique_ptr< text_art::tree_widget > make_dump_widget(const text_art::dump_widget_info &dwi) const
const function * get_current_function() const
tree get_representative_tree(const svalue *sval) const
void dump_to_pp(const extrinsic_state &ext_state, bool simple, bool multiline, pretty_printer *pp) const
bool m_valid
Definition program-state.h:312
program_state(const extrinsic_state &ext_state)
Definition region-model.h:718
Definition region-model-manager.h:32
Definition region-model.h:263
Definition program-state.h:77
bool operator==(const sm_state_map &other) const
bool can_merge_with_p(const sm_state_map &other, const state_machine &sm, const extrinsic_state &ext_state, sm_state_map **out) const
static const svalue * canonicalize_svalue(const svalue *sval, const extrinsic_state &ext_state)
static int cmp(const sm_state_map &smap_a, const sm_state_map &smap_b)
iterator_t begin() const
Definition program-state.h:174
state_machine::state_t m_global_state
Definition program-state.h:194
state_machine::state_t get_state(const svalue *sval, const extrinsic_state &ext_state) const
const state_machine & m_sm
Definition program-state.h:192
sm_state_map * clone() const
size_t elements() const
Definition program-state.h:176
void print(const region_model *model, bool simple, bool multiline, pretty_printer *pp) const
map_t m_map
Definition program-state.h:193
std::unique_ptr< json::object > to_json() const
void set_state(region_model *model, const svalue *sval, state_machine::state_t state, const svalue *origin, const extrinsic_state &ext_state)
bool operator!=(const sm_state_map &other) const
Definition program-state.h:131
bool impl_set_state(const svalue *sval, state_machine::state_t state, const svalue *origin, const extrinsic_state &ext_state)
void clear_any_state(const svalue *sval)
void on_svalue_leak(const svalue *sval, impl_region_model_context *ctxt)
state_machine::state_t get_global_state() const
const svalue * get_origin(const svalue *sval, const extrinsic_state &ext_state) const
iterator_t end() const
Definition program-state.h:175
void on_unknown_change(const svalue *sval, bool is_mutable, const extrinsic_state &ext_state)
map_t::iterator iterator_t
Definition program-state.h:109
void clear_all_per_svalue_state()
void purge_state_involving(const svalue *sval, const extrinsic_state &ext_state)
bool set_state(const equiv_class &ec, state_machine::state_t state, const svalue *origin, const extrinsic_state &ext_state)
std::unique_ptr< text_art::tree_widget > make_dump_widget(const text_art::dump_widget_info &dwi, const region_model *model) const
void set_global_state(state_machine::state_t state)
void on_liveness_change(const svalue_set &live_svalues, const region_model *model, const extrinsic_state &ext_state, impl_region_model_context *ctxt)
hash_map< const svalue *, entry_t > map_t
Definition program-state.h:108
bool replay_call_summary(call_summary_replay &r, const sm_state_map &summary)
sm_state_map(const state_machine &sm)
void dump(bool simple) const
Definition program-state.h:318
virtual bool on_state_change(const state_machine &sm, state_machine::state_t src_sm_val, state_machine::state_t dst_sm_val, const svalue *dst_sval, const svalue *dst_origin_sval)=0
virtual ~state_change_visitor()
Definition program-state.h:320
virtual bool on_global_state_change(const state_machine &sm, state_machine::state_t src_sm_val, state_machine::state_t dst_sm_val)=0
virtual bool can_purge_p(state_t s) const =0
Definition supergraph.h:314
Definition region-model.h:222
iterator begin() const
Definition hash-map.h:302
size_t elements() const
Definition hash-map.h:247
iterator end() const
Definition hash-map.h:303
Definition pretty-print.h:241
union tree_node * tree
Definition coretypes.h:97
Definition access-diagram.h:30
bool for_each_state_change(const program_state &src_state, const program_state &dst_state, const extrinsic_state &ext_state, state_change_visitor *visitor)
poly_int< N, C > r
Definition poly-int.h:774
i
Definition poly-int.h:776
Definition program-state.h:81
static int cmp(const entry_t &entry_a, const entry_t &entry_b)
bool operator==(const entry_t &other) const
Definition program-state.h:93
entry_t(state_machine::state_t state, const svalue *origin)
Definition program-state.h:88
entry_t()
Definition program-state.h:83
state_machine::state_t m_state
Definition program-state.h:105
bool operator!=(const entry_t &other) const
Definition program-state.h:98
const svalue * m_origin
Definition program-state.h:106
Definition function.h:249
Definition gengtype.h:377
Definition genautomata.cc:669
#define NULL
Definition system.h:50
#define FOR_EACH_VEC_ELT(V, I, P)
Definition vec.h:1884