faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > Class Template Reference
[Multitasking PlugIn]

Allows to create colored marking generators (CMGs) as the common five tupel consisting of alphabet, stateset, transition relation, initial states, marked states, and attributes for state and event properties. More...

#include <mtc_generator.h>

List of all members.

Public Member Functions

Constructor, Destructor and Copy-Methods

 TmtcGenerator (void)
 Creates an emtpy MtcSystem.
 TmtcGenerator (const TmtcGenerator &rOtherGen)
 Creates an mtcgenerator from another mtcgenerator - copy constructor:
 TmtcGenerator (const vGenerator &rOtherGen)
 Creates an mtcgenerator from another generator - copy constructor.
 TmtcGenerator (const std::string &rFileName)
 Constructs an MtcSystem from file.
 ~TmtcGenerator (void)
 Destructor for MtcSystem.
virtual TmtcGeneratorNew (void) const
 Construct on heap.
virtual TmtcGeneratorCopy (void) const
 Construct copy on heap.
virtual TmtcGeneratorAssign (const TmtcGenerator &rSrc)
 Copy from other mtcgenerator.
virtual TmtcGeneratorAssign (const vGenerator &rSrc)
 Copy from other generator.
Color Symbol Table

SymbolTableGlobalColorSymbolTablep (void) const
 Get Pointer to global ColorSymbolTable.
SymbolTableColorSymbolTablep (void) const
 Get Pointer to ColorSymbolTable currently used by this MtcSystem.
void ColorSymbolTable (SymbolTable *pSymTab)
 Set ColorSymbolTable to be used by this MtcSystem.
void ColorSymbolTable (const TmtcGenerator &rOtherGen)
 Set ColorSymbolTable as given by rOtherGen.
Editing Colored States

Idx InsColoredState (const std::string &rStateName, const std::string &rColorName)
 Create a new named state and set the color rColorName.
Idx InsColoredState (const std::string &rStateName, Idx colorIndex)
 Create a new named state and set the color colorIndex.
Idx InsColoredState (const std::string &rStateName, const ColorSet &rColors)
 Create a new named state and set the colors from rColors.
Idx InsColoredState (const ColorSet &rColors)
 Create a new unnamed state and set the colors from rColors.
Idx InsColor (Idx stateIndex, const std::string &rColorName)
 Insert a color by name into an existing state.
void InsColor (Idx stateIndex, Idx colorIndex)
 Insert a color by index into an existing state.
void InsColors (Idx stateIndex, const ColorSet &rColors)
 Insert multiple colors from a color set into an existing state.
void DelColor (Idx stateIndex, const std::string &rColorName)
 Remove color by name from an existing state specified by index.
void DelColor (Idx stateIndex, Idx colorIndex)
 Remove color by index form an existing state specified by index.
void DelColor (const std::string &rColorName)
 Remove color by name from all states.
void DelColor (Idx colorIndex)
 Remove color by index from all states.
void ClrColors (Idx stateIndex)
 Remove all colors from a particular state.
void ClearStateAttributes ()
 Clear all the generator's state attributes.
Analyse Colored States and State Colors

void Colors (ColorSet &rColors) const
 Insert all colors used in the generator to a given ColorSet.
ColorSet Colors (void) const
 Returns a color set containing all the generator's colors.
const ColorSetColors (Idx stateIndex) const
 Return a color set which contains all colors of one state.
StateSet ColoredStates (Idx colorIndex) const
 Returns a state set containing all states that are colored with the color given by index.
StateSet ColoredStates (const std::string &rColorName) const
 Returns a state set containing all states that are colored with the color given by name.
StateSet ColoredStates () const
 Returns a state set containing all colored states of the MtcSystem.
StateSet UncoloredStates () const
 Returns a state set containing all states that are not colored.
bool ExistsColor (Idx colorIndex) const
 Check if color exists in generator.
bool ExistsColor (const std::string &rColorName) const
 Check if color exists in generator.
bool ExistsColor (Idx stateIndex, Idx colorIndex) const
 Check if color exists in a given state of the MtcSystem.
bool IsColored (void) const
 Check if there is at least one colored state in the MtcSystem.
bool IsColored (Idx stateIndex) const
 Check if the given state is colored or not.
Symbol Table

void DelColorName (Idx colorIndex)
 Finally deletes a color name and its index from the currently used symbol table.
void CheckSymbolTable (Idx colorIndex)
 Delete the given color from the symbol table if it is not used anymore in the generator by calling DelColorName.
