General Purpose Functions

This module collects general purpose functions on Generator, System, EventSet and Alphabet typed data. More...

Classes

class  faudes::SccFilter
 Filter for strictly connected components (SCC) search/compute routines. More...

Functions

void faudes::UniqueInit (Generator &rGen)
 Make initial states unique.
void faudes::UniqueInit (const Generator &rGen, Generator &rResGen)
 Make initial states unique.
void faudes::Deterministic (const Generator &rGen, Generator &rResGen)
 Make generator deterministic.
void faudes::aDeterministic (const Generator &rGen, Generator &rResGen)
 Make generator deterministic.
bool faudes::IsAccessible (const vGenerator &rGen)
 RTI wrapper function.
bool faudes::IsCoaccessible (const vGenerator &rGen)
 RTI wrapper function.
bool faudes::IsTrim (const vGenerator &rGen)
 RTI wrapper function.
bool faudes::IsOmegaTrim (const vGenerator &rGen)
 RTI wrapper function.
bool faudes::IsComplete (const vGenerator &rGen)
 RTI wrapper function.
bool faudes::IsComplete (const vGenerator &rGen, const EventSet &rSigmaO)
 RTI wrapper function.
bool faudes::IsDeterministic (const vGenerator &rGen)
 RTI wrapper function.
void faudes::Accessible (vGenerator &rGen)
 RTI wrapper function.
void faudes::Accessible (const vGenerator &rGen, vGenerator &rRes)
 RTI wrapper function.
void faudes::Coaccessible (vGenerator &rGen)
 RTI wrapper function.
void faudes::Coaccessible (const vGenerator &rGen, vGenerator &rRes)
 RTI wrapper function.
void faudes::Complete (vGenerator &rGen)
 RTI wrapper function.
void faudes::Complete (const vGenerator &rGen, vGenerator &rRes)
 RTI wrapper function.
void faudes::Complete (vGenerator &rGen, const EventSet &rSigmaO)
 RTI wrapper function.
void faudes::Complete (const vGenerator &rGen, const EventSet &rSigmaO, vGenerator &rRes)
 RTI wrapper function.
void faudes::Trim (vGenerator &rGen)
 RTI wrapper function.
void faudes::Trim (const vGenerator &rGen, vGenerator &rRes)
 RTI wrapper function.
void faudes::OmegaTrim (vGenerator &rGen)
 RTI wrapper function.
void faudes::OmegaTrim (const vGenerator &rGen, vGenerator &rRes)
 RTI wrapper function.
void faudes::MarkAllStates (vGenerator &rGen)
 RTI wrapper function.
void faudes::AlphabetExtract (const vGenerator &rGen, EventSet &rRes)
 RTI wrapper function.
bool faudes::ComputeScc (const Generator &rGen, const SccFilter &rFilter, std::list< StateSet > &rSccList, StateSet &rRoots)
 Compute strongly connected components (SCC).
bool faudes::ComputeScc (const Generator &rGen, std::list< StateSet > &rSccList, StateSet &rRoots)
 Compute strongly connected components (SCC).
bool faudes::ComputeScc (const Generator &rGen, const SccFilter &rFilter, Idx q0, StateSet &rScc)
 Compute strongly connected component (SCC).
bool faudes::ComputeScc (const Generator &rGen, const SccFilter &rFilter, StateSet &rScc)
 Compute one strongly connected components (SCC).
bool faudes::HasScc (const Generator &rGen, const SccFilter &rFilter)
 Test for strongly connected components (SCC).
bool faudes::ComputeNextScc (const Generator &rGen, SccFilter &rFilter, StateSet &rScc)
 Compute next SCC.
void faudes::OmegaProduct (const Generator &rGen1, const Generator &rGen2, Generator &rResGen)
 Product composition for Buechi automata.
void faudes::aOmegaProduct (const Generator &rGen1, const Generator &rGen2, Generator &rResGen)
 Product composition for Buechi automata.
void faudes::OmegaParallel (const Generator &rGen1, const Generator &rGen2, Generator &rResGen)
 Parallel composition with relaxed acceptance condition.
void faudes::aOmegaParallel (const Generator &rGen1, const Generator &rGen2, Generator &rResGen)
 Parallel composition with relaxed acceptance condition.
void faudes::OmegaClosure (Generator &rGen)
 Topological closure.
bool faudes::IsOmegaClosed (const Generator &rGen)
 Test for topologically closed omega language.
void faudes::Parallel (const Generator &rGen1, const Generator &rGen2, Generator &rResGen)
 Parallel composition.
void faudes::aParallel (const Generator &rGen1, const Generator &rGen2, Generator &rResGen)
 Parallel composition.
void faudes::aParallel (const Generator &rGen1, const Generator &rGen2, ProductCompositionMap &rCompositionMap, Generator &rResGen)
 Parallel composition.
void faudes::Parallel (const Generator &rGen1, const Generator &rGen2, ProductCompositionMap &rCompositionMap, Generator &rResGen)
 Parallel composition.
void faudes::Product (const Generator &rGen1, const Generator &rGen2, Generator &rResGen)
 Product composition.
void faudes::aProduct (const Generator &rGen1, const Generator &rGen2, Generator &rResGen)
 Product composition.
void faudes::aProduct (const Generator &rGen1, const Generator &rGen2, ProductCompositionMap &rCompositionMap, Generator &rResGen)
 Product composition.
void faudes::ProjectNonDet (Generator &rGen, const EventSet &rProjectAlphabet)
 Language projection.
void faudes::ProjectNonDetScc (Generator &rGen, const EventSet &rProjectAlphabet)
 Language projection.
void faudes::Project (const Generator &rGen, const EventSet &rProjectAlphabet, Generator &rResGen)
 Deterministic projection.
void faudes::aProject (const Generator &rGen, const EventSet &rProjectAlphabet, Generator &rResGen)
 Deterministic projection.
void faudes::aProjectNonDet (Generator &rGen, const EventSet &rProjectAlphabet)
 Language projection.
void faudes::InvProject (Generator &rGen, const EventSet &rProjectAlphabet)
 Inverse projection.
void faudes::aInvProject (Generator &rGen, const EventSet &rProjectAlphabet)
 Inverse projection.
void faudes::aInvProject (const Generator &rGen, const EventSet &rProjectAlphabet, Generator &rResGen)
 Inverse projection.
void faudes::LanguageUnionNonDet (const Generator &rGen1, const Generator &rGen2, Generator &rResGen)
 Language union, nondeterministic version.
void faudes::LanguageUnion (const Generator &rGen1, const Generator &rGen2, Generator &rResGen)
 Language union, deterministic version.
void faudes::LanguageIntersection (const Generator &rGen1, const Generator &rGen2, Generator &rResGen)
 Language intersection.
bool faudes::EmptyLanguageIntersection (const Generator &rGen1, const Generator &rGen2)
 Test for empty language intersection (same as Disjoind()).
bool faudes::LanguageDisjoint (const Generator &rGen1, const Generator &rGen2)
 Test whether two languages are disjoint.
