Detailed Description

Base class of all FAUDES generators.

Overview

The faudes::vGenerator models the plain five-tupel G = (X, Sigma, Delta, X_0, X_m) to represent the marked language L(G) and closed language L_m(G), respectively. It provides read and write access to core menbers, e.g. methods for inserting/deleting events, states and transitions.

States, events and transitions in a generator can be addressed in three alternative methods:

  • by index, involves a search on a sorted set (efficient)
  • by name, involves two searches on sorted sets (not quite so efficient)
  • by iterator, involves pointer dereferencing (very efficient)

For read access, const refererences to sets are provided. In order to allow for consistency checks, write access is via generator methods only. When the compiletime option FAUDES_CHECKED is defined, write methods throw an exception on inconsistent data, eg. setting an initial state that is not an element of the state set, or introducing a transition with an event label that is not in the alphabet.

Events Versus States

While both, events and states, are represented by the integer type faudes::Idx, there is a fundamental distinction between both, which stems from the design choice to use generators as a tool to represent formal languages. From this perspective, events are global enteties while states are local to the respective generator. Any two events within libFAUDES are related while states only compare within a generator.

In consequence, there is global sybmoltable for event name resolution, while there is one local state symboltable for each generator. Furthermore, state names are considered cosmetic and hence are optional, while event names are mandatory.

Example: two machines both refer to the event name "alpha" that models the process of passing a workpiece from one machine to the other. In libFAUDES this is indeed modelled as one event which is represented by one index. However, both machines may have a state "Idle" which indicates that the respective machine is idle. In libFAUDES the two states are treated locally to the generators and whether or not they have the same index is regarded irrelevant.

The generator class carries a flag to indicate that functions with result type generator shall attach names to the newly created states, based on the state names of the respective arguments. Turning of this feature and avoiding state names alltogether considerably increases libFAUDES performance.

File I/O (default format)

Generators inherit the standard token IO interface from the libFAUDES general purpose base Type, so you may use Read and Write functions for generators. The file-format consists of a generator section that includes one subsection for each core member. It is illustrated by the below example

<Generator name="simple machine">
% libFAUDES Generator for the simple machine
alpha beta mue lambda
idle busy down
idle alpha busy
busy beta idle
busy mue down
down lambda idle
idle
idle
const TransSet & TransRel(void) const
Return reference to transition relation.
const StateSet & MarkedStates(void) const
Return const ref of marked states.
const EventSet & Alphabet(void) const
Return const reference to alphabet.
const StateSet & InitStates(void) const
Const ref to initial states.
const StateSet & States(void) const
Return reference to state set.
vGenerator Generator
Plain generator, api typedef for generator with no attributes.

Technical Detail: Since symbolic state names are optional, states may alternatively be represented by their index. In order to consitently read a generator from a token stream, the convention was that states are indexed consecutively starting from 1. This convention produces nice and human-readable output. However, it requires a re-indexing when writing the generator. As of libFAUDES 2.20j, the token format was extended to allow for explicit symbol table entries in the format "symbolic_state_name#index". Whether or not re-indexing is applied can be configured via ReindexOnWrite(bool). The default is not to re-index. If you want to read your token stream with libFAUDES pre 2.20j, you must turn re-index on.

Technical Detail: The generator name, the alphabet and the state set are optional. The generator name defaults to "generator"; the alphabet and the state set are extracted from the transition relation. Furthermore, there alternative short labels "A" for "Alphabet", "S" for "States" etc. are accepted. This short format has been introduced in 2.24e and is meant for embedding data concisely into luafaudes scripts. In general, the full format is preferable.

<T>
idle alpha busy
busy beta idle
busy mue down
down lambda idle
</T>
<I> idle </I>
<M> idle </M>

File I/O (XML file-format)

The alternative file file format prodiced by XWrite() is meant to accomodate for additional attributes attached to states, events and transitions, including e.g. graph data for a graphical representation. It starts with the outer element "Generator" with name attribute (optionally) and type attribute (mandatory).

<Generator name="simpla machine" ftype="Generator">
<Event name="alpha"/>
<Event name="beta"/>
<Event name="mue"/>
<Event name="lambda"/>
<State name="idle" id="1">
<Marked/><Initial/>
<State/>
<State name="busy" id="2"/>
<State name="down" id="3"/>
<TransitionRelation>
<Transition x1="1" event="alphs" x2="2"/>
<Transition x1="2" event="beta" x2="2"/>
<Transition x1="2" event="mue" x2="3"/>
<Transition x1="3" event="lambda" x2="1"/>
<TransitionRelation/>
IndexSet StateSet
Definition: cfl_indexset.h:271

Attributes

libFAUDES generators provide an interface to access so called attributes, ie data that is optionally attached to individual states, events, transitions, or globally to the generator.

The faudes::Generator's interface to attributes is abstract in the sense that a generator is not aware of the actual type of its attributes. Instances of the class Generator indeed have trivial attributes that hold no data at all. To use attributes, you are meant to instantiate objects of the derived class TaGenerator with template parameters to specify attribute types. Basic algorithms implemented for plain generators will accept attributed generators as arguments. Such algorithms may occasionally inspect or set attributes using the abstract interface and C++ dynamic casts. For specialised algorithms that refer to extended generator semantics, we recommend derived generator classes as argument type.

Definition at line 213 of file cfl_generator.h.

#include <cfl_generator.h>

Public Member Functions

Constructors & Destructor
 vGenerator (void)
 Default constructor. More...
 
 vGenerator (const vGenerator &rOtherGen)
 Copy-constructror. More...
 
 vGenerator (const std::string &rFileName)
 Construct from file. More...
 
virtual vGeneratorNew (void) const
 Construct on heap. More...
 
virtual vGeneratorCopy (void) const
 Construct copy on heap. More...
 
virtual const TypeCast (const Type *pOther) const
 Type test. More...
 
virtual ~vGenerator (void)
 Destructor. More...
 
Copy and Assignment
virtual vGeneratorAssign (const Type &rSrc)
 Copy from other faudes type. More...
 
virtual vGeneratorAssignWithoutAttributes (const vGenerator &rGen)
 Copy from other vGenerator, ignore attributes. More...
 
virtual void Move (vGenerator &rGen)
 Destructive copy to other vGenerator. More...
 
virtual vGeneratoroperator= (const vGenerator &rOtherGen)
 Assignment operator (uses Assign method) More...
 
virtual void Version (const std::string &rVersion, vGenerator &rResGen) const
 Create another version of this generator. More...
 
virtual void Version (Idx version, vGenerator &rResGen) const
 Create another version of this generator. More...
 
virtual void Version (const std::string &rPattern, const std::string &rReplacement, vGenerator &rResGen) const
 Create another version of this generator. More...
 
Basic Maintenance
void Name (const std::string &rName)
 Set the generator's name. More...
 
const std::string & Name (void) const
 Get generator's name. More...
 
virtual bool Valid (void) const
 Check if generator is valid. More...
 
virtual void Clear (void)
 Clear generator data. More...
 
void ClearStates (void)
 Clear all states and transitions, maintain alphabet. More...
 
Idx AlphabetSize (void) const
 Get number of events in alphabet. More...
 
Idx Size (void) const
 Get generator size (number of states) More...
 
Idx TransRelSize (void) const
 Get number of transitions. More...
 
Idx InitStatesSize (void) const
 Get number of initial states. More...
 
Idx MarkedStatesSize (void) const
 Get number of marked states. More...
 
bool Empty (void) const
 Check if generator is empty (no states) More...
 
bool AlphabetEmpty (void) const
 Check if alphabet is Empty. More...
 
bool TransRelEmpty (void) const
 Check if transition relation is empty. More...
 
bool InitStatesEmpty (void) const
 Check if set of initial states are empty. More...
 
bool MarkedStatesEmpty (void) const
 Check if set of marked states are empty. More...
 
Event Symboltable
SymbolTableEventSymbolTablep (void) const
 Get Pointer to EventSymbolTable currently used by this vGenerator. More...
 
virtual void EventSymbolTablep (SymbolTable *pSymTab)
 Set EventSymbolTable to be used by this vGenerator. More...
 
virtual void EventSymbolTablep (const vGenerator &rOtherGen)
 Set EventSymbolTable as given by rOtherGen. More...
 
EventSet NewEventSet (void) const
 Create EventSet with generator's EventSymbolTable (on stack). More...
 
EventSetNewEventSetp (void) const
 Create EventSet with generator's EventSymbolTable (on heap). More...
 
Idx EventIndex (const std::string &rName) const
 Event index lookup. More...
 
std::string EventName (Idx index) const
 Event name lookup. More...
 
void EventName (Idx index, const std::string &rName)
 Set name for existing event. More...
 
std::string UniqueEventName (const std::string &rName) const
 Create a new unique symbolic event name. More...
 
bool EventRename (Idx event, const std::string &rNewName)
 Rename event in this generator. More...
 
bool EventRename (const std::string &rOldName, const std::string &rNewName)
 Rename event in this generator. More...
 
State Symboltable
const SymbolTableStateSymbolTable (void) const
 Get StateSymbolTable. More...
 
void StateSymbolTable (const SymbolTable &rSymTab)
 Set StateSymbolTable. More...
 
Idx StateIndex (const std::string &rName) const
 State index lookup. More...
 
std::string StateName (Idx index) const
 State name lookup. More...
 
void StateName (Idx index, const std::string &rName)
 Set name of state. More...
 
void ClearStateNames (void)
 Remove all names from generator's StateSymbolTable. More...
 
void ClrStateName (Idx index)
 Clear name for individual state. More...
 
void ClrStateName (const std::string &rName)
 Clear name for individual state. More...
 
bool StateNamesEnabled (void) const
 Whether libFAUEDS functions are requested to generate state names. More...
 
void StateNamesEnabled (bool flag)
 Enable/disable libFAUEDS functions to automatically generate state names. More...
 
void SetDefaultStateNames (void)
 Assign each state a default name based on its index. More...
 
void EnforceStateNames (const std::string &rTemplate)
 For all states without a symbolic name, assign a name based on suggested template and the index. More...
 
std::string UniqueStateName (const std::string &rName) const
 Create a new unique symbolic state name. More...
 
Read Access to Core Members
EventSet::Iterator AlphabetBegin (void) const
 Iterator to Begin() of alphabet. More...
 
EventSet::Iterator AlphabetEnd (void) const
 Iterator to End() of alphabet. More...
 
bool ExistsEvent (Idx index) const
 Test existence of event in alphabet. More...
 
bool ExistsEvent (const std::string &rName) const
 Test existence of event in alphabet. More...
 
EventSet::Iterator FindEvent (Idx index) const
 Returns a iterator to event index in alphabet. More...
 
EventSet::Iterator FindEvent (const std::string &rName) const
 Returns a iterator to event index in alphabet. More...
 
const EventSetAlphabet (void) const
 Return const reference to alphabet. More...
 
StateSet::Iterator StatesBegin (void) const
 Iterator to Begin() of state set. More...
 
StateSet::Iterator StatesEnd (void) const
 Iterator to End() of state set. More...
 
bool ExistsState (Idx index) const
 Test existence of state in state set. More...
 
bool ExistsState (const std::string &name) const
 Test existence of state in state set. More...
 
StateSet::Iterator FindState (Idx index) const
 Returns a iterator to state index in state set. More...
 
StateSet::Iterator FindState (const std::string &rName) const
 Returns a iterator to state with specified name. More...
 
const StateSetStates (void) const
 Return reference to state set. More...
 
Idx InitState (void) const
 Return initial state. More...
 
StateSet::Iterator InitStatesBegin (void) const
 Iterator to Begin() of mInitStates. More...
 
StateSet::Iterator InitStatesEnd (void) const
 Iterator to End() of mInitStates. More...
 
bool ExistsInitState (Idx index) const
 Test existence of state in mInitStates. More...
 
StateSet::Iterator FindInitState (Idx index) const
 Iterator to state index in mInitStates. More...
 
const StateSetInitStates (void) const
 Const ref to initial states. More...
 
StateSet::Iterator MarkedStatesBegin (void) const
 Iterator to Begin() of mMarkedStates. More...
 
StateSet::Iterator MarkedStatesEnd (void) const
 Iterator to End() of mMarkedStates. More...
 
bool ExistsMarkedState (Idx index) const
 Test existence of state in mMarkedStates. More...
 
StateSet::Iterator FindMarkedState (Idx index) const
 Returns a iterator to state index in mMarkedStates. More...
 
const StateSetMarkedStates (void) const
 Return const ref of marked states. More...
 
TransSet::Iterator TransRelBegin (void) const
 Iterator to Begin() of transition relation. More...
 
TransSet::Iterator TransRelEnd (void) const
 Iterator to End() of transition relation. More...
 
TransSet::Iterator TransRelBegin (Idx x1) const
 Iterator to begin of transitions with x1 as predecessor state. More...
 
TransSet::Iterator TransRelEnd (Idx x1) const
 iterator to end of transitions with x1 as predecessor state. More...
 
TransSet::Iterator TransRelBegin (Idx x1, Idx ev) const
 iterator to begin of transitions with x1 as predecessor state and event ev. More...
 
TransSet::Iterator TransRelEnd (Idx x1, Idx ev) const
 Iterator to end of transitions with x1 as predecessor state and event ev. More...
 
TransSet::Iterator FindTransition (const std::string &rX1, const std::string &rEv, const std::string &rX2) const
 iterator to transition given by x1, ev, x2 More...
 
TransSet::Iterator FindTransition (Idx x1, Idx ev, Idx x2) const
 Iterator to transition given by x1, ev, x2. More...
 
TransSet::Iterator FindTransition (const Transition &rTrans) const
 Iterator to transition. More...
 
bool ExistsTransition (const std::string &rX1, const std::string &rEv, const std::string &rX2) const
 Test for transition given by x1, ev, x2. More...
 
bool ExistsTransition (Idx x1, Idx ev, Idx x2) const
 Test for transition given by x1, ev, x2. More...
 
bool ExistsTransition (const Transition &rTrans) const
 test for transition More...
 
bool ExistsTransition (Idx x1, Idx ev) const
 Test for transition given by x1, ev. More...
 
bool ExistsTransition (Idx x1) const
 Test for transition given by x1. More...
 
const TransSetTransRel (void) const
 Return reference to transition relation. More...
 
void TransRel (TransSetX1EvX2 &res) const
 Get copy of trantision relation sorted by other compare operator, e.g. More...
 
void TransRel (TransSetEvX1X2 &res) const
 
void TransRel (TransSetEvX2X1 &res) const
 
void TransRel (TransSetX2EvX1 &res) const
 
void TransRel (TransSetX2X1Ev &res) const
 
void TransRel (TransSetX1X2Ev &res) const
 
Transition TransitionByNames (const std::string &rX1, const std::string &rEv, const std::string &rX2) const
 Convebience function. More...
 
Write Access to Core Members
bool InsEvent (Idx index)
 Add an existing event to alphabet by index. More...
 
Idx InsEvent (const std::string &rName)
 Add named event to generator. More...
 
void InsEvents (const EventSet &events)
 Add new named events to generator. More...
 
bool DelEvent (Idx index)
 Delete event from generator by index. More...
 
bool DelEvent (const std::string &rName)
 Delete event from generator by name. More...
 
void DelEvents (const EventSet &rEvents)
 Delete a set of events from generator. More...
 
bool DelEventFromAlphabet (Idx index)
 Delete event from alphabet without consistency check. More...
 
