PandA-2024.02
Public Member Functions
StateTransitionGraph Struct Reference

Class used to describe a state transition graph. More...

#include <state_transition_graph.hpp>

Inheritance diagram for StateTransitionGraph:
Inheritance graph
[legend]
Collaboration diagram for StateTransitionGraph:
Collaboration graph
[legend]

Public Member Functions

 StateTransitionGraph (const StateTransitionGraphsCollectionRef state_transition_graphs_collection, int selector)
 Standard constructor. More...
 
 StateTransitionGraph (const StateTransitionGraphsCollectionRef state_transition_graphs_collection, int selector, CustomUnorderedSet< vertex > &sub)
 Sub-graph constructor. More...
 
 ~StateTransitionGraph () override
 Destructor. More...
 
StateInfoRef GetStateInfo (const vertex state)
 Return the info associated with a state. More...
 
const StateInfoConstRef CGetStateInfo (const vertex state) const
 Return the info associated with a state. More...
 
const StateInfoConstRef CGetStateInfo (unsigned int state_id) const
 Return the info associated with a state, given its ID is the ID of the state to be considered. More...
 
vertex GetVertex (unsigned int state_id) const
 Return the state vertex corresponding to the given id. More...
 
TransitionInfoRef GetTransitionInfo (const EdgeDescriptor transition)
 Return the info associated with a transition. More...
 
const TransitionInfoConstRef CGetTransitionInfo (const EdgeDescriptor transition) const
 Return the info associated with a transition. More...
 
StateTransitionGraphInfoRef GetStateTransitionGraphInfo ()
 Return the info associated with the graph. More...
 
const StateTransitionGraphInfoConstRef CGetStateTransitionGraphInfo () const
 Return the info associated with the graph. More...
 
void WriteDot (const std::string &file_name, const int detail_level=0) const
 Writes this graph in dot format. More...
 
- Public Member Functions inherited from graph
virtual ~graph ()=default
 Destructor. More...
 
bool is_in_subset (const boost::graph_traits< graph >::vertex_descriptor v) const
 return true in case the vertex is a vertex of the subgraph. More...
 
int GetSelector () const
 Return the selector of this graph. More...
 
int GetSelector (const edge_descriptor e) const
 Return the selectors associated with an edge. More...
 
int GetSelector (const boost::graph_traits< graphs_collection >::vertex_descriptor source, const boost::graph_traits< graphs_collection >::vertex_descriptor target) const
 Return the selectors associated with an edge. More...
 
void GetStronglyConnectedComponents (std::map< size_t, UnorderedSetStdStable< boost::graph_traits< graphs_collection >::vertex_descriptor >> &strongly_connected_components) const
 Compute the strongly connected components of the graph. More...
 
void BreadthFirstSearch (const boost::graph_traits< graphs_collection >::vertex_descriptor node, boost::bfs_visitor<> *vis) const
 Compute the breadth first search. More...
 
void ReverseTopologicalSort (std::deque< boost::graph_traits< graphs_collection >::vertex_descriptor > &sorted_vertices) const
 Compute the reverse topological order of the graph. More...
 
void TopologicalSort (std::list< boost::graph_traits< graphs_collection >::vertex_descriptor > &sorted_vertices) const
 Compute the topological order of the graph. More...
 
bool IsReachable (const boost::graph_traits< graphs_collection >::vertex_descriptor x, const boost::graph_traits< graphs_collection >::vertex_descriptor y) const
 Compute if vertex y is reachable from x. More...
 
NodeInfoRef GetNodeInfo (typename boost::graph_traits< graphs_collection >::vertex_descriptor node)
 FIXME: this method should become protected and called by equivalent method in subclasses Get the node property. More...
 
GraphInfoRef GetGraphInfo ()
 FIXME: this method should become protected and called by equivalent method in subclasses Get the graph property. More...
 
const GraphInfoConstRef CGetGraphInfo () const
 FIXME: this method should become protected and called by equivalent method in subclasses Get the graph property. More...
 
template<typename VertexWriterTemplate , typename EdgeWriterTemplate >
void InternalWriteDot (const std::string &file_name, const VertexWriterConstRef vertex_writer, const EdgeWriterConstRef edge_writer) const
 Print the graph in dot format FIXME: this method should become protected and called by WriteDot. More...
 
bool ExistsEdge (const boost::graph_traits< graphs_collection >::vertex_descriptor source, const boost::graph_traits< graphs_collection >::vertex_descriptor target) const
 Check if an edge exists. More...
 
boost::graph_traits< graphs_collection >::edge_descriptor CGetEdge (const boost::graph_traits< graphs_collection >::vertex_descriptor source, const boost::graph_traits< graphs_collection >::vertex_descriptor target) const
 Returns the edge connecting two vertices; throw error if it does not exist. More...
 
 graph (graphs_collection *g, const int _selector)
 Standard constructor. More...
 
 graph (graphs_collection *g, const int _selector, const CustomUnorderedSet< boost::graph_traits< graphs_collection >::vertex_descriptor > &vertices)
 Sub-graph constructor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from graph
const NodeInfoConstRef CGetNodeInfo (typename boost::graph_traits< graphs_collection >::vertex_descriptor node) const
 Get the node property. More...
 
EdgeInfoRef GetEdgeInfo (typename boost::graph_traits< graphs_collection >::vertex_descriptor source, typename boost::graph_traits< graphs_collection >::vertex_descriptor target)
 Get the edge property. More...
 