void CheckSymbolTable (ColorSet &rColors)
 Delete all colors from the given color set from the color symbol table by calling DelColorName if they are not used anymore.
std::string ColorName (Idx colorIndex) const
 Look up the color name for a given color index.
Idx ColorIndex (const std::string &rColorName) const
 Look up the color index for a given color name.
Output Methods

virtual void DotWrite (const std::string &rFileName) const
 Writes generator to dot input format.
std::string CStr (Idx index) const
 Return pretty printable color name for index.
Reachability

StateSet StronglyCoaccessibleSet (void) const
 Generate a state set with all strongly coaccessible states.
bool StronglyCoaccessible (void)
 Make generator strongly coaccessible.
bool IsStronglyCoaccessible (void) const
 Check if MtcSystem is strongly coaccessible.
StateSet StronglyTrimSet (void) const
 Generate a state set with all the strongly trim generator's states.
bool StronglyTrim (void)
 Make generator strongly trim.
bool IsStronglyTrim (void) const
 Check if the MtcSystem is strongly trim.
Further Methods

void NewColorSymbolTable ()
 Insert a new local color symbol table.
std::map< Idx, ColorSetStateColorMap (void) const
 Return a color map with state indices and their corresponding colors.

Protected Member Functions

virtual void DoSWrite (TokenWriter &rTw) const
 Token output, see Type::SWrite for public wrappers.

Protected Attributes

SymbolTablempColorSymbolTable
 Pointer to currently used symbol table.

Detailed Description

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
class faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >

Allows to create colored marking generators (CMGs) as the common five tupel consisting of alphabet, stateset, transition relation, initial states, marked states, and attributes for state and event properties.

Thus, it is possible to set a control status for events and to add or delete colored markings to single states. Doing so, multitasking generators can be computed and their behaviour be analysed.Methods for examining the color status are included as well as those for making a CMG accessible or strongly coaccessible. Furthermore, input and output methods for MtcSystems are included.

Definition at line 53 of file mtc_generator.h.


Constructor & Destructor Documentation

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TmtcGenerator ( void   )  [inline]

Creates an emtpy MtcSystem.

doxygen group

Definition at line 793 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TmtcGenerator ( const TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > &  rOtherGen  )  [inline]

Creates an mtcgenerator from another mtcgenerator - copy constructor:

If the other MtcSystem uses a local color symbol table, the new generator also creates a local symbol table. This new one is empty! If you use a local symbol table, you should implement a copy mechanism for the entries of the original generator's symbol table.

Parameters:
rOtherGen Other mtcgenerator to copy

Definition at line 799 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TmtcGenerator ( const vGenerator rOtherGen  )  [inline]

Creates an mtcgenerator from another generator - copy constructor.

Parameters:
rOtherGen Other generator to copy

Definition at line 808 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TmtcGenerator ( const std::string &  rFileName  )  [inline]

Constructs an MtcSystem from file.

Define FAUDES_CHECKED for consistency checks

Parameters:
rFileName Filename
Exceptions:
Exception 
  • Opening/reading failed (ids 1, 50, 51)

Definition at line 815 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::~TmtcGenerator ( void   )  [inline]

Destructor for MtcSystem.

Definition at line 103 of file mtc_generator.h.


Member Function Documentation

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > & faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Assign ( const vGenerator rSrc  )  [inline, virtual]

Copy from other generator.

Parameters:
rSrc Generator which will become the copy

Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 873 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > & faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Assign ( const TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > &  rSrc  )  [inline, virtual]

Copy from other mtcgenerator.

Parameters:
rSrc MtcSystem to copy from

Definition at line 847 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::CheckSymbolTable ( ColorSet rColors  )  [inline]

Delete all colors from the given color set from the color symbol table by calling DelColorName if they are not used anymore.

rColors must use the same symbol table as the MtcSystem!

Parameters:
rColors Color set with all colors that will be deleted from symbol table if not used anymore
Exceptions:
Exception 
  • Symbol table mismatch (id 88)

Definition at line 1222 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::CheckSymbolTable ( Idx  colorIndex  )  [inline]

Delete the given color from the symbol table if it is not used anymore in the generator by calling DelColorName.

Parameters:
colorIndex Color which will be deleted from symbol table if not used anymore

Definition at line 1212 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClearStateAttributes ( void   )  [inline, virtual]

Clear all the generator's state attributes.