void faudes::Automaton (Generator &rGen)
 Convert generator to automaton.
void faudes::Automaton (Generator &rGen, const EventSet &rAlphabet)
 Convert generator to automaton wrt specified alphabet.
void faudes::LanguageComplement (Generator &rGen)
 Language complement.
void faudes::LanguageComplement (Generator &rGen, const EventSet &rAlphabet)
 Language complement wrt specified alphabet.
void faudes::LanguageComplement (const Generator &rGen, Generator &rRes)
 Language Complement (uniform API wrapper).
void faudes::LanguageComplement (const Generator &rGen, const EventSet &rSigma, Generator &rRes)
 Language Complement (uniform API wrapper).
void faudes::LanguageDifference (const Generator &rGen1, const Generator &rGen2, Generator &rResGen)
 Language difference (set-theoretic difference).
void faudes::LanguageConcatenateNonDet (const Generator &rGen1, const Generator &rGen2, Generator &rResGen)
 Language concatenation, nondeterministic version.
void faudes::LanguageConcatenate (const Generator &rGen1, const Generator &rGen2, Generator &rResGen)
 Language concatenation, deterministic version.
void faudes::FullLanguage (const EventSet &rAlphabet, Generator &rResGen)
 Full Language, L(G)=Lm(G)=Sigma*.
void faudes::AlphabetLanguage (const EventSet &rAlphabet, Generator &rResGen)
 Alphabet Language, L(G)=Lm(G)=Sigma.
void faudes::EmptyStringLanguage (const EventSet &rAlphabet, Generator &rResGen)
 Empty string language, L(G)=Lm(G)={epsilon}.
void faudes::EmptyLanguage (const EventSet &rAlphabet, Generator &rResGen)
 Empty language Lm(G)={}.
bool faudes::IsEmptyLanguage (const Generator &rGen)
 Test for Empty language Lm(G)=={}.
bool faudes::LanguageInclusion (const Generator &rGen1, const Generator &rGen2)
 Test language inclusion, Lm1<=Lm2.
bool faudes::LanguageEquality (const Generator &rGen1, const Generator &rGen2)
 Language equality, Lm1==Lm2.
void faudes::KleeneClosure (Generator &rGen)
 Kleene Closure.
void faudes::KleeneClosure (const Generator &rGen, Generator &rResGen)
 Kleene Closure.
void faudes::KleeneClosureNonDet (Generator &rGen)
 Kleene Closure, nondeterministic version.
void faudes::PrefixClosure (Generator &rGen)
 Prefix Closure.
bool faudes::IsPrefixClosed (const Generator &rGen)
 Test for prefix closed marked language.
bool faudes::IsNonblocking (const Generator &rGen)
 Test for nonblocking generator.
bool faudes::IsNonblocking (const Generator &rGen1, const Generator &rGen2)
 Test for nonblocking marked languages.
void faudes::SelfLoop (Generator &rGen, const EventSet &rAlphabet)
 Self-loop all states.
void faudes::SelfLoopMarkedStates (Generator &rGen, const EventSet &rAlphabet)
 Self-loop all marked states.
void faudes::SelfLoop (Generator &rGen, const EventSet &rAlphabet, const StateSet &rStates)
 Self-loop specified states.
void faudes::StateMin (const Generator &rGen, Generator &rResGen)
 State set minimization.
void faudes::aStateMin (const Generator &rGen, Generator &rResGen)
 State set minimization.
void faudes::aStateMin (Generator &rGen)
 State set minimization.
bool faudes::IsStronglyCoaccessible (const MtcSystem &rGen)
 RTI wrapper function.
bool faudes::IsStronglyTrim (const MtcSystem &rGen)
 RTI wrapper function.
void faudes::StronglyCoaccessible (MtcSystem &rGen)
 RTI wrapper function.
void faudes::StronglyCoaccessible (const MtcSystem &rGen, MtcSystem &rRes)
 RTI wrapper function.
void faudes::StronglyTrim (MtcSystem &rGen)
 RTI wrapper function.
void faudes::StronglyTrim (const MtcSystem &rGen, MtcSystem &rRes)
 RTI wrapper function.

Detailed Description

This module collects general purpose functions on Generator, System, EventSet and Alphabet typed data.

It includes functions related to regular expressions, projection, parallel composition, etc.


Function Documentation

void faudes::Accessible ( const vGenerator &  rGen,
vGenerator &  rRes 
)

RTI wrapper function.

See also vGenerator::Accessible().

void faudes::Accessible ( vGenerator &  rGen  ) 

RTI wrapper function.

See also vGenerator::Accessible().

void faudes::aDeterministic ( const Generator &  rGen,
Generator &  rResGen 
)

Make generator deterministic.

See also Deterministic(const Generator&, Generator&). This version maintains event attributes provided they can be castes to the result type.

Parameters:
rGen Reference to generator
rResGen Reference to resulting deterministic generator
void faudes::aInvProject ( const Generator &  rGen,
const EventSet &  rProjectAlphabet,
Generator &  rResGen 
)

Inverse projection.

This adds selfloop transition at every state for all missing events. This version tries to be transparent to attributes.

Parameters:
rGen Reference to argumant generator
rProjectAlphabet Alphabet for inverse projection
rResGen Alphabet to result.
void faudes::aInvProject ( Generator &  rGen,
const EventSet &  rProjectAlphabet 
)

Inverse projection.

This adds selfloop transition at every state for all missing events. This version tries to be transparent to attributes.

Parameters:
rGen Reference to generator
rProjectAlphabet Alphabet for inverse projection
void faudes::AlphabetExtract ( const vGenerator &  rGen,
EventSet &  rRes 
)

RTI wrapper function.

void faudes::AlphabetLanguage ( const EventSet &  rAlphabet,
Generator &  rResGen 
)

Alphabet Language, L(G)=Lm(G)=Sigma.

Construct generator generating and marking an alphabet as languages, that is L(G)=Lm(G)=Sigma. Method: this function creates a generator with one init state and one marked state. For each event from rAlphabet, a transition is inserted leading from the init state to the marked state.

No restrictions on parameters.

Parameters:
rAlphabet alphabet from which alphabet language is built
rResGen generator with languages Lm(G)=Sigma

Example:

AlphabetLanguage(Sigma={a,b},Result)
tmp_languagesAlphabet_result.png
void faudes::aOmegaParallel ( const Generator &  rGen1,
const Generator &  rGen2,
Generator &  rResGen 
)

Parallel composition with relaxed acceptance condition.

See also OmegaParallel(const Generator&, const Generator&, Generator&). This version tries to be transparent on event attributes: if argument attributes match and if the result can take the respective attributes, then they are copied; it is considered an error if argument attributes do not match.

Parameters:
rGen1 First generator
rGen2 Second generator
rResGen Reference to resulting composition generator
void faudes::aOmegaProduct ( const Generator &  rGen1,
const Generator &  rGen2,
Generator &  rResGen 
)

Product composition for Buechi automata.

See also OmegaProduct(const Generator&, const Generator&, Generator&). This version tries to be transparent on event attributes: if argument attributes match and if the result can take the respective attributes, then they are copied; it is considered an error if argument attributes do not match.