void InjectAlphabet (const EventSet &rNewalphabet)
 Set mpAlphabet without consistency check. More...
 
void RestrictAlphabet (const EventSet &rNewalphabet)
 Restricts mpAlphabet incl removing resp. More...
 
Idx InsState (void)
 Add new anonymous state to generator. More...
 
bool InsState (Idx index)
 Add (perhaps new) state to generator. More...
 
Idx InsState (const std::string &rName)
 Add new named state to generator. More...
 
void InsStates (const StateSet &rStates)
 Add anonymous states to generator. More...
 
bool DelState (Idx index)
 Delete a state from generator by index. More...
 
bool DelState (const std::string &rName)
 Delete a state from generator by name. More...
 
void DelStates (const StateSet &rDelStates)
 Delete a set of states Cleans mpStates, mInitStates, mMarkedStates, mpTransrel, and mpStateSymboltable. More...
 
bool DelStateFromStates (Idx index)
 Delete a state from generator without consistency check. More...
 
StateSet::Iterator DelStateFromStates (StateSet::Iterator pos)
 Delete a state from generator without consistency check. More...
 
void RestrictStates (const StateSet &rStates)
 Restrict states Cleans mpStates, mInitStates, mMarkedStates, mpTransrel, and mpStateSymboltable. More...
 
void InjectState (Idx index)
 Inject an existing state index into generators mStates Use with care! For use in performance optimized functions. More...
 
void InjectStates (const StateSet &rNewStates)
 Inject a complete state set without consistency checks (without attributes) More...
 
Idx InsInitState (void)
 Create new anonymous state and set as initial state. More...
 
bool InsInitState (Idx index)
 Add (perhaps new) state to generator and turn it into a initial state. More...
 
Idx InsInitState (const std::string &rName)
 Create a new named state and set as initial state. More...
 
void InsInitStates (const StateSet &rStates)
 Add (perhaps new) anonymous initial states to generator
More...
 
Idx InsMarkedState (void)
 Create new anonymous state and set as marked state. More...
 
bool InsMarkedState (Idx index)
 Add (perhaps new) state to generator and turn it into a marked state. More...
 
Idx InsMarkedState (const std::string &rName)
 Create a new named state and set as marked state. More...
 
void InsMarkedStates (const StateSet &rStates)
 Add (perhaps new) anonymous initial states to generator
More...
 
void SetInitState (Idx index)
 Set an existing state as initial state by index. More...
 
void SetInitState (const std::string &rName)
 Set an existing state as initial state by name. More...
 
void InjectInitStates (const StateSet &rNewInitStates)
 Replace mInitStates with StateSet given as parameter without consistency checks. More...
 
void ClrInitState (Idx index)
 Unset an existing state as initial state by index. More...
 
void ClrInitState (const std::string &rName)
 Unset an existing state as initial state by name. More...
 
StateSet::Iterator ClrInitState (StateSet::Iterator pos)
 Unset an existing state as initial state by iterator. More...
 
void ClearInitStates (void)
 Clear all mInitStates. More...
 
void SetMarkedState (Idx index)
 Set an existing state as marked state by index. More...
 
void SetMarkedState (const std::string &rName)
 Set an existing state as marked state by name. More...
 
void ClrMarkedState (Idx index)
 Unset an existing state as marked state by index. More...
 
void ClrMarkedState (const std::string &rName)
 Unset an existing state as marked state by name. More...
 
StateSet::Iterator ClrMarkedState (StateSet::Iterator pos)
 Unset an existing state as marked state by iterator. More...
 
void ClearMarkedStates (void)
 Clear all marked states. More...
 
void InjectMarkedStates (const StateSet &rNewMarkedStates)
 Replace mMarkedStates with StateSet given as parameter without consistency checks. More...
 
bool SetTransition (Idx x1, Idx ev, Idx x2)
 Add a transition to generator by indices. More...
 
bool SetTransition (const std::string &rX1, const std::string &rEv, const std::string &rX2)
 Add a transition to generator by names. More...
 
bool SetTransition (const Transition &rTransition)
 Add a transition to generator. More...
 
void ClrTransition (Idx x1, Idx ev, Idx x2)
 Remove a transition by indices. More...
 
void ClrTransition (const Transition &rTrans)
 Remove a transition by transition object. More...
 
TransSet::Iterator ClrTransition (TransSet::Iterator it)
 Remove a transition by iterator. More...
 
void ClrTransitions (Idx x1, Idx ev)
 Remove a transitions by state and event. More...
 
void ClrTransitions (Idx x1)
 Remove a transitions by state. More...
 
void ClearTransRel (void)
 Clear all transitions. More...
 
void InjectTransition (const Transition &rTrans)
 Set transition without consistency check. More...
 
void InjectTransRel (const TransSet &rNewtransrel)
 Set transition relation without consistency check (no attributes) More...
 
Attributes
virtual void ClearAttributes (void)
 Clear Attributes. More...
 
virtual bool UpdateAttributes (void)
 Updates internal attributes. More...
 
virtual void ClearEventAttributes (void)
 Clear event attributes. More...
 
virtual void ClrEventAttribute (Idx index)
 Clear attribute for existing event. More...
 
virtual void EventAttribute (Idx index, const Type &rAttr)
 Set attribute for existing event. More...
 
virtual void EventAttributes (const EventSet &rEventSet)
 Set attributes for existing events. More...
 
virtual const AttributeVoidEventAttribute (Idx index) const
 Event attribute lookup. More...
 
virtual const AttributeVoidEventAttribute (const std::string &rName) const
 Event attribute lookup. More...
 
virtual AttributeVoidEventAttributep (Idx index)
 Event attribute pointer to access Attribute methods. More...
 
virtual AttributeVoidEventAttributep (const std::string &rName)
 Event attribute pointer to access Attribute methods. More...
 
virtual void ClearStateAttributes (void)
 Clear state attributes. More...
 
virtual void ClrStateAttribute (Idx index)
 Clear attribute for existing state. More...
 
virtual void StateAttribute (Idx index, const Type &rAttr)
 Set attribute for existing state. More...
 
virtual const AttributeVoidStateAttribute (Idx index) const
 State attribute lookup. More...
 
virtual AttributeVoidStateAttributep (Idx index)
 State attribute pointer to access Attribute methods. More...
 
virtual void ClearTransAttributes (void)
 Clear transition attributes. More...
 
virtual void TransAttribute (const Transition &rTrans, const Type &rAttr)
 Set attribute for existing transition. More...
 
virtual void ClrTransAttribute (const Transition &rTrans)
 Clear attribute for existing transition. More...
 
virtual const AttributeVoidTransAttribute (const Transition &rTrans) const
 Transition attribute lookup. More...
 
virtual AttributeVoidTransAttributep (const Transition &rTrans)
 Transition attribute pointer to access Attribute methods. More...
 
virtual void ClearGlobalAttribute (void)
 Clear global attribute. More...
 
virtual void GlobalAttribute (const Type &rAttr)
 Set global attribute. More...
 
virtual void GlobalAttributeTry (const Type &rAttr)
 Set global attribute. More...
 
virtual const AttributeVoidGlobalAttribute (void) const
 Global attribute lookup. More...
 
virtual AttributeVoidGlobalAttributep (void)
 Get attribute pointer The global attribute allways exits. More...
 
Reachability
StateSet AccessibleSet (void) const
 Compute set of accessible states. More...
 
bool Accessible (void)
 Make generator accessible. More...
 
bool IsAccessible (void) const
 Check if generator is accessible. More...
 
StateSet CoaccessibleSet (void) const
 Compute set of Coaccessible states. More...
 
bool Coaccessible (void)
 Make generator Coaccessible. More...
 
bool IsCoaccessible (void) const
 Check if generator is Coaccessible. More...
 
StateSet BlockingStates (void) const
 Compute set of blocking states. More...
 
StateSet TerminalStates (void) const
 Compute set of terminal states. More...
 
StateSet TerminalStates (const StateSet &rStates) const
 Compute set of terminal states. More...
 
bool IsComplete (void) const
 Check if generator is complete. More...
 
bool IsComplete (const StateSet &rStates) const
 Check if generator is complete. More...
 
bool IsComplete (const EventSet &rSigmaO) const
 Check if generator is complete w.r.t. More...
 
bool Complete (void)
 Make generator Complete. More...
 
bool Complete (const EventSet &rSigmaO)
 Make generator Complete w.r.t. More...
 
StateSet TrimSet (void) const
 Compute set of trim states. More...
 
bool Trim (void)
 Make generator trim. More...
 
bool IsTrim (void) const
 Check if generator is trim. More...
 
bool OmegaTrim (void)
 Make generator omega-trim. More...
 
bool IsOmegaTrim (void) const
 Check if generator is omega-trim. More...
 
Misc
EventSet UsedEvents (void) const
 Return used events (executed in transitions) More...
 
EventSet UnusedEvents (void) const
 Return unused events. More...
 
void MinimizeAlphabet (void)
 Set the alphabet to used events. More...
 
EventSet ActiveEventSet (Idx x1) const
 Return active event set at state x1. More...
 
TransSet ActiveTransSet (Idx x1) const
 Return active transition set at state x1. More...
 
StateSet TransRelStates (void) const
 Return the states covered by transitions. More...
 
Idx SuccessorState (Idx x1, Idx ev) const
 Return the successor state of state x1 with event ev. More...
 
StateSet SuccessorStates (Idx x1) const
 Return the successor states of state x1. More...
 
StateSet SuccessorStates (Idx x1, Idx ev) const
 Return the successor states of state x1 with event ev. More...
 
bool IsDeterministic (void) const
 Check if generator is deterministic. More...
 
void SetMinStateIndexMap (void) const
 Set minimal index map for file io of generator states. More...
 
void ClearMinStateIndexMap (void) const
 Clear minimal index map for 1:1 file io. More...
 
Idx MinStateIndex (Idx index) const
 Get state index as is it will be written to file. More...
 
void MinStateIndex (void)
 Re-enumerate states. More...
 
Idx MaxStateIndex (void) const
 Get maximum state index used in this generator. More...
 
const std::map< Idx, Idx > & MinStateIndexMap (void) const
 Get state index translation map. More...
 
std::string EStr (Idx index) const
 Pretty printable event name for index (eg for debugging). More...
 
std::string SStr (Idx index) const
 Return pretty printable state name for index (eg for debugging) More...
 
std::string TStr (const Transition &rTrans) const
 Return pretty printable transition (eg for debugging) More...
 
void GraphWrite (const std::string &rFileName, const std::string &rOutFormat="", const std::string &rDotExec="dot") const
 Produce graphical representation of this generator. More...
 
bool operator< (const vGenerator &rOtherGen) const
 Order for sorting containers of generators. More...
 
- Public Member Functions inherited from faudes::Type
 Type (void)
 Constructor. More...
 
 Type (const Type &rType)
 Copy constructor. More...
 
virtual ~Type (void)
 Destructor. More...
 
virtual Typeoperator= (const Type &rSrc)
 Assign configurationdata from other object. More...
 
