faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > Class Template Reference
[Pushdown PlugIn]

Generator with push down extensions. More...

#include <pd_pdgenerator.h>

List of all members.

Public Member Functions

 TpdGenerator (void)
 Constructor.
 TpdGenerator (const TpdGenerator &rOtherGen)
 Copy constructor.
 TpdGenerator (const vGenerator &rOtherGen)
 Copy constructor (no attributes).
virtual TpdGeneratoroperator= (const TpdGenerator &rOtherGen)
 Assignment operator (uses copy) Note: you must reimplement this operator in derived classes in order to handle internal pointers correctly.
virtual TpdGeneratoroperator= (const vGenerator &rOtherGen)
 Assignment operator (uses copy).
 TpdGenerator (const std::string &rFileName)
 Construct from file.
TpdGeneratorNew (void) const
 Construct on heap.
TpdGeneratorCopy (void) const
 Construct copy on heap.
virtual const TypeCast (const Type *pOther) const
 Type test.
TpdGenerator NewPdGen (void) const
 Construct on stack.
SymbolTableStackSymbolTablep (void) const
 Get Pointer to mpStackSymbolTable.
void StackSymbolTablep (SymbolTable *pStackSymTab)
 Set StackSymbolTable.
StackSymbolSet NewStackSymbolSet (void) const
 Return a NameSet with generator's StackSymbolTable.
StackSymbolSetNewStackSymbolSetp (void) const
 Construct a stack symbol on heap.
Idx StackSymbolsSize (void) const
 Number of stacks symbols in mStackSymbols.
const StackSymbolSetStackSymbols (void) const
 Get stack symbol set as const reference.
StackSymbolSetStackSymbolsp (void)
 Get stack symbol set as pointer.
void InjectStackSymbols (const StackSymbolSet &newstacksymbols)
 Overwrites mStackSymbols with new stack symbols without consistency check.
std::string StackSymbolName (Idx index) const
 Looks up stack symbol name for given index.
StackSymbol StackSymbolObj (Idx index) const
 Returns stack symbol for given index.
Idx StackSymbolIndex (const std::string &rName) const
 Looks up stack symbol index for given name.
Idx InsStackSymbol (const std::string &rName)
 Add named stack symbol to generator.
Idx InsStackSymbol (const StackSymbol &rSymbol)
 Add stack symbol to generator.
Idx SetStackBottom (const std::string &rName)
 Add named stack bottom to generator.
Idx SetStackBottom (const StackSymbol &rSymbol)
 Add stack bottom to generator.
Idx SetStackBottom (const Idx idx)
 Add stack bottom to generator.
Idx StackBottom () const
 Get the index of the stack bottom symbol.
void InsStackSymbols (const StackSymbolSet &rStackSymbolSet)
 Add new named stack symbols to generator.
bool DelStackSymbol (Idx index)
 Delete stack symbol from generator by index.
bool DelStackSymbol (const std::string &rName)
 Delete stack symbol from generator by name.
void DelStackSymbols (const StackSymbolSet &rStackSymbols)
 Delete a set of stack symbols from generator.
bool ExistsStackSymbol (Idx index) const
 Test existence of stack symbol in mStackSymbols.
bool ExistsStackSymbol (const std::string &rName) const
 Test existence of stack symbol in mStackSymbols.
StackSymbolSet::Iterator FindStackSymbol (Idx index) const
 Returns an iterator to stack symbol index in mStackSymbols.
StackSymbolSet::Iterator FindStackSymbol (const std::string &rName) const
 Returns an iterator to stack symbol index in mStackSymbols.
StackSymbolSet::Iterator StackSymbolsBegin (void) const
 Iterator to Begin() of mStackSymbols.
StackSymbolSet::Iterator StackSymbolsEnd (void) const
 Iterator to End() of mStackSymbols.
std::vector< IdxStackSymbolsToIndices (const std::vector< StackSymbol > symbols) const
 Converts a vector of stack symbols to a vector of Idx.
Idx TransRelSize () const
 Get number of transitions including pop-push-pairs.
bool SetTransition (Idx x1, Idx ev, Idx x2)
 Add a transition to generator by indices.