Parameters:
rGen1 First generator
rGen2 Second generator
rResGen Reference to resulting product composition generator
void faudes::aParallel ( const Generator &  rGen1,
const Generator &  rGen2,
ProductCompositionMap &  rCompositionMap,
Generator &  rResGen 
)

Parallel composition.

See also Parallel(const Generator&, const Generator&, Generator&). This version fills a composition map to map pairs of old states to new states.

Parameters:
rGen1 First generator
rGen2 Second generator
rCompositionMap Composition map
rResGen Reference to resulting composition generator
void faudes::aParallel ( const Generator &  rGen1,
const Generator &  rGen2,
Generator &  rResGen 
)

Parallel composition.

See also Parallel(const Generator&, const Generator&, Generator&). This version tries to be transparent on event attributes: if argument attributes match and if the result can take the respective attributes, then they are copied; it is considered an error if argument attributes do not match.

Parameters:
rGen1 First generator
rGen2 Second generator
rResGen Reference to resulting composition generator
void faudes::aProduct ( const Generator &  rGen1,
const Generator &  rGen2,
ProductCompositionMap &  rCompositionMap,
Generator &  rResGen 
)

Product composition.

See also Product(const Generator&, const Generator&, Generator&). This version fills a omposition map to map pairs of old states to new states.

Parameters:
rGen1 First generator
rGen2 Second generator
rCompositionMap Composition map
rResGen Reference to resulting composition generator
void faudes::aProduct ( const Generator &  rGen1,
const Generator &  rGen2,
Generator &  rResGen 
)

Product composition.

See also Product(const Generator&, const Generator&, Generator&). This version tries to be transparent on event attributes: if argument attributes match and if the result can take the respective attributes, then they are copied; it is considered an error if argument attributes do not match.

Parameters:
rGen1 First generator
rGen2 Second generator
rResGen Reference to resulting product composition generator
void faudes::aProject ( const Generator &  rGen,
const EventSet &  rProjectAlphabet,
Generator &  rResGen 
)

Deterministic projection.

See also Project(const Generator&, const EventSet&, Generator&). This version tries to be transparent on event attributes: if argument attributes match and if the result can take the respective attributes, then they are copied; it is considered an error if argument attributes do not match.

Parameters:
rGen Reference to generator
rProjectAlphabet Projection alphabet
rResGen Reference to resulting deterministic generator
void faudes::aProjectNonDet ( Generator &  rGen,
const EventSet &  rProjectAlphabet 
)

Language projection.

See also ProjectNonDet(const Generator&, const EventSet&). This version tries to be transparent on event attributes: result maintains its attributes.

Parameters:
rGen Reference to generator
rProjectAlphabet Projection alphabet
void faudes::aStateMin ( Generator &  rGen  ) 

State set minimization.

See also StateMin(const Generator&, Generator&). This version maintains event attributes provided they can be casted to the result type.

Parameters:
rGen Generator
Exceptions:
Exception Input automaton nondeterministic (id 101)
void faudes::aStateMin ( const Generator &  rGen,
Generator &  rResGen 
)

State set minimization.

See also StateMin(const Generator&, Generator&). This version maintains event attributes provided they can be casted to the result type.

Parameters:
rGen Generator
rResGen Minimized generator (result)
Exceptions:
Exception Input automaton nondeterministic (id 101)
void faudes::Automaton ( Generator &  rGen,
const EventSet &  rAlphabet 
)

Convert generator to automaton wrt specified alphabet.

Convert a generator marking the language Lm into a formal automaton recognizing Lm with a dump state representing Sigma*-PrefixClosure(Lm(rGen)). In this function, Sigma is given by the parameter rAlphabet. For information about automata, see [Wonham. Supervisory Control of Discrete Event Systems]. The original generated language is ignored. Note: An automaton is a deterministic transition structure according to the formal definition; see also "Determinism" below. Method: Uncoaccessible states are erased, as the language generated by rGen is not examined in this function. A dump state representing "Sigma*-PrefixClosure(Lm)" is created. Then, the transition relation is completed such that it is fully defined for each state of rGen and each event of rAlphabet. Formerly undefined transitions lead to the dump state.

Determinism: Input parameter has to be deterministic for correct result. If not, then the (also nondeterministic) result recognizes the correct language, but the dump state does not represent "Sigma*-PrefixClosure(Lm)" as it should; see also example ExAutomaton_basic(). If FAUDES_CHECKED is defined a warning on non-deterministic input is issued.

No further restrictions on parameters.

Parameters:
rGen generator that is converted to automaton
rAlphabet the dump state of the resulting automaton represents the language L_dump=rAlphabet*-PrefixClosure(Lm(rGen))
void faudes::Automaton ( Generator &  rGen  ) 

Convert generator to automaton.

Convert a generator marking the language Lm into a formal automaton recognizing Lm with a dump state representing Sigma*-PrefixClosure(Lm). In this function, Sigma is given by the alphabet of rGen; see also Automaton(rGen,rAlphabet). For information about automata, see [Wonham. Supervisory Control of Discrete Event Systems]. The original generated language is ignored. Note: An automaton is a deterministic transition structure according to the formal definition; see also "Determinism" below. Method: Uncoaccessible states are erased, as the language generated by rGen is not examined in this function. A dump state representing "Sigma*-PrefixClosure(Lm)" is created. Then, the transition relation is completed such that it is fully defined for each state and each event. Formerly undefined transitions lead to the dump state.

Determinism: Input parameter has to be deterministic for correct result. If not, then the (also nondeterministic) result recognizes the correct language, but the dump state does not represent "Sigma*-PrefixClosure(Lm)" as it should; see also example ExAutomaton_basic(). If FAUDES_CHECKED is defined a warning on non-deterministic input is issued.

No further restrictions on parameter.

Parameters:
rGen generator that is converted to automaton

Example:

Generator G Automaton(G)
tmp_automaton_g.png
tmp_automaton_gRes.png
void faudes::Coaccessible ( const vGenerator &  rGen,
vGenerator &  rRes 
)

RTI wrapper function.

See also vGenerator::Coaccessible().

void faudes::Coaccessible ( vGenerator &  rGen  ) 

RTI wrapper function.

See also vGenerator::Coaccessible().

void faudes::Complete ( const vGenerator &  rGen,
const EventSet &  rSigmaO,
vGenerator &  rRes 
)

RTI wrapper function.

See also vGenerator::Complete().

void faudes::Complete ( vGenerator &  rGen,
const EventSet &  rSigmaO 
)

RTI wrapper function.

See also vGenerator::Complete().

void faudes::Complete ( const vGenerator &  rGen,
vGenerator &  rRes 
)

RTI wrapper function.

See also vGenerator::Complete().

void faudes::Complete ( vGenerator &  rGen  ) 

RTI wrapper function.

See also vGenerator::Complete().

bool faudes::ComputeNextScc ( const Generator &  rGen,
SccFilter &  rFilter,
StateSet &  rScc 
)

Compute next SCC.

