GCC Middle and Back End API Reference
|
#include <sm.h>
Data Structures | |
class | state |
Public Types | |
typedef const state_machine::state * | state_t |
Public Member Functions | |
state_machine (const char *name, logger *logger) | |
virtual | ~state_machine () |
virtual bool | inherited_state_p () const =0 |
virtual state_t | alt_get_inherited_state (const sm_state_map &, const svalue *, const extrinsic_state &) const |
virtual bool | has_alt_get_inherited_state_p () const |
virtual state_machine::state_t | get_default_state (const svalue *) const |
const char * | get_name () const |
state_t | get_state_by_name (const char *name) const |
virtual bool | on_stmt (sm_context &sm_ctxt, const supernode *node, const gimple *stmt) const =0 |
virtual void | on_phi (sm_context &sm_ctxt, const supernode *node, const gphi *phi, tree rhs) const |
virtual void | on_condition (sm_context &sm_ctxt, const supernode *node, const gimple *stmt, const svalue *lhs, enum tree_code op, const svalue *rhs) const |
virtual void | on_bounded_ranges (sm_context &sm_ctxt, const supernode *node, const gimple *stmt, const svalue &sval, const bounded_ranges &ranges) const |
virtual void | on_pop_frame (sm_state_map *smap, const frame_region *frame_reg) const |
virtual bool | can_purge_p (state_t s) const =0 |
virtual std::unique_ptr< pending_diagnostic > | on_leak (tree var) const |
virtual bool | reset_when_passed_to_unknown_fn_p (state_t s, bool is_mutable) const |
state_t | maybe_get_merged_state (state_t state_a, state_t state_b) const |
virtual state_t | maybe_get_merged_states_nonequal (state_t state_a, state_t state_b) const |
void | validate (state_t s) const |
void | dump_to_pp (pretty_printer *pp) const |
json::object * | to_json () const |
state_t | get_start_state () const |
logger * | get_logger () const |
void | set_logger (logger *logger) |
void | log (const char *fmt,...) const ATTRIBUTE_GCC_DIAG(2 |
void void | start_log_line () const |
void | end_log_line () const |
void | enter_scope (const char *scope_name) |
void | exit_scope (const char *scope_name) |
pretty_printer * | get_logger_pp () const |
FILE * | get_logger_file () const |
Protected Member Functions | |
state_t | add_state (const char *name) |
state_t | add_custom_state (state *s) |
unsigned | alloc_state_id () |
Protected Attributes | |
state_t | m_start |
Private Member Functions | |
DISABLE_COPY_AND_ASSIGN (state_machine) | |
Private Attributes | |
const char * | m_name |
auto_delete_vec< state > | m_states |
unsigned | m_next_state_id |
logger * | m_logger |
An abstract base class for a state machine describing an API. Manages a set of state objects, and has various virtual functions for pattern-matching on statements.
ana::state_machine::state_machine | ( | const char * | name, |
logger * | logger ) |
|
inlinevirtual |
|
protected |
|
inlineprotected |
References m_next_state_id.
|
inlinevirtual |
References NULL.
Referenced by ana::program_state::can_purge_p().
|
private |
void ana::state_machine::dump_to_pp | ( | pretty_printer * | pp | ) | const |
|
inlineinherited |
A shortcut for ending a log line from a log_user, handling the common case where the underlying logger is NULL via a no-op.
References ana::logger::end_log_line(), and ana::log_user::m_logger.
|
inlineinherited |
A shortcut for recording entry into a scope from a log_user, handling the common case where the underlying logger is NULL via a no-op.
References ana::logger::enter_scope(), and ana::log_user::m_logger.
|
inlineinherited |
A shortcut for recording exit from a scope from a log_user, handling the common case where the underlying logger is NULL via a no-op.
References ana::logger::exit_scope(), and ana::log_user::m_logger.
|
inlinevirtual |
References m_start.
|
inlineinherited |
References ana::log_user::m_logger.
Referenced by ana::exploded_graph::get_logger(), and ana::impl_region_model_context::get_logger().
|
inlineinherited |
References ana::logger::get_file(), ana::log_user::m_logger, and NULL.
|
inlineinherited |
References gcc_assert, ana::logger::get_printer(), and ana::log_user::m_logger.
|
inline |
References m_name.
state_t ana::state_machine::get_state_by_name | ( | const char * | name | ) | const |
|
inlinevirtual |
|
pure virtual |
|
inlineinherited |
A shortcut for calling log from a log_user, handling the common case where the underlying logger is NULL via a no-op.
References ap, ana::logger::log_va(), and ana::log_user::m_logger.
|
inline |
References maybe_get_merged_states_nonequal().
|
inlinevirtual |
References NULL.
Referenced by maybe_get_merged_state().
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
|
inlinevirtual |
|
inlinevirtual |
|
pure virtual |
|
inlinevirtual |
|
inherited |
|
inlineinherited |
A shortcut for starting a log line from a log_user, handling the common case where the underlying logger is NULL via a no-op.
References ana::log_user::m_logger, and ana::logger::start_log_line().
json::object * ana::state_machine::to_json | ( | ) | const |
void ana::state_machine::validate | ( | state_t | s | ) | const |
|
privateinherited |
|
private |
Referenced by get_name().
|
private |
Referenced by alloc_state_id().
|
protected |
Referenced by get_default_state(), and get_start_state().
|
private |
Referenced by add_custom_state().