The current implementation also clears the color symbol table if it is local. This behaviour may change in future.

Reimplemented from faudes::vGenerator.

Definition at line 1607 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrColors ( Idx  stateIndex  )  [inline]

Remove all colors from a particular state.

If symbol table is local, unused colors are deleted from it, global symbol table stays untouched.

Define FAUDES_CHECKED for consistency checks

Parameters:
stateIndex State where colors should be removed
Exceptions:
Exception 
  • Index not member of set (id 200)

Definition at line 1140 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
StateSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColoredStates (  )  const [inline]

Returns a state set containing all colored states of the MtcSystem.

Returns:
State set containing colored states

Definition at line 1456 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
StateSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColoredStates ( const std::string &  rColorName  )  const [inline]

Returns a state set containing all states that are colored with the color given by name.

Parameters:
rColorName Color whose corresponding states shall be returned
Returns:
State set containing appropriate states

Definition at line 1450 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
StateSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColoredStates ( Idx  colorIndex  )  const [inline]

Returns a state set containing all states that are colored with the color given by index.

Parameters:
colorIndex Color whose corresponding states shall be returned
Returns:
State set containing appropriate states

Definition at line 1440 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColorIndex ( const std::string &  rColorName  )  const [inline]

Look up the color index for a given color name.

Parameters:
rColorName 
Returns:
Color index

Definition at line 1270 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
std::string faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColorName ( Idx  colorIndex  )  const [inline]

Look up the color name for a given color index.

Parameters:
colorIndex 
Returns:
Color name

Definition at line 1265 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
const ColorSet & faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Colors ( Idx  stateIndex  )  const [inline]

Return a color set which contains all colors of one state.

Returns:
Color set with state's colors
Exceptions:
Exception 
  • Index not member of set (id 200)

Definition at line 1194 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
ColorSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Colors ( void   )  const [inline]

Returns a color set containing all the generator's colors.

Returns:
Color set with generators colors

Definition at line 1183 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Colors ( ColorSet rColors  )  const [inline]

Insert all colors used in the generator to a given ColorSet.

doxygen group

Parameters:
rColors Color set in which all colors of the generator will be inserted
Exceptions:
Exception 
  • Symbol table mismatch (id 88)

Definition at line 1167 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColorSymbolTable ( const TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > &  rOtherGen  )  [inline]

Set ColorSymbolTable as given by rOtherGen.

Parameters:
rOtherGen Other generator

Definition at line 897 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColorSymbolTable ( SymbolTable pSymTab  )  [inline]

Set ColorSymbolTable to be used by this MtcSystem.

Note: the managemnt of local color symbol tables needs a re-design. Dont use thus feature.

Parameters:
pSymTab Pointer to SymbolTable

Definition at line 892 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
SymbolTable * faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColorSymbolTablep ( void   )  const [inline]

Get Pointer to ColorSymbolTable currently used by this MtcSystem.

Returns:
Pointer to ColorSymbolTable

Definition at line 887 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > * faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Copy ( void   )  const [inline, virtual]

Construct copy on heap.

Returns:
New Generator

Reimplemented from faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 836 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
std::string faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::CStr ( Idx  index  )  const [inline]

Return pretty printable color name for index.

Primary meant for debugging messages.

Parameters:
index 
Returns:
std::string Color name

Definition at line 1275 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelColor ( Idx  colorIndex  )  [inline]

Remove color by index from all states.

Parameters:
colorIndex Index of state color

Definition at line 1129 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelColor ( const std::string &  rColorName  )  [inline]

Remove color by name from all states.

Parameters:
rColorName Name of state color

Definition at line 1115 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelColor ( Idx  stateIndex,
Idx  colorIndex 
) [inline]

Remove color by index form an existing state specified by index.

Define FAUDES_CHECKED for consistency checks.

Parameters:
stateIndex State index
colorIndex Index of the state color
Exceptions:
Exception 
  • Index not member of set (id 200)
  • Color index not found in generator (id 205)

Definition at line 1090 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelColor ( Idx  stateIndex,
const std::string &  rColorName 
) [inline]

Remove color by name from an existing state specified by index.

Define FAUDES_CHECKED for consistency checks.

Parameters:
stateIndex State index
rColorName Name of the state color
Exceptions:
Exception 
  • Index not member of set (id 200)
  • Name not found in NameSet (id 202)