bool SetTransition (const std::string &rX1, const std::string &rEv, const std::string &rX2)
 Add a transition to generator by names.
bool SetTransition (const Transition &rTransition, const TransAttr &rAttr)
 Add a transition with attribute to generator.
bool SetTransition (const Transition &rTrans, const std::vector< StackSymbol > &rPop, const std::vector< StackSymbol > &rPush)
 Inserts new PushdownTransition constructed from parameters.
bool SetTransition (const Transition &rTrans, const std::vector< Idx > &rPop, const std::vector< Idx > &rPush)
 Inserts new PushdownTransition constructed from parameters.
bool SetTransition (Idx x1, Idx ev, Idx x2, const std::vector< StackSymbol > &rPop, const std::vector< StackSymbol > &rPush)
 Inserts new PushdownTransition constructed from parameters.
bool SetTransition (Idx x1, Idx ev, Idx x2, const std::vector< Idx > &rPop, const std::vector< Idx > &rPush)
 Inserts new PushdownTransition constructed from parameters.
bool SetTransition (const std::string &rX1, const std::string &rEv, const std::string &rX2, const std::vector< StackSymbol > &rPop, const std::vector< StackSymbol > &rPush)
 Inserts new PushdownTransition constructed from parameters.
bool SetTransition (const std::string &rX1, const std::string &rEv, const std::string &rX2, const std::vector< Idx > &rPop, const std::vector< Idx > &rPush)
 Inserts new PushdownTransition constructed from parameters.
bool ClrTransition (Idx x1, Idx ev, Idx x2, const std::vector< StackSymbol > &rPop, const std::vector< StackSymbol > &rPush)
 Delete an exisiting PushdownTransition with the provided parameters.
bool ClrTransition (Idx x1, Idx ev, Idx x2, const std::vector< Idx > &rPop, const std::vector< Idx > &rPush)
 Delete an exisiting PushdownTransition with the provided parameters.
bool ClrTransition (const Transition &rTrans, const std::vector< StackSymbol > &rPop, const std::vector< StackSymbol > &rPush)
 Delete an exisiting PushdownTransition with the provided parameters.
bool ClrTransition (const Transition &rTrans, const std::vector< Idx > &rPop, const std::vector< Idx > &rPush)
 Delete an exisiting PushdownTransition with the provided parameters.
const PopPushSetPopPush (const Transition &rTrans) const
 Get the pop/push set attached to this transition.
PopPushSet::const_iterator PopPushBegin (const Transition &rTrans) const
 Get an iterator to the beginning of the pop/push set attached to this transition.
PopPushSet::const_iterator PopPushEnd (const Transition &rTrans) const
 Get an iterator to the end of the pop/push set attached to this transition.
bool IsStackSymbolLambda (Idx index) const
 determine if the stack symbol associated with the given index is lambda
bool IsEventLambda (Idx index) const
 determine if the event associated with the given index is lambda
void ConsistentStackSymbol (const StackSymbol &rStackSymbol) const
 Throw exception if stack symbol refers to stack symbol not in stack symbol set.
void ConsistentStackSymbol (Idx idx) const
 Throw exception if stack symbol refers to stack symbol not in stack symbol set.
void ConsistentVectorStackSymbol (const std::vector< StackSymbol > &rVector) const
 Throw exception if vector of stack symbols contains stack symbols not in generators stack symbol set.
void ConsistentVectorStackSymbol (const std::vector< Idx > &rVector) const
 Throw exception if vector of stack symbols contains stack symbols not in generators stack symbol set.
void EmptyVectorPopPush (const std::vector< StackSymbol > &rVector) const
 Throw exception if vector of stack symbols is empty.
void EmptyVectorPopPush (const std::vector< Idx > &rVector) const
 Throw exception if vector of stack symbols is empty.
void SetMerge (const std::string &stateName, MergeAbstract &rMerge)
 Marks a state as being merged from other data type by setting mpMerge.
void SetMerge (Idx index, MergeAbstract &rMerge)
 Marks a state as being merged from other data type by setting mpMerge.
