GCC Middle and Back End API Reference
ana::sm_context Class Referenceabstract

#include <sm.h>

Collaboration diagram for ana::sm_context:

Public Member Functions

virtual ~sm_context ()
 
virtual tree get_fndecl_for_call (const gcall *call)=0
 
virtual state_machine::state_t get_state (const gimple *stmt, tree var)=0
 
virtual state_machine::state_t get_state (const gimple *stmt, const svalue *)=0
 
virtual void set_next_state (const gimple *stmt, tree var, state_machine::state_t to, tree origin=NULL_TREE)=0
 
virtual void set_next_state (const gimple *stmt, const svalue *var, state_machine::state_t to, tree origin=NULL_TREE)=0
 
void on_transition (const supernode *node, const gimple *stmt, tree var, state_machine::state_t from, state_machine::state_t to, tree origin=NULL_TREE)
 
void on_transition (const supernode *node, const gimple *stmt, const svalue *var, state_machine::state_t from, state_machine::state_t to, tree origin=NULL_TREE)
 
virtual void warn (const supernode *node, const gimple *stmt, tree var, std::unique_ptr< pending_diagnostic > d)=0
 
virtual void warn (const supernode *node, const gimple *stmt, const svalue *var, std::unique_ptr< pending_diagnostic > d)=0
 
virtual tree get_diagnostic_tree (tree expr)
 
virtual tree get_diagnostic_tree (const svalue *)=0
 
virtual state_machine::state_t get_global_state () const =0
 
virtual void set_global_state (state_machine::state_t)=0
 
virtual void clear_all_per_svalue_state ()=0
 
virtual void on_custom_transition (custom_transition *transition)=0
 
virtual tree is_zero_assignment (const gimple *stmt)=0
 
virtual path_contextget_path_context () const
 
virtual bool unknown_side_effects_p () const
 
virtual const program_stateget_old_program_state () const =0
 
virtual const program_stateget_new_program_state () const =0
 
const region_modelget_old_region_model () const
 

Protected Member Functions

 sm_context (int sm_idx, const state_machine &sm)
 

Protected Attributes

int m_sm_idx
 
const state_machinem_sm
 

Detailed Description

Abstract base class giving an interface for the state machine to call
the checker engine, at a particular stmt.   

Constructor & Destructor Documentation

◆ ~sm_context()

virtual ana::sm_context::~sm_context ( )
inlinevirtual

◆ sm_context()

ana::sm_context::sm_context ( int sm_idx,
const state_machine & sm )
inlineprotected

Member Function Documentation

◆ clear_all_per_svalue_state()

virtual void ana::sm_context::clear_all_per_svalue_state ( )
pure virtual

◆ get_diagnostic_tree() [1/2]

virtual tree ana::sm_context::get_diagnostic_tree ( const svalue * )
pure virtual

◆ get_diagnostic_tree() [2/2]

virtual tree ana::sm_context::get_diagnostic_tree ( tree expr)
inlinevirtual

References expr.

◆ get_fndecl_for_call()

virtual tree ana::sm_context::get_fndecl_for_call ( const gcall * call)
pure virtual

◆ get_global_state()

virtual state_machine::state_t ana::sm_context::get_global_state ( ) const
pure virtual

◆ get_new_program_state()

virtual const program_state * ana::sm_context::get_new_program_state ( ) const
pure virtual

◆ get_old_program_state()

virtual const program_state * ana::sm_context::get_old_program_state ( ) const
pure virtual

◆ get_old_region_model()

const region_model * ana::sm_context::get_old_region_model ( ) const

◆ get_path_context()

virtual path_context * ana::sm_context::get_path_context ( ) const
inlinevirtual

References NULL.

◆ get_state() [1/2]

virtual state_machine::state_t ana::sm_context::get_state ( const gimple * stmt,
const svalue *  )
pure virtual

◆ get_state() [2/2]

virtual state_machine::state_t ana::sm_context::get_state ( const gimple * stmt,
tree var )
pure virtual

Referenced by on_transition(), and on_transition().

◆ is_zero_assignment()

virtual tree ana::sm_context::is_zero_assignment ( const gimple * stmt)
pure virtual

◆ on_custom_transition()

virtual void ana::sm_context::on_custom_transition ( custom_transition * transition)
pure virtual

◆ on_transition() [1/2]

void ana::sm_context::on_transition ( const supernode * node,
const gimple * stmt,
const svalue * var,
state_machine::state_t from,
state_machine::state_t to,
tree origin = NULL_TREE )
inline

References get_state(), and set_next_state().

◆ on_transition() [2/2]

void ana::sm_context::on_transition ( const supernode * node,
const gimple * stmt,
tree var,
state_machine::state_t from,
state_machine::state_t to,
tree origin = NULL_TREE )
inline

References get_state(), and set_next_state().

◆ set_global_state()

virtual void ana::sm_context::set_global_state ( state_machine::state_t )
pure virtual

◆ set_next_state() [1/2]

virtual void ana::sm_context::set_next_state ( const gimple * stmt,
const svalue * var,
state_machine::state_t to,
tree origin = NULL_TREE )
pure virtual

◆ set_next_state() [2/2]

virtual void ana::sm_context::set_next_state ( const gimple * stmt,
tree var,
state_machine::state_t to,
tree origin = NULL_TREE )
pure virtual

Referenced by on_transition(), and on_transition().

◆ unknown_side_effects_p()

virtual bool ana::sm_context::unknown_side_effects_p ( ) const
inlinevirtual

◆ warn() [1/2]

virtual void ana::sm_context::warn ( const supernode * node,
const gimple * stmt,
const svalue * var,
std::unique_ptr< pending_diagnostic > d )
pure virtual

◆ warn() [2/2]

virtual void ana::sm_context::warn ( const supernode * node,
const gimple * stmt,
tree var,
std::unique_ptr< pending_diagnostic > d )
pure virtual

Field Documentation

◆ m_sm

const state_machine& ana::sm_context::m_sm
protected

◆ m_sm_idx

int ana::sm_context::m_sm_idx
protected

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