FSM Library - C++ version
Public Member Functions | Static Public Attributes | Friends | List of all members
FsmNode Class Reference
Inheritance diagram for FsmNode:
Inheritance graph
[legend]
Collaboration diagram for FsmNode:
Collaboration graph
[legend]

Public Member Functions

 FsmNode (const int id, const std::shared_ptr< FsmPresentationLayer > presentationLayer)
 
 FsmNode (const int id, const std::string &name, const std::shared_ptr< FsmPresentationLayer > presentationLayer)
 
void addTransition (const FsmTransition &transition)
 
std::vector< FsmTransitiongetTransitions () const
 
int getId () const
 
std::string getName () const
 
bool hasBeenVisited () const
 
void setVisited ()
 
void setPair (const std::shared_ptr< FsmNode > l, const std::shared_ptr< FsmNode > r)
 
void setPair (const std::shared_ptr< std::pair< std::shared_ptr< FsmNode >, std::shared_ptr< FsmNode >>> p)
 
bool isDerivedFrom (const std::shared_ptr< std::pair< std::shared_ptr< FsmNode >, std::shared_ptr< FsmNode >>> p) const
 
std::shared_ptr< std::pair< std::shared_ptr< FsmNode >, std::shared_ptr< FsmNode > > > getPair () const
 
std::shared_ptr< FsmNodeapply (const int e, OutputTrace &o)
 
OutputTree apply (const InputTrace &itrc)
 
std::unordered_set< std::shared_ptr< FsmNode > > after (const InputTrace &itrc)
 
std::vector< std::shared_ptr< FsmNode > > after (const int x)
 
std::unordered_set< std::shared_ptr< FsmNode > > afterAsSet (const int x)
 
void setColor (const int color)
 
int getColor ()
 
std::shared_ptr< DFSMTableRowgetDFSMTableRow (const int maxInput)
 
bool distinguished (const std::shared_ptr< FsmNode > otherNode, const std::vector< int > &iLst)
 
std::shared_ptr< InputTracedistinguished (const std::shared_ptr< FsmNode > otherNode, std::shared_ptr< Tree > w)
 
InputTrace calcDistinguishingTrace (const std::shared_ptr< FsmNode > otherNode, const std::vector< std::shared_ptr< PkTable >> &pktblLst, const int maxInput)
 
InputTrace calcDistinguishingTrace (const std::shared_ptr< FsmNode > otherNode, const std::vector< std::shared_ptr< OFSMTable >> &ofsmTblLst, const int maxInput, const int maxOutput)
 
bool isObservable () const
 
bool isDeterministic () const
 

Static Public Attributes

static const int white = 0
 
static const int grey = 1
 
static const int black = 2
 

Friends

std::ostream & operator<< (std::ostream &out, const FsmNode &node)
 
bool operator== (FsmNode const &node1, FsmNode const &node2)
 

Member Function Documentation

std::unordered_set< std::shared_ptr< FsmNode > > FsmNode::after ( const InputTrace itrc)

Return the set of FsmNode instances reachable from this node after having applied the input trace itrc

Parameters
itrcInput Trace to be applied to the FSM, starting with this FsmNode
Returns
Set of FsmNode instances reachable from this node via input trace itrc.

Here is the call graph for this function:

std::vector< std::shared_ptr< FsmNode > > FsmNode::after ( const int  x)

Return list of nodes that can be reached from this node when applying input x

Parameters
xFSM input, to be applied in this node
Returns
empty list, if no transition is defined from this node with input x list of target nodes reachable from this node under input x otherwise.
InputTrace FsmNode::calcDistinguishingTrace ( const std::shared_ptr< FsmNode otherNode,
const std::vector< std::shared_ptr< PkTable >> &  pktblLst,
const int  maxInput 
)

Calculate a distinguishing input trace for a DFSM node. The algorithm is based on Pk-tables

Parameters
otherNodeThe other FSM state, to be distinguished from this FSM state
pktblLstList of Pk-tables, pre-calculated for this DFSM
maxInputMaximal value of the input alphabet with range 0..maxInput
Returns
Distinguishing trace as instance of InputTrace

Here is the call graph for this function:

InputTrace FsmNode::calcDistinguishingTrace ( const std::shared_ptr< FsmNode otherNode,
const std::vector< std::shared_ptr< OFSMTable >> &  ofsmTblLst,
const int  maxInput,
const int  maxOutput 
)

Calculate a distinguishing input trace for a (potentially nondeterministic) FSM node. The algorithm is based on OFSM-tables

Parameters
otherNodeThe other FSM state, to be distinguished from this FSM state
ofsmTblLstList of OFSM-tables, pre-calculated for this FSM
maxInputMaximal value of the input alphabet with range 0..maxInput
maxOutputMaximal value of the output alphabet in range 0..maxOutput
Returns
Distinguishing trace as instance of InputTrace

Here is the call graph for this function:

bool FsmNode::isDeterministic ( ) const

Check if outgoing transitions of this node are deterministic


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