This function provides an API for the iterative computation of SCCs. It invokes SearchScc() to find the next SCC and then adds the SCC to the StatesAvoid Filter. This approach is not computationally efficient but it allows for simple Lua wrappers.

Parameters:
rGen Generator under investigation
rFilter Filter out specified transitions
rScc First SCC that has been found, empty if no such.
Returns:
True if an SCC has been found, false if not.
bool faudes::ComputeScc ( const Generator &  rGen,
const SccFilter &  rFilter,
StateSet &  rScc 
)

Compute one strongly connected components (SCC).

This functions searchs for the first SCC of the generator rGen while applying the filter rFilter; see SCCFilter for details.

Technically, this function is a API wrapper that calls the recursive implementation SearchScc() as presented in

-- Aho, Hopcroft, Ullman: The Design and Analysis of Computer Algorithms --

Parameters:
rGen Generator under investigation
rFilter Filter out specified transitions
rScc First SCC that has been found, empty if no such.
Returns:
True if SCCs have been found, false if not.
bool faudes::ComputeScc ( const Generator &  rGen,
const SccFilter &  rFilter,
Idx  q0,
StateSet &  rScc 
)

Compute strongly connected component (SCC).

This function is a API wrapper that calls the recursive implementation SearchScc(). It internally edits the filter to require the specified initial state and to stop on the first SCC found. In particular, any other state requirement will be ignored.

Parameters:
rGen Generator under investigation
rFilter Filter specified transitions
q0 Initial state for SCC.
rScc SCC (result)
Returns:
True if an SCC has been found, false if not.
bool faudes::ComputeScc ( const Generator &  rGen,
std::list< StateSet > &  rSccList,
StateSet &  rRoots 
)

Compute strongly connected components (SCC).

This function is a API wrapper that calls the recursive implementation SearchScc().

Parameters:
rGen Generator under investigation
rSccList List of SCCs (result)
rRoots Set of states that each are root of some SCC (result).
Returns:
True if SCCs have been found, false if not. Since there are no filters, true is returned iff the the state set is non-empty.
bool faudes::ComputeScc ( const Generator &  rGen,
const SccFilter &  rFilter,
std::list< StateSet > &  rSccList,
StateSet &  rRoots 
)

Compute strongly connected components (SCC).

This function is a API wrapper that calls the recursive implementation SearchScc().

Parameters:
rGen Generator under investigation
rFilter Filter specified transitions
rSccList List of SCCs (result)
rRoots Set of states that each are root of some SCC (result).
Returns:
True if SCCs have been found, false if not.
void faudes::Deterministic ( const Generator &  rGen,
Generator &  rResGen 
)

Make generator deterministic.

Constructs a deterministic generator while preserving the generated and marked languages. The implementation is based on the so called multiway merge variant of subset construction, in which the new state set becomes a subset of the power set og the given state set. It is of exponential complexity. For details on the multiway merge algorithm see "Ted Leslie, Efficient Approaches to Subset Construction, Computer Science, University of Waterloo, 1995". See also Deterministic(const Generator&,std::map<Idx,StateSet>&,Generator& rResGen) and Deterministic(const Generator&,std::vector<StateSet>&,std::vector<Idx>&,Generator& rResGen).

Technical detail: if the input has no initial state, then so has the output. In this aspect this function does not match the test IsDeterministic(). See also UniqueInit().

Parameters:
rGen Reference to generator
rResGen Reference to resulting deterministic generator

Example:

Generator G Deterministic(G,Result)
tmp_deterministic_nondet.png
tmp_deterministic_det.png
void faudes::EmptyLanguage ( const EventSet &  rAlphabet,
Generator &  rResGen 
)

Empty language Lm(G)={}.

Construct generator and marking the empty language, that is Lm(G)={}. Method: this function creates a deterministic generator with one initial state that is not marked. The alphabet is set as specified.

No restrictions on parameters.

Parameters:
rAlphabet Alphabet of the resulting generator
rResGen Generator with language Lm(G)={}
bool faudes::EmptyLanguageIntersection ( const Generator &  rGen1,
const Generator &  rGen2 
)

Test for empty language intersection (same as Disjoind()).

This function checks if the intersection of two languages marked by two generators is empty that is the two languages are disjoint. The involved generated (prefix-closed) languages are not considered. This function is identical to Disjoint().

No restrictions on parameters.

Parameters:
rGen1 generator marking Lm1
rGen2 generator marking Lm2
Returns:
true if language intersection is empty, false if not.
void faudes::EmptyStringLanguage ( const EventSet &  rAlphabet,
Generator &  rResGen 
)

Empty string language, L(G)=Lm(G)={epsilon}.

Construct generator generating and marking the empty string, that is L(G)=Lm(G)={epsilon}. Method: this function creates a generator with one marked init state and the alphabet rAlphabet.

No restrictions on parameters.

Parameters:
rAlphabet alphabet of the resulting generator
rResGen generator with languages L(G)=Lm(G)={epsilon} and alphabet rAlphabet

Example:

EmptyStringLanguage(Sigma={a,b},Result)
tmp_languagesEmptyString_result.png
void faudes::FullLanguage ( const EventSet &  rAlphabet,
Generator &  rResGen 
)

Full Language, L(G)=Lm(G)=Sigma*.

Construct generator generating and marking full language Sigma* from alphabet Sigma. Method: this function creates a generator with one state that is marked and init state. This state is selflooped with all events from rAlphabet.

Parameters:
rAlphabet Alphabet Sigma from which full language Sigma* is built
rResGen Generator generating and marking full language Sigma*

Example:

FullLanguage(Sigma={a,b},Result)
tmp_languagesFull_result.png
bool faudes::HasScc ( const Generator &  rGen,
const SccFilter &  rFilter 
)

Test for strongly connected components (SCC).

This functions searchs for the first SCC of the generator rGen while applying the filter rFilter; see SCCFilter for details.

Technically, this function is an API wrapper that calls the recursive implementation SearchScc() as presented in

-- Aho, Hopcroft, Ullman: The Design and Analysis of Computer Algorithms --

Parameters:
rGen Generator under investigation
rFilter Filter out specified transitions
Returns:
True if SCCs have been found, false if not.
void faudes::InvProject ( Generator &  rGen,
const EventSet &  rProjectAlphabet 
)

Inverse projection.

This adds selfloop transition at every state for all missing events.

Parameters:
rGen Reference to generator
rProjectAlphabet Alphabet for inverse projection
bool faudes::IsAccessible ( const vGenerator &  rGen  ) 

RTI wrapper function.

See also vGenerator::IsAccessible().

bool faudes::IsCoaccessible ( const vGenerator &  rGen  ) 

RTI wrapper function.

See also vGenerator::IsCoaccessible().

bool faudes::IsComplete ( const vGenerator &  rGen,
const EventSet &  rSigmaO 
)

RTI wrapper function.

See also vGenerator::IsComplete().

bool faudes::IsComplete ( const vGenerator &  rGen  ) 

RTI wrapper function.

See also vGenerator::IsComplete().