const MergeAbstractMerge (Idx index) const
 Return the merge attribute of a state.
void SetDfaState (const std::string &stateName, Idx dfaIndex)
 Marks a state as being derived from the intersection with a DFA.
void SetDfaState (Idx index, Idx dfaIndex)
 Marks a state as being derived from the intersection with a DPA.
Idx DfaState (Idx index) const
 Return the dfaState attribute of a state.
virtual bool Valid (void)
 Check if generator is valid.

Static Public Member Functions

static SymbolTableGlobalStackSymbolTablep (void)
 Get Pointer to global StackSymbolTable.

Detailed Description

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

Generator with push down extensions.

Overview

tratarterteartawrtrae

Contents

fvdgdthrthorthtiop

Definition at line 37 of file pd_pdgenerator.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 837 of file pd_pdgenerator.h.

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

Copy constructor.

Parameters:
rOtherGen 

Definition at line 848 of file pd_pdgenerator.h.

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

Copy constructor (no attributes).

Parameters:
rOtherGen 

Definition at line 854 of file pd_pdgenerator.h.

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

Construct from file.

Parameters:
rFileName Name of file
Exceptions:
Exception 
  • file format errors (id 1, 50, 51, 52)

Definition at line 863 of file pd_pdgenerator.h.


Member Function Documentation

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
virtual const Type* faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Cast ( const Type pOther  )  const [inline, virtual]

Type test.

Uses C++ dynamic cast to test whether the specified object casts to a PushdownGenerator.

Returns:
TpdGenerator reference if dynamic cast succeeds, else NULL

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

Definition at line 114 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrTransition ( const Transition rTrans,
const std::vector< Idx > &  rPop,
const std::vector< Idx > &  rPush 
) [inline]

Delete an exisiting PushdownTransition with the provided parameters.

Parameters:
rTrans the transition
rPop Stack symbol vector to be popped when transitioning
rPush Stack symbol vector to be pushed when transitioning
Returns:
True, if the transition was deleted from the generator

Definition at line 1223 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrTransition ( const Transition rTrans,
const std::vector< StackSymbol > &  rPop,
const std::vector< StackSymbol > &  rPush 
) [inline]

Delete an exisiting PushdownTransition with the provided parameters.

Parameters:
rTrans the transition
rPop Stack symbol vector to be popped when transitioning
rPush Stack symbol vector to be pushed when transitioning
Returns:
True, if the transition was deleted from the generator

Definition at line 1202 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrTransition ( Idx  x1,
Idx  ev,
Idx  x2,
const std::vector< Idx > &  rPop,
const std::vector< Idx > &  rPush 
) [inline]

Delete an exisiting PushdownTransition with the provided parameters.

Parameters:
x1 Start state of the PushdownTransition.
ev Event of the PushdownTransition.
x2 End state of the PushdownTransition.
rPop Stack symbol vector to be popped when transitioning
rPush Stack symbol vector to be pushed when transitioning
Returns:
True, if the transition was deleted from the generator

Definition at line 1196 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrTransition ( Idx  x1,
Idx  ev,
Idx  x2,
const std::vector< StackSymbol > &  rPop,
const std::vector< StackSymbol > &  rPush 
) [inline]

Delete an exisiting PushdownTransition with the provided parameters.

Parameters:
x1 Start state of the PushdownTransition.
ev Event of the PushdownTransition.
x2 End state of the PushdownTransition.
rPop Stack symbol vector to be popped when transitioning
rPush Stack symbol vector to be pushed when transitioning
Returns:
True, if the transition was deleted from the generator

Definition at line 1190 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ConsistentStackSymbol ( Idx  idx  )  const [inline]

Throw exception if stack symbol refers to stack symbol not in stack symbol set.

Exceptions:
Exception 
  • invalid stack symbol (id 1001)

Definition at line 1293 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ConsistentStackSymbol ( const StackSymbol rStackSymbol  )  const [inline]

Throw exception if stack symbol refers to stack symbol not in stack symbol set.

Exceptions:
Exception 
  • invalid stack symbol (id 1001)