const EdgeInfoConstRef CGetEdgeInfo (typename boost::graph_traits< graphs_collection >::vertex_descriptor source, typename boost::graph_traits< graphs_collection >::vertex_descriptor target) const
 Get the edge property. More...
 
EdgeInfoRef GetEdgeInfo (typename boost::graph_traits< graphs_collection >::edge_descriptor edge) const
 Get the edge property. More...
 
EdgeInfoConstRef CGetEdgeInfo (typename boost::graph_traits< graphs_collection >::edge_descriptor edge) const
 Get the edge property. More...
 
template<typename VertexWriterTemplate , typename EdgeWriterTemplate , typename GraphWriterTemplate >
void InternalWriteDot (const std::string &file_name, const VertexWriterConstRef vertex_writer, const EdgeWriterConstRef edge_writer, const GraphWriterConstRef graph_writer) const
 Print the graph in dot format. More...
 
- Protected Attributes inherited from graph
graphs_collectioncollection
 The graph collection. More...
 
const int selector
 selector More...
 

Detailed Description

Class used to describe a state transition graph.

Definition at line 332 of file state_transition_graph.hpp.

Constructor & Destructor Documentation

◆ StateTransitionGraph() [1/2]

StateTransitionGraph::StateTransitionGraph ( const StateTransitionGraphsCollectionRef  state_transition_graphs_collection,
int  selector 
)

Standard constructor.

Parameters
state_transition_graphs_collectionis the bulk graph.
selectoris the selector used to filter the bulk graph.

Definition at line 370 of file state_transition_graph.cpp.

◆ StateTransitionGraph() [2/2]

StateTransitionGraph::StateTransitionGraph ( const StateTransitionGraphsCollectionRef  state_transition_graphs_collection,
int  selector,
CustomUnorderedSet< vertex > &  sub 
)

Sub-graph constructor.

Parameters
state_transition_graphs_collectionis the bulk graph.
selectoris the selector used to filter the bulk graph.
subis the set of vertices on which the graph is filtered.

Definition at line 376 of file state_transition_graph.cpp.

References ~StateTransitionGraph().

Here is the call graph for this function:

◆ ~StateTransitionGraph()

StateTransitionGraph::~StateTransitionGraph ( )
overridedefault

Destructor.

Referenced by StateTransitionGraph().

Here is the caller graph for this function:

Member Function Documentation

◆ CGetStateInfo() [1/2]

const StateInfoConstRef StateTransitionGraph::CGetStateInfo ( const vertex  state) const
inline

Return the info associated with a state.

Parameters
stateis the state to be considered

Definition at line 369 of file state_transition_graph.hpp.

References graph::CGetNodeInfo().

Referenced by WriteDot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CGetStateInfo() [2/2]

const StateInfoConstRef StateTransitionGraph::CGetStateInfo ( unsigned int  state_id) const
inline

Return the info associated with a state, given its ID is the ID of the state to be considered.

Definition at line 378 of file state_transition_graph.hpp.

◆ CGetStateTransitionGraphInfo()

const StateTransitionGraphInfoConstRef StateTransitionGraph::CGetStateTransitionGraphInfo ( ) const
inline

Return the info associated with the graph.

Returns
the info associated with the graph

Definition at line 425 of file state_transition_graph.hpp.

References graph::CGetGraphInfo().

Referenced by WriteDot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CGetTransitionInfo()

const TransitionInfoConstRef StateTransitionGraph::CGetTransitionInfo ( const EdgeDescriptor  transition) const
inline

Return the info associated with a transition.

Parameters
transitionis the transition to be considered

Definition at line 407 of file state_transition_graph.hpp.

References graph::CGetEdgeInfo().

Here is the call graph for this function:

◆ GetStateInfo()

StateInfoRef StateTransitionGraph::GetStateInfo ( const vertex  state)
inline

Return the info associated with a state.

Parameters
stateis the state to be considered

Definition at line 360 of file state_transition_graph.hpp.

References graph::GetNodeInfo().

Here is the call graph for this function:

◆ GetStateTransitionGraphInfo()

StateTransitionGraphInfoRef StateTransitionGraph::GetStateTransitionGraphInfo ( )
inline

Return the info associated with the graph.

Returns
the info associated with the graph

Definition at line 416 of file state_transition_graph.hpp.

References graph::GetGraphInfo().

Here is the call graph for this function:

◆ GetTransitionInfo()

TransitionInfoRef StateTransitionGraph::GetTransitionInfo ( const EdgeDescriptor  transition)
inline

Return the info associated with a transition.

Parameters
transitionis the transition to be considered

Definition at line 398 of file state_transition_graph.hpp.

References graph::GetEdgeInfo().

Here is the call graph for this function:

◆ GetVertex()

vertex StateTransitionGraph::GetVertex ( unsigned int  state_id) const
inline

Return the state vertex corresponding to the given id.

Definition at line 386 of file state_transition_graph.hpp.

References STR, and THROW_ASSERT.

◆ WriteDot()

void StateTransitionGraph::WriteDot ( const std::string &  file_name,
const int  detail_level = 0 
) const

Writes this graph in dot format.

Parameters
file_nameis the file where the graph has to be printed
detail_levelis the detail level of the printed graph

Definition at line 384 of file state_transition_graph.cpp.

References OpGraph::CGetOpGraphInfo(), CGetStateInfo(), CGetStateTransitionGraphInfo(), graph::collection, FunctionBehavior::DFG, and graphs_collection::parameters.

Here is the call graph for this function:

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

Generated on Mon Feb 12 2024 13:04:03 for PandA-2024.02 by doxygen 1.8.13