bool faudes::IsDeterministic ( const vGenerator &  rGen  ) 

RTI wrapper function.

See also vGenerator::IsDeterministic().

bool faudes::IsEmptyLanguage ( const Generator &  rGen  ) 

Test for Empty language Lm(G)=={}.

Tests if the language marked by rGen is empty, that is if Lm(G)=={}. The generated language L(G) is not considered. Method: This function tests if a) the set of marked states is empty or else b) the intersection of the set of accessible states and the set of marked states is empty, i.e. if there is no marked state or if no marked state is accessible (reachable).

No restrictions on parameter.

Parameters:
rGen generator to be tested for empty marked language
Returns:
true on empty marked language, false on nonempty marked language
bool faudes::IsNonblocking ( const Generator &  rGen1,
const Generator &  rGen2 
)

Test for nonblocking marked languages.

Two languages L1 and L2 are nonblocking, if closure(L1 || L2) == closure(L1) || closure(L2).

This function performs the parallel composition of the two specified generators and tests it for nonblockingness. Provided that both generators are trim, this is equivalent to the respective marked languages being nonblocking.

The specified generators must be trim.

Parameters:
rGen1 Generator G1
rGen2 Generator G2
Returns:
True <> Lm(G1) and Lm(G2) are nonblocking
bool faudes::IsNonblocking ( const Generator &  rGen  ) 

Test for nonblocking generator.

A generator G is nonblocking if closure(Lm(G)) = L(G), i.e. if every accessible state is coacessile.

The specified generator must be deterministic.

Parameters:
rGen generator G marking to test
Returns:
True <> G is nonblocking
bool faudes::IsOmegaClosed ( const Generator &  rGen  ) 

Test for topologically closed omega language.

This function tests whether the omega language Bm(G) realized by the specified generator G is topologically closed.

Method: First, compute the omega-trim state set and restrict the discussion to that set. Then, omega-closedness is equivalent to the non-existence on a non-trivial SCC with no marked states.

Parameters:
rGen Generator that realizes Bm to which omega closure is applied
Returns:
True <> Bm(G) is omega closed
bool faudes::IsOmegaTrim ( const vGenerator &  rGen  ) 

RTI wrapper function.

See also vGenerator::IsOmegaTrim().

bool faudes::IsPrefixClosed ( const Generator &  rGen  ) 

Test for prefix closed marked language.

This function tests whether the language Lm(G) marked by the specified generator G is prefix closed. It does so by testing whether all accessible and coaccessible states are marked.

The specified generator must be deterministic.

Parameters:
rGen generator G marking the Lm(G) to test
Returns:
True <> Lm(G) is prefix closed
bool faudes::IsStronglyCoaccessible ( const MtcSystem &  rGen  ) 

RTI wrapper function.

See also MtcSystem::IsStronglyCoaccessible().

bool faudes::IsStronglyTrim ( const MtcSystem &  rGen  ) 

RTI wrapper function.

See also MtcSystem::IsStronglyTrim().

bool faudes::IsTrim ( const vGenerator &  rGen  ) 

RTI wrapper function.

See also vGenerator::IsTrim().

void faudes::KleeneClosure ( const Generator &  rGen,
Generator &  rResGen 
)

Kleene Closure.

This function is a convenience wrapper for KleeneClosure(Generator&).

void faudes::KleeneClosure ( Generator &  rGen  ) 

Kleene Closure.

This function computes the Kleene Closure ( ()* - operator) of the language marked by rGen. The generated language is not considered. Method: KleeneClosureNonDet() is called, which, for all transitions leading from a state x to a marked state, inserts a transition with the same event starting from x and leading to (one of) the initial state(s). As this step causes nondeterminism, the function Deterministic() is called. See also KleeneClosureNonDet().

No restrictions on parameter.

Parameters:
rGen generator marking the language Lm to which the Kleene Closure is applied

Example:

Generator G KleeneClosure(G)
tmp_kleene_g.png
tmp_kleene_gRes.png
void faudes::KleeneClosureNonDet ( Generator &  rGen  ) 

Kleene Closure, nondeterministic version.

This function computes the Kleene Closure ( ()* - operator) of the language marked by rGen. The generated language is not considered. Method: KleeneClosureNonDet() is called, which, for all transitions leading from a state x to a marked state, inserts a transition with the same event starting from x and leading to (one of) the initial state(s).

Parameters:
rGen generator marking the language Lm to which Kleene Closure is applied
void faudes::LanguageComplement ( const Generator &  rGen,
const EventSet &  rSigma,
Generator &  rRes 
)

Language Complement (uniform API wrapper).

Parameters:
rGen generator on which the language complement is performed
rSigma reference alphabet to build the complement
rRes resulting generator
void faudes::LanguageComplement ( const Generator &  rGen,
Generator &  rRes 
)

Language Complement (uniform API wrapper).

Parameters:
rGen generator on which the language complement is performed
rRes resulting generator
void faudes::LanguageComplement ( Generator &  rGen,
const EventSet &  rAlphabet 
)

Language complement wrt specified alphabet.

Convert generator marking the language Lm into generator marking the language complement of Lm which is defined as Sigma*-Lm. In this function, Sigma is given by the parameter rAlphabet. The original generated language is ignored. Method: This function calls Automaton() first and then inverts the marking of the states of the result.

Determinism: Input parameter has to be deterministic for correct result, see Automaton() for explanations. If FAUDES_CHECKED is defined a warning on non-deterministic input is issued. (by function Automaton()).

No further restrictions on parameter.

Parameters:
rGen generator on which the language complement is performed
rAlphabet reference alphabet to build the complement
void faudes::LanguageComplement ( Generator &  rGen  ) 

Language complement.

Convert generator marking the language Lm into generator marking the language complement of Lm which is defined as Sigma*-Lm. In this function, Sigma is given by the alphabet of rGen; see also LanguageComplement(rGen,rAlphabet). The original generated language is ignored. Method: This function calls Automaton() first and then inverts the marking of the states of the result.

Determinism: Input parameter has to be deterministic for correct result, see Automaton() for explanations. If FAUDES_CHECKED is defined a warning on non-deterministic input is issued. (by function Automaton()).

No further restrictions on parameter.

Parameters:
rGen generator on which the language complement is performed

Example:

Generator G LanguageComplement(G)
tmp_boolean_g1.png
tmp_complement_g1.png
void faudes::LanguageConcatenate ( const Generator &  rGen1,
const Generator &  rGen2,
Generator &  rResGen 
)

Language concatenation, deterministic version.

With the languages Lm1 and Lm2 marked by rGen1 and rGen2, respectively, the result rResGen marks the concatenation LmRes=Lm1Lm2. The languages generated by rGen1 and rGen2 are ignored. It would be possible to let the result also generate the concatenation of the generated languages; however, this can produce disproportionate computational overhead, if only the marked languages shall be concatenated. Method: rGen2 is appended to rGen1: first, the initial states of rGen2 are erased. Then, transitions, that formerly started from the initial state(s) of rGen2, are redirected and multiplied such that they start from each marked state of rGen1. The marked states corresponding to rGen2 remain marked. The marked states of rGen1 remain marked only if rGen2 has at least one marked initial state (i.e. if epsilon is concatenated to Lm1.)