Definition at line 1282 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ConsistentVectorStackSymbol ( const std::vector< Idx > &  rVector  )  const [inline]

Throw exception if vector of stack symbols contains stack symbols not in generators stack symbol set.

Exceptions:
Exception 
  • invalid stack symbol (id 1001)

Definition at line 1319 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ConsistentVectorStackSymbol ( const std::vector< StackSymbol > &  rVector  )  const [inline]

Throw exception if vector of stack symbols contains stack symbols not in generators stack symbol set.

Exceptions:
Exception 
  • invalid stack symbol (id 1001)

Definition at line 1304 of file pd_pdgenerator.h.

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

Construct copy on heap.

Constructs a TpdGenerator on heap.

Returns:
new Generator

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

Definition at line 898 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelStackSymbol ( const std::string &  rName  )  [inline]

Delete stack symbol from generator by name.

mpStackSymbolTable stays untouched.

Parameters:
rName Name of stack symbol
Returns:
True if stack symbol did exist

Definition at line 1002 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelStackSymbol ( Idx  index  )  [inline]

Delete stack symbol from generator by index.

Parameters:
index Index of stack symbol
Returns:
True if stack symbol did exist

Definition at line 996 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelStackSymbols ( const StackSymbolSet rStackSymbols  )  [inline]

Delete a set of stack symbols from generator.

Parameters:
rStackSymbols StackSymbolSet containing stack symbols to remove

Definition at line 1008 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DfaState ( Idx  index  )  const [inline]

Return the dfaState attribute of a state.

Parameters:
index the index of the state

Definition at line 1384 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::EmptyVectorPopPush ( const std::vector< Idx > &  rVector  )  const [inline]

Throw exception if vector of stack symbols is empty.

Exceptions:
Exception 
  • invalid stack symbol (id 1001)

Definition at line 1345 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::EmptyVectorPopPush ( const std::vector< StackSymbol > &  rVector  )  const [inline]

Throw exception if vector of stack symbols is empty.

Exceptions:
Exception 
  • invalid stack symbol (id 1001)

Definition at line 1334 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ExistsStackSymbol ( const std::string &  rName  )  const [inline]

Test existence of stack symbol in mStackSymbols.

Parameters:
rName Stack symbol name
Returns:
True if stack symbol exists

Definition at line 1021 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ExistsStackSymbol ( Idx  index  )  const [inline]

Test existence of stack symbol in mStackSymbols.

Parameters:
index Stack symbol index
Returns:
true / false

Definition at line 1016 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
StackSymbolSet::Iterator faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::FindStackSymbol ( const std::string &  rName  )  const [inline]

Returns an iterator to stack symbol index in mStackSymbols.

Parameters:
rName Stack symbol name of index to find
Returns:
StackSymbolSet::Iterator to stack symbol index

Definition at line 1032 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
StackSymbolSet::Iterator faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::FindStackSymbol ( Idx  index  )  const [inline]

Returns an iterator to stack symbol index in mStackSymbols.

Parameters:
index Index to find
Returns:
StackSymbolSet::Iterator to stack symbol index

Definition at line 1027 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
SymbolTable * faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::GlobalStackSymbolTablep ( void   )  [inline, static]

Get Pointer to global StackSymbolTable.

This is a static member of SymbolTable and used as default for all derived generator classes and instantiated objects.

Returns:
Pointer to global StackSymbolTable

Definition at line 869 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InjectStackSymbols ( const StackSymbolSet newstacksymbols  )  [inline]

Overwrites mStackSymbols with new stack symbols without consistency check.

Parameters:
newstacksymbols New stack symbols that are written to mStackSymbols

Definition at line 930 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsStackSymbol ( const StackSymbol rSymbol  )  [inline]

Add stack symbol to generator.

An entry in the mpStackSymbolTable will be made if stack symbol is new.

Parameters:
rSymbol The stack symbol to add
Returns:
New unique index

Definition at line 956 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsStackSymbol ( const std::string &  rName  )  [inline]

Add named stack symbol to generator.

An entry in the mpStackSymbolTable will be made if stack symbol is new.

Parameters:
rName Name of the stack symbol to add
Returns:
New unique index