Definition at line 1060 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelColorName ( Idx  colorIndex  )  [inline]

Finally deletes a color name and its index from the currently used symbol table.

doxygen group

Parameters:
colorIndex Index of color to delete from symbol table

Definition at line 1162 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DoSWrite ( TokenWriter rTw  )  const [inline, protected, virtual]

Token output, see Type::SWrite for public wrappers.

The method assumes that the type parameter is a faudes type and uses the provide write method per entry. Reimplement this function in derived classes for non-faudes type vectors.

Parameters:
rTw Reference to TokenWriter
Exceptions:
Exception 
  • IO errors (id 2)

Reimplemented from faudes::vGenerator.

Definition at line 1614 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DotWrite ( const std::string &  rFileName  )  const [inline, virtual]

Writes generator to dot input format.

doxygen group

The dot file format is specified by the graphiz package; see http://www.graphviz.org. The package includes the dot command line tool to generate a graphical representation of the generators graph. See also Generator::GraphWrite(). This functions sets the re-indexing to minimal indices.

Parameters:
rFileName Name of file to save result

Reimplemented from faudes::vGenerator.

Definition at line 1296 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ExistsColor ( Idx  stateIndex,
Idx  colorIndex 
) const [inline]

Check if color exists in a given state of the MtcSystem.

Define FAUDES_CHECKED for consistency checks

Parameters:
stateIndex Index which determines the generator's state
colorIndex Color index to look for in given state
Returns:
true if color exists in state
Exceptions:
Exception 
  • Index not member of set (id 200)

Definition at line 1280 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ExistsColor ( const std::string &  rColorName  )  const [inline]

Check if color exists in generator.

Define FAUDES_CHECKED for consistency checks

Parameters:
rColorName Color name which will be examined regarding existence in the generator
Returns:
true if color exists
Exceptions:
Exception 
  • Color name not found in symbol table (id 202)

Definition at line 1252 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ExistsColor ( Idx  colorIndex  )  const [inline]

Check if color exists in generator.

Parameters:
colorIndex Index which will be examined regarding existence in the generator
Returns:
true if color exists

Definition at line 1243 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
SymbolTable * faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::GlobalColorSymbolTablep ( void   )  const [inline]

Get Pointer to global ColorSymbolTable.

doxygen group This is a static member of ColorSet and used as default for all derived classes and instantiated objects.

Returns:
Pointer to global ColorSymbolTable

Definition at line 882 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColor ( Idx  stateIndex,
Idx  colorIndex 
) [inline]

Insert a color by index into an existing state.

Define FAUDES_CHECKED for consistency checks

Parameters:
stateIndex Index of state to be set as colored state
colorIndex Index of color to be added to state, must already exist in symbol table
Exceptions:
Exception 
  • State index not member of set (id 200)
  • Color index not known to symbol table (id 200)

Definition at line 1001 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColor ( Idx  stateIndex,
const std::string &  rColorName 
) [inline]

Insert a color by name into an existing state.

Define FAUDES_CHECKED for consistency checks

Parameters:
stateIndex Index of state to be set as colored state
rColorName Name of state color to be added
Returns:
Index of inserted color
Exceptions:
Exception 
  • Index not member of set (id 200)
  • Name already exists / invalid name (id 104)

Definition at line 973 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColoredState ( const ColorSet rColors  )  [inline]

Create a new unnamed state and set the colors from rColors.

Parameters:
rColors Color set
Returns:
Index of new unique state

Definition at line 966 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColoredState ( const std::string &  rStateName,
const ColorSet rColors 
) [inline]

Create a new named state and set the colors from rColors.

Parameters:
rStateName Name of the state to add
rColors Color set
Returns:
Index of new unique state

Definition at line 959 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColoredState ( const std::string &  rStateName,
Idx  colorIndex 
) [inline]

Create a new named state and set the color colorIndex.

Define FAUDES_CHECKED for consistency checks

Parameters:
rStateName Name of the state to add
colorIndex Index of the state color, must already exist in symbol table
Returns:
Index of new unique state
Exceptions:
Exception 
  • Color index not known to symbol table (id 200)

Definition at line 940 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColoredState ( const std::string &  rStateName,
const std::string &  rColorName 
) [inline]

Create a new named state and set the color rColorName.

doxygen group Define FAUDES_CHECKED for consistency checks

Parameters:
rStateName Name of the state to add
rColorName Name of the state color
Returns:
Index of new unique state
Exceptions:
Exception 
  • Name already exists (id 104)
  • Index not member of set (id 200)