Determinism: Input parameters may be nondeterministic. This function calls LanguageUnionNonDet() and then Deterministic() to convert the result into a deterministic generator. Note that this conversion is usually straightforward, but there exist theoretical worst-case examples of exponential complexity.

No restrictions on parameters.

Parameters:
rGen1 generator marking Lm1
rGen2 generator marking Lm2
rResGen Resulting generator marking the language concatenation Lm1Lm2

Example:

Generator G1 LanguageConcatenate(G1,G3,Result)
tmp_concat_g1.png
tmp_concat_g1g3.png
Generator G2 LanguageConcatenate(G1,G4,Result)
tmp_concat_g2.png
tmp_concat_g1g4.png
Generator G3 LanguageConcatenate(G2,G3,Result)
tmp_concat_g3.png
tmp_concat_g2g3.png
Generator G4 LanguageConcatenate(G2,G4,Result)
tmp_concat_g4.png
tmp_concat_g2g4.png
void faudes::LanguageConcatenateNonDet ( const Generator &  rGen1,
const Generator &  rGen2,
Generator &  rResGen 
)

Language concatenation, nondeterministic version.

With the languages Lm1 and Lm2 marked by rGen1 and rGen2, respectively, the result rResGen marks the concatenation LmRes=Lm1Lm2. The languages generated by rGen1 and rGen2 are ignored. It would be possible to let the result also generate the concatenation of the generated languages; however, this can produce disproportionate computational overhead, if only the marked languages shall be concatenated. Method: rGen2 is appended to rGen1: first, the initial states of rGen2 are erased. Then, transitions, that formerly started from the initial state(s) of rGen2, are redirected and multiplied such that they start from each marked state of rGen1. The marked states corresponding to rGen2 remain marked. The marked states of rGen1 remain marked only if rGen2 has at least one marked initial state (i.e. if epsilon is concatenated to Lm1.)

Determinism: Input parameters may be nondeterministic. Result can be nondeterministic even if input parameters are deterministic; see also LanguageConcatenate().

No restrictions on parameters.

Parameters:
rGen1 generator marking Lm1
rGen2 generator marking Lm2
rResGen resulting generator marking the language concatenation Lm1Lm2
void faudes::LanguageDifference ( const Generator &  rGen1,
const Generator &  rGen2,
Generator &  rResGen 
)

Language difference (set-theoretic difference).

This function calculates Lm1-Lm2 (sometimes also denoted by Lm1\Lm2), that is the set of all strings included in Lm1 but not in Lm2. Method: The language difference is computed by taking the intersection of Lm1 with the complement of Lm2.

Determinism: Due to the use of LanguageComplement(), rGen2 has to be deterministic. Result can be nondeterministic only if rGen1 is nondeterministic.

Restrictions on prameters: rGen2 has to be deterministic.

Parameters:
rGen1 generator marking the language Lm1
rGen2 generator marking the language Lm2
rResGen generator marking the language difference Lm1-Lm2
Exceptions:
Exception 
  • nondeterministic parameter rGen2 (id 101).

Example:

Generator G1 Generator G2
tmp_difference_g1.png
tmp_difference_g2.png
LanguageDifference(G1,G2,Result)
tmp_difference_g1minusg2.png
bool faudes::LanguageDisjoint ( const Generator &  rGen1,
const Generator &  rGen2 
)

Test whether two languages are disjoint.

This function tests whether the intersection of two languages marked by two generators is empty, ie the two languages are disjoint. The involved generated (prefix-closed) languages are not considered. This function is identical to EmptyLanguageIntersection().

No restrictions on parameters.

Parameters:
rGen1 generator marking Lm1
rGen2 generator marking Lm2
Returns:
true if language intersection is empty, false if not.
bool faudes::LanguageEquality ( const Generator &  rGen1,
const Generator &  rGen2 
)

Language equality, Lm1==Lm2.

Test if the language Lm1 marked by rGen1 equals the language Lm2 marked by rGen2. The generated languages are not considered. Method: This function checks mutual inclusion of Lm1 in Lm2 and of Lm2 in Lm1 using the function LanguageInclusion().

Restrictions on parameters: rGen1 and rGen2 have to be deterministic! If FAUDES_CHECKED is defined a warning on non-deterministic input is issued. (by function Automaton()).

ToDo: implement faster, version using a variant of Product(): compute product without storing result, return false as soon as rGen1 and rGen2 "disagree" on the occurrence of some event.

Parameters:
rGen1 generator marking Lm1
rGen2 generator marking Lm2
Returns:
true if the language marked by rGen1 equals the language marked by rGen2
bool faudes::LanguageInclusion ( const Generator &  rGen1,
const Generator &  rGen2 
)

Test language inclusion, Lm1<=Lm2.

Test if language Lm1 marked by rGen1 is included in language Lm2 marked by rGen2. The generated languages are not considered. Method: This function checks if there is no string in Lm1 that is not in Lm2 by testing if the intersection of Lm1 and the language complement of Lm2 is empty.

Restrictions on parameters: rGen2 has to be deterministic! If FAUDES_CHECKED is defined a warning on non-deterministic input is issued. (by function Automaton()).

Determinism: correctness in case of nondeterministic parameter rGen1 has been tested with an example (see ExInclusion_simple), but not proven.

ToDo: implement faster version using a variant of Product(): compute product without storing result, return false as soon as some event is possible in Lm2 but not in Lm1.

Parameters:
rGen1 generator marking Lm1
rGen2 generator marking Lm2
Returns:
true if language marked by rGen1 is included in language marked by rGen2
void faudes::LanguageIntersection ( const Generator &  rGen1,
const Generator &  rGen2,
Generator &  rResGen 
)

Language intersection.

This function performs the intersection of two languages marked by two generators; the resulting generator marks the resulting language. Moreover, the same is done for the involved generated (prefix-closed) languages. The resulting languages are defined over the intersection of the involved alphabets. Method: This function calls Product(). In the product of two automata, an event occurs if and only if it occurs in both automata rGen1 and rGen2. The result generates/marks the intersection of the involved languages, see e.g. [Cassandras, Lafortune. Introduction to Discrete Event Systems, p.84]

Determinism: Input parameters may be nondeterministic. Result can be nondeterministic only if input parameters are nondeterministic.

No restrictions on parameters.

Parameters:
rGen1 generator generating/marking L1/Lm1
rGen2 generator generating/marking L2/Lm2
rResGen resulting generator generating/marking the language intersection of L1 and L2/of Lm1 and Lm2

Example:

Generator G1 Generator G2
tmp_boolean_g1.png
tmp_boolean_g2.png
LanguageIntersection(G1,G2,Result)
tmp_intersection_g1g2.png
void faudes::LanguageUnion ( const Generator &  rGen1,
const Generator &  rGen2,
Generator &  rResGen 
)

Language union, deterministic version.