virtual bool Equal (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual bool operator== (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual bool operator!= (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual const std::string & TypeName (void) const
 Get objects's type name. More...
 
void Write (const Type *pContext=0) const
 Write configuration data to console. More...
 
void Write (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const
 Write configuration data to a file. More...
 
void Write (const std::string &pFileName, std::ios::openmode openmode) const
 Write configuration data to a file. More...
 
void Write (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to TokenWriter. More...
 
virtual void XWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to an XML file. More...
 
void XWrite (const Type *pContext=0) const
 Write configuration data in XML format to concole Note: this write function uses the virtual function DoXWrite(), to be reimplemented by derived classes. More...
 
void XWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data in XML format to TokenWriter. More...
 
std::string ToString (const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to a string. More...
 
std::string ToText (const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to a formated string. More...
 
void DWrite (const Type *pContext=0) const
 Write configuration data to console, debugging format. More...
 
void DWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const
 Write configuration data to a file, debugging format. More...
 
void DWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data in debug format to TokenWriter. More...
 
void SWrite (TokenWriter &rTw) const
 Write statistics comment to TokenWriter. More...
 
void SWrite (void) const
 Write statistics comment to console. More...
 
std::string ToSText (void) const
 Write statistics to a string. More...
 
void Read (const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from file with label specified. More...
 
void FromString (const std::string &rString, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from a string. More...
 
void Read (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from TokenReader with label sepcified. More...
 

Static Public Member Functions

static SymbolTableGlobalEventSymbolTablep (void)
 Get Pointer to global EventSymbolTable. More...
 
static void StateNamesEnabledDefault (bool flag)
 Sets the default for automatic state name generation. More...
 

Protected Member Functions

virtual void NewCore (void)
 Allocate my heap members (attribute dependent types) More...
 
virtual void DeleteCore (void)
 Free my heap members (attribute dependent types) More...
 
virtual void UpdateCore (void)
 Callback for core update. More...
 
void ConfigureAttributeTypes (const AttributeVoid *pNewGlobalPrototype, const StateSet *pNewStatesPrototype, const EventSet *pNewAlphabetPrototype, const TransSet *pNewTransRelPrototype)
 Configure attribute types. More...
 
void DoAssign (const vGenerator &rSrc)
 Assignment for matching type. More...
 
virtual void DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Read generator object from TokenReader, see Type::Read for public wrappers. More...
 
virtual void DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write generator to TokenWriter, see Type::Write for public wrappers. More...
 
virtual void DoDWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write generator in debugging format to TokenWriter, see Type::DWrite for public wrappers. More...
 
virtual void DoSWrite (TokenWriter &rTw) const
 Write generator statistics as comment to TokenWriter, see Type::SWrite for public wrappers. More...
 
virtual void DoXWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write generator to TokenWriter, see Type::XWrite for public wrappers. More...
 
void ReadAlphabet (TokenReader &rTr)
 Read the generator's alphabet from a TokenReader. More...
 
void WriteStates (TokenWriter &rTw) const
 Write generators stateset to TokenWriter. More...
 
void ReadStates (TokenReader &rTr)
 Read the generator's stateset from a TokenReader. More...
 
void XReadStateSet (TokenReader &rTr, StateSet &rStateSet, const std::string &rLabel="") const
 Read a stateset from TokenReader in XML format. More...
 
void ReadTransRel (const std::string &rFileName)
 Read the generator's transition relation from a file. More...
 
void ReadTransRel (TokenReader &rTr)
 Read the generator's transition relation from a TokenReader. More...
 
void XReadTransRel (TokenReader &rTr)
 Read the generator's transition relation from a TokenReader. More...
 
void XWriteStateSet (TokenWriter &rTw, const StateSet &rStateSet, const std::string &rLabel="") const
 Write a stateset to TokenWriter in XML format. More...
 
void XWriteTransRel (TokenWriter &rTw) const
 Write transition relation to tokenwriter in XML format. More...
 
- Protected Member Functions inherited from faudes::Type
void DoAssign (const Type &rSrc)
 Assign configuration data from other object. More...
 
bool DoEqual (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual const TypeDefinitionTypeDefinitionp (void) const
 Get objects's type definition. More...
 
virtual Token XBeginTag (const std::string &rLabel="", const std::string &rFallbackLabel="") const
 

Static Protected Member Functions

static const EventSetAlphabetVoid (void)
 Static default alphabet prototype (incl. More...
 
static const StateSetStatesVoid (void)
 Static default state set prototype (incl. More...
 
static const TransSetTransRelVoid (void)
 Static default transition relation prototype (incl. More...
 
static const AttributeVoidGlobalVoid (void)
 Static default global attribute prototype (configures global attribute type) More...
 

Protected Attributes

std::string mMyName
 Name of generator. More...
 
Idx mId
 Number of generator. More...
 
SymbolTable mStateSymbolTable
 State symbol table (local per Generator) More...
 
SymbolTablempStateSymbolTable
 Pointer to State symbol table. More...
 
SymbolTablempEventSymbolTable
 Pointer to Event symbol table. More...
 
bool mStateNamesEnabled
 Automatic state names. More...
 
bool mReindexOnWrite
 Reindex states on file-i/o. More...
 
EventSetmpAlphabet
 Pointer to alphabet (actual type depends on attributes) More...
 
StateSetmpStates
 Pointer to state set (actual type depends on attributes) More...
 
TransSetmpTransRel
 Pointer to ransition relation (actual type depends on attributes) More...
 
AttributeVoidmpGlobalAttribute
 Pointer to lobal attribute (actual type depends on attributes) More...
 
const EventSetpAlphabetPrototype
 Pointer to alphabet prototype (incl. More...
 
const StateSetpStatesPrototype
 Pointer to state set prototype (incl. More...
 
const TransSetpTransRelPrototype
 Pointer to transition relation prototype (incl. More...
 
const AttributeVoidpGlobalPrototype
 Pointer to global attribute prototype (configures global attribute type) More...
 
StateSet mInitStates
 Initial states. More...
 
StateSet mMarkedStates
 Marked states. More...
 
std::map< Idx, IdxmMinStateIndexMap
 Map State indices to consecutive indices. More...
 

Static Protected Attributes

static Idx msObjectCount = 0
 Number of generator objects. More...
 
static bool msStateNamesEnabledDefault = true
 Default for automatic statenames. More...
 
static bool msReindexOnWriteDefault = false
 Default for automatic statenames. More...
 

File IO

void WriteAlphabet (void) const
 Write generators alphabet to console. More...
 
std::string AlphabetToString (void) const
 Write generators alphabet to string. More...
 
void WriteAlphabet (TokenWriter &rTw) const
 Write generators alphabet to tokenwriter. More...
 
void WriteStateSet (const StateSet &rStateSet) const
 Write a stateset to console (no re-indexing). More...
 
std::string StateSetToString (const StateSet &rStateSet) const
 Write a stateset to string (no re-indexing). More...
 
std::string StateSetToText (const StateSet &rStateSet) const
 Write a stateset to formated text (no re-indexing). More...
 
void WriteStateSet (TokenWriter &rTw, const StateSet &rStateSet) const
 Write a stateset to TokenWriter. More...
 
void DWriteStateSet (TokenWriter &rTw, const StateSet &rStateSet) const
 Write a stateset to TokenWriter (debug version, no re-indexing) More...
 
std::string StatesToString (void) const
 Write stateset of this generator to a string (no re-indexing) More...
 
std::string StatesToText (void) const
 Write stateset of this generator to formated text (no re-indexing) More...
 
std::string MarkedStatesToString (void) const
 Write set of marked states to a string (no re-indexing) More...
 
std::string InitStatesToString (void) const
 Write set of initial states to a string (no re-indexing) More...
 
void WriteTransRel (void) const
 Write transition relation to console (no re-indexing) More...
 
std::string TransRelToString (void) const
 Write transition relation to string (no re-indexing) More...
 
std::string TransRelToText (void) const
 Write transition relation to formated text (no re-indexing) More...
 
void WriteTransRel (TokenWriter &rTw) const
 Write transition relation to tokenwriter. More...
 
void DWriteTransRel (TokenWriter &rTw) const
 Write transition relation to tokenwriter (debug version) More...
 
virtual void DotWrite (const std::string &rFileName) const
 Writes generator to dot input format. More...
 
virtual void DDotWrite (const std::string &rFileName) const
 Writes generator to dot input format (no re-indexing). More...
 
virtual void XDotWrite (const std::string &rFileName) const
 Writes generator to dot input format for export to VioLib. More...
 
void ReadStateSet (TokenReader &rTr, const std::string &rLabel, StateSet &rStateSet) const
 Read a state set. More...
 
bool ReindexOnWrite (void) const
 Test whether file-i/o uses minimal state indicees. More...
 
void ReindexOnWrite (bool flag)
 Enable/disable minimal state indicees for file-i/o. More...
 
static void ReindexOnWriteDefault (bool flag)
 Enable/disable reindexing states for file-i/o. More...
 
static bool ReindexOnWriteDefault (void)
 Enable/disable reindexing states for file-i/o. More...
 

Constructor & Destructor Documentation

◆ vGenerator() [1/3]

faudes::vGenerator::vGenerator ( void  )

Default constructor.

doxygen group

Definition at line 62 of file cfl_generator.cpp.

◆ vGenerator() [2/3]

faudes::vGenerator::vGenerator ( const vGenerator rOtherGen)

Copy-constructror.

Definition at line 97 of file cfl_generator.cpp.

◆ vGenerator() [3/3]

faudes::vGenerator::vGenerator ( const std::string &  rFileName)

Construct from file.

This constructor effectively uses the DoRead(TokenReader&) function to read.

Parameters
rFileNameName of file
Exceptions
Exception
  • IO errors (id 1)
  • Token mismatch (id 50, 51, 52, 80, 85)

Definition at line 129 of file cfl_generator.cpp.

◆ ~vGenerator()

faudes::vGenerator::~vGenerator ( void  )
virtual

Destructor.

Definition at line 194 of file cfl_generator.cpp.

Member Function Documentation

◆ Accessible()

bool faudes::vGenerator::Accessible ( void  )

Make generator accessible.

Returns
True if generator contains at least one initial state

Definition at line 2030 of file cfl_generator.cpp.

◆ AccessibleSet()

StateSet faudes::vGenerator::AccessibleSet ( void  ) const

Compute set of accessible states.

doxygen group

Definition at line 1998 of file cfl_generator.cpp.

◆ ActiveEventSet()

EventSet faudes::vGenerator::ActiveEventSet ( Idx  x1) const

Return active event set at state x1.

Parameters
x1Index of x1
Returns
EventSet

Definition at line 1938 of file cfl_generator.cpp.

◆ ActiveTransSet()

TransSet faudes::vGenerator::ActiveTransSet ( Idx  x1) const

Return active transition set at state x1.

Parameters
x1Index of x1
Returns
EventSet

Definition at line 1948 of file cfl_generator.cpp.

◆ Alphabet()

const EventSet & faudes::vGenerator::Alphabet ( void  ) const

Return const reference to alphabet.

Returns
EventSet Reference to mpAlphabet

Definition at line 1878 of file cfl_generator.cpp.

◆ AlphabetBegin()

EventSet::Iterator faudes::vGenerator::AlphabetBegin ( void  ) const

Iterator to Begin() of alphabet.

doxygen group

Returns
Iterator to begin of mpAlphabet

Definition at line 1047 of file cfl_generator.cpp.

◆ AlphabetEmpty()

bool faudes::vGenerator::AlphabetEmpty ( void  ) const

Check if alphabet is Empty.

Returns
True if mpAlphabet is empty

Definition at line 648 of file cfl_generator.cpp.

◆ AlphabetEnd()

EventSet::Iterator faudes::vGenerator::AlphabetEnd ( void  ) const

Iterator to End() of alphabet.

Returns
Iterator to end of mpAlphabet

Definition at line 1052 of file cfl_generator.cpp.

◆ AlphabetSize()

Idx faudes::vGenerator::AlphabetSize ( void  ) const

Get number of events in alphabet.

Returns
Number of events

Definition at line 572 of file cfl_generator.cpp.

◆ AlphabetToString()

std::string faudes::vGenerator::AlphabetToString ( void  ) const

Write generators alphabet to string.

Returns
std::string
Exceptions
Exception
  • IO errors (id 2)

Definition at line 2523 of file cfl_generator.cpp.

◆ AlphabetVoid()

const EventSet & faudes::vGenerator::AlphabetVoid ( void  )
staticprotected

Static default alphabet prototype (incl.

attribute type)

Definition at line 41 of file cfl_generator.cpp.

◆ Assign()

vGenerator & faudes::vGenerator::Assign ( const Type rSrc)
virtual

Copy from other faudes type.

doxygen group The current implementation tests whether the source object can be casted to a generator and then performs the according assignment.

Parameters
rSrcSource to copy from.

Reimplemented from faudes::Type.

Reimplemented in faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, and faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 287 of file cfl_generator.cpp.

◆ AssignWithoutAttributes()

vGenerator & faudes::vGenerator::AssignWithoutAttributes ( const vGenerator rGen)
virtual

Copy from other vGenerator, ignore attributes.

Parameters
rGenSource to copy from.

Definition at line 303 of file cfl_generator.cpp.

◆ BlockingStates()

StateSet faudes::vGenerator::BlockingStates ( void  ) const

Compute set of blocking states.

A state is considered blocking if it is accessible but not coaccessible.

Definition at line 2148 of file cfl_generator.cpp.

◆ Cast()

const Type * faudes::vGenerator::Cast ( const Type pOther) const
virtual

◆ Clear()

void faudes::vGenerator::Clear ( void  )
virtual

Clear generator data.

Clears state set, alphabet and transitionrealtion. Behavioural flags eg StateNamesEnabled are maintained.

Reimplemented from faudes::Type.

Reimplemented in faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, and faudes::Executor.

Definition at line 582 of file cfl_generator.cpp.

◆ ClearAttributes()

void faudes::vGenerator::ClearAttributes ( void  )
virtual

Clear Attributes.

doxygen group

Definition at line 615 of file cfl_generator.cpp.

◆ ClearEventAttributes()

void faudes::vGenerator::ClearEventAttributes ( void  )
virtual

Clear event attributes.

Definition at line 605 of file cfl_generator.cpp.

◆ ClearGlobalAttribute()

void faudes::vGenerator::ClearGlobalAttribute ( void  )
virtual

Clear global attribute.

Definition at line 595 of file cfl_generator.cpp.

◆ ClearInitStates()

void faudes::vGenerator::ClearInitStates ( void  )

Clear all mInitStates.

Definition at line 1502 of file cfl_generator.cpp.

◆ ClearMarkedStates()

void faudes::vGenerator::ClearMarkedStates ( void  )

Clear all marked states.

Definition at line 1577 of file cfl_generator.cpp.

◆ ClearMinStateIndexMap()

void faudes::vGenerator::ClearMinStateIndexMap ( void  ) const

Clear minimal index map for 1:1 file io.

Definition at line 674 of file cfl_generator.cpp.

◆ ClearStateAttributes()

void faudes::vGenerator::ClearStateAttributes ( void  )
virtual

Clear state attributes.

Reimplemented in faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 600 of file cfl_generator.cpp.

◆ ClearStateNames()

void faudes::vGenerator::ClearStateNames ( void  )

Remove all names from generator's StateSymbolTable.

Definition at line 970 of file cfl_generator.cpp.

◆ ClearStates()

void faudes::vGenerator::ClearStates ( void  )

Clear all states and transitions, maintain alphabet.

Definition at line 624 of file cfl_generator.cpp.

◆ ClearTransAttributes()

void faudes::vGenerator::ClearTransAttributes ( void  )
virtual

Clear transition attributes.

Definition at line 610 of file cfl_generator.cpp.

◆ ClearTransRel()

void faudes::vGenerator::ClearTransRel ( void  )

Clear all transitions.

Definition at line 1717 of file cfl_generator.cpp.

◆ ClrEventAttribute()

void faudes::vGenerator::ClrEventAttribute ( Idx  index)
virtual

Clear attribute for existing event.

Parameters
indexEvent index

Definition at line 1737 of file cfl_generator.cpp.

◆ ClrInitState() [1/3]

void faudes::vGenerator::ClrInitState ( const std::string &  rName)

Unset an existing state as initial state by name.

Parameters
rNameState name
Exceptions
Exception
  • State name not known in generator (id 90)

Definition at line 1482 of file cfl_generator.cpp.

◆ ClrInitState() [2/3]

void faudes::vGenerator::ClrInitState ( Idx  index)

Unset an existing state as initial state by index.

Define FAUDES_CHECKED for consistency checks.

Parameters
indexState index
Exceptions
Exception
  • State index not found in generator (id 91)

Definition at line 1468 of file cfl_generator.cpp.

◆ ClrInitState() [3/3]

StateSet::Iterator faudes::vGenerator::ClrInitState ( StateSet::Iterator  pos)

Unset an existing state as initial state by iterator.

Parameters
posStateSet::iterator
Returns
Iterator to next init state

Definition at line 1496 of file cfl_generator.cpp.

◆ ClrMarkedState() [1/3]

void faudes::vGenerator::ClrMarkedState ( const std::string &  rName)

Unset an existing state as marked state by name.

Parameters
rNameState name
Exceptions
Exception
  • State index not found in generator (id 91)

Definition at line 1557 of file cfl_generator.cpp.

◆ ClrMarkedState() [2/3]

void faudes::vGenerator::ClrMarkedState ( Idx  index)

Unset an existing state as marked state by index.

Parameters
indexState index
Exceptions
Exception
  • State index not found in generator (id 91)

Definition at line 1543 of file cfl_generator.cpp.

◆ ClrMarkedState() [3/3]

StateSet::Iterator faudes::vGenerator::ClrMarkedState ( StateSet::Iterator  pos)

Unset an existing state as marked state by iterator.

Parameters
posStateSet::iterator
Returns
Iterator to next marked state

Definition at line 1571 of file cfl_generator.cpp.

◆ ClrStateAttribute()

void faudes::vGenerator::ClrStateAttribute ( Idx  index)
virtual

Clear attribute for existing state.

Parameters
indexState index

Definition at line 1750 of file cfl_generator.cpp.

◆ ClrStateName() [1/2]

void faudes::vGenerator::ClrStateName ( const std::string &  rName)

Clear name for individual state.

Parameters
rNameState name

Definition at line 991 of file cfl_generator.cpp.

◆ ClrStateName() [2/2]

void faudes::vGenerator::ClrStateName ( Idx  index)

Clear name for individual state.

Parameters
indexState index
Exceptions
Exception
  • state does not exist in generator (id 90)

Definition at line 977 of file cfl_generator.cpp.

◆ ClrTransAttribute()

void faudes::vGenerator::ClrTransAttribute ( const Transition rTrans)
virtual

Clear attribute for existing transition.

Parameters
rTranstransition

Definition at line 1711 of file cfl_generator.cpp.

◆ ClrTransition() [1/3]

void faudes::vGenerator::ClrTransition ( const Transition rTrans)

Remove a transition by transition object.

Parameters
rTransTransition object

Definition at line 1667 of file cfl_generator.cpp.

◆ ClrTransition() [2/3]

void faudes::vGenerator::ClrTransition ( Idx  x1,
Idx  ev,
Idx  x2 
)

Remove a transition by indices.

Parameters
x1Predecessor state index
evEvent index
x2Successor state index

Definition at line 1660 of file cfl_generator.cpp.

◆ ClrTransition() [3/3]

TransSet::Iterator faudes::vGenerator::ClrTransition ( TransSet::Iterator  it)

Remove a transition by iterator.

Parameters
itTransSet::iterator
Returns
Iterator to next transition

Definition at line 1673 of file cfl_generator.cpp.

◆ ClrTransitions() [1/2]

void faudes::vGenerator::ClrTransitions ( Idx  x1)

Remove a transitions by state.

Parameters
x1Predecessor state index

Definition at line 1686 of file cfl_generator.cpp.

◆ ClrTransitions() [2/2]

void faudes::vGenerator::ClrTransitions ( Idx  x1,
Idx  ev 
)

Remove a transitions by state and event.

Parameters
x1Predecessor state index
evEvent index

Definition at line 1679 of file cfl_generator.cpp.

◆ Coaccessible()

bool faudes::vGenerator::Coaccessible ( void  )

Make generator Coaccessible.

Returns
True if generator contains at least one marked state

Definition at line 2089 of file cfl_generator.cpp.

◆ CoaccessibleSet()

StateSet faudes::vGenerator::CoaccessibleSet ( void  ) const

Compute set of Coaccessible states.

Definition at line 2054 of file cfl_generator.cpp.

◆ Complete() [1/2]

bool faudes::vGenerator::Complete ( const EventSet rSigmaO)

Make generator Complete w.r.t.

an alphabet

This procedure removes all states that conflict with completes w.r.t. the specified alphabet Sigma_o until a fixpoint is reached. The current implementation consists of an outer iteration to restrict a domain of states and an inner iteration for abcakwar reachability analyis.

THIS IS EXPERIMENTAL / NEEDS TESTING

Parameters
rSigmaOSpecified alphabet Sigma_o
Returns
True if generator contains at least one initial state

Definition at line 2246 of file cfl_generator.cpp.

◆ Complete() [2/2]

bool faudes::vGenerator::Complete ( void  )

Make generator Complete.

This procedure removes all states that are guaranteed to evolve into a terminal state within a finite number of transitios. The current implementations is initialized by the set of terminal states and then performs a backward reachability analysis.

Returns
True if generator contains at least one initial state

Definition at line 2216 of file cfl_generator.cpp.

◆ ConfigureAttributeTypes()

void faudes::vGenerator::ConfigureAttributeTypes ( const AttributeVoid pNewGlobalPrototype,
const StateSet pNewStatesPrototype,
const EventSet pNewAlphabetPrototype,
const TransSet pNewTransRelPrototype 
)
protected

Configure attribute types.

Definition at line 201 of file cfl_generator.cpp.

◆ Copy()

vGenerator * faudes::vGenerator::Copy ( void  ) const
virtual

Construct copy on heap.

Technically not a constructor, this function creates a vGenerator with the same event symboltable. It is the callers responsebilty to delete the object when no longer needed. Derived classes must reimplement this function to create an object of the same class and the same event symboltable.

Returns
New vGenerator

Reimplemented from faudes::Type.

Reimplemented in faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TioGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::THioPlant< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::THioPlant< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >, faudes::THioEnvironment< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::THioEnvironment< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >, faudes::THioController< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::THioController< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >, faudes::THioConstraint< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::THioConstraint< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >, and faudes::TdiagGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 180 of file cfl_generator.cpp.

◆ DDotWrite()

void faudes::vGenerator::DDotWrite ( const std::string &  rFileName) const
virtual

Writes generator to dot input format (no re-indexing).

Variant of DotWrite() without re-indexing.

Parameters
rFileNameFile to write
Exceptions
Exception
  • IO errors (id 2)

Definition at line 3061 of file cfl_generator.cpp.

◆ DeleteCore()

void faudes::vGenerator::DeleteCore ( void  )
protectedvirtual

Free my heap members (attribute dependent types)

Definition at line 239 of file cfl_generator.cpp.

◆ DelEvent() [1/2]

bool faudes::vGenerator::DelEvent ( const std::string &  rName)

Delete event from generator by name.

mpEventSymbolTable stays untouched. Transitions containing event will be removed too.

Parameters
rNameName of event
Returns
True, if event was in alphabet

Definition at line 1222 of file cfl_generator.cpp.

◆ DelEvent() [2/2]

bool faudes::vGenerator::DelEvent ( Idx  index)

Delete event from generator by index.

mpEventSymbolTable stays untouched. Transitions containing event will be removed too.

Parameters
indexIndex of event
Returns
True, if event was in alphabet

Definition at line 1215 of file cfl_generator.cpp.

◆ DelEventFromAlphabet()

bool faudes::vGenerator::DelEventFromAlphabet ( Idx  index)

Delete event from alphabet without consistency check.

The event is only deleted from mpAlphabet but not from transition relation.

Parameters
indexIndex of event
Returns
True, if event was in alphabet

Definition at line 1240 of file cfl_generator.cpp.

◆ DelEvents()

void faudes::vGenerator::DelEvents ( const EventSet rEvents)

Delete a set of events from generator.

mpEventSymbolTable stays untouched. Transitions containing events will be removed too.

Parameters
rEventsEventSet containing events to remove

Definition at line 1230 of file cfl_generator.cpp.

◆ DelState() [1/2]

bool faudes::vGenerator::DelState ( const std::string &  rName)

Delete a state from generator by name.

Cleans mpStates, mInitStates, mMarkedStates, mpTransRel and mpStateSymbolTable.

Parameters
rNameName of state to delete. Will be erased in mpStateSymbolTable too
Returns
True, if state was in stateset
Exceptions
Exception
  • Symbolic name not known (id 90)

Definition at line 1365 of file cfl_generator.cpp.

◆ DelState() [2/2]

bool faudes::vGenerator::DelState ( Idx  index)

Delete a state from generator by index.

Cleans mpStates, mInitStates, mMarkedStates, mpTransRel and mpStateSymbolTable.

Parameters
indexIndex of state to delete.
Returns
True, if state was in stateset

Definition at line 1350 of file cfl_generator.cpp.

◆ DelStateFromStates() [1/2]

bool faudes::vGenerator::DelStateFromStates ( Idx  index)

Delete a state from generator without consistency check.

This removes the state from mpStates and mpStateSymbolTable but doesn't touch mpTransRel, mInitStates and mMarkedStates.

Parameters
indexIndex of state to delete.
Returns
True, if state was in stateset

Definition at line 1399 of file cfl_generator.cpp.

◆ DelStateFromStates() [2/2]

StateSet::Iterator faudes::vGenerator::DelStateFromStates ( StateSet::Iterator  pos)

Delete a state from generator without consistency check.

This removes the state from mpStates and mpStateSymbolTable but doesn't touch mpTransRel, mInitStates and mMarkedStates. Index to delete is given by iterator.

Parameters
posStateSet::Iterator
Returns
Iteraror to next state

Definition at line 1406 of file cfl_generator.cpp.

◆ DelStates()

void faudes::vGenerator::DelStates ( const StateSet rDelStates)

Delete a set of states Cleans mpStates, mInitStates, mMarkedStates, mpTransrel, and mpStateSymboltable.

Parameters
rDelStatesStateSet containing states aka indicees to delete

Definition at line 1381 of file cfl_generator.cpp.

◆ DoAssign()

void faudes::vGenerator::DoAssign ( const vGenerator rSrc)
protected

Assignment for matching type.

Definition at line 255 of file cfl_generator.cpp.

◆ DoDWrite()

void faudes::vGenerator::DoDWrite ( TokenWriter rTw,
const std::string &  rLabel = "",
const Type pContext = 0 
) const
protectedvirtual

Write generator in debugging format to TokenWriter, see Type::DWrite for public wrappers.

Reimplement this method in derived classes to provide the std token io interface defined in the public section of Type.

Parameters
rTwReference to TokenWriter
rLabelLabel of section to write
pContextWrite context to provide contextual information (ignored)
Exceptions
Exception
  • IO errors (id 2)

Reimplemented from faudes::Type.

Definition at line 2453 of file cfl_generator.cpp.

◆ DoRead()

void faudes::vGenerator::DoRead ( TokenReader rTr,
const std::string &  rLabel = "",
const Type pContext = 0 
)
protectedvirtual

Read generator object from TokenReader, see Type::Read for public wrappers.

Virtual function for std token io interface. Context is ignored, label defaults to "Generator".

Parameters
rTrTokenReader to read from
rLabelSection to read
pContextRead context to provide contextual information (ignored)
Exceptions
Exception
  • token mismatch (id 50, 51, 52, 80, 85)
  • IO error (id 1)

Reimplemented from faudes::Type.

Reimplemented in faudes::Executor, and faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 3153 of file cfl_generator.cpp.

◆ DoSWrite()

void faudes::vGenerator::DoSWrite ( TokenWriter rTw) const
protectedvirtual

Write generator statistics as comment to TokenWriter, see Type::SWrite for public wrappers.

Reimplement this method in derived classes to provide the std token io interface defined in the public section of Type.

Parameters
rTwReference to TokenWriter
Exceptions
Exception
  • IO errors (id 2)

Reimplemented from faudes::Type.

Reimplemented in faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 2984 of file cfl_generator.cpp.

◆ DotWrite()

void faudes::vGenerator::DotWrite ( const std::string &  rFileName) const
virtual

Writes generator to dot input format.

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 GraphWrite(). This functions sets the re-indexing to minimal indices.

Parameters
rFileNameFile to write
Exceptions
Exception
  • IO errors (id 2)

Reimplemented in faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, and faudes::TdiagGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 3000 of file cfl_generator.cpp.

◆ DoWrite()

void faudes::vGenerator::DoWrite ( TokenWriter rTw,
const std::string &  rLabel = "",
const Type pContext = 0 
) const
protectedvirtual

Write generator to TokenWriter, see Type::Write for public wrappers.

Virtual function for std token io interface. Context is ignored, label defaults to "Generator". If the tokenwriter writes to a file, state indices will be re-indext to start from 1.

Parameters
rTwReference to TokenWriter
rLabelLabel of section to write
pContextWrite context to provide contextual information (ignored)
Exceptions
Exception
  • IO errors (id 2)

Reimplemented from faudes::Type.

Reimplemented in faudes::Executor, and faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 2413 of file cfl_generator.cpp.

◆ DoXWrite()

void faudes::vGenerator::DoXWrite ( TokenWriter rTw,
const std::string &  rLabel = "",
const Type pContext = 0 
) const
protectedvirtual

Write generator to TokenWriter, see Type::XWrite for public wrappers.

Virtual function for std token io interface. Context is ignored, label defaults to "Generator".

Parameters
rTwReference to TokenWriter
rLabelLabel of section to write
pContextWrite context to provide contextual information (ignored)
Exceptions
Exception
  • IO errors (id 2)

Reimplemented from faudes::Type.

Definition at line 2483 of file cfl_generator.cpp.

◆ DWriteStateSet()

void faudes::vGenerator::DWriteStateSet ( TokenWriter rTw,
const StateSet rStateSet 
) const

Write a stateset to TokenWriter (debug version, no re-indexing)

Parameters
rTwReference to TokenWriter
rStateSetReference to stateset
Exceptions
Exception
  • IO errors (id 2)

Definition at line 2736 of file cfl_generator.cpp.

◆ DWriteTransRel()

void faudes::vGenerator::DWriteTransRel ( TokenWriter rTw) const

Write transition relation to tokenwriter (debug version)

Parameters
rTwReference to TokenWriter
Exceptions
Exception
  • IO errors (id 2)

Definition at line 2904 of file cfl_generator.cpp.

◆ Empty()

bool faudes::vGenerator::Empty ( void  ) const

Check if generator is empty (no states)

Returns
True if state set is empty

Definition at line 653 of file cfl_generator.cpp.

◆ EnforceStateNames()

void faudes::vGenerator::EnforceStateNames ( const std::string &  rTemplate)

For all states without a symbolic name, assign a name based on suggested template and the index.

Parameters
rTemplateBasis for name generation

Definition at line 1027 of file cfl_generator.cpp.

◆ EStr()

std::string faudes::vGenerator::EStr ( Idx  index) const

Pretty printable event name for index (eg for debugging).

Parameters
indexEvent index
Returns
std::string

Definition at line 3828 of file cfl_generator.cpp.

◆ EventAttribute() [1/3]

const AttributeVoid & faudes::vGenerator::EventAttribute ( const std::string &  rName) const
virtual

Event attribute lookup.

In a context where the attribute type is known, you may prefer the TaGenerator method.

Parameters
rName
Returns
reference to attribute

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

Definition at line 1826 of file cfl_generator.cpp.

◆ EventAttribute() [2/3]

const AttributeVoid & faudes::vGenerator::EventAttribute ( Idx  index) const
virtual

Event attribute lookup.

In a context where the attribute type is known, you may prefer the TaGenerator method.

Parameters
index
Returns
reference to attribute

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

Definition at line 1816 of file cfl_generator.cpp.

◆ EventAttribute() [3/3]

void faudes::vGenerator::EventAttribute ( Idx  index,
const Type rAttr 
)
virtual

Set attribute for existing event.

This version uses a dynamic cast to test the actual type of the provided attribute. An exception is thrown for an invalid attribute type. In a context where the attribute type is known, you may prefer the TaGenerator method.

Parameters
indexEvent index
rAttrNew attribute
Exceptions
Exception
  • Index not found in alphabet (id 60)
  • Cannot cast attribute (id 63)

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

Definition at line 1722 of file cfl_generator.cpp.

◆ EventAttributep() [1/2]

AttributeVoid * faudes::vGenerator::EventAttributep ( const std::string &  rName)
virtual

Event attribute pointer to access Attribute methods.

If there are no attributes (plain vGenerator) this method returs 0. If there are attributes, an explicit default value may be inserted. In a context where the attribute type is known, you may prefer the TaGenerator method.

Parameters
rName
Returns
pointer to attribute

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

Definition at line 1831 of file cfl_generator.cpp.

◆ EventAttributep() [2/2]

AttributeVoid * faudes::vGenerator::EventAttributep ( Idx  index)
virtual

Event attribute pointer to access Attribute methods.

If there are no attributes (plain vGenerator) this method returs 0. If there are attributes, an explicit default value may be inserted. In a context where the attribute type is known, you may prefer the TaGenerator method.

Parameters
index
Returns
pointer to attribute

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

Definition at line 1821 of file cfl_generator.cpp.

◆ EventAttributes()

void faudes::vGenerator::EventAttributes ( const EventSet rEventSet)
virtual

Set attributes for existing events.

This version uses a dynamic cast to test the actual type of the provided attributes. An exception is thrown for an invalid attribute type.

Parameters
rEventSetSet of attributed events
Exceptions
Exception
  • Element not found in alphabet (id 60)
  • Cannot cast attribute (id 63)

Definition at line 1730 of file cfl_generator.cpp.

◆ EventIndex()

Idx faudes::vGenerator::EventIndex ( const std::string &  rName) const

Event index lookup.

Parameters
rNameName of event to lookup
Returns
Valid index or 0 if name unknown to symboltable

Definition at line 834 of file cfl_generator.cpp.

◆ EventName() [1/2]

std::string faudes::vGenerator::EventName ( Idx  index) const

Event name lookup.

Parameters
indexIndex of event to look up
Returns
Name or empty std::string if non-existent

Definition at line 839 of file cfl_generator.cpp.

◆ EventName() [2/2]

void faudes::vGenerator::EventName ( Idx  index,
const std::string &  rName 
)

Set name for existing event.

Note: since the event symboltable is global, this affect all generators that refer to the specified event.

Parameters
indexEvent index
rNameNew name
Exceptions
Exception
  • index not found in EventSymbolMap (id 42)
  • name already associated with another index (id 44)
  • event does not exist in generator (id 89)

Definition at line 844 of file cfl_generator.cpp.

◆ EventRename() [1/2]

bool faudes::vGenerator::EventRename ( const std::string &  rOldName,
const std::string &  rNewName 
)

Rename event in this generator.

Convenience wrapper for EventRename(Idx, const std::string&).

Parameters
rOldNameEvent to rename
rNewNameNew name
Returns
True, if the new name did already exist
Exceptions
Exception
  • specified event does not exist (id 89)

Definition at line 912 of file cfl_generator.cpp.

◆ EventRename() [2/2]

bool faudes::vGenerator::EventRename ( Idx  event,
const std::string &  rNewName 
)

Rename event in this generator.

This method renames the specified event. It does so by removing and adding transitions. This does not effect other generators.

Parameters
eventEvent to rename
rNewNameNew name
Returns
True, if the new name did already exist
Exceptions
Exception
  • specified event does not exist (id 89)

Definition at line 867 of file cfl_generator.cpp.

◆ EventSymbolTablep() [1/3]

void faudes::vGenerator::EventSymbolTablep ( const vGenerator rOtherGen)
virtual

Set EventSymbolTable as given by rOtherGen.

This function sets the reference to the event symboltable. The current implementation clears the generator, future versions may implement a re-indexing.

Parameters
rOtherGenOther generator

Definition at line 829 of file cfl_generator.cpp.

◆ EventSymbolTablep() [2/3]

void faudes::vGenerator::EventSymbolTablep ( SymbolTable pSymTab)
virtual

Set EventSymbolTable to be used by this vGenerator.

This function sets the reference to the event symboltable. The current implementation in derived classes clears the generator, future versions may implement a re-indexing.

Parameters
pSymTabPointer to SymbolTable

Definition at line 823 of file cfl_generator.cpp.

◆ EventSymbolTablep() [3/3]

SymbolTable * faudes::vGenerator::EventSymbolTablep ( void  ) const

Get Pointer to EventSymbolTable currently used by this vGenerator.

doxygen group

Returns
Pointer to EventSymbolTable

Definition at line 813 of file cfl_generator.cpp.

◆ ExistsEvent() [1/2]

bool faudes::vGenerator::ExistsEvent ( const std::string &  rName) const

Test existence of event in alphabet.

Parameters
rNameEvent name
Returns
True / false

Definition at line 1761 of file cfl_generator.cpp.

◆ ExistsEvent() [2/2]

bool faudes::vGenerator::ExistsEvent ( Idx  index) const

Test existence of event in alphabet.

Parameters
indexEvent index
Returns
True / false

Definition at line 1756 of file cfl_generator.cpp.

◆ ExistsInitState()

bool faudes::vGenerator::ExistsInitState ( Idx  index) const

Test existence of state in mInitStates.

Parameters
indexState index
Returns
true / false

Definition at line 1796 of file cfl_generator.cpp.

◆ ExistsMarkedState()

bool faudes::vGenerator::ExistsMarkedState ( Idx  index) const

Test existence of state in mMarkedStates.

Parameters
indexState index
Returns
true / false

Definition at line 1806 of file cfl_generator.cpp.

◆ ExistsState() [1/2]

bool faudes::vGenerator::ExistsState ( const std::string &  name) const

Test existence of state in state set.

Parameters
nameState name
Returns
true / false

Definition at line 1781 of file cfl_generator.cpp.

◆ ExistsState() [2/2]

bool faudes::vGenerator::ExistsState ( Idx  index) const

Test existence of state in state set.

Parameters
indexState index
Returns
true / false

Definition at line 1776 of file cfl_generator.cpp.

◆ ExistsTransition() [1/5]

bool faudes::vGenerator::ExistsTransition ( const std::string &  rX1,
const std::string &  rEv,
const std::string &  rX2 
) const

Test for transition given by x1, ev, x2.

Parameters
rX1name of Predecessor state
rEvname of Event
rX2name of Successor state
Returns
true / false

Definition at line 1124 of file cfl_generator.cpp.

◆ ExistsTransition() [2/5]

bool faudes::vGenerator::ExistsTransition ( const Transition rTrans) const

test for transition

Parameters
rTranstransition
Returns
true / false

Definition at line 1114 of file cfl_generator.cpp.

◆ ExistsTransition() [3/5]

bool faudes::vGenerator::ExistsTransition ( Idx  x1) const

Test for transition given by x1.

Parameters
x1Predecessor state
Returns
true / false

Definition at line 1136 of file cfl_generator.cpp.

◆ ExistsTransition() [4/5]

bool faudes::vGenerator::ExistsTransition ( Idx  x1,
Idx  ev 
) const

Test for transition given by x1, ev.

Parameters
x1Predecessor state
evEvent
Returns
true / false

Definition at line 1131 of file cfl_generator.cpp.

◆ ExistsTransition() [5/5]

bool faudes::vGenerator::ExistsTransition ( Idx  x1,
Idx  ev,
Idx  x2 
) const

Test for transition given by x1, ev, x2.

Parameters
x1Predecessor state
evEvent
x2Successor state
Returns
true / false

Definition at line 1119 of file cfl_generator.cpp.

◆ FindEvent() [1/2]

EventSet::Iterator faudes::vGenerator::FindEvent ( const std::string &  rName) const

Returns a iterator to event index in alphabet.

Parameters
rNameEvent name of index to find
Returns
Iterator to event index

Definition at line 1771 of file cfl_generator.cpp.

◆ FindEvent() [2/2]

EventSet::Iterator faudes::vGenerator::FindEvent ( Idx  index) const

Returns a iterator to event index in alphabet.

Parameters
indexIndex to find
Returns
Iterator to event index

Definition at line 1766 of file cfl_generator.cpp.

◆ FindInitState()

StateSet::Iterator faudes::vGenerator::FindInitState ( Idx  index) const

Iterator to state index in mInitStates.

Parameters
indexIndex to find
Returns
StateSet::Iterator to state index

Definition at line 1801 of file cfl_generator.cpp.

◆ FindMarkedState()

StateSet::Iterator faudes::vGenerator::FindMarkedState ( Idx  index) const

Returns a iterator to state index in mMarkedStates.

Parameters
indexIndex to find
Returns
StateSet::Iterator to state index

Definition at line 1811 of file cfl_generator.cpp.

◆ FindState() [1/2]

StateSet::Iterator faudes::vGenerator::FindState ( const std::string &  rName) const

Returns a iterator to state with specified name.

Parameters
rNamename of state to find
Returns
StateSet::Iterator to state

Definition at line 1786 of file cfl_generator.cpp.

◆ FindState() [2/2]

StateSet::Iterator faudes::vGenerator::FindState ( Idx  index) const

Returns a iterator to state index in state set.

Parameters
indexIndex to find
Returns
StateSet::Iterator to state index

Definition at line 1791 of file cfl_generator.cpp.

◆ FindTransition() [1/3]

TransSet::Iterator faudes::vGenerator::FindTransition ( const std::string &  rX1,
const std::string &  rEv,
const std::string &  rX2 
) const

iterator to transition given by x1, ev, x2

Parameters
rX1name of Predecessor state
rEvname of Event
rX2name of Successor state
Returns
iterator to transition or end() if not exists

Definition at line 1107 of file cfl_generator.cpp.

◆ FindTransition() [2/3]

TransSet::Iterator faudes::vGenerator::FindTransition ( const Transition rTrans) const

Iterator to transition.

Parameters
rTranstransition
Returns
iterator to transition or end() if not exists

Definition at line 1097 of file cfl_generator.cpp.

◆ FindTransition() [3/3]

TransSet::Iterator faudes::vGenerator::FindTransition ( Idx  x1,
Idx  ev,
Idx  x2 
) const

Iterator to transition given by x1, ev, x2.

Parameters
x1Predecessor state
evEvent
x2Successor state
Returns
iterator to transition or End() if not exists

Definition at line 1102 of file cfl_generator.cpp.

◆ GlobalAttribute() [1/2]

void faudes::vGenerator::GlobalAttribute ( const Type rAttr)
virtual

Set global attribute.

The vGenerator does not have attributes, so this function throws an exception for any specified attribute different to AttributeVoid. The TaGenarator provides a re-implementation to actually set the global attribute.

Parameters
rAttrAttribute
Exceptions
Exception
  • Cannot cast attribute (id 63)

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

Definition at line 1846 of file cfl_generator.cpp.

◆ GlobalAttribute() [2/2]

const AttributeVoid & faudes::vGenerator::GlobalAttribute ( void  ) const
virtual

Global attribute lookup.

In a context where the attribute type is known, you may prefer the TaGenerator method.

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

Definition at line 1865 of file cfl_generator.cpp.

◆ GlobalAttributep()

AttributeVoid * faudes::vGenerator::GlobalAttributep ( void  )
virtual

Get attribute pointer The global attribute allways exits.

For the vGenerator its of type AttributeVoid, the TaGenerator sets a nontrivial type. In a context where the attribute type is known, you may prefer the TaGenerator method.

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

Definition at line 1871 of file cfl_generator.cpp.

◆ GlobalAttributeTry()

void faudes::vGenerator::GlobalAttributeTry ( const Type rAttr)
virtual

Set global attribute.

The vGenerator does not have attributes, so this function does nothing. The TaGenarator provides a re-implementation to actually set the global attribute.

Parameters
rAttrAttribute

Definition at line 1858 of file cfl_generator.cpp.

◆ GlobalEventSymbolTablep()

SymbolTable * faudes::vGenerator::GlobalEventSymbolTablep ( void  )
static

Get Pointer to global EventSymbolTable.

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

Returns
Pointer to global EventSymbolTable

Definition at line 818 of file cfl_generator.cpp.

◆ GlobalVoid()

const AttributeVoid & faudes::vGenerator::GlobalVoid ( void  )
staticprotected

Static default global attribute prototype (configures global attribute type)

Definition at line 53 of file cfl_generator.cpp.

◆ GraphWrite()

void faudes::vGenerator::GraphWrite ( const std::string &  rFileName,
const std::string &  rOutFormat = "",
const std::string &  rDotExec = "dot" 
) const

Produce graphical representation of this generator.

This method calls the generator's DotWrite function and then processes the output with the dot tool from graphiz package. If no output format is given, try to guess from filename extension. See also ProcessDot().

Parameters
rFileNameName of output file
rOutFormatGraphics file format, eg "png", "jpg", "svg"
rDotExecpath/name of executable
Exceptions
Exception
  • IO errors (id 2)
  • error during systemcall for dot (id 3)

Definition at line 3847 of file cfl_generator.cpp.

◆ InitState()

Idx faudes::vGenerator::InitState ( void  ) const

Return initial state.

If the initial state is not unique, this function returns 0.

Returns
Index of initial state

Definition at line 1142 of file cfl_generator.cpp.

◆ InitStates()

const StateSet & faudes::vGenerator::InitStates ( void  ) const

Const ref to initial states.

Returns
StateSet

Definition at line 1908 of file cfl_generator.cpp.

◆ InitStatesBegin()

StateSet::Iterator faudes::vGenerator::InitStatesBegin ( void  ) const

Iterator to Begin() of mInitStates.

Returns
Iterator to begin of mInitStates

Definition at line 1150 of file cfl_generator.cpp.

◆ InitStatesEmpty()

bool faudes::vGenerator::InitStatesEmpty ( void  ) const

Check if set of initial states are empty.

Returns
True if mInitStates is empty

Definition at line 663 of file cfl_generator.cpp.

◆ InitStatesEnd()

StateSet::Iterator faudes::vGenerator::InitStatesEnd ( void  ) const

Iterator to End() of mInitStates.

Returns
Iterator to end of mInitStates

Definition at line 1155 of file cfl_generator.cpp.

◆ InitStatesSize()

Idx faudes::vGenerator::InitStatesSize ( void  ) const

Get number of initial states.

Returns
Number of initial states

Definition at line 638 of file cfl_generator.cpp.

◆ InitStatesToString()

std::string faudes::vGenerator::InitStatesToString ( void  ) const

Write set of initial states to a string (no re-indexing)

Returns
std::string
Exceptions
Exception
  • IO errors (id 2)

Definition at line 2829 of file cfl_generator.cpp.

◆ InjectAlphabet()

void faudes::vGenerator::InjectAlphabet ( const EventSet rNewalphabet)

Set mpAlphabet without consistency check.

Sets the alphabet incl attributes, if provided.

Parameters
rNewalphabetEventSet with new alphabet

Definition at line 1170 of file cfl_generator.cpp.

◆ InjectInitStates()

void faudes::vGenerator::InjectInitStates ( const StateSet rNewInitStates)

Replace mInitStates with StateSet given as parameter without consistency checks.

Parameters
rNewInitStatesStateSet containing new mInitStates

Definition at line 1460 of file cfl_generator.cpp.

◆ InjectMarkedStates()

void faudes::vGenerator::InjectMarkedStates ( const StateSet rNewMarkedStates)

Replace mMarkedStates with StateSet given as parameter without consistency checks.

Parameters
rNewMarkedStatesStateSet containing new marked states

Definition at line 1535 of file cfl_generator.cpp.

◆ InjectState()

void faudes::vGenerator::InjectState ( Idx  index)

Inject an existing state index into generators mStates Use with care! For use in performance optimized functions.

Parameters
indexState index to inject

Definition at line 1272 of file cfl_generator.cpp.

◆ InjectStates()

void faudes::vGenerator::InjectStates ( const StateSet rNewStates)

Inject a complete state set without consistency checks (without attributes)

Parameters
rNewStatesStateSet

Definition at line 1278 of file cfl_generator.cpp.

◆ InjectTransition()

void faudes::vGenerator::InjectTransition ( const Transition rTrans)

Set transition without consistency check.

Parameters
rTransTransition to insert

Definition at line 1582 of file cfl_generator.cpp.

◆ InjectTransRel()

void faudes::vGenerator::InjectTransRel ( const TransSet rNewtransrel)

Set transition relation without consistency check (no attributes)

Parameters
rNewtransrelTransRel to insert

Definition at line 1588 of file cfl_generator.cpp.

◆ InsEvent() [1/2]

Idx faudes::vGenerator::InsEvent ( const std::string &  rName)

Add named event to generator.

An entry in the mpEventSymbolTable will be made if event name is not known so far.

Parameters
rNameName of the event to add
Returns
New unique index

Definition at line 1204 of file cfl_generator.cpp.

◆ InsEvent() [2/2]

bool faudes::vGenerator::InsEvent ( Idx  index)

Add an existing event to alphabet by index.

doxygen group It is an error to insert an event index that is not known to the mpEventSymbolTable.

Parameters
indexEvent index
Returns
True, if event was new to alphabet

Definition at line 1198 of file cfl_generator.cpp.

◆ InsEvents()

void faudes::vGenerator::InsEvents ( const EventSet events)

Add new named events to generator.

If the event allready exists, the attribute is maintained.

Parameters
eventsEventSet

Definition at line 1210 of file cfl_generator.cpp.

◆ InsInitState() [1/3]

Idx faudes::vGenerator::InsInitState ( const std::string &  rName)

Create a new named state and set as initial state.

Parameters
rNameName of the state to add
Returns
Index of new unique state

Definition at line 1296 of file cfl_generator.cpp.

◆ InsInitState() [2/3]

bool faudes::vGenerator::InsInitState ( Idx  index)

Add (perhaps new) state to generator and turn it into a initial state.

Parameters
indexState to insert
Returns
True to indicate that state was new to generator

Definition at line 1305 of file cfl_generator.cpp.

◆ InsInitState() [3/3]

Idx faudes::vGenerator::InsInitState ( void  )

Create new anonymous state and set as initial state.

Returns
Index of new unique

Definition at line 1287 of file cfl_generator.cpp.

◆ InsInitStates()

void faudes::vGenerator::InsInitStates ( const StateSet rStates)

Add (perhaps new) anonymous initial states to generator

Parameters
rStatesSet of states to add

Definition at line 1312 of file cfl_generator.cpp.

◆ InsMarkedState() [1/3]

Idx faudes::vGenerator::InsMarkedState ( const std::string &  rName)

Create a new named state and set as marked state.

Parameters
rNameName of the state to add
Returns
Index of new unique state

Definition at line 1334 of file cfl_generator.cpp.

◆ InsMarkedState() [2/3]

bool faudes::vGenerator::InsMarkedState ( Idx  index)

Add (perhaps new) state to generator and turn it into a marked state.

Parameters
indexState to insert
Returns
True to indicate that state was new to generator

Definition at line 1327 of file cfl_generator.cpp.

◆ InsMarkedState() [3/3]

Idx faudes::vGenerator::InsMarkedState ( void  )

Create new anonymous state and set as marked state.

Returns
Index of new unique state

Definition at line 1318 of file cfl_generator.cpp.

◆ InsMarkedStates()

void faudes::vGenerator::InsMarkedStates ( const StateSet rStates)

Add (perhaps new) anonymous initial states to generator

Parameters
rStatesSet of states to add

Definition at line 1343 of file cfl_generator.cpp.

◆ InsState() [1/3]

Idx faudes::vGenerator::InsState ( const std::string &  rName)

Add new named state to generator.

Parameters
rNameName of the state to add
Returns
Index of new unique state
Exceptions
ExceptionName already exists (id 44)

Definition at line 1259 of file cfl_generator.cpp.

◆ InsState() [2/3]

bool faudes::vGenerator::InsState ( Idx  index)

Add (perhaps new) state to generator.

Returns
True to indicate that state was new to generator

Definition at line 1253 of file cfl_generator.cpp.

◆ InsState() [3/3]

Idx faudes::vGenerator::InsState ( void  )

Add new anonymous state to generator.

Returns
Index of new unique state

Definition at line 1247 of file cfl_generator.cpp.

◆ InsStates()

void faudes::vGenerator::InsStates ( const StateSet rStates)

Add anonymous states to generator.

Parameters
rStatesSet of states to add

Definition at line 1267 of file cfl_generator.cpp.

◆ IsAccessible()

bool faudes::vGenerator::IsAccessible ( void  ) const

Check if generator is accessible.

Returns
True if generator is accesssible

Definition at line 2044 of file cfl_generator.cpp.

◆ IsCoaccessible()

bool faudes::vGenerator::IsCoaccessible ( void  ) const

Check if generator is Coaccessible.

Returns
True if generator is coaccessible

Definition at line 2103 of file cfl_generator.cpp.

◆ IsComplete() [1/3]

bool faudes::vGenerator::IsComplete ( const EventSet rSigmaO) const

Check if generator is complete w.r.t.

an alphabet

A generator is considered complete w.r.t. an alphabet Sigma_o, if each state can be continued to a state in which a symbol of Sigma_c is enabled.

If the generator is accessible, completeness w.r.t. Sigma_o is equivalent to:

forall s in L(G) there exists t in (Sigma*)Sigma_u such that st in L(G)

Parameters
rSigmaOSpecified alphabet Sigma_o
Returns
True if generator is complete

Definition at line 2174 of file cfl_generator.cpp.

◆ IsComplete() [2/3]

bool faudes::vGenerator::IsComplete ( const StateSet rStates) const

Check if generator is complete.

Same as IsComplete(void), however, only the specified states are considered. The rational is to e.g. apply the test to accessible (resp. trim) states only. Then, test is equivalent to completeness of the generated (resp. marked) language.

Parameters
rStatesSet of state indices to restrict the completeness test
Returns
True if generator is relatively complete

Definition at line 2157 of file cfl_generator.cpp.

◆ IsComplete() [3/3]

bool faudes::vGenerator::IsComplete ( void  ) const

Check if generator is complete.

A generator is considered complete, if each state has at least one successor state.

If the generator is accessible, completeness is equivalent to completeness of the generated language, ie forall s in L(G) there exists r>s such that r in L(G)

If the generator is trim, completeness is equivalent to completeness of the markede language, ie forall s in Lm(G) there exists r>s such that r in Lm(G)

Returns
True if generator is complete

Definition at line 2211 of file cfl_generator.cpp.

◆ IsDeterministic()

bool faudes::vGenerator::IsDeterministic ( void  ) const

Check if generator is deterministic.

We require the transition relation to be a partial function and at most one initial state.

Note: pre 2.19 libFAUDES also insisted in exactly one initial state.

Returns
True if generator is deterministic

Definition at line 2367 of file cfl_generator.cpp.

◆ IsOmegaTrim()

bool faudes::vGenerator::IsOmegaTrim ( void  ) const

Check if generator is omega-trim.

Returns true if all states are accessible, coacessible, and have a successor state.

Returns
True if generator is omega-trim

Definition at line 2355 of file cfl_generator.cpp.

◆ IsTrim()

bool faudes::vGenerator::IsTrim ( void  ) const

Check if generator is trim.

Returns true if all states are rechable and coreachale.

Returns
True if generator is trim

Definition at line 2138 of file cfl_generator.cpp.

◆ MarkedStates()

const StateSet & faudes::vGenerator::MarkedStates ( void  ) const

Return const ref of marked states.

Returns
StateSet

Definition at line 1913 of file cfl_generator.cpp.

◆ MarkedStatesBegin()

StateSet::Iterator faudes::vGenerator::MarkedStatesBegin ( void  ) const

Iterator to Begin() of mMarkedStates.

Returns
iterator to Begin of mMarkedStates

Definition at line 1160 of file cfl_generator.cpp.

◆ MarkedStatesEmpty()

bool faudes::vGenerator::MarkedStatesEmpty ( void  ) const

Check if set of marked states are empty.

Returns
True if mMarkedStates is empty

Definition at line 668 of file cfl_generator.cpp.

◆ MarkedStatesEnd()

StateSet::Iterator faudes::vGenerator::MarkedStatesEnd ( void  ) const

Iterator to End() of mMarkedStates.

Returns
iterator to End of mMarkedStates

Definition at line 1165 of file cfl_generator.cpp.

◆ MarkedStatesSize()

Idx faudes::vGenerator::MarkedStatesSize ( void  ) const

Get number of marked states.

Returns
Number of marked states

Definition at line 643 of file cfl_generator.cpp.

◆ MarkedStatesToString()

std::string faudes::vGenerator::MarkedStatesToString ( void  ) const

Write set of marked states to a string (no re-indexing)

Returns
std::string
Exceptions
Exception
  • IO errors (id 2)

Definition at line 2824 of file cfl_generator.cpp.

◆ MaxStateIndex()

Idx faudes::vGenerator::MaxStateIndex ( void  ) const

Get maximum state index used in this generator.

Returns 0 if no states at all.

Returns
maximal index

Definition at line 754 of file cfl_generator.cpp.

◆ MinimizeAlphabet()

void faudes::vGenerator::MinimizeAlphabet ( void  )

Set the alphabet to used events.

Definition at line 1918 of file cfl_generator.cpp.

◆ MinStateIndex() [1/2]

Idx faudes::vGenerator::MinStateIndex ( Idx  index) const

Get state index as is it will be written to file.

Parameters
indexstate index
Returns
minimal index

Definition at line 743 of file cfl_generator.cpp.

◆ MinStateIndex() [2/2]

void faudes::vGenerator::MinStateIndex ( void  )

Re-enumerate states.

This method re-enumerates states such that the resulting state set consist of consecutive indexes; i.e. Size()=MaxStateIndex(). The current implementation sets up the minimal-state-index map used for file i/o and applies it to the state set and the transition relation.

Note: libFAUDES does not maintain consecutive state indices. This was a design decision and it comes pros and cons. The method MinStateIndex() was implemented to provide some limited support for the implementation of algorithms in a consecutive state enumeration paradigm. However, mixing both paradigms most likely involves an overall performace penalty.

Definition at line 760 of file cfl_generator.cpp.

◆ MinStateIndexMap()

const std::map< Idx, Idx > & faudes::vGenerator::MinStateIndexMap ( void  ) const

Get state index translation map.

Returns
minimal index map

Definition at line 682 of file cfl_generator.cpp.

◆ Move()

void faudes::vGenerator::Move ( vGenerator rGen)
virtual

Destructive copy to other vGenerator.

Copy method with increased performance at the cost of invalidating the source data. If attribute types of source and destination differ, a std copy is invoked.

Parameters
rGenDestination for copy operation.

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

Definition at line 333 of file cfl_generator.cpp.

◆ Name() [1/2]

void faudes::vGenerator::Name ( const std::string &  rName)
virtual

Set the generator's name.

doxygen group

Parameters
rNameGenerator name

Reimplemented from faudes::Type.

Definition at line 526 of file cfl_generator.cpp.

◆ Name() [2/2]

const std::string & faudes::vGenerator::Name ( void  ) const
virtual

Get generator's name.

Returns
Name of generator

Reimplemented from faudes::Type.

Reimplemented in faudes::Executor.

Definition at line 532 of file cfl_generator.cpp.

◆ New()

vGenerator * faudes::vGenerator::New ( void  ) const
virtual

Construct on heap.

Technically not a constructor, this function creates a vGenerator with the same event symboltable. It is the callers responsebilty to delete the object when no longer needed. Derived classes must reimplement this function to create an object of the same class and the same event symboltable.

Returns
New vGenerator

Reimplemented from faudes::Type.

Reimplemented in faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TioGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::THioPlant< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::THioPlant< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >, faudes::THioEnvironment< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::THioEnvironment< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >, faudes::THioController< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::THioController< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >, faudes::THioConstraint< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::THioConstraint< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >, and faudes::TdiagGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 168 of file cfl_generator.cpp.

◆ NewCore()

void faudes::vGenerator::NewCore ( void  )
protectedvirtual

Allocate my heap members (attribute dependent types)

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

Definition at line 223 of file cfl_generator.cpp.

◆ NewEventSet()

EventSet faudes::vGenerator::NewEventSet ( void  ) const

Create EventSet with generator's EventSymbolTable (on stack).

Returns
New empty EventSet on stack

Definition at line 918 of file cfl_generator.cpp.

◆ NewEventSetp()

EventSet * faudes::vGenerator::NewEventSetp ( void  ) const

Create EventSet with generator's EventSymbolTable (on heap).

Returns
Pointer to new empty EventSet on heap

Definition at line 925 of file cfl_generator.cpp.

◆ OmegaTrim()

bool faudes::vGenerator::OmegaTrim ( void  )

Make generator omega-trim.

This function removes states such that the generator becomes omega trim while not affecting the induced omega language.

The implementation first makes the generator accessible and then iteratively removes state that either never reach a marked state or that are guaranteed to eventually reach a terminal state. There might be a more efficient approach.

Returns
True if resulting generator contains at least one initial state and at least one marked state.

Definition at line 2334 of file cfl_generator.cpp.

◆ operator<()

bool faudes::vGenerator::operator< ( const vGenerator rOtherGen) const
inline

Order for sorting containers of generators.

Definition at line 2906 of file cfl_generator.h.

◆ operator=()

vGenerator & faudes::vGenerator::operator= ( const vGenerator rOtherGen)
virtual

Assignment operator (uses Assign method)

Note: you must reimplement this operator in derived classes in order to handle internal pointers correctly.

Parameters
rOtherGenOther generator

Reimplemented in faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, and faudes::TdiagGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 393 of file cfl_generator.cpp.

◆ ReadAlphabet()

void faudes::vGenerator::ReadAlphabet ( TokenReader rTr)
protected

Read the generator's alphabet from a TokenReader.

As of 2.24e, this method returns silently if no alphabet-tag is found.

Parameters
rTrReference to TokenReader
Exceptions
Exception
  • IO errors (id 1)
  • token mismatch (id 50, 51, 52)

Definition at line 3245 of file cfl_generator.cpp.

◆ ReadStates()

void faudes::vGenerator::ReadStates ( TokenReader rTr)
protected

Read the generator's stateset from a TokenReader.

This sets up the StateSymbolTable. As of 2.24e, this method returns silently if no alphabet-tag is found.

Parameters
rTrReference to TokenReader
Exceptions
Exception
  • IO errors (id 1)
  • token mismatch (id 50, 51, 52)

Definition at line 3257 of file cfl_generator.cpp.

◆ ReadStateSet()

void faudes::vGenerator::ReadStateSet ( TokenReader rTr,
const std::string &  rLabel,
StateSet rStateSet 
) const

Read a state set.

Refer to the generators state symboltable while reading a state set. Ignore any attributes.

Parameters
rTrReference to TokenReader
rLabelLabel of set in source
rStateSetDestination state set
Exceptions
Exception
  • IO errors (id 1)
  • token mismatch (id 50, 51, 52, 80, 85)

Definition at line 3386 of file cfl_generator.cpp.

◆ ReadTransRel() [1/2]

void faudes::vGenerator::ReadTransRel ( const std::string &  rFileName)
protected

Read the generator's transition relation from a file.

Parameters
rFileNameFile to read from
Exceptions
Exception
  • IO errors (id 1)
  • token mismatch (id 50, 51, 52)

◆ ReadTransRel() [2/2]

void faudes::vGenerator::ReadTransRel ( TokenReader rTr)
protected

Read the generator's transition relation from a TokenReader.

Parameters
rTrReference to TokenReader
Exceptions
Exception
  • IO errors (id 1)
  • token mismatch (id 50, 51, 52)

Definition at line 3619 of file cfl_generator.cpp.

◆ ReindexOnWrite() [1/2]

void faudes::vGenerator::ReindexOnWrite ( bool  flag)

Enable/disable minimal state indicees for file-i/o.

Parameters
flagTrue enables reindexing.

Definition at line 2396 of file cfl_generator.cpp.

◆ ReindexOnWrite() [2/2]

bool faudes::vGenerator::ReindexOnWrite ( void  ) const

Test whether file-i/o uses minimal state indicees.

Returns
True when minimal state indicees are enabled

Definition at line 2391 of file cfl_generator.cpp.

◆ ReindexOnWriteDefault() [1/2]

void faudes::vGenerator::ReindexOnWriteDefault ( bool  flag)
static

Enable/disable reindexing states for file-i/o.

Set default value for re-indexing. Initially, the default is set to "false".

Parameters
flagTrue enables reindexing.

Definition at line 2401 of file cfl_generator.cpp.

◆ ReindexOnWriteDefault() [2/2]

bool faudes::vGenerator::ReindexOnWriteDefault ( void  )
static

Enable/disable reindexing states for file-i/o.

Set default value for re-indexing.

Returns
True for reindexing enabled.

Definition at line 2406 of file cfl_generator.cpp.

◆ RestrictAlphabet()

void faudes::vGenerator::RestrictAlphabet ( const EventSet rNewalphabet)

Restricts mpAlphabet incl removing resp.

transition. Maintains attributes if any.

Note: before libFAUDES 2.23, this method did not remove transitions. Use InjectAlphabet(const EventSet&) for direct write acces to the alphabet.

Parameters
rNewalphabetEventSet with alphabet

Definition at line 1184 of file cfl_generator.cpp.

◆ RestrictStates()

void faudes::vGenerator::RestrictStates ( const StateSet rStates)

Restrict states Cleans mpStates, mInitStates, mMarkedStates, mpTransrel, and mpStateSymboltable.

Parameters
rStatesStateSet containing valid states

Definition at line 1412 of file cfl_generator.cpp.

◆ SetDefaultStateNames()

void faudes::vGenerator::SetDefaultStateNames ( void  )

Assign each state a default name based on its index.

Definition at line 1015 of file cfl_generator.cpp.

◆ SetInitState() [1/2]

void faudes::vGenerator::SetInitState ( const std::string &  rName)

Set an existing state as initial state by name.

Parameters
rNameName of state to set as initial state
Exceptions
Exception
  • State name not known in generator (id 90)

Definition at line 1446 of file cfl_generator.cpp.

◆ SetInitState() [2/2]

void faudes::vGenerator::SetInitState ( Idx  index)

Set an existing state as initial state by index.

Parameters
indexIndex of state to set as initial state
Exceptions
Exception
  • State index not found in generator (id 91)

Definition at line 1432 of file cfl_generator.cpp.

◆ SetMarkedState() [1/2]

void faudes::vGenerator::SetMarkedState ( const std::string &  rName)

Set an existing state as marked state by name.

Parameters
rNameName of state to set as marked state
Exceptions
Exception
  • State name not known in generator (id 90)

Definition at line 1521 of file cfl_generator.cpp.

◆ SetMarkedState() [2/2]

void faudes::vGenerator::SetMarkedState ( Idx  index)

Set an existing state as marked state by index.

Parameters
indexIndex of state to set as initial state
Exceptions
Exception
  • State index not found in generator (id 91)

Definition at line 1507 of file cfl_generator.cpp.

◆ SetMinStateIndexMap()

void faudes::vGenerator::SetMinStateIndexMap ( void  ) const

Set minimal index map for file io of generator states.

This function is implemented as fake-const to allow for const Write function.

Definition at line 688 of file cfl_generator.cpp.

◆ SetTransition() [1/3]

bool faudes::vGenerator::SetTransition ( const std::string &  rX1,
const std::string &  rEv,
const std::string &  rX2 
)

Add a transition to generator by names.

Statename and eventname must already exist.

Parameters
rX1Predecessor state name
rEvEvent name
rX2Successor 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)

Definition at line 1595 of file cfl_generator.cpp.

◆ SetTransition() [2/3]

bool faudes::vGenerator::SetTransition ( const Transition rTransition)

Add a transition to generator.

States and event must already exist.

Parameters
rTransitionTransition
Returns
True, if the transition was new the generator
Exceptions
Exception
  • state or event not in generator (id 95)

Definition at line 1631 of file cfl_generator.cpp.

◆ SetTransition() [3/3]

bool faudes::vGenerator::SetTransition ( Idx  x1,
Idx  ev,
Idx  x2 
)

Add a transition to generator by indices.

States and event must already exist.

Parameters
x1Predecessor state index
evEvent index
x2Successor state index
Returns
True, if the transition was new the generator
Exceptions
Exception
  • state or event not in generator (id 95)

Definition at line 1626 of file cfl_generator.cpp.

◆ Size()

Idx faudes::vGenerator::Size ( void  ) const

Get generator size (number of states)

Returns
Number of states

Definition at line 577 of file cfl_generator.cpp.

◆ SStr()

std::string faudes::vGenerator::SStr ( Idx  index) const

Return pretty printable state name for index (eg for debugging)

Parameters
indexState index
Returns
std::string

Definition at line 3834 of file cfl_generator.cpp.

◆ StateAttribute() [1/2]

const AttributeVoid & faudes::vGenerator::StateAttribute ( Idx  index) const
virtual

State attribute lookup.

In a context where the attribute type is known, you may prefer the TaGenerator method.

Parameters
indexState index
Returns
Ref to attribute of state

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

Definition at line 1836 of file cfl_generator.cpp.

◆ StateAttribute() [2/2]

void faudes::vGenerator::StateAttribute ( Idx  index,
const Type rAttr 
)
virtual

Set attribute for existing state.

This version uses a dynamic cast to test the actual type of the provided attribute. An exception is thrown for an invalid attribute type. In a context where the attribute type is known, you may prefer the TaGenerator method.

Parameters
indexState index
rAttrNew attribute
Exceptions
Exception
  • Index not found in Stateset (id 60)
  • Cannot cast attribute (id 63)

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

Definition at line 1743 of file cfl_generator.cpp.

◆ StateAttributep()

AttributeVoid * faudes::vGenerator::StateAttributep ( Idx  index)
virtual

State attribute pointer to access Attribute methods.

If there are no attributes (plain vGenerator) this method returns 0. If there are attributes, an explicit default value may be inserted. In a context where the attribute type is known, you may prefer the TaGenerator method.

Parameters
indexState index
Returns
Pointer to attribute of state

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

Definition at line 1841 of file cfl_generator.cpp.

◆ StateIndex()

Idx faudes::vGenerator::StateIndex ( const std::string &  rName) const

State index lookup.

Parameters
rName
Returns
Valid index (or 0 for non-existent)

Definition at line 944 of file cfl_generator.cpp.

◆ StateName() [1/2]

std::string faudes::vGenerator::StateName ( Idx  index) const

State name lookup.

Parameters
index
Returns
name (or empty string if no such exists)

Definition at line 949 of file cfl_generator.cpp.

◆ StateName() [2/2]

void faudes::vGenerator::StateName ( Idx  index,
const std::string &  rName 
)

Set name of state.

Parameters
indexIndex
rNameName
Exceptions
Exception
  • name already associated with another index (id 44)
  • state does not exist in generator (id 90)

Definition at line 954 of file cfl_generator.cpp.

◆ StateNamesEnabled() [1/2]

void faudes::vGenerator::StateNamesEnabled ( bool  flag)

Enable/disable libFAUEDS functions to automatically generate state names.

Disabling state name generation implies ClearStateNames().

Parameters
flagTrue enables statenames / false disables them

Definition at line 1004 of file cfl_generator.cpp.

◆ StateNamesEnabled() [2/2]

bool faudes::vGenerator::StateNamesEnabled ( void  ) const

Whether libFAUEDS functions are requested to generate state names.

Most libFAUDES functions that introduce new states to a generator can be enabled to also assign (more or less sensible) names to those states. This feature is purely cosmetic and may be disabled for performance reasons.

Returns
True, if generation of statenames is enabled.

Definition at line 999 of file cfl_generator.cpp.

◆ StateNamesEnabledDefault()

void faudes::vGenerator::StateNamesEnabledDefault ( bool  flag)
static

Sets the default for automatic state name generation.

This flag takes effect only on generators newly created by the default constructor. The copy constructor copies the state name flag from the source generator. See also StateNamesEnabled(bool).

Parameters
flagTrue enables statenames / false disables them

Definition at line 1010 of file cfl_generator.cpp.

◆ States()

const StateSet & faudes::vGenerator::States ( void  ) const

Return reference to state set.

Returns
StateSet reference incl actual attribute type

Definition at line 1883 of file cfl_generator.cpp.

◆ StatesBegin()

StateSet::Iterator faudes::vGenerator::StatesBegin ( void  ) const

Iterator to Begin() of state set.

Returns
Iterator to begin of state set

Definition at line 1057 of file cfl_generator.cpp.

◆ StatesEnd()

StateSet::Iterator faudes::vGenerator::StatesEnd ( void  ) const

Iterator to End() of state set.

Returns
Iterator to end of state set

Definition at line 1062 of file cfl_generator.cpp.

◆ StateSetToString()

std::string faudes::vGenerator::StateSetToString ( const StateSet rStateSet) const

Write a stateset to string (no re-indexing).

Uses WriteStateSet(TokenWriter& rTw, const StateSet&) const to write the specified state set to a string referring to this generators state names.

Parameters
rStateSetReference to stateset
Returns
std::string
Exceptions
Exception
  • IO errors (id 2)

Definition at line 2541 of file cfl_generator.cpp.

◆ StateSetToText()

std::string faudes::vGenerator::StateSetToText ( const StateSet rStateSet) const

Write a stateset to formated text (no re-indexing).

Uses WriteStateSet(TokenWriter& rTw, const StateSet&) const to write the specified state set to a string referring to this generators state names.

Parameters
rStateSetReference to stateset
Returns
std::string
Exceptions
Exception
  • IO errors (id 2)

Definition at line 2548 of file cfl_generator.cpp.

◆ StatesToString()

std::string faudes::vGenerator::StatesToString ( void  ) const

Write stateset of this generator to a string (no re-indexing)

Returns
std::string
Exceptions
Exception
  • IO errors (id 2)

Definition at line 2814 of file cfl_generator.cpp.

◆ StatesToText()

std::string faudes::vGenerator::StatesToText ( void  ) const

Write stateset of this generator to formated text (no re-indexing)

Returns
std::string
Exceptions
Exception
  • IO errors (id 2)

Definition at line 2819 of file cfl_generator.cpp.

◆ StatesVoid()

const StateSet & faudes::vGenerator::StatesVoid ( void  )
staticprotected

Static default state set prototype (incl.

attribute type)

Definition at line 45 of file cfl_generator.cpp.

◆ StateSymbolTable() [1/2]

void faudes::vGenerator::StateSymbolTable ( const SymbolTable rSymTab)

Set StateSymbolTable.

By convention, state names and indices are local to the respective generator. It is most unlikely that you want to use this function.

Returns
Pointer to mpStateSymbolTable

Definition at line 938 of file cfl_generator.cpp.

◆ StateSymbolTable() [2/2]

const SymbolTable & faudes::vGenerator::StateSymbolTable ( void  ) const

Get StateSymbolTable.

doxygen group

Returns
ref to state-symboltable

Definition at line 933 of file cfl_generator.cpp.

◆ SuccessorState()

Idx faudes::vGenerator::SuccessorState ( Idx  x1,
Idx  ev 
) const

Return the successor state of state x1 with event ev.

If no such transition exists, return 0. If multiple such transitions exit, through expection.

A more egeneral set valued interface is provided by TransSet

Returns
next state
Exceptions
Exception
  • Successor state does not exist uniquely (id 92)

Definition at line 1980 of file cfl_generator.cpp.

◆ SuccessorStates() [1/2]

StateSet faudes::vGenerator::SuccessorStates ( Idx  x1) const

Return the successor states of state x1.

Returns
StateSet

Definition at line 1969 of file cfl_generator.cpp.

◆ SuccessorStates() [2/2]

StateSet faudes::vGenerator::SuccessorStates ( Idx  x1,
Idx  ev 
) const

Return the successor states of state x1 with event ev.

Returns
StateSet

Definition at line 1974 of file cfl_generator.cpp.

◆ TerminalStates() [1/2]

StateSet faudes::vGenerator::TerminalStates ( const StateSet rStates) const

Compute set of terminal states.

A terminal state is a state with no successor state. This function returns the the set terminal states contained in the specified state ste.

Parameters
rStatesSet of state indices to restrict the search
Returns
Set of terminal states.

Definition at line 2308 of file cfl_generator.cpp.

◆ TerminalStates() [2/2]

StateSet faudes::vGenerator::TerminalStates ( void  ) const

Compute set of terminal states.

A terminal state is a state with no successor state. If and only if the set of terminal states is empty, the generator is complete.

Returns
Set of terminal states.

Definition at line 2328 of file cfl_generator.cpp.

◆ TransAttribute() [1/2]

const AttributeVoid & faudes::vGenerator::TransAttribute ( const Transition rTrans) const
virtual

Transition attribute lookup.

In a context where the attribute type is known, you may prefer the TaGenerator method.

Returns
Attribute

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

Definition at line 1706 of file cfl_generator.cpp.

◆ TransAttribute() [2/2]

void faudes::vGenerator::TransAttribute ( const Transition rTrans,
const Type rAttr 
)
virtual

Set attribute for existing transition.

This version uses a dynamic cast to test the actual type of the provided attribute. An exception is thrown for an invalid attribute type. In a context where the attribute type is known, you may prefer the TaGenerator method.

Parameters
rTransTransition
rAttrNew attribute
Exceptions
Exception
  • Transition not found in transition relation(id 60)
  • Cannot cast attribute (id 63)

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

Definition at line 1693 of file cfl_generator.cpp.

◆ TransAttributep()

AttributeVoid * faudes::vGenerator::TransAttributep ( const Transition rTrans)
virtual

Transition attribute pointer to access Attribute methods.

If there are no attributes (plain vGenerator) this method returns 0. If there are attributes, an explicit default value may be inserted. In a context where the attribute type is known, you may prefer the TaGenerator method.

Returns
Attribute pointer

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

Definition at line 1700 of file cfl_generator.cpp.

◆ TransitionByNames()

Transition faudes::vGenerator::TransitionByNames ( const std::string &  rX1,
const std::string &  rEv,
const std::string &  rX2 
) const

Convebience function.

Parameters
rX1Name of Predecessor state
rEvName of Event
rX2Name of Successor state
Returns
Transition as specified.

Definition at line 1902 of file cfl_generator.cpp.

◆ TransRel() [1/7]

void faudes::vGenerator::TransRel ( TransSetEvX1X2 res) const

Definition at line 1895 of file cfl_generator.cpp.

◆ TransRel() [2/7]

void faudes::vGenerator::TransRel ( TransSetEvX2X1 res) const

◆ TransRel() [3/7]

void faudes::vGenerator::TransRel ( TransSetX1EvX2 res) const

Get copy of trantision relation sorted by other compare operator, e.g.

"x2,ev,x1"

Parameters
resresulting transition relation

Definition at line 1894 of file cfl_generator.cpp.

◆ TransRel() [4/7]

void faudes::vGenerator::TransRel ( TransSetX1X2Ev res) const

◆ TransRel() [5/7]

void faudes::vGenerator::TransRel ( TransSetX2EvX1 res) const

◆ TransRel() [6/7]

void faudes::vGenerator::TransRel ( TransSetX2X1Ev res) const

◆ TransRel() [7/7]

const TransSet & faudes::vGenerator::TransRel ( void  ) const

Return reference to transition relation.

Returns
TransRel

Definition at line 1888 of file cfl_generator.cpp.

◆ TransRelBegin() [1/3]

TransSet::Iterator faudes::vGenerator::TransRelBegin ( Idx  x1) const

Iterator to begin of transitions with x1 as predecessor state.

Parameters
x1Predecessor state
Returns
iterator to begin of transitions with x1

Definition at line 1077 of file cfl_generator.cpp.

◆ TransRelBegin() [2/3]

TransSet::Iterator faudes::vGenerator::TransRelBegin ( Idx  x1,
Idx  ev 
) const

iterator to begin of transitions with x1 as predecessor state and event ev.

Parameters
x1Predecessor state
evEvent
Returns
iterator to begin of transitions with x1 and ev

Definition at line 1087 of file cfl_generator.cpp.

◆ TransRelBegin() [3/3]

TransSet::Iterator faudes::vGenerator::TransRelBegin ( void  ) const

Iterator to Begin() of transition relation.

Returns
Iterator to Begin of mpTransRel

Definition at line 1067 of file cfl_generator.cpp.

◆ TransRelEmpty()

bool faudes::vGenerator::TransRelEmpty ( void  ) const

Check if transition relation is empty.

Returns
True if transition relation is empty

Definition at line 658 of file cfl_generator.cpp.

◆ TransRelEnd() [1/3]

TransSet::Iterator faudes::vGenerator::TransRelEnd ( Idx  x1) const

iterator to end of transitions with x1 as predecessor state.

Note: Set the End(x1) iterator to a variable, so it won't be recalculated every iteration.

Parameters
x1Predecessor state
Returns
iterator to end of transitions with x1 (one after last matching transition)

Definition at line 1082 of file cfl_generator.cpp.

◆ TransRelEnd() [2/3]

TransSet::Iterator faudes::vGenerator::TransRelEnd ( Idx  x1,
Idx  ev 
) const

Iterator to end of transitions with x1 as predecessor state and event ev.

Note: Set the End(x1,ev) iterator to a variable, so it won't be recalculated every iteration.

Parameters
x1Predecessor state
evEvent
Returns
iterator to end of transitions with x1 and ev (one after last matching transition)

Definition at line 1092 of file cfl_generator.cpp.

◆ TransRelEnd() [3/3]

TransSet::Iterator faudes::vGenerator::TransRelEnd ( void  ) const

Iterator to End() of transition relation.

Returns
Iterator to End of mpTransRel

Definition at line 1072 of file cfl_generator.cpp.

◆ TransRelSize()

Idx faudes::vGenerator::TransRelSize ( void  ) const

Get number of transitions.

Returns
Number of transitions

Definition at line 633 of file cfl_generator.cpp.

◆ TransRelStates()

StateSet faudes::vGenerator::TransRelStates ( void  ) const

Return the states covered by transitions.

Returns
StateSet

Definition at line 1958 of file cfl_generator.cpp.

◆ TransRelToString()

std::string faudes::vGenerator::TransRelToString ( void  ) const

Write transition relation to string (no re-indexing)

Definition at line 2841 of file cfl_generator.cpp.

◆ TransRelToText()

std::string faudes::vGenerator::TransRelToText ( void  ) const

Write transition relation to formated text (no re-indexing)

Definition at line 2848 of file cfl_generator.cpp.

◆ TransRelVoid()

const TransSet & faudes::vGenerator::TransRelVoid ( void  )
staticprotected

Static default transition relation prototype (incl.

attribute type)

Definition at line 49 of file cfl_generator.cpp.

◆ Trim()

bool faudes::vGenerator::Trim ( void  )

Make generator trim.

This function removes all states are not accessible or not coaccessible. In other words: only those states are kept, that contribute to that marked language.

Returns
True if resulting generator contains at least one initial state and at least one marked state.

Definition at line 2122 of file cfl_generator.cpp.

◆ TrimSet()

StateSet faudes::vGenerator::TrimSet ( void  ) const

Compute set of trim states.

Definition at line 2113 of file cfl_generator.cpp.

◆ TStr()

std::string faudes::vGenerator::TStr ( const Transition rTrans) const

Return pretty printable transition (eg for debugging)

Parameters
rTransTransition
Returns
std::string

Definition at line 3841 of file cfl_generator.cpp.

◆ UniqueEventName()

std::string faudes::vGenerator::UniqueEventName ( const std::string &  rName) const

Create a new unique symbolic event name.

See also SymbolTable::UniqueSymbol().

Parameters
rNamesuggestion for new state name

Definition at line 859 of file cfl_generator.cpp.

◆ UniqueStateName()

std::string faudes::vGenerator::UniqueStateName ( const std::string &  rName) const

Create a new unique symbolic state name.

See also SymbolTable::UniqueSymbol().

Parameters
rNamesuggestion for new state name

Definition at line 1039 of file cfl_generator.cpp.

◆ UnusedEvents()

EventSet faudes::vGenerator::UnusedEvents ( void  ) const

Return unused events.

Returns
EventSet

Definition at line 1933 of file cfl_generator.cpp.

◆ UpdateAttributes()

◆ UpdateCore()

void faudes::vGenerator::UpdateCore ( void  )
protectedvirtual

Callback for core update.

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

Definition at line 213 of file cfl_generator.cpp.

◆ UsedEvents()

EventSet faudes::vGenerator::UsedEvents ( void  ) const

Return used events (executed in transitions)

doxygen group

Returns
EventSet

Definition at line 1923 of file cfl_generator.cpp.

◆ Valid()

bool faudes::vGenerator::Valid ( void  ) const
virtual

Check if generator is valid.

Performs internal consistency tests, This method is intendend to test generators that have been manipulated by methods without consistency tests, eg InjectAlphabet.

Returns
True for success

Reimplemented in faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::Executor, and faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 537 of file cfl_generator.cpp.

◆ Version() [1/3]

void faudes::vGenerator::Version ( const std::string &  rPattern,
const std::string &  rReplacement,
vGenerator rResGen 
) const
virtual

Create another version of this generator.

Assembles a copy of this generator, however, with versioned events. The new event names are created by replacing all substrings matching a specified string pattern by a replacement string. State names and indices as well as any attributes are maintained.

Parameters
rPatternString value to be replaced in event names
rReplacementString value to be inserted in event names in place of rPattern
rResGenResulting versioned generator
Exceptions
Exception
  • Source must not match destination (id 96)

Definition at line 452 of file cfl_generator.cpp.

◆ Version() [2/3]

void faudes::vGenerator::Version ( const std::string &  rVersion,
vGenerator rResGen 
) const
virtual

Create another version of this generator.

Assembles a copy of this generator, however, with versioned events. The new event names are created by appending an underscore and a specified string. State names and indices as well as any attributes are maintained.

Parameters
rVersionString value to be appended to event names
rResGenResulting versioned generator
Exceptions
Exception
  • Source must not match destination (id 96)

Definition at line 408 of file cfl_generator.cpp.

◆ Version() [3/3]

void faudes::vGenerator::Version ( Idx  version,
vGenerator rResGen 
) const
virtual

Create another version of this generator.

Assembles a copy of this generator, however, with versioned events. The new event names are created by appending an underscore and a numeric index. State names and indices as well as any attributes are maintained.

Parameters
versionNumeric value to be appended to event names
rResGenResulting versioned generator
Exceptions
Exception
  • Source must not match destination (id 96)

Definition at line 400 of file cfl_generator.cpp.

◆ WriteAlphabet() [1/2]

void faudes::vGenerator::WriteAlphabet ( TokenWriter rTw) const

Write generators alphabet to tokenwriter.

Parameters
rTwReference to TokenWriter
Exceptions
Exception
  • IO errors (id 2)

Definition at line 2530 of file cfl_generator.cpp.

◆ WriteAlphabet() [2/2]

void faudes::vGenerator::WriteAlphabet ( void  ) const

Write generators alphabet to console.

doxygen group

Definition at line 2517 of file cfl_generator.cpp.

◆ WriteStates()

void faudes::vGenerator::WriteStates ( TokenWriter rTw) const
protected

Write generators stateset to TokenWriter.

This method differs from the general purpos version WriteStateSet(TokenWriter&, const StateSet&) in that it can optionally write an explicit symbol table for state names. This will happen whenever writing is done without re-indexing states.

Parameters
rTwReference to TokenWriter
Exceptions
Exception
  • IO errors (id 2)

Definition at line 2557 of file cfl_generator.cpp.

◆ WriteStateSet() [1/2]

void faudes::vGenerator::WriteStateSet ( const StateSet rStateSet) const

Write a stateset to console (no re-indexing).

Uses WriteStateSet(TokenWriter& rTw, const StateSet&) const to write the specified state set to console referring to this generators state names.

Parameters
rStateSetReference to stateset

Definition at line 2535 of file cfl_generator.cpp.

◆ WriteStateSet() [2/2]

void faudes::vGenerator::WriteStateSet ( TokenWriter rTw,
const StateSet rStateSet 
) const

Write a stateset to TokenWriter.

All native output of external state sets done with this function. Technically, a StateSet is a set of plain indices with no references to symbolic names. Thus, it is only the context of a Generator that provides the symbolic names for file output.

Output of state sets always uses the mMinStateIndexMap to re-index states. However, this map is only set up automatically for file output. If You require re-indexed output to e.g. a string, you must set up the map by calling SetMinStateIndexMap(). To ensure that no re-indexing takes place, call ClearMinStateIndexMap().

Parameters
rTwReference to TokenWriter
rStateSetReference to stateset
Exceptions
Exception
  • IO errors (id 2)

Definition at line 2650 of file cfl_generator.cpp.

◆ WriteTransRel() [1/2]

void faudes::vGenerator::WriteTransRel ( TokenWriter rTw) const

Write transition relation to tokenwriter.

Re-indexing and symbolic state names are handled in the same way as with state sets: this function refers to the generators state symboltable to obtain state names and uses the mMinStateIndexMap to re-index the output.

Parameters
rTwReference to TokenWriter
Exceptions
Exception
  • IO errors (id 2)

Definition at line 2856 of file cfl_generator.cpp.

◆ WriteTransRel() [2/2]

void faudes::vGenerator::WriteTransRel ( void  ) const

Write transition relation to console (no re-indexing)

Definition at line 2835 of file cfl_generator.cpp.

◆ XDotWrite()

void faudes::vGenerator::XDotWrite ( const std::string &  rFileName) const
virtual

Writes generator to dot input format for export to VioLib.

Variant of DotWrite() using strategic state and event names to simplify import to VioLib (qt widget for graphical representation of FAUDES generators).

Parameters
rFileNameFile to write
Exceptions
Exception
  • IO errors (id 2)

Definition at line 3112 of file cfl_generator.cpp.

◆ XReadStateSet()

void faudes::vGenerator::XReadStateSet ( TokenReader rTr,
StateSet rStateSet,
const std::string &  rLabel = "" 
) const
protected

Read a stateset from TokenReader in XML format.

This version for file IO supports the XML format introduced with libFAUDES 2.20. Note that for Generators and derived classes, the native libFAUDES token format is considered the default. To read XML fromated data, use the XRead() interface.

Parameters
rTrReference to TokenReader
rStateSetReference to stateset
rLabelSection name, defaults to name of set
Exceptions
Exception
  • IO errors (id 1)
  • token mismatch (id 50, 51, 52)

Definition at line 3486 of file cfl_generator.cpp.

◆ XReadTransRel()

void faudes::vGenerator::XReadTransRel ( TokenReader rTr)
protected

Read the generator's transition relation from a TokenReader.

Parameters
rTrReference to TokenReader
Exceptions
Exception
  • IO errors (id 1)
  • token mismatch (id 50, 51, 52)

Definition at line 3732 of file cfl_generator.cpp.

◆ XWriteStateSet()

void faudes::vGenerator::XWriteStateSet ( TokenWriter rTw,
const StateSet rStateSet,
const std::string &  rLabel = "" 
) const
protected

Write a stateset to TokenWriter in XML format.

This version for file IO supports the XML format introduced with libFAUDES 2.20. Note that for Generators and derived classes, the native libFAUDES token format is considered the default. To obtain XML fromated output of a Generator, use the XWrite() interface.

Parameters
rTwReference to TokenWriter
rStateSetReference to stateset
rLabelSection name, defaults to name of set
Exceptions
Exception
  • IO errors (id 2)

Definition at line 2749 of file cfl_generator.cpp.

◆ XWriteTransRel()

void faudes::vGenerator::XWriteTransRel ( TokenWriter rTw) const
protected

Write transition relation to tokenwriter in XML format.

This version for file IO supports the XML format introduced with libFAUDES 2.20. Note that for Generators and derived classes, the native libFAUDES token format is considered the default. To obtain XML fromated output of a Generator, use the XWrite() interface.

Parameters
rTwReference to TokenWriter
Exceptions
Exception
  • IO errors (id 2)

Definition at line 2946 of file cfl_generator.cpp.

Member Data Documentation

◆ mId

Idx faudes::vGenerator::mId
protected

Number of generator.

Definition at line 2920 of file cfl_generator.h.

◆ mInitStates

StateSet faudes::vGenerator::mInitStates
protected

Initial states.

Definition at line 2983 of file cfl_generator.h.

◆ mMarkedStates

StateSet faudes::vGenerator::mMarkedStates
protected

Marked states.

Definition at line 2986 of file cfl_generator.h.

◆ mMinStateIndexMap

std::map<Idx,Idx> faudes::vGenerator::mMinStateIndexMap
protected

Map State indices to consecutive indices.

Definition at line 2989 of file cfl_generator.h.

◆ mMyName

std::string faudes::vGenerator::mMyName
protected

Name of generator.

Definition at line 2917 of file cfl_generator.h.

◆ mpAlphabet

EventSet* faudes::vGenerator::mpAlphabet
protected

Pointer to alphabet (actual type depends on attributes)

Definition at line 2947 of file cfl_generator.h.

◆ mpEventSymbolTable

SymbolTable* faudes::vGenerator::mpEventSymbolTable
protected

Pointer to Event symbol table.

Definition at line 2932 of file cfl_generator.h.

◆ mpGlobalAttribute

AttributeVoid* faudes::vGenerator::mpGlobalAttribute
protected

Pointer to lobal attribute (actual type depends on attributes)

Definition at line 2956 of file cfl_generator.h.

◆ mpStates

StateSet* faudes::vGenerator::mpStates
protected

Pointer to state set (actual type depends on attributes)

Definition at line 2950 of file cfl_generator.h.

◆ mpStateSymbolTable

SymbolTable* faudes::vGenerator::mpStateSymbolTable
protected

Pointer to State symbol table.

Definition at line 2929 of file cfl_generator.h.

◆ mpTransRel

TransSet* faudes::vGenerator::mpTransRel
protected

Pointer to ransition relation (actual type depends on attributes)

Definition at line 2953 of file cfl_generator.h.

◆ mReindexOnWrite

bool faudes::vGenerator::mReindexOnWrite
protected

Reindex states on file-i/o.

Definition at line 2941 of file cfl_generator.h.

◆ msObjectCount

Idx faudes::vGenerator::msObjectCount = 0
staticprotected

Number of generator objects.

Definition at line 2923 of file cfl_generator.h.

◆ msReindexOnWriteDefault

bool faudes::vGenerator::msReindexOnWriteDefault = false
staticprotected

Default for automatic statenames.

Definition at line 2944 of file cfl_generator.h.

◆ msStateNamesEnabledDefault

bool faudes::vGenerator::msStateNamesEnabledDefault = true
staticprotected

Default for automatic statenames.

Definition at line 2938 of file cfl_generator.h.

◆ mStateNamesEnabled

bool faudes::vGenerator::mStateNamesEnabled
protected

Automatic state names.

Definition at line 2935 of file cfl_generator.h.

◆ mStateSymbolTable

SymbolTable faudes::vGenerator::mStateSymbolTable
protected

State symbol table (local per Generator)

Definition at line 2926 of file cfl_generator.h.

◆ pAlphabetPrototype

const EventSet* faudes::vGenerator::pAlphabetPrototype
protected

Pointer to alphabet prototype (incl.

attribute type)

Definition at line 2959 of file cfl_generator.h.

◆ pGlobalPrototype

const AttributeVoid* faudes::vGenerator::pGlobalPrototype
protected

Pointer to global attribute prototype (configures global attribute type)

Definition at line 2968 of file cfl_generator.h.

◆ pStatesPrototype

const StateSet* faudes::vGenerator::pStatesPrototype
protected

Pointer to state set prototype (incl.

attribute type)

Definition at line 2962 of file cfl_generator.h.

◆ pTransRelPrototype

const TransSet* faudes::vGenerator::pTransRelPrototype
protected

Pointer to transition relation prototype (incl.

attribute type)

Definition at line 2965 of file cfl_generator.h.


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

libFAUDES 2.32b --- 2024.03.01 --- c++ api documentaion by doxygen