Definition at line 951 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsStackSymbols ( const StackSymbolSet rStackSymbolSet  )  [inline]

Add new named stack symbols to generator.

Parameters:
rStackSymbolSet StackSymbolSet

Definition at line 961 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::IsEventLambda ( Idx  index  )  const [inline]

determine if the event associated with the given index is lambda

Parameters:
index index of an event
Returns:
true if the associated event is lambda, else false

Definition at line 1273 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::IsStackSymbolLambda ( Idx  index  )  const [inline]

determine if the stack symbol associated with the given index is lambda

Parameters:
index index of a stack symbol
Returns:
true if the associated stack symbol is lambda, else false

Definition at line 1265 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
const MergeAbstract * faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Merge ( Idx  index  )  const [inline]

Return the merge attribute of a state.

Parameters:
index the index of the state

Definition at line 1368 of file pd_pdgenerator.h.

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

Construct on heap.

Constructs a TpdGenerator on heap.

Returns:
new Generator

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

Definition at line 885 of file pd_pdgenerator.h.

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

Construct on stack.

Constructs a TpdGenerator on stack.

Returns:
new Generator

Definition at line 906 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
StackSymbolSet faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::NewStackSymbolSet ( void   )  const

Return a NameSet with generator's StackSymbolTable.

Returns:
New empty StackSymbolSet on stack
template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
StackSymbolSet* faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::NewStackSymbolSetp ( void   )  const

Construct a stack symbol on heap.

Returns:
Pointer to new empty StackSymbolSet on heap
template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
virtual TpdGenerator& faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::operator= ( const vGenerator rOtherGen  )  [inline, virtual]

Assignment operator (uses copy).

Parameters:
rOtherGen Other generator

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

Definition at line 75 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
virtual TpdGenerator& faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::operator= ( const TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > &  rOtherGen  )  [inline, virtual]

Assignment operator (uses copy) Note: you must reimplement this operator in derived classes in order to handle internal pointers correctly.

Parameters:
rOtherGen Other generator

Definition at line 67 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
const PopPushSet & faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::PopPush ( const Transition rTrans  )  const [inline]

Get the pop/push set attached to this transition.

Parameters:
rTrans the transition
Returns:
the pop/push set

Definition at line 1243 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
PopPushSet::const_iterator faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::PopPushBegin ( const Transition rTrans  )  const [inline]

Get an iterator to the beginning of the pop/push set attached to this transition.

Parameters:
rTrans the transition
Returns:
iterator to the beginning of the pop/push set

Definition at line 1255 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
PopPushSet::const_iterator faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::PopPushEnd ( const Transition rTrans  )  const [inline]

Get an iterator to the end of the pop/push set attached to this transition.

Parameters:
rTrans the transition
Returns:
iterator to the end of the pop/push set

Definition at line 1260 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetDfaState ( Idx  index,
Idx  dfaIndex 
) [inline]

Marks a state as being derived from the intersection with a DPA.

Parameters:
index the index of the state to mark
dfaIndex the index of the DFA state

Definition at line 1379 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetDfaState ( const std::string &  stateName,
Idx  dfaIndex 
) [inline]

Marks a state as being derived from the intersection with a DFA.

Parameters:
stateName the name of the state to mark
dfaIndex the index of the DFA state

Definition at line 1373 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetMerge ( Idx  index,
MergeAbstract rMerge 
) [inline]

Marks a state as being merged from other data type by setting mpMerge.

Parameters:
index the index of the state to mark
rMerge the merged state

Definition at line 1363 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetMerge ( const std::string &  stateName,
MergeAbstract rMerge 
) [inline]

Marks a state as being merged from other data type by setting mpMerge.

Parameters:
stateName the name of the state to mark
rMerge the merged state

Definition at line 1357 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetStackBottom ( const Idx  idx  )  [inline]

Add stack bottom to generator.

An entry in the mpStackSymbolTable will be made if stack symbol is new. This will replace any old stack bottom symbol.

Parameters:
idx The index of the stack bottom symbol to add
Returns:
Stack bottom symbol index

Definition at line 980 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetStackBottom ( const StackSymbol rSymbol  )  [inline]

Add stack bottom to generator.

An entry in the mpStackSymbolTable will be made if stack symbol is new. This will replace any old stack bottom symbol.

Parameters:
rSymbol The stack bottom symbol to add
Returns:
Stack bottom symbol index

Definition at line 973 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetStackBottom ( const std::string &  rName  )  [inline]

Add named stack bottom to generator.

An entry in the mpStackSymbolTable will be made if stack symbol is new. This will replace any old stack bottom symbol.

Parameters:
rName Name of the stack bottom symbol to add
Returns:
Stack bottom symbol index

Definition at line 966 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetTransition ( const std::string &  rX1,
const std::string &  rEv,
const std::string &  rX2,
const std::vector< Idx > &  rPop,
const std::vector< Idx > &  rPush 
) [inline]

Inserts new PushdownTransition constructed from parameters.

Performs consistency checks for x1, x2, ev and stack symbols in rPop and rPush.

Parameters:
rX1 Start state of new PushdownTransition.
rEv Event of new PushdownTransition.
rX2 End state of new PushdownTransition.
rPop Stack symbol vector to be popped when transitioning
rPush Stack symbol vector to be pushed when transitioning
Returns:
True, if the transition was new to the generator

Definition at line 1181 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetTransition ( const std::string &  rX1,
const std::string &  rEv,
const std::string &  rX2,
const std::vector< StackSymbol > &  rPop,
const std::vector< StackSymbol > &  rPush 
) [inline]

Inserts new PushdownTransition constructed from parameters.

Performs consistency checks for x1, x2, ev and stack symbols in rPop and rPush.

Parameters:
rX1 Start state of new PushdownTransition.
rEv Event of new PushdownTransition.
rX2 End state of new PushdownTransition.
rPop Stack symbol vector to be popped when transitioning
rPush Stack symbol vector to be pushed when transitioning
Returns:
True, if the transition was new to the generator

Definition at line 1149 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetTransition ( Idx  x1,
Idx  ev,
Idx  x2,
const std::vector< Idx > &  rPop,
const std::vector< Idx > &  rPush 
) [inline]

Inserts new PushdownTransition constructed from parameters.

Performs consistency checks for x1, x2, ev and stack symbols in rPop and rPush.

Parameters:
x1 Start state of new PushdownTransition.
ev Event of new PushdownTransition.
x2 End state of new PushdownTransition.
rPop Stack symbol vector to be popped when transitioning
rPush Stack symbol vector to be pushed when transitioning
Returns:
True, if the transition was new to the generator

Definition at line 1143 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetTransition ( Idx  x1,
Idx  ev,
Idx  x2,
const std::vector< StackSymbol > &  rPop,
const std::vector< StackSymbol > &  rPush 
) [inline]

Inserts new PushdownTransition constructed from parameters.

Performs consistency checks for x1, x2, ev and stack symbols in rPop and rPush.

Parameters:
x1 Start state of new PushdownTransition.
ev Event of new PushdownTransition.
x2 End state of new PushdownTransition.
rPop Stack symbol vector to be popped when transitioning
rPush Stack symbol vector to be pushed when transitioning
Returns:
True, if the transition was new to the generator

Definition at line 1137 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetTransition ( const Transition rTrans,
const std::vector< Idx > &  rPop,
const std::vector< Idx > &  rPush 
) [inline]

Inserts new PushdownTransition constructed from parameters.

Performs consistency checks for x1, x2, ev and all stack symbols in rPop and rPush.

Parameters:
rTrans new transition
rPop Stack symbol vector to be popped when transitioning
rPush Stack symbol vector to be pushed when transitioning
Returns:
True, if the transition was new to the generator

Definition at line 1110 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetTransition ( const Transition rTrans,
const std::vector< StackSymbol > &  rPop,
const std::vector< StackSymbol > &  rPush 
) [inline]

Inserts new PushdownTransition constructed from parameters.

Performs consistency checks for x1, x2, ev and all stack symbols in rPop and rPush.

Parameters:
rTrans new transition
rPop Stack symbol vector to be popped when transitioning
rPush Stack symbol vector to be pushed when transitioning
Returns:
True, if the transition was new to the generator

Definition at line 1083 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetTransition ( const Transition rTransition,
const TransAttr &  rAttr 
) [inline]

Add a transition with attribute to generator.

States and event must already exist!

Define FAUDES_CHECKED for consistency checks.

Parameters:
rTransition transition
rAttr attribute
Returns:
True, if the transition was new the generator

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

Definition at line 1077 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetTransition ( const std::string &  rX1,
const std::string &  rEv,
const std::string &  rX2 
) [inline]

Add a transition to generator by names.

Statename and eventname must already exist!

Parameters:
rX1 Predecessor state name
rEv Event name
rX2 Successor state name
Returns:
True, if the transition was new the generator
Exceptions:
Exception 
  • state or event not in generator (id 95)
  • state name not known (id 90)
  • event name not known (id 66)

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

Definition at line 1066 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetTransition ( Idx  x1,
Idx  ev,
Idx  x2 
) [inline]

Add a transition to generator by indices.

States and event must already exist!

Define FAUDES_CHECKED for consistency checks.

Parameters:
x1 Predecessor state index
ev Event index
x2 Successor state index
Returns:
True, if the transition was new the generator
Exceptions:
Exception 
  • state or event not in generator (id 95)

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

Definition at line 1072 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StackBottom (  )  const [inline]

Get the index of the stack bottom symbol.

Returns:
index of the stack bottom symbol

Definition at line 991 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StackSymbolIndex ( const std::string &  rName  )  const [inline]

Looks up stack symbol index for given name.

Parameters:
rName Stack symbol name
Returns:
Stack symbol index or 0 for nonexistent

Definition at line 946 of file pd_pdgenerator.h.

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

Looks up stack symbol name for given index.

Parameters:
index Stack symbol index
Returns:
Stack symbol name

Definition at line 936 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
StackSymbol faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StackSymbolObj ( Idx  index  )  const [inline]

Returns stack symbol for given index.

Parameters:
index Stack symbol index
Returns:
Stack symbol object

Definition at line 941 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
const StackSymbolSet & faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StackSymbols ( void   )  const [inline]

Get stack symbol set as const reference.

Returns:
mStackSymbols

Definition at line 920 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
StackSymbolSet::Iterator faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StackSymbolsBegin ( void   )  const [inline]

Iterator to Begin() of mStackSymbols.

Returns:
iterator to begin of mStackSymbols

Definition at line 1037 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
StackSymbolSet::Iterator faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StackSymbolsEnd ( void   )  const [inline]

Iterator to End() of mStackSymbols.

Returns:
iterator to end of mStackSymbols

Definition at line 1042 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
StackSymbolSet * faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StackSymbolsp ( void   )  [inline]

Get stack symbol set as pointer.

Returns:
mStackSymbols

Definition at line 925 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StackSymbolsSize ( void   )  const [inline]

Number of stacks symbols in mStackSymbols.

Returns:
Number of stack symbols in mStackSymbols

Definition at line 915 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
std::vector< Idx > faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StackSymbolsToIndices ( const std::vector< StackSymbol symbols  )  const [inline]

Converts a vector of stack symbols to a vector of Idx.

Parameters:
symbols the vector of stack symbols
Returns:
vector of Idx

Definition at line 1046 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StackSymbolTablep ( SymbolTable pStackSymTab  )  [inline]

Set StackSymbolTable.

Parameters:
pStackSymTab Pointer SymbolTable

Definition at line 879 of file pd_pdgenerator.h.

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

Get Pointer to mpStackSymbolTable.

Returns:
Pointer mpStackSymbolTable

Definition at line 874 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TransRelSize ( void   )  const [inline]

Get number of transitions including pop-push-pairs.

Returns:
number of transitions

Reimplemented from faudes::vGenerator.

Definition at line 1055 of file pd_pdgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TpdGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Valid ( void   )  [inline, virtual]

Check if generator is valid.

Returns:
Success

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

Definition at line 1389 of file pd_pdgenerator.h.


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

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