This function performs the union of two languages marked by two generators; the resulting generator marks the resulting language. Moreover, the same is done for the involved generated (prefix-closed) |languages. Method: This function implements the textbook version (which textbook??) in taking unions of all generator entities (alphabets, initial states, ...). State sets are taken as disjoint by definition and thus reindexed and renamed to achieve disjoint union. The resulting language is defined over the union of the alphabets of the original languages.

Determinism: Input parameters may be nondeterministic. This function calls LanguageUnionNonDet() and then Deterministic() to convert the result into a deterministic generator. Note that this conversion is usually straightforward, but there exist theoretical worst-case examples of exponential complexity.

No restrictions on parameters.

ToDo: a version similar to parallel composition that produces a deterministic result by construction. (?)

Parameters:
rGen1 generator generating/marking L1/Lm1
rGen2 generator generating/marking L2/Lm2
rResGen resulting generator generating/marking the language union of L1 and L2/of Lm1 and Lm2

Example:

Generator G1 Generator G2
tmp_boolean_g1.png
tmp_boolean_g2.png
LanguageUnion(G1,G2,Result)
tmp_union_g1g2.png
void faudes::LanguageUnionNonDet ( const Generator &  rGen1,
const Generator &  rGen2,
Generator &  rResGen 
)

Language union, nondeterministic version.

This function performs the union of two languages marked by two generators; the resulting generator marks the resulting language. Moreover, the same is done for the involved generated (prefix-closed) languages. Method: This function implements the textbook version in taking unions of all generator entities (alphabets, initial states, ...) of rGen1 and rGen2. State sets are taken as disjoint by definition and thus reindexed and renamed to achieve disjoint union. The resulting language is defined over the union of the alphabets of the original languages; original languages defined over different alphabets are treated as if they were defined over the union of both alphabets.

Determinism: Input parameters may be nondeterministic. This function is more economical than the deterministic version, but likely to produce a non-deterministic result; see also LanguageUnion().

No restrictions on parameters.

Parameters:
rGen1 generator generating/marking L1/Lm1
rGen2 generator generating/marking L2/Lm2
rResGen resulting generator generating/marking the language union of L1 and L2/of Lm1 and Lm2
void faudes::MarkAllStates ( vGenerator &  rGen  ) 

RTI wrapper function.

void faudes::OmegaClosure ( Generator &  rGen  ) 

Topological closure.

This function computes the topological closure the omega language Bm realized by rGen.

Method: First, OmegaTrim is called to erase all states of rGen that do not contribute to Bm. Then, all remaining states are marked.

No restrictions on parameter.

Parameters:
rGen Generator that realizes Bm to which omega closure is applied

Example:

Generator G PrefixClosure(G)
tmp_omegaclosure_g.png
tmp_omegaclosure_gRes.png
void faudes::OmegaParallel ( const Generator &  rGen1,
const Generator &  rGen2,
Generator &  rResGen 
)

Parallel composition with relaxed acceptance condition.

This version of the parallel composition relaxes the synchronisation of the acceptance condition (marking). It requires that the omega extension of the generated language has infinitely many prefixes that comply to the marked languages of G1 and G2, referring to the projection on the respective alphabet. It does however not require the synchronous acceptance.

Parameters:
rGen1 First generator
rGen2 Second generator
rResGen Reference to resulting parallel composition generator
void faudes::OmegaProduct ( const Generator &  rGen1,
const Generator &  rGen2,
Generator &  rResGen 
)

Product composition for Buechi automata.

Referring to the Buechi acceptance condition, the resulting genarator accepts all those inifinite words that are accepted by both, G1 and G2. This implementation extends the usual product state space by a flag to indentify executions with alternating marking.

Parameters:
rGen1 First generator
rGen2 Second generator
rResGen Reference to resulting product composition generator
void faudes::OmegaTrim ( const vGenerator &  rGen,
vGenerator &  rRes 
)

RTI wrapper function.

See also vGenerator::OmegaTrim().

void faudes::OmegaTrim ( vGenerator &  rGen  ) 

RTI wrapper function.

See also vGenerator::OmegaTrim().

void faudes::Parallel ( const Generator &  rGen1,
const Generator &  rGen2,
ProductCompositionMap &  rCompositionMap,
Generator &  rResGen 
)

Parallel composition.

See also Parallel(const Generator&, const Generator&, Generator&). This version fills a composition map to map pairs of old states to new states.

Parameters:
rGen1 First generator
rGen2 Second generator
rCompositionMap Composition map
rResGen Reference to resulting composition generator
void faudes::Parallel ( const Generator &  rGen1,
const Generator &  rGen2,
Generator &  rResGen 
)

Parallel composition.

Constructs the parallel composition of two generators, where shared events are synchronised while non-shared events are executed independantly. The resulting generators alphabet is the union of the argument alphabets. In this implementation, only accessible states are generated. On deterministic input this functions constructs a deterministic output. See also Parallel(const Generator&,std::map< std::pair<Idx,Idx>, Idx>&,const Generator&, Generator&).

Parameters:
rGen1 First generator
rGen2 Second generator
rResGen Reference to resulting parallel composition generator

Example:

Generator G1 Generator G2
tmp_parallel_g1.png
tmp_parallel_g2.png
G1 || G2
tmp_parallel_g1g2.png
void faudes::PrefixClosure ( Generator &  rGen  ) 

Prefix Closure.

This function computes the prefix closure the language Lm marked by rGen. A language Lm is prefix closed if each string of Lm implies that all its prefixes are also element of Lm. The prefix closure of a language marked by a generator is always a subset of the generated language and is represented by the set of coaccessible states of the generator. Method: First, Coaccessible() is called to erase all states of rGen that do not represent prefixes of marked strings. Then, all remaining states are marked.

No restrictions on parameter.

ToDo: (slightly) more efficient version: implement generator function CoAccessibleSet() similar to AccessibleSet() and call InjectMarkedStates(AccessibleSet()).

Parameters:
rGen generator marking the language Lm to which prefix closure is applied

Example:

Generator G PrefixClosure(G)
tmp_prefixclosure_g.png
tmp_prefixclosure_gRes.png
void faudes::Product ( const Generator &  rGen1,
const Generator &  rGen2,
Generator &  rResGen 
)

Product composition.

The product composition executes shared events only. The resulting generators alphabet is the interscetion of the argument alphabets. In this implementation, only accessible states are generated. Assumes deterministic input generators, result is deterministic.

Parameters:
rGen1 First generator
rGen2 Second generator
rResGen Reference to resulting product composition generator
void faudes::Project ( const Generator &  rGen,
const EventSet &  rProjectAlphabet,
Generator &  rResGen 
)

Deterministic projection.

Projects the generated and marked languages to a subalphabet of the original alphabet, and subsequently calls Deterministic to construct a deterministic realisation of the result. The input generator does not need to be deterministic.

Parameters:
rGen Reference to generator
rProjectAlphabet Projection alphabet
rResGen Reference to resulting deterministic generator

Example:

Generator G Project(G,(a,c,g,e),Result)
tmp_project_g.png
tmp_project_prog.png
void faudes::ProjectNonDet ( Generator &  rGen,
const EventSet &  rProjectAlphabet 
)

Language projection.

Projects the generated and marked languages to another alphabet. Transitions with events not in the projection alphabet are considered invisible and therefor acordingly relinked with a visible lable to the appropriate successor state. The projection alphabet is intended (but not required) to be a subset of the original alphabet.

The default implementation is based on a local forward reachability analysis per state. It known to suffer from performance issues for certain large automata. This was in particular the case for the variation used in libFAUDES 2.14 up to 2.23. A number of alternatives are now available in "cfl_project.cpp" and can bet set as the default by adjusting the respective wrapper function (grep for "wrapper" in "cfl_project.cpp"). If you experience trouble with the current revision, you can set the default to revert to pre libFAUDES 2.24 behaviour -- and please report back to us. The candidate for future releases is available for testing, see ProjectNonDetScc(Generator&, const EventSet&).

The results in general is nondeterministic. The input generator does not need to be deterministic. See Project(const Generator&,const EventSet&, Generator&) for a version with deterministic result.

Parameters:
rGen Reference to generator
rProjectAlphabet Projection alphabet
void faudes::ProjectNonDetScc ( Generator &  rGen,
const EventSet &  rProjectAlphabet 
)

Language projection.

Projects the generated and marked languages to another alphabet, see also ProjectNonDetScc(Generator&, const EventSet&). This implementation first eliminates silent strongly connected components and then applies a local backward reachability analysis. Performance benefits are significant for certain large generators.

The input generator does not need to be deterministic. The results in general is nondeterministic. You may manually invoke Deterministic() to convert the result.

Parameters:
rGen Reference to generator
rProjectAlphabet Projection alphabet
void faudes::SelfLoop ( Generator &  rGen,
const EventSet &  rAlphabet,
const StateSet &  rStates 
)

Self-loop specified states.

This function selfoops the states rStates of rGen with the events from rAlphabet. Method: The alphabet of rGen is extended by rAlphabet. For each state x of rStates and each event alpha of rAlphabet, a transition (x,alpha,x) is inserted, irrespective of whether this event was already active in x before. See also SelfLoop(rGen,rAlphabet) and SelfLoopMarkedStates(rGen,rAlphabet).

No restrictions on parameter.

Determinism: resulting generator is nondeterministic, if it was nondeterministic before, or if rGen already contains one or more (non selfloop) transitions starting from a state of rState with events from rAlphabet.

Parameters:
rGen generator with marked states to be selflooped with events from rAlphabet
rAlphabet alphabet with selfloop events
rStates states to apply selfloop
Exceptions:
Exception 
  • rStates is not a subset of rGen.States() (id 100).

Example:

Generator G SelfLoop(G,Sigma={e,f},G.InitStates())
tmp_selfloop_g.png
tmp_selfloopInit_gRes.png
void faudes::SelfLoop ( Generator &  rGen,
const EventSet &  rAlphabet 
)

Self-loop all states.

This function selfoops all states of rGen with the events from rAlphabet. Method: The alphabet of rGen is extended by rAlphabet. For each state x of rGen and each event alpha of rAlphabet, a transition (x,alpha,x) is inserted, irrespective of whether this event was already active in x before. See also SelfLoop(rGen,rAlphabet,rStates) and SelfLoopMarkedStates(rGen,rAlphabet).

No restrictions on parameter.

Determinism: resulting generator is nondeterministic, if it was nondeterministic before, or if rGen already contains one or more (non selfloop) transitions with events from rAlphabet.

Parameters:
rGen generator to be selflooped with events from rAlphabet
rAlphabet alphabet with selfloop events

Example:

Generator G SelfLoop(G,Sigma={e,f})
tmp_selfloop_g.png
tmp_selfloop_gRes.png
void faudes::SelfLoopMarkedStates ( Generator &  rGen,
const EventSet &  rAlphabet 
)

Self-loop all marked states.

This function selfoops all marked states of rGen with the events from rAlphabet. Method: The alphabet of rGen is extended by rAlphabet. For each marked state x of rGen and each event alpha of rAlphabet, a transition (x,alpha,x) is inserted, irrespective of whether this event was already active in x before. See also SelfLoop(rGen,rAlphabet) and SelfLoop(rGen,rAlphabet,rStates).

No restrictions on parameter.

Determinism: resulting generator is nondeterministic, if it was nondeterministic before, or if rGen already contains one or more (non selfloop) transitions starting from a marked state with events from rAlphabet.

Parameters:
rGen generator with marked states to be selflooped with events from rAlphabet
rAlphabet alphabet with selfloop events

Example:

Generator G SelfLoopMarkedStates(G,Sigma={e,f})
tmp_selfloop_g.png
tmp_selfloopMarked_gRes.png
void faudes::StateMin ( const Generator &  rGen,
Generator &  rResGen 
)

State set minimization.

Constructs a generator with minimal stateset while preserving the generated und marked languages. This function implements the (n*log n) set partitioning algorithm by John E. Hopcroft. The algorithm expects an accessible input generator. To have a const interface, the argument is copied. See also StateMin(Generator&,Generator&).

Parameters:
rGen Generator
rResGen Minimized generator (result)
Exceptions:
Exception Input automaton nondeterministic (id 101)

Example:

Generator G StateMin(G,Result)
tmp_minimal_nonmin.png
tmp_minimal_min.png
void faudes::StronglyCoaccessible ( const MtcSystem &  rGen,
MtcSystem &  rRes 
)

RTI wrapper function.

See also MtcSystem::Coaccessible().

void faudes::StronglyCoaccessible ( MtcSystem &  rGen  ) 

RTI wrapper function.

See also MtcSystem::Coaccessible().

void faudes::StronglyTrim ( const MtcSystem &  rGen,
MtcSystem &  rRes 
)

RTI wrapper function.

See also MtcSystem::Trim().

void faudes::StronglyTrim ( MtcSystem &  rGen  ) 

RTI wrapper function.

See also MtcSystem::Trim().

void faudes::Trim ( const vGenerator &  rGen,
vGenerator &  rRes 
)

RTI wrapper function.

See also vGenerator::Trim().

void faudes::Trim ( vGenerator &  rGen  ) 

RTI wrapper function.

See also vGenerator::Trim().

void faudes::UniqueInit ( const Generator &  rGen,
Generator &  rResGen 
)

Make initial states unique.

Convenience wrapper for UniqueInit(Generator&).

Parameters:
rGen Reference to generator
rResGen Reference to resulting generator
void faudes::UniqueInit ( Generator &  rGen  ) 

Make initial states unique.

If the argument generator has precisely one initial state, this function does nothing. Else, this function introduces a new and unique initial state and relinks transitions accordinly. If the argument generator used to have more than one initial state, this operation may render the output nondeterministic. If the argument generator used to have no initial state, the output generator will generate the empty string language as opposed to the empty language. Otherwise, generated and marked languages are preserved.

Note: call this function followed by determine to convert the generator to a deterministic generator with exactly one initial state.

Parameters:
rGen Reference to generator

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