Definition at line 902 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColors ( Idx  stateIndex,
const ColorSet rColors 
) [inline]

Insert multiple colors from a color set into an existing state.

Define FAUDES_CHECKED for consistency checks

Parameters:
stateIndex Index of state to be set as colored state
rColors Reference to color set with colors to set for state, colors must already exist in symbol table
Exceptions:
Exception 
  • State index not member of set (id 200)
  • Symbol table mismach (id 200)
  • Symbol table mismatch (id 88)

Definition at line 1027 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::IsColored ( Idx  stateIndex  )  const [inline]

Check if the given state is colored or not.

Define FAUDES_CHECKED for consistency checks

Parameters:
stateIndex State to examine
Returns:
True if given state is colored
Exceptions:
Exception 
  • State index not member of set (id 200)

Definition at line 1485 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::IsColored ( void   )  const [inline]

Check if there is at least one colored state in the MtcSystem.

Returns:
True if there is at least one colored state

Definition at line 1476 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::IsStronglyCoaccessible ( void   )  const [inline]

Check if MtcSystem is strongly coaccessible.

Returns:
True if generator is strongly coaccessible

Definition at line 1529 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::IsStronglyTrim ( void   )  const [inline]

Check if the MtcSystem is strongly trim.

Returns:
True if generator is strongly trim

Definition at line 1555 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > * faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::New ( void   )  const [inline, virtual]

Construct on heap.

Returns:
New Generator

Reimplemented from faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 822 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::NewColorSymbolTable (  )  [inline]

Insert a new local color symbol table.

doxygen group mpColorSymbolTable is reset. The color symbol table pointer in every state attribute's mColors is also reset to the new symbol table. If there already exist color entries in the current symbol table, they are copied to the new local one.

Define FAUDES_CHECKED for consistency checks

Exceptions:
Exception 
  • Could not insert index and symbol to symbol table (id 44)

Definition at line 1567 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
std::map< Idx, ColorSet > faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StateColorMap ( void   )  const [inline]

Return a color map with state indices and their corresponding colors.

Only states with asociated colors are part of this list.

Returns:
color map Standard library map where states and corresponding colors are saved

Definition at line 1428 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StronglyCoaccessible ( void   )  [inline]

Make generator strongly coaccessible.

Forbidden states are deleted.

Returns:
True if generator is strongly coaccessible

Example: Computation of the strongly coaccessible form of an MtcSystem

Original MtcSystem gen
tmp_mtc_functions_1b_acc.png
From state 3 states with other colored markings cannot be reached. So, this generator is weakly coaccessible w.r.t. its color set, but not strongly coaccessible w.r.t. it.
Result of gen.StronglyCoaccessible();
tmp_mtc_functions_1d_str_trim.png
Resulting MtcSystem is strongly coaccessible w.r.t its new color set where the color of the primary state 3 is missing

Definition at line 1522 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
StateSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StronglyCoaccessibleSet ( void   )  const [inline]

Generate a state set with all strongly coaccessible states.

doxygen group

Returns:
StateSet Coaccessible states

Definition at line 1500 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StronglyTrim ( void   )  [inline]

Make generator strongly trim.

Therefore, the forbidden states are deleted.

Returns:
True if generator is strongly trim

Example: Computation of the strongly trim form of an MtcSystem

Original MtcSystem gen
tmp_mtc_functions_1a_not_trim.png
State 5 is not accessible and from state 3 other states with other colored markings cannot be reached. So, this generator is not accessible and weakly coaccessible w.r.t. its color set.
Result of gen.StronglyTrim();
tmp_mtc_functions_1d_str_trim.png
Resulting MtcSystem is strongly trim, which means accessible and strongly coaccessible w.r.t its color set

Definition at line 1541 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
StateSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StronglyTrimSet ( void   )  const [inline]

Generate a state set with all the strongly trim generator's states.

Returns:
StateSet All states for which generator is strongly trim

Definition at line 1534 of file mtc_generator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
StateSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::UncoloredStates (  )  const [inline]

Returns a state set containing all states that are not colored.

Returns:
State set containing uncolored states

Definition at line 1466 of file mtc_generator.h.


Member Data Documentation

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
SymbolTable* faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::mpColorSymbolTable [protected]

Pointer to currently used symbol table.

Definition at line 718 of file mtc_generator.h.


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

libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen