libFAUDES

Sections

Index

faudes Namespace Reference


Detailed Description

libFAUDES resides within the namespace faudes.

Plug-Ins may use the same namespace.


Classes

class  TaGenerator
 Generator with specified attribute types. More...
class  GeneratorPool
 A Generator pool maintains a global generator context. More...
class  AttributeVoid
 Minimal Attribute. More...
class  AttributeFlags
 Boolean flags Attribute. More...
class  TBaseSet
 STL style set template. More...
class  AttributeCFlags
 Attribute class to model event controllability properties. More...
class  TcGenerator
 Generator with controllability attributes. More...
class  Exception
 Faudes exception class. More...
class  IndexSet
 Set of indices. More...
class  TaIndexSet
 Set of indices with attributes. More...
class  NameSet
 Set of indices with symbolic names. More...
class  TaNameSet
 Set of indices with symbolic names and attributes. More...
class  Parameter
 Structure to model a parameter type within the Signature of a Function. More...
class  Signature
 Signature of a Function. More...
class  FunctionDefinition
 A FunctionDefinition defines the interface to a faudes-function. More...
class  Function
 A faudes-function hosts parameter values of some faudes type and provides a method to perform an operation on the specified paramters, e.g. More...
class  TypeRegistry
 The TypeRegistry registers faudes-types. More...
class  FunctionRegistry
 The FunctionRegistry registers faudes-functions. More...
class  Type
 Base class of all libFAUDES objects that participate in the run time interface. More...
class  Documentation
 Structure to hold documentation data relating to a faudes-type or -function. More...
class  TypeDefinition
 A TypeDefinition defines a faudes-type in that it specifies a faudes-type name to identify the type and a method NewObject() to instantiate objects of the respective type. More...
class  Integer
 Elementary type. More...
class  String
 Elementary type. More...
class  Boolean
 Elementary type. More...
class  TSimpleFunction1
 A TSimpeFunction derives a class from Function to invoke a c-function with parameters of specified type. More...
class  TSimpleFunction2
class  TSimpleFunction3
class  TNestedFunction
 A TNestedFunction derives a class from Function to invoke a c-function repeatavely. More...
class  SymbolSet
 Set of symbols. More...
class  SymbolTable
 A SymbolTable associates sybolic names with indices. More...
class  Token
 Tokens model atomic data for stream IO. More...
class  TokenReader
 A TokenReader reads sequential tokens from a file or string. More...
class  TokenWriter
 A TokenWriter writes sequential tokens to a file, a string or stdout. More...
class  Transition
 Triple (X1,Ev,X2) to represent current state, event and next state. More...
class  TransSort
 Alternative ordering of Transitions. More...
class  TTransSet
 Set of Transitions. More...
class  TaTransSet
 Set of Transitions with attributes. More...
class  vGenerator
 Base class of all FAUDES generators. More...
class  Bisimulation
 This class implements the algorithms needed for the computation of the coarsest quasi-congruence (=Bisimulation) of a given generator. More...
class  EventRelabelMap
 Rti convenience wrapper for relabeling maps. More...
struct  Partition
 This struct implements a coset (=equivalence class) as needed for the computation of the coarsest quasi-congruence on an automaton. More...
class  HioEventFlags
 Event attributes for hierarchical discrete event systems with inputs and outputs. More...
class  HioStateFlags
 State attributes for hierarchical discrete event systems with inputs and outputs. More...
class  THioConstraint
 Generator with I/O-constraint attributes. More...
class  THioController
 Generator with I/O-controller attributes. More...
class  THioEnvironment
 Generator with I/O-environment attributes. More...
class  HioModule
 Recurring structure in hierarchies designed according to the I/O based DES framework. More...
class  THioPlant
 Generator with I/O-plant attributes. More...
class  AttributeColoredState
 State attributes for multitasking automata. More...
class  ColorSet
 Container for colors: this is a NameSet with its own static symboltable. More...
class  TmtcGenerator
 Allows to create colored marking generators (CMGs) as the common five tupel consisting of alphabet, stateset, transition relation, initial states, marked states, and attributes for state and event properties. More...
class  AttributeTimedTrans
 Transition Attribute with guard and resets. More...
class  AttributeTimedState
 State attribute with invariant. More...
class  AttributeTimedGlobal
 Globat attribute with clockset. More...
class  TtGenerator
 Generator with timing extensions. More...
class  tGeneratorPool
class  ClockSet
 Container class to model a set of clocks. More...
class  ElemConstraint
 Model of an elementary clock constraint formula. More...
class  TimeConstraint
 A TimeConstraint is a set of elementary clock constraints. More...
class  tpTime
 Type to represent time. More...
class  TimeInterval
 Model of a time interval. More...
class  DiscreteDensityFunction
 Density Function. More...
class  SampledDensityFunction
class  DeviceExecutor
 Executer with IO device to handle external/physical events. More...
struct  TimedEvent
 Global Tyoedefs. More...
class  Executor
 An Executor is a timed generator that maintains a current state. More...
class  LoggingExecutor
 Executor with logging facilities. More...
class  ParallelExecutor
 Synchronized parallel execution of tGenerators. More...
class  ProposingExecutor
 Executer that proposes which transition to execute. More...
class  SimEventConditionAttribute
 Defining data of event based simulation condition. More...
class  SimStateConditionAttribute
 Defining data of state based simulation condition. More...
class  SimConditionAttribute
 Attribute for a simulation condition. More...
class  SimConditionSet
 Set of simulation named conditions. More...
class  SimPriorityEventAttribute
 Defining data to prioritise events. More...
class  SimStochasticEventAttribute
 Defining data of stochastic behaviour. More...
class  SimEventAttribute
 Attribute for an event in the context of simulation. More...

Typedefs

typedef unsigned long int fType
 Convenience typdef flag data.
typedef TcGenerator
< AttributeVoid, AttributeVoid,
AttributeCFlags, AttributeVoid
cGenerator
 Convenience typedef for std cGenerator.
typedef TaNameSet
< AttributeCFlags
cEventSet
 EventSet with controllablity properties.
typedef long unsigned int Idx
 Type definition for index type.
typedef long int SignedIdx
 Type definition for signed index type.
typedef IndexSet StateSet
typedef NameSet EventSet
typedef TTransSet
< TransSort::X1EvX2
TransSet
 Type definition for default sorted TTransSet.
typedef TTransSet
< TransSort::X1EvX2
TransSetX1EvX2
 Type definition for default sorted TTransSet.
typedef TTransSet
< TransSort::EvX1X2
TransSetEvX1X2
 Type definition for ev, x1, x2 sorted TTransSet.
typedef TTransSet
< TransSort::EvX2X1
TransSetEvX2X1
 Type definition for ev, x2, x1 sorted TTransSet.
typedef TTransSet
< TransSort::X2EvX1
TransSetX2EvX1
 Type definition for x2, ev, x1 sorted TTransSet.
typedef TTransSet
< TransSort::X2X1Ev
TransSetX2X1Ev
 Type definition for x2, x1, ev sorted TTransSet.
typedef TTransSet
< TransSort::X1X2Ev
TransSetX1X2Ev
 Type definition for x1, x2, ev sorted TTransSet.
typedef vGenerator Generator
 Plain generator, api typedef for generator with no attributes.
typedef THioConstraint
< AttributeVoid, HioStateFlags,
HioEventFlags, AttributeVoid
HioConstraint
typedef THioController
< AttributeVoid, HioStateFlags,
HioEventFlags, AttributeVoid
HioController
typedef THioEnvironment
< AttributeVoid, HioStateFlags,
HioEventFlags, AttributeVoid
HioEnvironment
typedef THioPlant
< AttributeVoid, HioStateFlags,
HioEventFlags, AttributeVoid
HioPlant
typedef TmtcGenerator
< AttributeVoid,
AttributeColoredState,
AttributeCFlags, AttributeVoid
mtcGenerator
typedef TtGenerator
< AttributeTimedGlobal,
AttributeTimedState,
AttributeCFlags,
AttributeTimedTrans
tGenerator
 Convenience typedef for std tGenerator.
typedef void vDevice
 Dummy typedef in the absence of the IO Device plugin.
typedef TaNameSet
< SimEventAttribute
sEventSet
 Typedef for events with simulation attributes.

Functions

bool cIsControllable (const cGenerator &rPlantGen, const vGenerator &rSupCandGen)
 Controllability.
void cSupConNB (const cGenerator &rPlantGen, const vGenerator &rSpecGen, cGenerator &rResGen)
 Nonblocking Supremal Controllable Sublanguage.
void cSupCon (const cGenerator &rPlantGen, const vGenerator &rSpecGen, cGenerator &rResGen)
 Supremal Controllable Sublanguage.
void cParallel (const cGenerator &rGen1, const cGenerator &rGen2, cGenerator &rResGen)
 Parallel composition of accessible states of generators rGen1 and rGen2.
void cProject (const cGenerator &rGen, const EventSet &rProjectAlphabet, cGenerator &rResGen)
 Minimized (deterministic) projection.
void cProjectNonDet (cGenerator &rGen, const EventSet &rProjectAlphabet)
 Language projection, non deterministic.
void cInvProject (cGenerator &rGen, const cEventSet &rProjectAlphabet)
 Inverse projection.
std::string ToStringInteger (long int number)
 integer to string
std::string ToStringInteger16 (long int number)
 integer to string base 16
std::string ToStringFloat (double number)
 float to string
std::string ExpandString (const std::string &rString, unsigned int len)
 Fill string with spaces up to a given length if length of the string is smaller than given length parameter.
std::string CollapsString (const std::string &rString, unsigned int len=70)
 Limit length of string, return head and tail of string.
Idx ToIdx (const std::string &rString)
 Convert a string to Idx.
std::string StringSubstitute (const std::string &rString, const std::string &rFrom, const std::string &rTo)
 Substitute in string.
std::string FDVersionString ()
 Return FAUDES_VERSION as std::string.
std::string FDPluginsString ()
 Return FAUDES_PLUGINS as std::string.
std::string FDContributorsString ()
 Return contributors as std::string.
void ProcessDot (const std::string &rDotFile, const std::string &rOutFile, const std::string &rOutFormat="", const std::string &rDotExec="dot")
 Convenience function: process dot file to graphics output.
std::string CreateTempFile (void)
 Create a temp file, length 0.
bool RemoveFile (const std::string &rFileName)
 Delete a file.
std::string ExtractPath (const std::string &rFullName)
 Extract directory from full filename.
std::string PrependPath (const std::string &rPathName, const std::string &rFileName)
 Construct full name from directory and filename.
std::ostream * DebugStream (void)
 Get debugging stream.
void DebugToStream (std::ostream *pStream)
 Set stream for debug log.
void DebugToFile (const std::string &rFileName="tmp_faudes_debug.log")
 Set filename for debug log.
StateSet LowExitStates (const vGenerator &rLowGen, const EventSet &rHighAlph, const std::map< Idx, StateSet > &rEntryStatesMap, const TransSetX2EvX1 &rLowRevTransRel, Idx highState)
 LowExitStates return-copy function:.
void LowExitStates (const EventSet &rHighAlph, const std::map< Idx, StateSet > &rEntryStatesMap, const TransSetX2EvX1 &rLowRevTransRel, Idx highState, StateSet &rLowExitStates)
 LowExitStates call-by-reference function:.
EventSet ReachableEvents (const vGenerator &rLowGen, const EventSet &rHighAlph, Idx lowState)
 ReachableEvents return-copy function:.
void ReachableEvents (const vGenerator &rLowGen, const EventSet &rHighAlph, Idx lowState, EventSet &rReachableEvents)
 ReachableEvents call-by-reference function:.
void LocalCoaccessibleReach (const TransSetX2EvX1 &rRevTransRel, const EventSet &rHighAlph, Idx lowState, StateSet &rCoaccessibleReach)
 Compute the coaccessible reach for a local automaton.
void LocalAccessibleReach (const vGenerator &rLowGen, const EventSet &rHighAlph, Idx lowState, StateSet &rAccessibleReach)
 Compute the accessible reach for a local automaton.
void Parallel (const vGenerator &rGen1, const vGenerator &rGen2, vGenerator &rResGen)
 Parallel composition.
void Parallel (const vGenerator &rGen1, const vGenerator &rGen2, std::map< std::pair< Idx, Idx >, Idx > &rReverseCompositionMap, vGenerator &rResGen)
 Parallel composition.
void SParallel (const vGenerator &rGen1, const vGenerator &rGen2, vGenerator &rResGen)
 Shared event parallel composition.
void SParallel (const vGenerator &rGen1, const vGenerator &rGen2, std::map< std::pair< Idx, Idx >, Idx > &rReverseCompositionMap, vGenerator &rResGen)
 Shared event parallel composition.
void SetComposedStateNames (const vGenerator &rGen1, const vGenerator &rGen2, std::map< std::pair< Idx, Idx >, Idx > &rReverseCompositionMap, vGenerator &rGen12)
 Helper: uses reverse composition map to track state names in a paralell composition.
void UniqueInit (vGenerator &rGen)
 Make initial states unique.
void Deterministic (const vGenerator &rGen, vGenerator &rResGen)
 Make generator deterministic.
void Deterministic (const vGenerator &rGen, std::map< Idx, StateSet > &rEntryStatesMap, vGenerator &rResGen)
 Make generator deterministic.
void Deterministic (const vGenerator &rGen, std::vector< StateSet > &rPowerStates, std::vector< Idx > &rDetStates, vGenerator &rResGen)
 Make generator deterministic.
void ProjectNonDet (vGenerator &rGen, const EventSet &rProjectAlphabet)
 Language projection.
void Project (const vGenerator &rGen, const EventSet &rProjectAlphabet, vGenerator &rResGen)
 Minimized deterministic projection.
void Project (const vGenerator &rGen, const EventSet &rProjectAlphabet, std::map< Idx, StateSet > &rEntryStatesMap, vGenerator &rResGen)
 Minimized Deterministic projection.
void InvProject (vGenerator &rGen, const EventSet &rProjectAlphabet)
 Inverse projection.
void CreateEntryStatesMap (const std::map< StateSet, Idx > &rRevEntryStatesMap, std::map< Idx, StateSet > &rEntryStatesMap)
void LanguageUnionNonDet (const vGenerator &rGen1, const vGenerator &rGen2, vGenerator &rResGen)
 Language union, nondeterministic version: This function performs the union of two languages marked by two generators; the resulting generator marks the resulting language.
void LanguageUnion (const vGenerator &rGen1, const vGenerator &rGen2, vGenerator &rResGen)
 Language union, deterministic version: This function performs the union of two languages marked by two generators; the resulting generator marks the resulting language.
void LanguageIntersection (const vGenerator &rGen1, const vGenerator &rGen2, vGenerator &rResGen)
 Language intersection: This function performs the intersection of two languages marked by two generators; the resulting generator marks the resulting language.
bool EmptyLanguageIntersection (const vGenerator &rGen1, const vGenerator &rGen2)
 Empty language intersection: This function checks if the intersection of two languages marked by two generators is empty that is the two languages are disjoint.
bool LanguageDisjoint (const vGenerator &rGen1, const vGenerator &rGen2)
 Disjoint: This function checks if the intersection of two languages marked by two generators is empty, ie the two languages are disjoint.
void Automaton (vGenerator &rGen, const EventSet &rAlphabet)
 Automaton wrt alphabet: Convert a generator marking the language Lm into a formal automaton recognizing Lm with a dump state representing Sigma*-PrefixClosure(Lm(rGen)).
void Automaton (vGenerator &rGen)
 Automaton wrt generator alphabet: Convert a generator marking the language Lm into a formal automaton recognizing Lm with a dump state representing Sigma*-PrefixClosure(Lm).
void LanguageComplement (vGenerator &rGen, const EventSet &rAlphabet)
 Language complement wrt alphabet: Convert generator marking the language Lm into generator marking the language complement of Lm which is defined as Sigma*-Lm.
void LanguageComplement (vGenerator &rGen)
 Language complement wrt generator alphabet: Convert generator marking the language Lm into generator marking the language complement of Lm which is defined as Sigma*-Lm.
void LanguageComplement (const vGenerator &rGen, vGenerator &rRes)
 Language Complement, uniform api.
void LanguageComplement (const vGenerator &rGen, const EventSet &rSigma, vGenerator &rRes)
 Language Complement, uniform api.
void LanguageDifference (const vGenerator &rGen1, const vGenerator &rGen2, vGenerator &rResGen)
 LanguageDifference: 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.
void LanguageConcatenateNonDet (const vGenerator &rGen1, const vGenerator &rGen2, vGenerator &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.
void LanguageConcatenate (const vGenerator &rGen1, const vGenerator &rGen2, vGenerator &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.
void FullLanguage (const EventSet &rAlphabet, vGenerator &rResGen)
 Full Language: Construct generator generating and marking full language Sigma* from alphabet Sigma.
void AlphabetLanguage (const EventSet &rAlphabet, vGenerator &rResGen)
 Alphabet Language: Construct generator generating and marking an alphabet as languages, that is L(G)=Lm(G)=Sigma.
void EmptyStringLanguage (const EventSet &rAlphabet, vGenerator &rResGen)
 Empty string language: Construct generator generating and marking the empty string, that is L(G)=Lm(G)={epsilon}.
void EmptyLanguage (const EventSet &rAlphabet, vGenerator &rResGen)
 Empty language: Construct generator generating and marking the empty language, that is L(G)=Lm(G)={}.
bool EmptyLanguage (const vGenerator &rGen)
 Empty language: Tests if the language marked by rGen is empty, that is if Lm(G)={}.
bool LanguageInclusion (const vGenerator &rGen1, const vGenerator &rGen2)
 Language inclusion: Test if language Lm1 marked by rGen1 is included in language Lm2 marked by rGen2.
bool LanguageEquality (const vGenerator &rGen1, const vGenerator &rGen2)
 Language equality: Test if the language Lm1 marked by rGen1 equals the language Lm2 marked by rGen2.
void KleeneClosure (vGenerator &rGen)
 Kleene Closure: This function computes the Kleene Closure ( ()* - operator) of the language marked by rGen.
void KleeneClosureNonDet (vGenerator &rGen)
 Kleene Closure, nondeterministic version: This function computes the Kleene Closure ( ()* - operator) of the language marked by rGen.
void PrefixClosure (vGenerator &rGen)
 Prefix Closure: This function computes the prefix closure the language Lm marked by rGen.
void SelfLoop (vGenerator &rGen, const EventSet &rAlphabet)
 SelfLoop: This function selfoops all states of rGen with the events from rAlphabet.
void SelfLoopMarkedStates (vGenerator &rGen, const EventSet &rAlphabet)
 SelfLoopMarkedStates: This function selfoops all marked states of rGen with the events from rAlphabet.
void SelfLoop (vGenerator &rGen, const EventSet &rAlphabet, const StateSet &rStates)
 SelfLoop: This function selfoops the states rStates of rGen with the events from rAlphabet.
void LanguageDisjoint (const vGenerator &rGen1, const vGenerator &rGen2, bool &rRes)
 Run-time interface wrappers.
void LanguageInclusion (const vGenerator &rGen1, const vGenerator &rGen2, bool &rRes)
void LanguageEquality (const vGenerator &rGen1, const vGenerator &rGen2, bool &rRes)
void EmptyLanguage (const vGenerator &rGen, bool &rRes)
void LoadRegistry (const std::string &rPath="")
 Load all registered types and functions.
void ClearRegistry (void)
 Clear all registry.
TypeNewObject (const std::string &rTypeName)
 Convenience function to access registry singleton.
FunctionNewFunction (const std::string &rFunctName)
 Convenience function to access registry singleton.
void IntegerSum (const Integer &arg1, const Integer &arg2, Integer &res)
void StateMin (const vGenerator &rGen, vGenerator &rResGen)
 State set minimization.
void StateMin (vGenerator &rGen, vGenerator &rResGen)
 State set minimization.
void StateMin (vGenerator &rGen, vGenerator &rResGen, std::vector< StateSet > &rSubsets, std::vector< Idx > &rNewIndices)
 State set minimization.
bool IsControllableUnchecked (const vGenerator &rPlantGen, const EventSet &rCAlph, const vGenerator &rSpecGen, StateSet &rCriticalStates)
 Controllability (internal function).
bool SupConUnchecked (const vGenerator &rPlantGen, const EventSet &rCAlph, vGenerator &rSupCandGen)
 Supremal Controllable Sublangauge (internal function).
void SupconParallel (const vGenerator &rPlantGen, const EventSet &rCAlph, const vGenerator &rSpecGen, std::map< std::pair< Idx, Idx >, Idx > &rReverseCompositionMap, vGenerator &rResGen)
 Parallel composition optimized for the purpose of SupCon (internal function).
void SupConNBUnchecked (const vGenerator &rPlantGen, const EventSet &rCAlph, const vGenerator &rSpecGen, std::map< std::pair< Idx, Idx >, Idx > &rReverseCompositionMap, vGenerator &rResGen)
 Nonblocking Supremal Controllable Sublanguage (internal function).
void ControlProblemConsistencyCheck (const vGenerator &rPlantGen, const EventSet &rCAlph, const vGenerator &rSpecGen)
 Consistency check for controlproblem input data.
bool IsControllable (const vGenerator &rPlantGen, const EventSet &rCAlph, const vGenerator &rSupCandGen)
 Test controllability.
bool IsControllable (const vGenerator &rPlantGen, const EventSet &rCAlph, const vGenerator &rSupCandGen, StateSet &rCriticalStates)
 Test controllability.
void IsControllable (const vGenerator &rPlantGen, const EventSet &rCAlph, const vGenerator &rSupCandGen, bool &rRes)
 IsControllable wrapper.
void SupConNB (const vGenerator &rPlantGen, const EventSet &rCAlph, const vGenerator &rSpecGen, vGenerator &rResGen)
 Nonblocking Supremal Controllable Sublanguage.
void SupConNBNonDet (const vGenerator &rPlantGen, const EventSet &rCAlph, const vGenerator &rSpecGen, std::map< std::pair< Idx, Idx >, Idx > &rReverseCompositionMap, Generator rDetPlantGen, Generator rDetSpecGen, std::map< Idx, StateSet > &rPowerStatesPlant, std::map< Idx, StateSet > &rPowerStatesSpec, bool &rDetPlantBool, bool &rDetSpecBool, vGenerator &rResGen)
 Nonblocking Supremal Controllable Sublanguage.
void SupCon (const vGenerator &rPlantGen, const EventSet &rCAlph, const vGenerator &rSpecGen, vGenerator &rResGen)
 Supremal Controllable Sublanguage.
void SupCon (const vGenerator &rPlantGen, const EventSet &rCAlph, const vGenerator &rSpecGen, std::map< std::pair< Idx, Idx >, Idx > &rReverseCompositionMap, vGenerator &rResGen)
 Supremal Controllable Sublanguage.
void TraverseUncontrollableBackwards (const EventSet &rCAlph, TransSetX2EvX1 &rtransrel, StateSet &rCriticalStates, Idx current)
 Helper function for IsControllable.
void IsAccessible (const vGenerator &rGen, bool &rRes)
 IsAccessible wrapper function for convenient access via the run-time interface.
void IsCoaccessible (const vGenerator &rGen, bool &rRes)
 IsCoaccessible wrapper function for convenient access via the run-time interface.
void IsTrim (const vGenerator &rGen, bool &rRes)
 IsTrim wrapper function for convenient access via the run-time interface.
void IsDeterministic (const vGenerator &rGen, bool &rRes)
 IsDeterministic wrapper function for convenient access via the run-time interface.
void Accessible (vGenerator &rGen)
 Accessible wrapper function for convenient access via the run-time interface.
void Accessible (const vGenerator &rGen, vGenerator &rRes)
void Coaccessible (vGenerator &rGen)
 Coaccessible wrapper function for convenient access via the run-time interface.
void Coaccessible (const vGenerator &rGen, vGenerator &rRes)
void Trim (vGenerator &rGen)
 Trim wrapper function for convenient access via the run-time interface.
void Trim (const vGenerator &rGen, vGenerator &rRes)
void AlternativeAccessible (vGenerator &rGen)
 Alternative accessibility algorithm.
void calcBisimulation (Generator &rGenOrig, map< Idx, Idx > &rMapStateToPartition, Generator &rGenPart, vector< Idx > &rNewPartitions)
void calcBisimulation (Generator &rGenOrig, map< Idx, Idx > &rMapStateToPartition, vector< Idx > &rNewPartitions)
void calcBisimulation (Generator &rGenOrig, std::map< Idx, Idx > &rMapStateToPartition, Generator &rGenPart, std::vector< Idx > &rNewPartitions)
 Computation of a bisimulation over a given generator.
void calcBisimulation (Generator &rGenOrig, std::map< Idx, Idx > &rMapStateToPartition, std::vector< Idx > &rNewPartitions)
 Computation of a bisimulation over a given generator.
bool MutualControllability (const cGenerator &rGen1, const cGenerator &rGen2)
 Verification of mutual controllability.
bool MutualControllability (const cGenerator &rGen1, const cGenerator &rGen2, StateSet &rForbidden1, StateSet &rForbidden2)
 Verification of mutual controllability.
void calculateDynamicSystemClosedObs (const vGenerator &rGen, EventSet &rHighAlph, vGenerator &rGenDyn)
 Computation of the dynamic system for Delta_sigma (reachable states after the occurrence of one high-level event).
void calculateDynamicSystemObs (const vGenerator &rGen, EventSet &rHighAlph, vGenerator &rGenDyn)
 Computation of the dynamic system for Delta_obs (local reachability of a marked state).
void calculateDynamicSystemMSA (const vGenerator &rGen, EventSet &rHighAlph, vGenerator &rGenDyn)
 Computation of the dynamic system for Delta_msa (local fulfillment of the msa-observer property).
bool recursiveCheckMSAForward (const vGenerator &rGen, const EventSet &rHighAlph, Idx currentState, StateSet &rDoneStates)
 Check if the msa-observer conditions is fulfilled for a given state.
bool recursiveCheckMSABackward (const vGenerator &rGen, const TransSetX2EvX1 &rRevTransSet, const EventSet &rHighAlph, Idx currentState, StateSet &rDoneStates)
 Check if the msa-observer conditions is fulfilled for a given state.
void calculateDynamicSystemLCC (const vGenerator &rGen, const EventSet &rControllableEvents, const EventSet &rHighAlph, vGenerator &rGenDyn)
 Computation of the dynamic system for Delta_lcc (fulfillment of the local control consistency property).
void recursiveCheckLCC (const TransSetX2EvX1 &rRevTransSet, const EventSet &rControllableEvents, const EventSet &rHighAlph, Idx currentState, StateSet &rDoneStates)
 Find states that fulfill the lcc condition.
Idx calcClosedObserver (const vGenerator &rGenObs, EventSet &rHighAlph)
 L(G)-observer computation by adding events to the high-level alphabet.
Idx calcNaturalObserver (const vGenerator &rGenObs, EventSet &rHighAlph)
 Lm(G)-observer computation by adding events to the high-level alphabet.
Idx calcNaturalObserverLCC (const vGenerator &rGen, const EventSet &rControllableEvents, EventSet &rHighAlph)
 Lm(G)-observer computation including local control consistency (LCC) by adding events to the high-level alphabet.
Idx calcMSAObserver (const vGenerator &rGen, EventSet &rHighAlph)
 MSA-observer computation by adding events to the high-level alphabet.
Idx calcMSAObserverLCC (const vGenerator &rGen, const EventSet &rControllableEvents, EventSet &rHighAlph)
 MSA-observer computation including local control consistency (LCC) by adding events to the high-level alphabet.
void ExtendHighAlphabet (const vGenerator &rGen, EventSet &rHighAlph, map< Idx, Idx > &rMapStateToPartition)
bool CheckSplit (const Generator &rGen, const EventSet &rSplitAlphabet, const vector< pair< StateSet, Idx > > &rNondeterministicStates, Idx entryState)
void calcAbstAlphClosed (cGenerator &rGenObs, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Idx, set< Idx > > &rMapRelabeledEvents)
void calcAbstAlphClosed (vGenerator &rGenObs, EventSet &rControllableEvents, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Idx, set< Idx > > &rMapRelabeledEvents)
void calcAbstAlphClosed (vGenerator &rGenObs, EventSet &rControllableEvents, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Transition, Idx > &rMapChangedTrans)
void calcAbstAlphObs (cGenerator &rGenObs, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Idx, set< Idx > > &rMapRelabeledEvents)
void calcAbstAlphObs (vGenerator &rGenObs, EventSet &rControllableEvents, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Idx, set< Idx > > &rMapRelabeledEvents)
void calcAbstAlphObs (vGenerator &rGenObs, EventSet &rControllableEvents, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Transition, Idx > &rMapChangedTrans)
void calcAbstAlphMSA (cGenerator &rGenObs, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Idx, set< Idx > > &rMapRelabeledEvents)
void calcAbstAlphMSA (vGenerator &rGenObs, EventSet &rControllableEvents, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Idx, set< Idx > > &rMapRelabeledEvents)
void calcAbstAlphMSA (vGenerator &rGenObs, EventSet &rControllableEvents, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Transition, Idx > &rMapChangedTrans)
void backwardReachabilityObsOCC (const TransSetX2EvX1 &rTransSetX2EvX1, const EventSet &rControllableEvents, const EventSet &rHighAlph, Idx exitState, Idx currentState, bool controllablePath, map< Idx, map< Idx, bool > > &rExitLocalStatesMap, StateSet &rDoneStates)
void calcAbstAlphObsLCC (cGenerator &rGenObs, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Idx, set< Idx > > &rMapRelabeledEvents)
void calcAbstAlphObsLCC (vGenerator &rGenObs, EventSet &rControllableEvents, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Transition, Idx > &rMapChangedTrans)
void calcAbstAlphMSALCC (cGenerator &rGenObs, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Idx, set< Idx > > &rMapRelabeledEvents)
void calcAbstAlphMSALCC (vGenerator &rGenObs, EventSet &rControllableEvents, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Transition, Idx > &rMapChangedTrans)
bool relabel (vGenerator &rGenRelabel, EventSet &rControllableEvents, EventSet &rHighAlph, vector< Idx > &rNewPartitions, map< Idx, Idx > &rMapStateToPartition, map< Transition, Transition > &rMapChangedTransReverse, map< Transition, Idx > &rMapChangedTrans, map< Idx, EventSet > &rMapRelabeledEvents)
void insertRelabeledEvents (cGenerator &rGenPlant, const map< Idx, set< Idx > > &rMapRelabeledEvents, cEventSet &rNewEvents)
void insertRelabeledEvents (cGenerator &rGenPlant, const map< Idx, set< Idx > > &rMapRelabeledEvents)
void calcAbstAlphObs (cGenerator &rGenObs, EventSet &rHighAlph, EventSet &rNewHighAlph, EventRelabelMap &rMapRelabeledEvents)
 Rti convenience wrapper.
void insertRelabeledEvents (cGenerator &rGenPlant, const EventRelabelMap &rMapRelabeledEvents, cEventSet &rNewEvents)
 Rti convenience wrapper.
void insertRelabeledEvents (cGenerator &rGenPlant, const EventRelabelMap &rMapRelabeledEvents)
 Rti convenience wrapper.
void ExtendHighAlphabet (const vGenerator &rGenObs, EventSet &rHighAlph, std::map< Idx, Idx > &rMapStateToPartition)
 Extension of the high-level alphabet to achieve the Lm-observer property.
bool CheckSplit (const Generator &rGenObs, const EventSet &rSplitAlphabet, const std::vector< std::pair< StateSet, Idx > > &rNondeterministicStates, Idx entryState)
 Check if the current alphabet splits all local automata with nondeterminims or unobservable transitions.
void calcAbstAlphClosed (cGenerator &rGenObs, EventSet &rHighAlph, EventSet &rNewHighAlph, std::map< Idx, std::set< Idx > > &rMapRelabeledEvents)
 L(G)-observer computation.
void calcAbstAlphClosed (vGenerator &rGenObs, EventSet &rControllableEvents, EventSet &rHighAlph, EventSet &rNewHighAlph, std::map< Idx, std::set< Idx > > &rMapRelabeledEvents)
 L(G)-observer computation.
void calcAbstAlphClosed (vGenerator &rGenObs, EventSet &rControllableEvents, EventSet &rHighAlph, EventSet &rNewHighAlph, std::map< Transition, Idx > &rMapChangedTrans)
 L(G)-observer computation.
void calcAbstAlphObs (cGenerator &rGenObs, EventSet &rHighAlph, EventSet &rNewHighAlph, std::map< Idx, std::set< Idx > > &rMapRelabeledEvents)
 Lm-observer computation.
void calcAbstAlphObs (vGenerator &rGenObs, EventSet &rControllableEvents, EventSet &rHighAlph, EventSet &rNewHighAlph, std::map< Idx, std::set< Idx > > &rMapRelabeledEvents)
 Lm-observer computation.
void calcAbstAlphObs (vGenerator &rGenObs, EventSet &rControllableEvents, EventSet &rHighAlph, EventSet &rNewHighAlph, std::map< Transition, Idx > &rMapChangedTrans)
 Lm-observer computation.
void calcAbstAlphMSA (cGenerator &rGenObs, EventSet &rHighAlph, EventSet &rNewHighAlph, std::map< Idx, std::set< Idx > > &rMapRelabeledEvents)
 MSA-observer computation.
void calcAbstAlphMSA (vGenerator &rGenObs, EventSet &rControllableEvents, EventSet &rHighAlph, EventSet &rNewHighAlph, std::map< Idx, std::set< Idx > > &rMapRelabeledEvents)
 MSA-observer computation.
void calcAbstAlphMSA (vGenerator &rGenObs, EventSet &rControllableEvents, EventSet &rHighAlph, EventSet &rNewHighAlph, std::map< Transition, Idx > &rMapChangedTrans)
 MSA-observer computation.
void calcAbstAlphObsLCC (cGenerator &rGenObs, EventSet &rHighAlph, EventSet &rNewHighAlph, std::map< Idx, std::set< Idx > > &rMapRelabeledEvents)
 Lm-observer computation including output control consistency (OCC).
void calcAbstAlphObsLCC (vGenerator &rGenObs, EventSet &rControllableEvents, EventSet &rHighAlph, EventSet &rNewHighAlph, std::map< Transition, Idx > &rMapChangedTrans)
 Lm-observer computation including local control consistency (LCC).
void calcAbstAlphMSALCC (cGenerator &rGenObs, EventSet &rHighAlph, EventSet &rNewHighAlph, std::map< Idx, std::set< Idx > > &rMapRelabeledEvents)
 MSA-observer computation including local control consistency (LCC).
void calcAbstAlphMSALCC (vGenerator &rGenObs, EventSet &rControllableEvents, EventSet &rHighAlph, EventSet &rNewHighAlph, std::map< Transition, Idx > &rMapChangedTrans)
 MSA-observer computation including local control consistency (LCC).
bool relabel (vGenerator &rGenRelabel, EventSet &rControllableEvents, EventSet &rHighAlph, std::vector< Idx > &rNewPartitions, std::map< Idx, Idx > &rMapStateToPartition, std::map< Transition, Transition > &rMapChangedTransReverse, std::map< Transition, Idx > &rMapChangedTrans, std::map< Idx, EventSet > &rMapRelabeledEvents)
 Relabeling algorithm for the computation of an Lm-observer.
void insertRelabeledEvents (cGenerator &rGenPlant, const std::map< Idx, std::set< Idx > > &rMapRelabeledEvents, cEventSet &rNewEvents)
 Convenience function for relabeling events in a given generator.
void insertRelabeledEvents (cGenerator &rGenPlant, const std::map< Idx, std::set< Idx > > &rMapRelabeledEvents)
 Convenience function for relabeling events in a given generator.
bool IsObs (const Generator &rLowGen, const EventSet &rHighAlph)
 Verification of the observer property.
bool IsOCC (const cGenerator &rLowGen, const EventSet &rHighAlph)
 Verification of output control consistency (OCC).
bool IsOCC (const Generator &rLowGen, const EventSet &rControllableEvents, const EventSet &rHighAlph)
 Verification of output control consistency (OCC).
bool backwardVerificationOCC (const Generator &rLowGen, const EventSet &rControllableEvents, const EventSet &rHighAlph, Idx currentState)
 Function that supports the verification of output control consistency (OCC).
bool IsLCC (const cGenerator &rLowGen, const EventSet &rHighAlph)
 Verification of local control consistency (LCC).
bool IsLCC (const Generator &rLowGen, const EventSet &rControllableEvents, const EventSet &rHighAlph)
 Verification of local control consistency (LCC).
void backwardVerificationLCC (const TransSetX2EvX1 &rTransSetX2EvX1, const EventSet &rControllableEvents, const EventSet &rHighAlph, Idx exitState, Idx currentState, bool controllablePath, map< Idx, bool > &rLocalStatesMap, StateSet &rDoneStates)
void IsObs (const cGenerator &rLowGen, const EventSet &rHighAlph, bool rRes)
 Rti convenience wrapper.
void IsLCC (const cGenerator &rLowGen, const EventSet &rHighAlph, bool rRes)
 Rti convenience wrapper.
void backwardVerificationLCC (const TransSetX2EvX1 &rTransSetX2EvX1, const EventSet &rControllableEvents, const EventSet &rHighAlph, Idx exitState, Idx currentState, bool controllablePath, std::map< Idx, bool > &rLocalStatesMap, StateSet &rDoneStates)
 Function that supports the verification of local control consistency (LCC).
bool IsIoConstraintForm (HioConstraint &rHioConstraint, StateSet &rQY, StateSet &rQU, EventSet &rErrEvSet, TransSet &rErrTrSet, StateSet &rErrStSet, std::string &ReportStr)
 IsIoConstraintForm: check if rHioConstraint is in I/O-constraint form and assign state attributes.
bool IsIoConstraintForm (HioConstraint &rHioConstraint, std::string &ReportStr)
 IsIoConstraintForm: check if rHioConstraint is in I/O-constraint form and assign state attributes.
bool IsIoConstraintForm (HioConstraint &rHioConstraint)
 IsIoConstraintForm: check if rHioConstraint is in I/O-constraint form and assign state attributes.
void IsIoConstraintForm (HioConstraint &rHioConstraint, bool &rRes)
 Function definition for run-time interface.
void IoStatePartition (HioConstraint &rConstraint)
 Function definition for run-time interface.
bool IsIoControllerForm (HioController &rHioController, StateSet &rQUc, StateSet &rQYP, StateSet &rQUp, StateSet &rQYcUp, EventSet &rErrEvSet, TransSet &rErrTrSet, StateSet &rErrStSet, std::string &ReportStr)
 IsIoControllerForm: check if rHioController is in I/O-controller form and assign state attributes.
bool IsIoControllerForm (HioController &rHioController, std::string &ReportStr)
 IsIoControllerForm: check if rHioController is in I/O-controller form and assign state attributes.
bool IsIoControllerForm (HioController &rHioController)
 IsIoControllerForm: check if rHioController is in I/O-controller form and assign state attributes.
void IsIoControllerForm (HioController &rHioController, bool &rRes)
 Function definition for run-time interface.
void IoStatePartition (HioController &rController)
 Function definition for run-time interface.
bool IsIoEnvironmentForm (HioEnvironment &rHioEnvironment, StateSet &rQYe, StateSet &rQUe, StateSet &rQUl, StateSet &rQYlUe, EventSet &rErrEvSet, TransSet &rErrTrSet, StateSet &rErrStSet, std::string &ReportStr)
 IsIoEnvironmentForm: check if rHioEnvironment is in I/O-environment form and assign state attributes.
bool IsIoEnvironmentForm (HioEnvironment &rHioEnvironment, std::string &ReportStr)
 IsIoEnvironmentForm: check if rHioEnvironment is in I/O-environment form and assign state attributes.
bool IsIoEnvironmentForm (HioEnvironment &rHioEnvironment)
 IsIoEnvironmentForm: check if rHioEnvironment is in I/O-environment form and assign state attributes.
void IsIoEnvironmentForm (HioEnvironment &rHioEnvironment, bool &rRes)
 Function definition for run-time interface.
void IoStatePartition (HioEnvironment &rEnvironment)
 Function definition for run-time interface.
bool CompleteSynth (const Generator &rPlant, const EventSet rCAlph, const Generator &rSpec, Generator &rClosedLoop)
 CompleteSynth: compute supremal complete and controllable (and closed) sublanguage.
bool NormalCompleteSynth (Generator &rPlant, const EventSet &rCAlph, const EventSet &rOAlph, const Generator &rSpec, Generator &rClosedLoop)
 NormalCompleteSynth: compute normal, complete and controllable (and closed) sublanguage.
bool NormalCompleteSynthNB (Generator &rPlant, const EventSet &rCAlph, const EventSet &rOAlph, const Generator &rSpec, Generator &rClosedLoop)
 NormalCompleteSynthNB: compute normal, complete, controllable and nonblocking sublanguage.
Generator IoSortCL (const EventSet &rYc, const EventSet &rUc, const EventSet &rYp, const EventSet &rUp, const EventSet &rYe, const EventSet &rUe)
 IoSortCL: returns IO-sorting structure required for closed loops.
void FreeInput (const Generator &rGen, const EventSet &rInput, const EventSet &rOutput, Generator &rResGen, const std::string &rErrState1, const std::string &rErrState2, Idx &rErrState1Idx, Idx &rErrState2Idx)
 FreeInput: extend generator by obviously missing input transitions.
void FreeInput (const Generator &rGen, const EventSet &rInput, const EventSet &rOutput, Generator &rResGen, const std::string &rErrState1, const std::string &rErrState2)
 FreeInput: extend generator by obviously missing input transitions.
void FreeInput (const Generator &rGen, const EventSet &rInput, const EventSet &rOutput, Generator &rResGen)
 FreeInput: extend generator by obviously missing input transitions.
void FreeInput (const HioPlant &rPlant, HioPlant &rResPlant)
 FreeInput: extend HioPlant by obviously missing input transitions.
void FreeInput (const HioController &rController, HioController &rResController)
 FreeInput: extend HioController by obviously missing input transitions.
void FreeInput (const HioEnvironment &rEnvironment, HioEnvironment &rResEnvironment)
 FreeInput: extend HioEnvironment by obviously missing input transitions.
void FreeInput (const HioConstraint &rConstraint, HioConstraint &rResConstraint)
 FreeInput: extend HioConstraint by obviously missing input transitions.
void FreeInput (HioPlant &rPlant)
 FreeInput: convenience interface to faudes::FreeInput(const HioPlant&, HioPlant).
void FreeInput (HioController &rController)
 FreeInput: convenience interface to faudes::FreeInput(const HioController&, HioController).
void FreeInput (HioEnvironment &rEnvironment)
 FreeInput: convenience interface to faudes::FreeInput(const HioEnvironment&, HioEnvironment).
void FreeInput (HioConstraint &rConstraint)
 FreeInput: convenience interface to faudes::FreeInput(const HioConstraint&, HioConstraint).
void NormalityConsistencyCheck (const Generator &rK, const Generator &rL, const EventSet &rOAlph)
 NormalityConsistencyCheck: Consistency check for normality input data.
bool IsNormal (const Generator &rK, const Generator &rL, const EventSet &rOAlph)
 IsNormal: checks normality of a language K generated by rK wrt a language L generated by rL and the subset of observable events rOAlph.
bool IsNormalAlt (const Generator &rK, const Generator &rL, const EventSet &rOAlph)
 IsNormalAlt: Alternative implementation of IsNormal().
void ConcatenateFullLanguage (vGenerator &rGen)
 ConcatenateFullLanguage: concatenate Sigma* to language marked by rGen.
bool SupNorm (const Generator &rK, Generator &rL, const EventSet &rOAlph, Generator &rResult)
 SupNorm: compute supremal normal and closed sublanguage.
bool SupPrefixClosed (const Generator &rK, Generator &rResult)
 SupPrefixClosed: supremal closed sublanguage of K by cancelling all tranistions leading to a non-marked state.
bool SupNormAlt (const Generator &rK, Generator &rL, const EventSet &rOAlph, Generator &rResult)
 SupNormAlt: Alternative implementation of SupNorm().
bool IsComplete (const Generator &rGen, StateSet &rDeadStates)
 IsComplete: checks if language generated by rGen is complete.
bool IsComplete (const Generator &rGen)
 IsComplete: checks if language generated by rGen is complete.
bool SupConComplete (const Generator &rPlant, const EventSet rCAlph, const Generator &rSpec, Generator &rResGen)
 SupConComplete: Supremal Controllable and Complete Sublanguage - alternative for CompleteSynth() - UNDER CONSTRUCTION.
void MarkIoShuffle (const vGenerator &rGen1, const vGenerator &rGen2, const std::map< std::pair< Idx, Idx >, Idx > &rReverseCompositionMap, vGenerator &rShuffle)
 MarkIoShuffle: marking rule for IoShuffle() in case of marked parameters rGen1 and rGen2 - UNDER CONSTRUCTION.
void MarkAlternationAB (const EventSet rAset, const EventSet rBset, Generator &rAltAB)
 MarkAlternationAB: returns Generator marking the alternation of Aset-transitions with Bset-transtions.
void IoShuffleUnchecked (const Generator &rPlantA, const Generator &rPlantB, const EventSet &rYp, const EventSet &rUp, const EventSet &rYe, const EventSet &rUe, Generator &rIOShuffAB)
 IoShuffleUnchecked: IO-shuffle of rPlantA and rPlantB according to definition, no parameter check.
void IoShuffle (const Generator &rPlantA, const Generator &rPlantB, const EventSet &rYp, const EventSet &rUp, const EventSet &rYe, const EventSet &rUe, Generator &rIOShuffAB)
 IoShuffle: IO-shuffle of rPlantA and rPlantB according to definition.
void IoShuffle (const HioPlant &rPlantA, const HioPlant &rPlantB, HioPlant &rIOShuffAB)
 IoShuffle: IO-shuffle of rPlantA and rPlantB according to definition.
void CheapAltAnB (const EventSet rAset, const EventSet rBset, const int Depth, Generator &rAltAnB)
 CheapAltAnB: returns Generator of the following specification: "After a maximum of n (=depth) pairs of A-transitions, a B-transition has to occur!".
void CheapAltAB (const EventSet rAset, const EventSet rBset, const int Depth, Generator &rAltAB)
 CheapAltAB: returns Generator of the following specification: "After a maximum of n (=depth) pairs of A-transitions, a B-transition has to occur and vice-versa!".
void IoShuffleTU (const Generator &rPlantA, const Generator &rPlantB, const EventSet &rYp, const EventSet &rUp, const EventSet &rYe, const EventSet &rUe, const int Depth, Generator &rIOShuffAB)
 IoShuffleTU: IO-shuffle of rPlantA and rPlantB according to definition with additional forced alternation of depth Depth (see CheapAltAB()) between A- and B-events.
void SearchYclessScc (const Idx state, int &rcount,const Generator &rGen, const EventSet &rYc, const bool UnMarkedOnly, StateSet &rNewStates, std::stack< Idx > &rSTACK, StateSet &rStackStates, std::map< const Idx, int > &rDFN, std::map< const Idx, int > &rLOWLINK, std::set< StateSet > &rSccSet, StateSet &rRoots)
 SearchYclessSCC: Search for strongly connected ycless components (YC-less SCC's).
bool YclessScc (const Generator &rGen, const EventSet &rYc, std::set< StateSet > &rSccSet, StateSet &rRoots)
 YclessSCC: Search for strongly connected ycless components (YC-less SCC's) - convenience api.
bool YclessUnmarkedScc (const Generator &rGen, const EventSet &rYc, std::set< StateSet > &rSccSet, StateSet &rRoots)
 YclessUnmarkedSCC: Search for strongly connected ycless components (YC-less SCC's) consisting of unmarked states only.
bool YclessScc (const Generator &rGen, const EventSet &rYc, std::set< StateSet > &rSccSet)
void WriteStateSets (const std::set< StateSet > &rStateSets)
 WriteStateSets: Write set of StateSet's to console (indeces).
void WriteStateSets (const Generator &rGen, const std::set< StateSet > &rStateSets)
 WriteStateSets: Write set of StateSet's to console (symbolic state names taken from rGen).
void SccEntries (const Generator &rGen, const std::set< StateSet > &rSccSet, StateSet &rEntryStates, TransSetX2EvX1 &rEntryTransSet)
 SCCEntries: figure entry states and entry transitions of strongly connected components rSccSet of rGen.
void CloneScc (Generator &rGen, const StateSet &rScc, std::set< StateSet > &rSccSet, const Idx EntryState, StateSet &rEntryStates, TransSetX2EvX1 &rEntryTransSet)
 cloneSCC: makes a copy (clone) of strongly connected component (rSCC) of the generator and moves all transitions leading to some entry state EntryState of this SCC to the copy of EntryState.
void CloneUnMarkedScc (Generator &rGen, const StateSet &rScc, const Idx EntryState, const StateSet &rEntryStates, TransSetX2EvX1 &rEntryTransSet)
 CloneUnMarkedSCC: makes a copy (clone) of strongly connected unmarked component (rSCC) of rGen.
void YcAcyclic (const Generator &rGen, const EventSet &rYc, Generator &rResGen)
 YcAcyclic: Computes the supremal(?) Yc-acyclic sublanguage of L(Gen).
void ConstrSynth_Beta (Generator &rPlant, const EventSet &rYp, const EventSet &rUp, const Generator &rLocConstr, Generator &rOpConstraint)
 ConstrSynth_Beta: compute operator constraint Sp for plant under environment constraint Sl such that plant is complete & Yp-live wrt both constraints - Beta Version.
void HioSynthUnchecked (const Generator &rPlant, const Generator &rSpec, const Generator &rConstr, const Generator &rLocConstr, const EventSet &rYc, const EventSet &rUc, const EventSet &rYp, const EventSet &rUp, const EventSet &rYel, const EventSet &rUel, Generator &rController)
 HioSynthUnchecked: I/O controller synthesis procedure, no parameter check.
void HioSynth (const Generator &rPlant, const Generator &rSpec, const Generator &rConstr, const Generator &rLocConstr, const EventSet &rYc, const EventSet &rUc, const EventSet &rYp, const EventSet &rUp, const EventSet &rYel, const EventSet &rUel, Generator &rController)
 HioSynthUnchecked: I/O controller synthesis procedure.
void HioSynthMonolithic (const HioPlant &rPlant, const HioPlant &rSpec, const HioConstraint &rSc, const HioConstraint &rSp, const HioConstraint &rSe, HioController &rController)
 HioSynthMonolithic: I/O controller synthesis procedure for monolithic plant.
void HioSynthHierarchical (const HioPlant &rIoShuffle, const HioEnvironment &rEnvironment, const HioPlant &rSpec, const Generator &rIntConstr, const HioConstraint &rSc, const HioConstraint &rSl, HioController &rController)
 HioSynthHierarchical: I/O controller synthesis procedure for I/O-shuffle of i plants and their interaction via an I/O environment.
void IoShuffle_Musunoi (const HioPlant &rPlantA, const HioPlant &rPlantB, int depth, Generator &rIOShuffAB)
void HioSynth_Musunoi (const Generator &rPlant, const HioPlant &rSpec, const Generator &rConstr, const Generator &rLocConstr, const EventSet &rYp, const EventSet &rUp, Generator &rController)
bool YclessSCC (const Generator &rGen, const EventSet &rYc, std::set< StateSet > &rSccSet)
 YclessSCC: Search for strongly connected ycless components (YC-less SCC's) - convenience api.
void AdjustHioController (const HioController &rHioController, const HioModule *rHioModule1, const HioModule *rHioModule2, HioController &rResEnv)
void GroupHioModules (const std::vector< HioModule * > &rChildren, HioModule &rParentModule)
 GroupHioModules: This function groups two or more HioModules to a new HioModule.
void CreateSpec (int mType[5], HioPlant &rHioSpec, Generator &constrP, Generator &constrE)
 This function creates new specification given by the type ("xxxxx") Note: The core of this function is a template specification model (SpecCB12.gen).
void CreateConstraint (int mType[5], Generator &constrP, Generator &constrE)
 This function creates constraints which describe the condition of completeness and Yp-liveness of a Specification.
bool IsIoPlantForm (HioPlant &rHioPlant, StateSet &rQYpYe, StateSet &rQUp, StateSet &rQUe, EventSet &rErrEvSet, TransSet &rErrTrSet, StateSet &rErrStSet, std::string &ReportStr)
 IsIoPlantForm: check if rHioPlant is in I/O-plant form and assign state attributes.
bool IsIoPlantForm (HioPlant &rHioPlant, std::string &ReportStr)
 IsIoPlantForm: check if rHioPlant is in I/O-plant form and assign state attributes.
bool IsIoPlantForm (HioPlant &rHioPlant)
 IsIoPlantForm: check if rHioPlant is in I/O-plant form and assign state attributes.
void IsIoPlantForm (HioPlant &rHioPlant, bool &rRes)
 Function definition for run-time interface.
void IsIoPlantForm (HioPlant &rHioPlant, bool &rRes, std::string &rReportStr)
 Function definition for run-time interface.
void IsIoPlantForm (HioPlant &rHioPlant, StateSet &rQYpYe, StateSet &rQUp, StateSet &rQUe, EventSet &rErrEvSet, TransSet &rErrTrSet, StateSet &rErrStSet, bool &rRes, std::string &ReportStr)
 Function definition for run-time interface.
void IoStatePartition (HioPlant &rPlant)
 Function definition for run-time interface.
Idx calcNaturalObserver (const mtcGenerator &rGen, EventSet &rHighAlph)
 Calculate a colored natural observer by extending a given high-level alphabet.
void calcAbstAlphObs (mtcGenerator &rGenObs, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Idx, set< Idx > > &rMapRelabeledEvents)
 Lm-observer computation.
void calcAbstAlphObs (mtcGenerator &rGenObs, EventSet &rControllableEvents, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Idx, set< Idx > > &rMapRelabeledEvents)
 Lm-observer computation.
void calcAbstAlphObs (mtcGenerator &rGenObs, EventSet &rControllableEvents, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Transition, Idx > &rMapChangedTrans)
 Lm-observer computation.
void calculateDynamicSystemObs (const mtcGenerator &rGen, EventSet &rHighAlph, vGenerator &rGenDyn)
 Computation of the dynamic system for an Lm-observer.
bool IsMTCObs (const mtcGenerator &rLowGen, const EventSet &rHighAlph)
 Verification of the observer property.
void Parallel (const mtcGenerator &rGen1, const mtcGenerator &rGen2, mtcGenerator &rResGen)
 Parallel composition of two colored marking generators, controllability status is observed.
void Parallel (const mtcGenerator &rGen1, const mtcGenerator &rGen2, std::map< std::pair< Idx, Idx >, Idx > &rReverseCompositionMap, mtcGenerator &rResGen)
 Parallel composition of two mtcGenerators.
void ComposedColorSet (const mtcGenerator &rGen1, const Idx stdidx1, ColorSet &colors1, const mtcGenerator &rGen2, const Idx stdidx2, ColorSet &colors2, ColorSet &composedSet)
 Compose the color set for a state combined from two states in two distinct automata.
void UniqueInit (mtcGenerator &rGen)
void Deterministic (const mtcGenerator &rGen, mtcGenerator &rResGen)
 Make generator deterministic.
void Deterministic (const mtcGenerator &rGen, std::map< Idx, StateSet > &rEntryStatesMap, mtcGenerator &rResGen)
 Make generator deterministic.
void Deterministic (const mtcGenerator &rGen, std::vector< StateSet > &rPowerStates, std::vector< Idx > &rDetStates, mtcGenerator &rResGen)
 Make generator deterministic.
void ProjectNonDet (mtcGenerator &rGen, const EventSet &rProjectAlphabet)
 Project generator to alphabet rProjectAlphabet.
void Project (const mtcGenerator &rGen, const EventSet &rProjectAlphabet, mtcGenerator &rResGen)
 Minimized Deterministic projection.
void Project (const mtcGenerator &rGen, const EventSet &rProjectAlphabet, std::map< Idx, StateSet > &rEntryStatesMap, mtcGenerator &rResGen)
 Minimized Deterministic projection.
void InvProject (mtcGenerator &rGen, const EventSet &rProjectAlphabet)
 Inverse projection.
void SearchScc (const Idx state, int &rCount, const Generator &rGen, StateSet &rNewStates, std::stack< Idx > &rSTACK, StateSet &rStackStates, std::map< const Idx, int > &rDFN, std::map< const Idx, int > &rLOWLINK, std::set< StateSet > &rSccSet, StateSet &rRoots)
 Search for strongly connected components (SCC)*** This function partitions the stateset of a generator into equivalence classes such that states x1 and x2 are equivalent iff there is a path from x1 to x2 AND a path from x2 to x1.
bool ComputeSCC (const Generator &rGen, std::set< StateSet > &rSccSet, StateSet &rRoots)
 Computes the strongly connected components (SCCs) of an automaton.
void ColoredSCC (mtcGenerator &rGen, ColorSet &rColors, std::set< StateSet > &rColoredSCCs)
 Compute all strongly connected components (SCCs) in a colored marking generator (CMG) that are marked with a given set of colors.
bool CheckRedundantColor (mtcGenerator rGen, Idx redundantColor)
 Check if a color in a colored marking generator is redundant for the supervisor synthesis.
void OptimalColorSet (const mtcGenerator &rGen, ColorSet &rOptimalColors, EventSet &rHighAlph)
 Compute an optimal subset of the colors that should be removed.
void rec_OptimalColorSet (const mtcGenerator &rGen, const vector< Idx > &rColorVector, Idx colorNumber, ColorSet &rOptimalColors, Idx &rOptimalNumberStates, Idx &rOptimalNumberColors, const EventSet &rHighAlph, EventSet &rOptimalHighAlph)
 Recursively find an optimal set of colors to be removed.
void StateMin (mtcGenerator &rGen, mtcGenerator &rResGen)
 State Minimization This function implements the (n*log n) set partitioning algorithm by John E.
void StateMin (mtcGenerator &rGen, mtcGenerator &rResGen, std::vector< StateSet > &rSubsets, std::vector< Idx > &rNewIndices)
 State Minimization This function implements the (n*log n) set partitioning algorithm by John E.
void SupConNB (const mtcGenerator &rPlantGen, const mtcGenerator &rSpecGen, mtcGenerator &rResGen)
 Nonblocking Supremal Controllable Sublanguage (wrapper function).
void SupConNB (const mtcGenerator &rPlantGen, const mtcGenerator &rSpecGen, std::map< std::pair< Idx, Idx >, Idx > &rReverseCompositionMap, mtcGenerator &rResGen)
 Nonblocking Supremal Controllable Sublanguage.
void SupCon (const mtcGenerator &rPlantGen, const mtcGenerator &rSpecGen, mtcGenerator &rResGen)
 Supremal Controllable Sublanguage (wrapper function).
void SupCon (const mtcGenerator &rPlantGen, const mtcGenerator &rSpecGen, std::map< std::pair< Idx, Idx >, Idx > &rReverseCompositionMap, mtcGenerator &rResGen)
 Supremal Controllable Sublanguage.
void SupconParallel (const mtcGenerator &rPlantGen, const mtcGenerator &rSpecGen, const EventSet &rUAlph, std::map< std::pair< Idx, Idx >, Idx > &rReverseCompositionMap, mtcGenerator &rResGen)
 Fast parallel composition for computation for the SupConNB.
bool SupConUnchecked (const mtcGenerator &rPlantGen, const EventSet &rCAlph, mtcGenerator &rSupGen)
 Supremal Controllable Sublangauge (Real SupCon function; unchecked).
bool IsControllableUnchecked (const mtcGenerator &rPlantGen, const mtcGenerator &rSpecGen, const EventSet &rUAlph, StateSet &forbidden)
template<class GlobalAttr1, class StateAttr1, class EventAttr1, class TransAttr1, class GlobalAttr2, class StateAttr2, class EventAttr2, class TransAttr2, class GlobalAttrR, class StateAttrR, class EventAttrR, class TransAttrR>
void TParallel (const TtGenerator< GlobalAttr1, StateAttr1, EventAttr1, TransAttr1 > &rGen1, const TtGenerator< GlobalAttr2, StateAttr2, EventAttr2, TransAttr2 > &rGen2, TtGenerator< GlobalAttrR, StateAttrR, EventAttrR, TransAttrR > &rResGen)
 Parallel composition of timed generators.
template<class GlobalAttr1, class StateAttr1, class EventAttr1, class TransAttr1, class GlobalAttr2, class StateAttr2, class EventAttr2, class TransAttr2, class GlobalAttrR, class StateAttrR, class EventAttrR, class TransAttrR>
void TParallel (const TtGenerator< GlobalAttr1, StateAttr1, EventAttr1, TransAttr1 > &rGen1, const TtGenerator< GlobalAttr2, StateAttr2, EventAttr2, TransAttr2 > &rGen2, std::map< std::pair< Idx, Idx >, Idx > &rReverseCompositionMap, TtGenerator< GlobalAttrR, StateAttrR, EventAttrR, TransAttrR > &rResGen)
 Parallel composition of timed generators.
void ran_plant_seeds (long x)
 Use this function to set the state of all the random number generator streams by "planting" a sequence of states (seeds), one per stream, with all states dictated by the state of the default stream.
void ran_put_seed (long seed)
 Put a seed.
void ran_select_stream (int index)
 Use this function to set the current random number generator stream -- that stream from which the next random number will come.
void ran_init (long seed)
 Initialize random generator.
double ran (void)
 Run random generator Random Number Generator (for more details see "Random Number Generators: Good Ones Are Hard To Find" Steve Park and Keith Miller Communications of the ACM, October 1988).
double ran_uniform (double a, double b)
 Sample a random variable uniformly on interval [a;b) Distribution: f(t) dt= {1/(b-a)} dt for t, a <=t< b, else 0.
long ran_uniform_int (long a, long b)
 Sample a discrete random variable uniformly on interval [a;b) Distribution: p(n) = 1/(b-a-1).
double ran_exponential (double mu)
 Sample a random variable exponentially Distribution: f(t) dt = 1/mu exp(-t/mu) dt for t>=0.
double ran_exponential (double mu, tpTime::Type tossLB, tpTime::Type tossUB)
 Sample a random variable exponentially on a restricted interval Distribution: f(t) dt = 1/mu exp(-t/mu) dt for t>=0.
double ran_gauss (double mu, double sigma, tpTime::Type tossLB, tpTime::Type tossUB)
 Sample a random variable gaussian distributed on a restricted interval Distribution: f(t) = 1 / sqrt(2 pi sigma^2) * exp( -1/2 ((t-mu)/sigma)^2) for t>=0.
double ran_gaussian_cdf_P (double x)
 Help function: calculate gaussian CDF using an approximation from Abromowitz and Stegun: Handbook of Mathematical Functions.

Variables

std::ostream * pDebugStream = NULL
 Stream to debug to.
static long ran_seed [256] = { 123456789 */ }
static int ran_stream = 0
static int ran_initialized = 0


Typedef Documentation

EventSet with controllablity properties.

Convenience typedef for std cGenerator.

typedef unsigned long int faudes::fType

Convenience typdef flag data.

typedef long unsigned int faudes::Idx

Type definition for index type.

typedef long int faudes::SignedIdx

Type definition for signed index type.

typedef void faudes::vDevice

Dummy typedef in the absence of the IO Device plugin.


Function Documentation

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

void faudes::AdjustHioController ( const HioController &  rHioController,
const HioModule *  rHioModule1,
const HioModule *  rHioModule2,
HioController &  rResEnv 
)

void faudes::backwardReachabilityObsOCC ( const TransSetX2EvX1 &  rTransSetX2EvX1,
const EventSet &  rControllableEvents,
const EventSet &  rHighAlph,
Idx  exitState,
Idx  currentState,
bool  controllablePath,
map< Idx, map< Idx, bool > > &  rExitLocalStatesMap,
StateSet &  rDoneStates 
)

void faudes::backwardVerificationLCC ( const TransSetX2EvX1 &  rTransSetX2EvX1,
const EventSet &  rControllableEvents,
const EventSet &  rHighAlph,
Idx  exitState,
Idx  currentState,
bool  controllablePath,
std::map< Idx, bool > &  rLocalStatesMap,
StateSet &  rDoneStates 
)

Function that supports the verification of local control consistency (LCC).

This function performs a recursive backward reachability to find if from a state where an uncontrollable high-level event is possible, another state is only reachable by local strings that contaion at least one controllable event. If this is the case, LCC is violated.

Parameters:
rTransSetX2EvX1 reverse transition relation of the input generator
rControllableEvents set of controllable events
rHighAlph High level alphabet
exitState start state for backward reachability
currentState current state for backward reachability
controllablePath false if at least one uncontrollable path to the currentState exists
rLocalStatesMap map for states and their controllability property
rDoneStates states that have already been visited

void faudes::backwardVerificationLCC ( const TransSetX2EvX1 &  rTransSetX2EvX1,
const EventSet &  rControllableEvents,
const EventSet &  rHighAlph,
Idx  exitState,
Idx  currentState,
bool  controllablePath,
map< Idx, bool > &  rLocalStatesMap,
StateSet &  rDoneStates 
)

bool faudes::backwardVerificationOCC ( const Generator &  rLowGen,
const EventSet &  rControllableEvents,
const EventSet &  rHighAlph,
Idx  currentState 
)

Function that supports the verification of output control consistency (OCC).

This function performs a backward reachability to find if an uncontrollable high-level event is preemted by an uncontrollable low-level event. If this is the case, OCC is violated.

Parameters:
rLowGen Input generator
rControllableEvents set of controllable events
rHighAlph High level alphabet
currentState start state for backward reachability
Returns:
true if no controllable low-level event has been found

void faudes::calcAbstAlphClosed ( vGenerator &  rGenObs,
EventSet &  rControllableEvents,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
std::map< Transition, Idx > &  rMapChangedTrans 
)

L(G)-observer computation.

This function is called by void calcAbstAlphClosed(vGenerator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents). It modifies a given generator and an associated natural projection such that the resulting natural projection is an Lm-observer for the prefix-closed language of the resulting generator. This function evaluates the observer algorithm as described in K. C. Wong and W. M. Wonham, "On the Computation of Observers in Discrete Event Systems," Discrete Event Dynamic Systems, vol. 14, no. 1, pp. 55-107, 2004.

The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs. rGenObs must be a deterministic generator. There are no further restrictions on parameters.

Parameters:
rGenObs Low-level generator. It is modified by the algorithm by relabeling transitions and events
rControllableEvents Set of controllable events
rHighAlph Initial abstraction alphabet
rNewHighAlph Modified abstraction alphabet such that the abstraction is an Lm-observer
rMapChangedTrans Maps the original relabeled transitions to the new events

void faudes::calcAbstAlphClosed ( vGenerator &  rGenObs,
EventSet &  rControllableEvents,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
std::map< Idx, std::set< Idx > > &  rMapRelabeledEvents 
)

L(G)-observer computation.

This function is called by calcAbstAlphClosed(cGenerator& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents). It modifies a given generator and an associated natural projection such that the resulting natural projection is an L(G)-observer for the prefix-closed language of the resulting generator. This function evaluates the observer algorithm as described in K. C. Wong and W. M. Wonham, "On the Computation of Observers in Discrete Event Systems," Discrete Event Dynamic Systems, vol. 14, no. 1, pp. 55-107, 2004.

the alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs rGenObs must be a deterministic generator no further restrictions on parameters.

Parameters:
rGenObs Low-level generator. It is modified by the algorithm by relabeling transitions and events
rControllableEvents Set of controllable events
rHighAlph Initial abstraction alphabet
rNewHighAlph Modified abstraction alphabet such that the abstraction is an Lm-observer
rMapRelabeledEvents Maps the original events to sets of newly introduced events (accumulatoive, call clear before)

void faudes::calcAbstAlphClosed ( vGenerator &  rGenObs,
EventSet &  rControllableEvents,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
map< Transition, Idx > &  rMapChangedTrans 
)

void faudes::calcAbstAlphClosed ( vGenerator &  rGenObs,
EventSet &  rControllableEvents,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
map< Idx, set< Idx > > &  rMapRelabeledEvents 
)

void faudes::calcAbstAlphClosed ( cGenerator &  rGenObs,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
map< Idx, set< Idx > > &  rMapRelabeledEvents 
)

void faudes::calcAbstAlphMSA ( vGenerator &  rGenObs,
EventSet &  rControllableEvents,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
std::map< Transition, Idx > &  rMapChangedTrans 
)

MSA-observer computation.

This function is called by void calcAbstAlphMSA(vGenerator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents). It modifies a given generator and an associated natural projection such that the resulting natural projection is an MSA-observer for the language marked by the resulting generator. This function evaluates the observer algorithm as described in K. Schmidt and Th. Moor, "Marked String Accepting Observers for the Hierarchical and Decentralized Control of Discrete Event Systems," Workshop on Discrete Event Systems, 2006.

The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs. rGenObs must be a deterministic generator. There are no further restrictions on parameters.

Parameters:
rGenObs Low-level generator. It is modified by the algorithm by relabeling transitions and events
rControllableEvents Set of controllable events
rHighAlph Initial abstraction alphabet
rNewHighAlph Modified abstraction alphabet such that the abstraction is an Lm-observer
rMapChangedTrans Maps the original relabeled transitions to the new events

void faudes::calcAbstAlphMSA ( vGenerator &  rGenObs,
EventSet &  rControllableEvents,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
std::map< Idx, std::set< Idx > > &  rMapRelabeledEvents 
)

MSA-observer computation.

This function is called by calcAbstAlphMSA(cGenerator& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents). It modifies a given generator and an associated natural projection such that the resulting natural projection is an MSA-observer for the language marked by the resulting generator. This function evaluates the observer algorithm as described in K. Schmidt and Th. Moor, "Marked String Accepting Observers for the Hierarchical and Decentralized Control of Discrete Event Systems," Workshop on Discrete Event Systems, 2006.

the alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs rGenObs must be a deterministic generator no further restrictions on parameters.

Parameters:
rGenObs Low-level generator. It is modified by the algorithm by relabeling transitions and events
rControllableEvents Set of controllable events
rHighAlph Initial abstraction alphabet
rNewHighAlph Modified abstraction alphabet such that the abstraction is an Lm-observer
rMapRelabeledEvents Maps the original events to sets of newly introduced events (accumulatoive, call clear before)

void faudes::calcAbstAlphMSA ( vGenerator &  rGenObs,
EventSet &  rControllableEvents,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
map< Transition, Idx > &  rMapChangedTrans 
)

void faudes::calcAbstAlphMSA ( vGenerator &  rGenObs,
EventSet &  rControllableEvents,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
map< Idx, set< Idx > > &  rMapRelabeledEvents 
)

void faudes::calcAbstAlphMSA ( cGenerator &  rGenObs,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
map< Idx, set< Idx > > &  rMapRelabeledEvents 
)

void faudes::calcAbstAlphMSALCC ( vGenerator &  rGenObs,
EventSet &  rControllableEvents,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
std::map< Transition, Idx > &  rMapChangedTrans 
)

MSA-observer computation including local control consistency (LCC).

This function is called by calcAbstAlphMSALCC(cGenerator& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx,set<Idx > > & rMapRelabeledEvents). It modifies a given generator and an associated natural projection such that the resulting natural projection is an MSA-observer for the language marked by the resulting generator and at the same time fulfills the local control consistency condition (LCC). This function evaluates the observer algorithm as described in K. Schmidt and C. Breindl, "On Maximal Permissiveness of Hierarchical and Modular Supervisory Control Approaches for Discrete Event Systems, Workshop on Discrete Event Systems, 2008. with an extension to LCC as indicated in K. Schmidt and C. Breindl, "On Maximal Permissiveness of Hierarchical and Modular Supervisory Control Approaches for Discrete Event Systems," Workshop on Discrete Event Systems, 2008.

The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs. rGenObs must be a deterministic generator. There are no further restrictions on parameters.

Parameters:
rGenObs Low-level generator. It is modified by the algorithm by relabeling transitions and events
rControllableEvents Set of controllable events
rHighAlph Initial abstraction alphabet
rNewHighAlph Modified abstraction alphabet such that the abstraction is an Lm-observer
rMapChangedTrans Maps the original relabeled transitions to the new events

void faudes::calcAbstAlphMSALCC ( vGenerator &  rGenObs,
EventSet &  rControllableEvents,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
map< Transition, Idx > &  rMapChangedTrans 
)

void faudes::calcAbstAlphMSALCC ( cGenerator &  rGenObs,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
map< Idx, set< Idx > > &  rMapRelabeledEvents 
)

void faudes::calcAbstAlphObs ( mtcGenerator rGenObs,
EventSet rControllableEvents,
EventSet rHighAlph,
EventSet rNewHighAlph,
map< Transition, Idx > &  rMapChangedTrans 
)

Lm-observer computation.

This function is called by void calcAbstAlphObs(vGenerator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents). It modifies a given generator and an associated natural projection such that the resulting natural projection is an Lm-observer for the language marked by the resulting generator. This function evaluates the observer algorithm as described in K. C. Wong and W. M. Wonham, "On the Computation of Observers in Discrete Event Systems," Discrete Event Dynamic Systems, vol. 14, no. 1, pp. 55-107, 2004.

The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs. rGenObs must be a deterministic generator. There are no further restrictions on parameters.

Parameters:
rGenObs Low-level generator. It is modified by the algorithm by relabeling transitions and events
rControllableEvents Set of controllable events
rHighAlph Initial abstraction alphabet
rNewHighAlph Modified abstraction alphabet such that the abstraction is an Lm-observer
rMapChangedTrans Maps the original relabeled transitions to the new events

void faudes::calcAbstAlphObs ( mtcGenerator rGenObs,
EventSet rControllableEvents,
EventSet rHighAlph,
EventSet rNewHighAlph,
map< Idx, set< Idx > > &  rMapRelabeledEvents 
)

Lm-observer computation.

This function is called by calcAbstAlphObs(cGenerator& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents). It modifies a given generator and an associated natural projection such that the resulting natural projection is an Lm-observer for the language marked by the resulting generator. This function evaluates the observer algorithm as described in K. C. Wong and W. M. Wonham, "On the Computation of Observers in Discrete Event Systems," Discrete Event Dynamic Systems, vol. 14, no. 1, pp. 55-107, 2004.

the alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs rGenObs must be a deterministic generator no further restrictions on parameters.

Parameters:
rGenObs Low-level generator. It is modified by the algorithm by relabeling transitions and events
rControllableEvents Set of controllable events
rHighAlph Initial abstraction alphabet
rNewHighAlph Modified abstraction alphabet such that the abstraction is an Lm-observer
rMapRelabeledEvents Maps the original events to sets of newly introduced events (accumulatoive, call clear before)

void faudes::calcAbstAlphObs ( vGenerator &  rGenObs,
EventSet &  rControllableEvents,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
std::map< Transition, Idx > &  rMapChangedTrans 
)

Lm-observer computation.

This function is called by void calcAbstAlphObs(vGenerator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents). It modifies a given generator and an associated natural projection such that the resulting natural projection is an Lm-observer for the language marked by the resulting generator. This function evaluates the observer algorithm as described in K. C. Wong and W. M. Wonham, "On the Computation of Observers in Discrete Event Systems," Discrete Event Dynamic Systems, vol. 14, no. 1, pp. 55-107, 2004.

The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs. rGenObs must be a deterministic generator. There are no further restrictions on parameters.

Parameters:
rGenObs Low-level generator. It is modified by the algorithm by relabeling transitions and events
rControllableEvents Set of controllable events
rHighAlph Initial abstraction alphabet
rNewHighAlph Modified abstraction alphabet such that the abstraction is an Lm-observer
rMapChangedTrans Maps the original relabeled transitions to the new events

void faudes::calcAbstAlphObs ( vGenerator &  rGenObs,
EventSet &  rControllableEvents,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
std::map< Idx, std::set< Idx > > &  rMapRelabeledEvents 
)

Lm-observer computation.

This function is called by calcAbstAlphObs(cGenerator& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents). It modifies a given generator and an associated natural projection such that the resulting natural projection is an Lm-observer for the language marked by the resulting generator. This function evaluates the observer algorithm as described in K. C. Wong and W. M. Wonham, "On the Computation of Observers in Discrete Event Systems," Discrete Event Dynamic Systems, vol. 14, no. 1, pp. 55-107, 2004.

the alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs rGenObs must be a deterministic generator no further restrictions on parameters.

Parameters:
rGenObs Low-level generator. It is modified by the algorithm by relabeling transitions and events
rControllableEvents Set of controllable events
rHighAlph Initial abstraction alphabet
rNewHighAlph Modified abstraction alphabet such that the abstraction is an Lm-observer
rMapRelabeledEvents Maps the original events to sets of newly introduced events (accumulatoive, call clear before)

void faudes::calcAbstAlphObs ( cGenerator &  rGenObs,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
EventRelabelMap &  rMapRelabeledEvents 
)

Rti convenience wrapper.

void faudes::calcAbstAlphObs ( vGenerator &  rGenObs,
EventSet &  rControllableEvents,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
map< Transition, Idx > &  rMapChangedTrans 
)

void faudes::calcAbstAlphObs ( vGenerator &  rGenObs,
EventSet &  rControllableEvents,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
map< Idx, set< Idx > > &  rMapRelabeledEvents 
)

void faudes::calcAbstAlphObs ( cGenerator &  rGenObs,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
map< Idx, set< Idx > > &  rMapRelabeledEvents 
)

void faudes::calcAbstAlphObsLCC ( vGenerator &  rGenObs,
EventSet &  rControllableEvents,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
std::map< Transition, Idx > &  rMapChangedTrans 
)

Lm-observer computation including local control consistency (LCC).

This function is called by calcAbstAlphObsLCC(cGenerator& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx,set<Idx > > & rMapRelabeledEvents). It modifies a given generator and an associated natural projection such that the resulting natural projection is an Lm-observer for the language marked by the resulting generator and at the same time fulfills the local control consistency condition (LCC). This function evaluates the observer algorithm as described in K. C. Wong and W. M. Wonham, "On the Computation of Observers in Discrete Event Systems," Discrete Event Dynamic Systems, vol. 14, no. 1, pp. 55-107, 2004. with an extension to LCC as indicated in K. Schmidt and C. Breindl, "On Maximal Permissiveness of Hierarchical and Modular Supervisory Control Approaches for Discrete Event Systems," Workshop on Discrete Event Systems, 2008.

The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs. rGenObs must be a deterministic generator. There are no further restrictions on parameters.

Parameters:
rGenObs Low-level generator. It is modified by the algorithm by relabeling transitions and events
rControllableEvents Set of controllable events
rHighAlph Initial abstraction alphabet
rNewHighAlph Modified abstraction alphabet such that the abstraction is an Lm-observer
rMapChangedTrans Maps the original relabeled transitions to the new events

void faudes::calcAbstAlphObsLCC ( vGenerator &  rGenObs,
EventSet &  rControllableEvents,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
map< Transition, Idx > &  rMapChangedTrans 
)

void faudes::calcAbstAlphObsLCC ( cGenerator &  rGenObs,
EventSet &  rHighAlph,
EventSet &  rNewHighAlph,
map< Idx, set< Idx > > &  rMapRelabeledEvents 
)

void faudes::calcBisimulation ( Generator &  rGenOrig,
map< Idx, Idx > &  rMapStateToPartition,
vector< Idx > &  rNewPartitions 
)

void faudes::calcBisimulation ( Generator &  rGenOrig,
map< Idx, Idx > &  rMapStateToPartition,
Generator &  rGenPart,
vector< Idx > &  rNewPartitions 
)

void faudes::calculateDynamicSystemClosedObs ( const vGenerator &  rGen,
EventSet &  rHighAlph,
vGenerator &  rGenDyn 
)

Computation of the dynamic system for Delta_sigma (reachable states after the occurrence of one high-level event).

This function computes the part of the dynamic system that is needed for evaluating the observer algorithm for closed languages.

The alphabet rHighAlph has to be a subset of the alphabet of rGen. rGen must be a deterministic generator. There are no further restrictions on parameters.

Parameters:
rGen Generator for which the dynamic system is computed
rHighAlph Abstraction alphabet
rGenDyn Generator representing the dynamic system

void faudes::calculateDynamicSystemLCC ( const vGenerator &  rGen,
const EventSet &  rControllableEvents,
const EventSet &  rHighAlph,
vGenerator &  rGenDyn 
)

Computation of the dynamic system for Delta_lcc (fulfillment of the local control consistency property).

This function computes the part of the dynamic system that is needed for evaluating the observer algorithm for local control consistency

The alphabet rHighAlph has to be a subset of the alphabet of rGen. rGen must be a deterministic generator. There are no further restrictions on parameters.

Parameters:
rGen Generator for which the dynamic system is computed
rControllableEvents Set of controllable events
rHighAlph Abstraction alphabet
rGenDyn Generator representing the dynamic system

void faudes::calculateDynamicSystemMSA ( const vGenerator &  rGen,
EventSet &  rHighAlph,
vGenerator &  rGenDyn 
)

Computation of the dynamic system for Delta_msa (local fulfillment of the msa-observer property).

This function computes the part of the dynamic system that is needed for evaluating the observer algorithm for msa-observers.

The alphabet rHighAlph has to be a subset of the alphabet of rGen. rGen must be a deterministic generator. There are no further restrictions on parameters.

Parameters:
rGen Generator for which the dynamic system is computed
rHighAlph Abstraction alphabet
rGenDyn Generator representing the dynamic system

void faudes::calculateDynamicSystemObs ( const mtcGenerator rGen,
EventSet rHighAlph,
vGenerator rGenDyn 
)

Computation of the dynamic system for an Lm-observer.

This function computes the dynamic system that is needed for evaluating the observer algorithm.

The alphabet rHighAlph has to be a subset of the alphabet of rGen. rGen must be a deterministic generator. There are no further restrictions on parameters.

Parameters:
rGen Generator for which the dynamic system is computed
rHighAlph Abstraction alphabet
rGenDyn Generator representing the dynamic system

void faudes::calculateDynamicSystemObs ( const vGenerator &  rGen,
EventSet &  rHighAlph,
vGenerator &  rGenDyn 
)

Computation of the dynamic system for Delta_obs (local reachability of a marked state).

This function computes the part of the dynamic system that is needed for evaluating the observer algorithm for marked languages.

The alphabet rHighAlph has to be a subset of the alphabet of rGen. rGen must be a deterministic generator. There are no further restrictions on parameters.

Parameters:
rGen Generator for which the dynamic system is computed
rHighAlph Abstraction alphabet
rGenDyn Generator representing the dynamic system

bool faudes::CheckSplit ( const Generator &  rGenObs,
const EventSet &  rSplitAlphabet,
const std::vector< std::pair< StateSet, Idx > > &  rNondeterministicStates,
Idx  entryState 
)

Check if the current alphabet splits all local automata with nondeterminims or unobservable transitions.

This algorithm verifies if nondetermisisms or unobservable transitions are resolved if the given events in are added to the high-level alphabet. The function is called by ExtendHighAlphabet,

The alphabet rHighAlph has to be a subset of the alphabet of rGenObs. rGenObs must be a deterministic generator. There are no further restrictions on parameters.

Parameters:
rGenObs Low-level generator. It is modified by the algorithm by relabeling transitions and events
rSplitAlphabet Reference to the current alphabet for splitting verification
rNondeterministicStates vector with states where nondeterminism has to be resolved and the related event
entryState current state that is investigated

bool faudes::CheckSplit ( const Generator &  rGen,
const EventSet &  rSplitAlphabet,
const vector< pair< StateSet, Idx > > &  rNondeterministicStates,
Idx  entryState 
)

void faudes::cInvProject ( cGenerator &  rGen,
const cEventSet &  rProjectAlphabet 
)

Inverse projection.

This adds selfloop transition at every state for all missing events. This version sets controllability attributes for inserted transictions from the alphabet argument.

Parameters:
rGen Reference to generator
rProjectAlphabet Alphabet for inverse projection

bool faudes::cIsControllable ( const cGenerator &  rPlantGen,
const vGenerator &  rSupCandGen 
)

Controllability.

Tests whether the candidate supervisor h is controllable w.r.t. the plant g; see IsControllable

Parameters:
rPlantGen Plant g generator
rSupCandGen Supervisor candidate h generator
Exceptions:
Exception Alphabets of generators don't match (id 500) Plant generator nondeterministic (id 501) Specification generator nondeterministic (id 503) Plant & Spec generator nondeterministic (id 504)
Returns:
true / false

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

std::string faudes::CollapsString ( const std::string &  rString,
unsigned int  len = 70 
)

Limit length of string, return head and tail of string.

Parameters:
rString string
len Maximum number of charakters in string (approx)
Returns:
Collapsed string

void faudes::ComposedColorSet ( const mtcGenerator &  rGen1,
const Idx  stdidx1,
ColorSet &  colors1,
const mtcGenerator &  rGen2,
const Idx  stdidx2,
ColorSet &  colors2,
ColorSet &  composedSet 
)

Compose the color set for a state combined from two states in two distinct automata.

Parameters:
rGen1 First mtcGenerator for parallel composition
stdidx1 Index to first mtcGenerator's current state
colors1 Color set of first mtcGenerator
rGen2 Second mtcGenerator for parallel composition
stdidx2 Index to second mtcGenerator's current state
colors2 Color set of second mtcGenerator
composedSet Color set where composition colors will be inserted
Exceptions:
Exception 
  • Index not member of set (id 200)
  • Index not found in set (id 201)

void faudes::ConcatenateFullLanguage ( vGenerator &  rGen  ) 

ConcatenateFullLanguage: concatenate Sigma* to language marked by rGen.

Less expensive than using LanguageConcatenate() to concatenate Sigma*, as no additional nondeterminism is caused. Used in SupNorm(). Method: Transitions starting from marked states are erased. Remaining accessible marked states are provided with Sigma-selfloops. Determinism: Result can be nondeterministic only if parameter is nondeterministic.

Parameters:
rGen generator marking the language to be concatenated with Sigma*

void faudes::ControlProblemConsistencyCheck ( const vGenerator &  rPlantGen,
const EventSet &  rCAlph,
const vGenerator &  rSpecGen 
)

Consistency check for controlproblem input data.

Tests whether alphabets match and generators are deterministic.

Parameters:
rPlantGen Plant generator
rCAlph Controllable events
rSpecGen Specification generator
Exceptions:
Exception 
  • lphabets of generators don't match (id 100)
  • plant generator nondeterministic (id 201)
  • specification generator nondeterministic (id 203)
  • plant and spec generator nondeterministic (id 204)

void faudes::cParallel ( const cGenerator &  rGen1,
const cGenerator &  rGen2,
cGenerator &  rResGen 
)

Parallel composition of accessible states of generators rGen1 and rGen2.

This version will set the resulting generators controllability attributes to represent the union of controllable events of the arguments. When FAUDES_CHECKD is defined, consistency of controllability flags in the argiments is tested.

Computes symbolic state names in rResGen, if symbolic state names are enabled in rGen1 and rGen2 and rResGen

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

void faudes::cProject ( const cGenerator &  rGen,
const EventSet &  rProjectAlphabet,
cGenerator &  rResGen 
)

Minimized (deterministic) projection.

Calls projectnondet, determine and statemin. This version passes on controllability attributes from the argument.

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

void faudes::cProjectNonDet ( cGenerator &  rGen,
const EventSet &  rProjectAlphabet 
)

Language projection, non deterministic.

This convenience definition is equivalent to ProjecNonDet. Controllability attributes from the argument are maintaned anyway.

Parameters:
rGen Reference to generator
rProjectAlphabet Projection alphabet

void faudes::CreateConstraint ( int  mType[5],
Generator &  constrP,
Generator &  constrE 
)

This function creates constraints which describe the condition of completeness and Yp-liveness of a Specification.

The implementation follows the same algorithm as the CreateSpec() function, and has the same limitation: it is only for use with a specific model

Parameters:
mType By the type we specifiy type of the specification to build constraint for
constrP Generator to the resulting operator constraint for the specification
constrE Generator to the resulting environment constraint for the specification

void faudes::CreateEntryStatesMap ( const std::map< StateSet, Idx > &  rRevEntryStatesMap,
std::map< Idx, StateSet > &  rEntryStatesMap 
)

void faudes::CreateSpec ( int  mType[5],
HioPlant &  rHioSpec,
Generator &  constrP,
Generator &  constrE 
)

This function creates new specification given by the type ("xxxxx") Note: The core of this function is a template specification model (SpecCB12.gen).

Based on this model are the specifications created, by simply adding corresponding states and transitions. Hence, for different models, this funcion can not be used directly, but can serve as an example.

Parameters:
mType By the type we specifiy the desired behaviour we want to model
rHioSpec HioPlant referance to the resulting specification (result)
constrP Generator to the resulting operator constraint for the specification
constrE Generator to the resulting environment constraint for the specification

std::string faudes::CreateTempFile ( void   ) 

Create a temp file, length 0.

Returns:
Name of temp file

void faudes::cSupCon ( const cGenerator &  rPlantGen,
const vGenerator &  rSpecGen,
cGenerator &  rResGen 
)

Supremal Controllable Sublanguage.

Finds the "largest" sublanguage of h for that language of g is controllable with respect to h. Note that the language of h is not rtequired to be a a sublanguage of g, but both languages must share the same alphabet.

See "C.G CASSANDRAS AND S. LAFORTUNE. Introduction to Discrete Event Systems. Kluwer, 1999." for base algorithm.

This version creates a "reverse composition map" given as reference parameter.

Parameters:
rPlantGen Plant Generator
rSpecGen Specification Generator
rResGen Reference to resulting Generator, the minimal restrictive supervisor
Exceptions:
Exception Alphabets of generators don't match (id 100) plant nondeterministic (id 201) spec nondeterministic (id 203) plant and spec nondeterministic (id 204)

void faudes::cSupConNB ( const cGenerator &  rPlantGen,
const vGenerator &  rSpecGen,
cGenerator &  rResGen 
)

Nonblocking Supremal Controllable Sublanguage.

Computes the supremal sublanguage of the specification h that is controllable w.r.t. the plant g. The result is given as a trim deterministic generator that may be used to supervise g in order to enforce h.

See "C.G CASSANDRAS AND S. LAFORTUNE. Introduction to Discrete Event Systems. Kluwer, 1999." for base algorithm.

This implementation does not require h to be a sublanguage of g. However, both generators must be deterministic and share the same alphabet. Controllable events are extracted from the plant parameter, and copied to the result.

Parameters:
rPlantGen Plant cGenerator
rSpecGen Specification Generator
rResGen Reference to resulting Generator, the minimal restrictive nonblocking supervisor
Exceptions:
Exception Alphabets of generators don't match (id 100) plant nondeterministic (id 201) spec nondeterministic (id 203) plant and spec nondeterministic (id 204)

std::ostream * faudes::DebugStream ( void   ) 

Get debugging stream.

Returns:
Debugging Output Stream

void faudes::DebugToFile ( const std::string &  rFileName = "tmp_faudes_debug.log"  ) 

Set filename for debug log.

Debugging to file is meant for platforms that dont provide a console for std::err (eg embedded systems); see also FAUDES_WRITE_STDERR makro in definitions.

Parameters:
rFileName File to log to

void faudes::DebugToStream ( std::ostream *  pStream  ) 

Set stream for debug log.

Parameters:
pStream Stream to log to

void faudes::Deterministic ( const mtcGenerator &  rGen,
std::vector< StateSet > &  rPowerStates,
std::vector< Idx > &  rDetStates,
mtcGenerator &  rResGen 
)

Make generator deterministic.

(real function)

Second and third parameter hold the subsets + deterministic states in vectors

The multiway merge algorithm is based on a propsal in "Ted Leslie, Efficient Approaches to Subset Construction, Computer Science, University of Waterloo, 1995"

Parameters:
rGen Reference to generator
rPowerStates Vector that holds the power states
rDetStates Vector that holds the corresponding deterministic states
rResGen Reference to resulting deterministic generator

void faudes::Deterministic ( const mtcGenerator &  rGen,
std::map< Idx, StateSet > &  rEntryStatesMap,
mtcGenerator &  rResGen 
)

Make generator deterministic.

(function wrapper)

The second parameter is an empty std::map<Idx,StateSet> which holds all the pairs of new states and their respective power states set. This is used as a so called "entry state map" for deterministic projected generators.

Parameters:
rGen Reference to generator
rEntryStatesMap Entry state map
rResGen Reference to resulting deterministic generator

void faudes::Deterministic ( const vGenerator &  rGen,
std::vector< StateSet > &  rPowerStates,
std::vector< Idx > &  rDetStates,
vGenerator &  rResGen 
)

Make generator deterministic.

Constructs a deterministic generator while preserving the generated and marked languages. See Deterministic(const vGenerator&,vGenerator& rResGen) for the intended api. This version provides as second and third parameters the correspondence betwwen new states and the original state sets. in vectors

Parameters:
rGen Reference to generator
rPowerStates Vector that holds the power states
rDetStates Vector that holds the corresponding deterministic states
rResGen Reference to resulting deterministic generator

void faudes::Deterministic ( const vGenerator &  rGen,
std::map< Idx, StateSet > &  rEntryStatesMap,
vGenerator &  rResGen 
)

Make generator deterministic.

Constructs a deterministic generator while preserving the generated and marked languages. See Deterministic(const vGenerator&,vGenerator& rResGen) for the intended api. This version provides as a second parameter the resulting map from new states to their respective original state set. It is used as a so called "entry state map" for deterministic projected generators.

Parameters:
rGen Reference to generator
rEntryStatesMap Entry state map
rResGen Reference to resulting deterministic generator

void faudes::EmptyLanguage ( const vGenerator &  rGen,
bool &  rRes 
)

std::string faudes::ExpandString ( const std::string &  rString,
unsigned int  len 
)

Fill string with spaces up to a given length if length of the string is smaller than given length parameter.

Parameters:
rString string
len Minimum number of charakters in string
Returns:
Expanded string

void faudes::ExtendHighAlphabet ( const vGenerator &  rGen,
EventSet &  rHighAlph,
map< Idx, Idx > &  rMapStateToPartition 
)

std::string faudes::ExtractPath ( const std::string &  rFullName  ) 

Extract directory from full filename.

Parameters:
rFullName Full name of filr eg "/home/friend/data/generator.gen"
Returns:
Directory eg "/home/friend/data"

std::string faudes::FDContributorsString (  ) 

Return contributors as std::string.

Returns:
std::string

std::string faudes::FDPluginsString (  ) 

Return FAUDES_PLUGINS as std::string.

Returns:
std::string with FAUDES_VERSION

std::string faudes::FDVersionString (  ) 

Return FAUDES_VERSION as std::string.

Returns:
std::string with FAUDES_VERSION

void faudes::GroupHioModules ( const std::vector< HioModule * > &  rChildren,
HioModule &  rParentModule 
)

GroupHioModules: This function groups two or more HioModules to a new HioModule.

The new HioModule represents the uncontrolled behaviour of the composed HioModules.

Parameters:
rChildren vector of HioModules to group
rParentModule resulting HioModule

void faudes::HioSynth_Musunoi ( const Generator &  rPlant,
const HioPlant &  rSpec,
const Generator &  rConstr,
const Generator &  rLocConstr,
const EventSet &  rYp,
const EventSet &  rUp,
Generator &  rController 
)

void faudes::insertRelabeledEvents ( cGenerator &  rGenPlant,
const std::map< Idx, std::set< Idx > > &  rMapRelabeledEvents 
)

Convenience function for relabeling events in a given generator.

This function inserts new events and respective transitions given by a relableing map into a given generator. The function is used to adjust plant components to the rtelableing from another plant component.

There are no restrictions on parameters.

Parameters:
rGenPlant Plant component automaton
rMapRelabeledEvents maps the original events to sets of newly introduced events

void faudes::insertRelabeledEvents ( cGenerator &  rGenPlant,
const std::map< Idx, std::set< Idx > > &  rMapRelabeledEvents,
cEventSet &  rNewEvents 
)

Convenience function for relabeling events in a given generator.

This function inserts new events and respective transitions given by a relableing map into a given generator. The function is used to adjust plant components to the rtelableing from another plant component.

There are no restrictions on parameters.

Parameters:
rGenPlant Plant component automaton
rMapRelabeledEvents Maps the original events to sets of newly introduced events
rNewEvents returns the newly inserted events (accumulative, call clear before)

void faudes::insertRelabeledEvents ( cGenerator &  rGenPlant,
const EventRelabelMap &  rMapRelabeledEvents 
)

Rti convenience wrapper.

void faudes::insertRelabeledEvents ( cGenerator &  rGenPlant,
const EventRelabelMap &  rMapRelabeledEvents,
cEventSet &  rNewEvents 
)

Rti convenience wrapper.

void faudes::insertRelabeledEvents ( cGenerator &  rGenPlant,
const map< Idx, set< Idx > > &  rMapRelabeledEvents 
)

void faudes::insertRelabeledEvents ( cGenerator &  rGenPlant,
const map< Idx, set< Idx > > &  rMapRelabeledEvents,
cEventSet &  rNewEvents 
)

void faudes::IntegerSum ( const Integer &  arg1,
const Integer &  arg2,
Integer &  res 
)

void faudes::InvProject ( vGenerator &  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

void faudes::IoShuffle_Musunoi ( const HioPlant &  rPlantA,
const HioPlant &  rPlantB,
int  depth,
Generator &  rIOShuffAB 
)

void faudes::IoStatePartition ( HioPlant &  rPlant  ) 

Function definition for run-time interface.

Parameters:
rPlant HioPlant

void faudes::IoStatePartition ( HioEnvironment &  rEnvironment  ) 

Function definition for run-time interface.

Parameters:
rEnvironment HioEnvironment

void faudes::IoStatePartition ( HioController &  rController  ) 

Function definition for run-time interface.

Parameters:
rController HioController

void faudes::IoStatePartition ( HioConstraint &  rConstraint  ) 

Function definition for run-time interface.

Parameters:
rConstraint HioConstraint

bool faudes::IsComplete ( const Generator &  rGen  ) 

IsComplete: checks if language generated by rGen is complete.

Method: accessible states are tested for empty active event set;

Parameters:
rGen generator of language that is tested for completeness
Returns:
true if generated language is complete

bool faudes::IsComplete ( const Generator &  rGen,
StateSet &  rDeadStates 
)

IsComplete: checks if language generated by rGen is complete.

Method: all accessible states are tested for empty active event set. Found states (dead ends) are stored in rDeadStates. Note: the generated, but not the marked language is investigated.

Parameters:
rGen generator of language that is tested for completeness
rDeadStates set of accessible states with empty active event set
Returns:
true if generated language is complete

void faudes::IsControllable ( const vGenerator &  rPlantGen,
const EventSet &  rCAlph,
const vGenerator &  rSupCandGen,
bool &  rRes 
)

IsControllable wrapper.

Wrapper for convenient access via the run-time interface.

bool faudes::IsControllableUnchecked ( const mtcGenerator &  rPlantGen,
const mtcGenerator &  rSpecGen,
const EventSet &  rUAlph,
StateSet &  forbidden 
)

bool faudes::IsControllableUnchecked ( const vGenerator &  rPlantGen,
const EventSet &  rCAlph,
const vGenerator &  rSpecGen,
StateSet &  rCriticalStates 
)

Controllability (internal function).

Checks if language of specification h is controllable with respect to language of generator g. Only for deterministic plant + spec.

Controllable event set has to be given as parameter. Returns the set of critical states as last parameter.

Parameters:
rPlantGen Plant generator
rCAlph Controllable events
rSpecGen Specification generator
rCriticalStates Set of critical states
Exceptions:
Exception 
  • alphabets of generators don't match (id 100)
  • plant generator nondeterministic (id 201)
  • specification generator nondeterministic (id 203)
  • plant & spec generator nondeterministic (id 204)
Returns:
true / false

void faudes::IsIoConstraintForm ( HioConstraint &  rHioConstraint,
bool &  rRes 
)

Function definition for run-time interface.

bool faudes::IsIoConstraintForm ( HioConstraint &  rHioConstraint  ) 

IsIoConstraintForm: check if rHioConstraint is in I/O-constraint form and assign state attributes.

This function tests if rHioConstraint meets the I/O-constraint form that has been formally defined by S.Perk. If so, then the alphabet of and the language marked by rHioConstraint formally describe an I/O constraint. During the test, the HioStateFlags are set according to the active event set or the respective state, for example: The QY flag is assigned to a state if its active eventset is a subset of the Y-Alphabet. The assignment of HioStateFlags is complete only if IsIoConstraintForm() returns true. Method: all conditions of the formal I/O-constraint form definition are checked individually. If crucial conditions are violated, the test of remaining conditions is omitted.

Parameters:
rHioConstraint HioConstraint to check, HioStateFlags are set
Returns:
true if rHioConstraint is in I/O-constraint form

bool faudes::IsIoConstraintForm ( HioConstraint &  rHioConstraint,
std::string &  ReportStr 
)

IsIoConstraintForm: check if rHioConstraint is in I/O-constraint form and assign state attributes.

This function tests if rHioConstraint meets the I/O-constraint form that has been formally defined by S.Perk. If so, then the alphabet of and the language marked by rHioConstraint formally describe an I/O constraint. During the test, the HioStateFlags are set according to the active event set or the respective state, for example: The QY flag is assigned to a state if its active eventset is a subset of the Y-Alphabet. The assignment of HioStateFlags is complete only if IsIoConstraintForm() returns true. Method: all conditions in the formal I/O-constraint form definition are checked individually. If crucial conditions are violated, the test of remaining conditions is omitted.

Parameters:
rHioConstraint HioConstraint to check, HioStateFlags are set
ReportStr Information about test results
Returns:
true if rHioConstraint is in I/O-constraint form

bool faudes::IsIoConstraintForm ( HioConstraint &  rHioConstraint,
StateSet &  rQY,
StateSet &  rQU,
EventSet &  rErrEvSet,
TransSet &  rErrTrSet,
StateSet &  rErrStSet,
std::string &  ReportStr 
)

IsIoConstraintForm: check if rHioConstraint is in I/O-constraint form and assign state attributes.

This function tests if rHioConstraint meets the I/O-constraint form that has been formally defined by S.Perk. If so, then the alphabet of and the language marked by rHioConstraint formally describe an I/O constraint. During the test, the HioStateFlags are set according to the active event set or the respective state, for example: The QY flag is assigned to a state if its active eventset is a subset of the Y-Alphabet. The assignment of HioStateFlags is complete only if IsIoConstraintForm() returns true. Method: all conditions in the formal I/O-constraint form definition are checked individually. If crucial conditions are violated, the test of remaining conditions is omitted.

Parameters:
rHioConstraint HioConstraint to check, HioStateFlags are set
rQY State set containing all QY states
rQU State set containing all QU states
rErrEvSet Event set for possible 'bad' events
rErrTrSet Event set for possible 'bad' transition relations
rErrStSet Event set for possible 'bad' states
ReportStr Information about test results
Returns:
true if rHioConstraint is in I/O-constraint form

void faudes::IsIoControllerForm ( HioController &  rHioController,
bool &  rRes 
)

Function definition for run-time interface.

bool faudes::IsIoControllerForm ( HioController &  rHioController  ) 

IsIoControllerForm: check if rHioController is in I/O-controller form and assign state attributes.

This function tests if rHioController meets the I/O-controller form that has been formally defined by S.Perk. If so, then the alphabet of and the language marked by rHioController formally describe an I/O controller. During the test, the HioStateFlags are set according to the active event set or the respective state, for example: The QYcUp flag is assigned to a state if its active eventset is a subset of the union of the YC- and the UP-Alphabet. The assignment of HioStateFlags is complete only if IsIoControllerForm() returns true. Method: all conditions of the formal I/O-controller form definition are checked individually. If crucial conditions are violated, the test of remaining conditions is omitted.

Parameters:
rHioController HioController to check, HioStateFlags are set
Returns:
true if rHioController is in I/O-controller form

bool faudes::IsIoControllerForm ( HioController &  rHioController,
std::string &  ReportStr 
)

IsIoControllerForm: check if rHioController is in I/O-controller form and assign state attributes.

This function tests if rHioController meets the I/O-controller form that has been formally defined by S.Perk. If so, then the alphabet of and the language marked by rHioController formally describe an I/O controller. During the test, the HioStateFlags are set according to the active event set or the respective state, for example: The QYcUp flag is assigned to a state if its active eventset is a subset of the union of the YC- and the UP-Alphabet. The assignment of HioStateFlags is complete only if IsIoControllerForm() returns true. Method: all conditions in the formal I/O-controller form definition are checked individually. If crucial conditions are violated, the test of remaining conditions is omitted.

Parameters:
rHioController HioController to check, HioStateFlags are set
ReportStr Information about test results
Returns:
true if rHioController is in I/O-controller form

bool faudes::IsIoControllerForm ( HioController &  rHioController,
StateSet &  rQUc,
StateSet &  rQYP,
StateSet &  rQUp,
StateSet &  rQYcUp,
EventSet &  rErrEvSet,
TransSet &  rErrTrSet,
StateSet &  rErrStSet,
std::string &  ReportStr 
)

IsIoControllerForm: check if rHioController is in I/O-controller form and assign state attributes.

This function tests if rHioController meets the I/O-controller form that has been formally defined by S.Perk. If so, then the alphabet of and the language marked by rHioController formally describe an I/O controller. During the test, the HioStateFlags are set according to the active event set or the respective state, for example: The QYcUp flag is assigned to a state if its active eventset is a subset of the union of the YC- and the UP-Alphabet. The assignment of HioStateFlags is complete only if IsIoControllerForm() returns true. Method: all conditions in the formal I/O-controller form definition are checked individually. If crucial conditions are violated, the test of remaining conditions is omitted.

Parameters:
rHioController HioController to check, HioStateFlags are set
rQUc State set containing all QUc states
rQYP State set containing all QYP states
rQUp State set containing all QUp states
rQYcUp State set containing all QYcUp states
rErrEvSet Event set for possible 'bad' events
rErrTrSet Event set for possible 'bad' transition relations
rErrStSet Event set for possible 'bad' states
ReportStr Information about test results
Returns:
true if rHioController is in I/O-controller form

void faudes::IsIoEnvironmentForm ( HioEnvironment &  rHioEnvironment,
bool &  rRes 
)

Function definition for run-time interface.

bool faudes::IsIoEnvironmentForm ( HioEnvironment &  rHioEnvironment  ) 

IsIoEnvironmentForm: check if rHioEnvironment is in I/O-environment form and assign state attributes.

This function tests if rHioEnvironment meets the I/O-environment form that has been formally defined by S.Perk. If so, then the alphabet of and the language marked by rHioEnvironment formally describe an I/O environment. During the test, the HioStateFlags are set according to the active event set or the respective state, for example: The QYlUe flag is assigned to a state if its active eventset is a subset of the union of the YL- and the UE-Alphabet. The assignment of HioStateFlags is complete only if IsIoEnvironmentForm() returns true. Method: all conditions of the formal I/O-environment form definition are checked individually. If crucial conditions are violated, the test of remaining conditions is omitted.

Parameters:
rHioEnvironment HioEnvironment to check, HioStateFlags are set
Returns:
true if rHioEnvironment is in I/O-environment form

bool faudes::IsIoEnvironmentForm ( HioEnvironment &  rHioEnvironment,
std::string &  ReportStr 
)

IsIoEnvironmentForm: check if rHioEnvironment is in I/O-environment form and assign state attributes.

This function tests if rHioEnvironment meets the I/O-environment form that has been formally defined by S.Perk. If so, then the alphabet of and the language marked by rHioEnvironment formally describe an I/O environment. During the test, the HioStateFlags are set according to the active event set or the respective state, for example: The QYlUe flag is assigned to a state if its active eventset is a subset of the union of the YL- and the UE-Alphabet. The assignment of HioStateFlags is complete only if IsIoEnvironmentForm() returns true. Method: all conditions in the formal I/O-environment form definition are checked individually. If crucial conditions are violated, the test of remaining conditions is omitted.

Parameters:
rHioEnvironment HioEnvironment to check, HioStateFlags are set
ReportStr Information about test results
Returns:
true if rHioEnvironment is in I/O-environment form

bool faudes::IsIoEnvironmentForm ( HioEnvironment &  rHioEnvironment,
StateSet &  rQYe,
StateSet &  rQUe,
StateSet &  rQUl,
StateSet &  rQYlUe,
EventSet &  rErrEvSet,
TransSet &  rErrTrSet,
StateSet &  rErrStSet,
std::string &  ReportStr 
)

IsIoEnvironmentForm: check if rHioEnvironment is in I/O-environment form and assign state attributes.

This function tests if rHioEnvironment meets the I/O-environment form that has been formally defined by S.Perk. If so, then the alphabet of and the language marked by rHioEnvironment formally describe an I/O environment. During the test, the HioStateFlags are set according to the active event set or the respective state, for example: The QYlUe flag is assigned to a state if its active eventset is a subset of the union of the YL- and the UE-Alphabet. The assignment of HioStateFlags is complete only if IsIoEnvironmentForm() returns true. Method: all conditions in the formal I/O-environment form definition are checked individually. If crucial conditions are violated, the test of remaining conditions is omitted.

Parameters:
rHioEnvironment HioEnvironment to check, HioStateFlags are set
rQYe State set containing all QYe states
rQUe State set containing all QUe states
rQUl State set containing all QUl states
rQYlUe State set containing all QYlUe states
rErrEvSet Event set for possible 'bad' events
rErrTrSet Event set for possible 'bad' transition relations
rErrStSet Event set for possible 'bad' states
ReportStr Information about test results
Returns:
true if rHioEnvironment is in I/O-environment form

void faudes::IsIoPlantForm ( HioPlant &  rHioPlant,
StateSet &  rQYpYe,
StateSet &  rQUp,
StateSet &  rQUe,
EventSet &  rErrEvSet,
TransSet &  rErrTrSet,
StateSet &  rErrStSet,
bool &  rRes,
std::string &  ReportStr 
)

Function definition for run-time interface.

void faudes::IsIoPlantForm ( HioPlant &  rHioPlant,
bool &  rRes,
std::string &  rReport 
)

Function definition for run-time interface.

void faudes::IsIoPlantForm ( HioPlant &  rHioPlant,
bool &  rRes 
)

Function definition for run-time interface.

bool faudes::IsIoPlantForm ( HioPlant &  rHioPlant  ) 

IsIoPlantForm: check if rHioPlant is in I/O-plant form and assign state attributes.

This function tests if rHioPlant meets the I/O-plant form that has been formally defined by S.Perk. If so, then the alphabet of and the language marked by rHioPlant formally describe an I/O plant. During the test, the HioStateFlags are set according to the active event set or the respective state, for example: The QYpYe flag is assigned to a state if its active eventset is a subset of the union of the YP- and the YE-Alphabet. The assignment of HioStateFlags is complete only if IsIoPlantForm() returns true. Method: all conditions of the formal I/O-plant form definition are checked individually. If crucial conditions are violated, the test of remaining conditions is omitted.

Parameters:
rHioPlant HioPlant to check, HioStateFlags are set
Returns:
true if rHioPlant is in I/O-plant form

bool faudes::IsIoPlantForm ( HioPlant &  rHioPlant,
std::string &  ReportStr 
)

IsIoPlantForm: check if rHioPlant is in I/O-plant form and assign state attributes.

This function tests if rHioPlant meets the I/O-plant form that has been formally defined by S.Perk. If so, then the alphabet of and the language marked by rHioPlant formally describe an I/O plant. During the test, the HioStateFlags are set according to the active event set or the respective state, for example: The QYpYe flag is assigned to a state if its active eventset is a subset of the union of the YP- and the YE-Alphabet. The assignment of HioStateFlags is complete only if IsIoPlantForm() returns true. Method: all conditions in the formal I/O-plant form definition are checked individually. If crucial conditions are violated, the test of remaining conditions is omitted.

Parameters:
rHioPlant HioPlant to check, HioStateFlags are set
ReportStr Information about test results
Returns:
true if rHioPlant is in I/O-plant form

bool faudes::IsIoPlantForm ( HioPlant &  rHioPlant,
StateSet &  rQYpYe,
StateSet &  rQUp,
StateSet &  rQUe,
EventSet &  rErrEvSet,
TransSet &  rErrTrSet,
StateSet &  rErrStSet,
std::string &  ReportStr 
)

IsIoPlantForm: check if rHioPlant is in I/O-plant form and assign state attributes.

This function tests if rHioPlant meets the I/O-plant form that has been formally defined by S.Perk. If so, then the alphabet of and the language marked by rHioPlant formally describe an I/O plant. During the test, the HioStateFlags are set according to the active event set or the respective state, for example: The QYpYe flag is assigned to a state if its active eventset is a subset of the union of the YP- and the YE-Alphabet. The assignment of HioStateFlags is complete only if IsIoPlantForm() returns true. Method: all conditions in the formal I/O-plant form definition are checked individually. If crucial conditions are violated, the test of remaining conditions is omitted.

Parameters:
rHioPlant HioPlant to check, HioStateFlags are set
rQYpYe State set containing all QYpYe states
rQUp State set containing all QUp states
rQUe State set containing all QUe states
rErrEvSet Event set for possible 'bad' events
rErrTrSet Event set for possible 'bad' transition relations
rErrStSet Event set for possible 'bad' states
ReportStr Information about test results
Returns:
true if rHioPlant is in I/O-plant form

void faudes::IsLCC ( const cGenerator &  rLowGen,
const EventSet &  rHighAlph,
bool  rRes 
)

Rti convenience wrapper.

Verification of local control consistency (LCC).

Rti wrapper.

Parameters:
rLowGen Input cGenerator
rHighAlph High level alphabet
rRes Return True if LCC holds

bool faudes::IsLCC ( const Generator &  rLowGen,
const EventSet &  rControllableEvents,
const EventSet &  rHighAlph 
)

Verification of local control consistency (LCC).

For verifying if a natural projection fulfills the local control consistency condition, a backward reachability is conducted. If starting from a state, where an uncontrollable high-level event is feasible, at least one local state cannot be reached by an uncontrollable path, LCC is violated.

Parameters:
rLowGen Input generator
rControllableEvents set of controllable events
rHighAlph High level alphabet
Returns:
true if LCC holds

bool faudes::IsMTCObs ( const mtcGenerator rLowGen,
const EventSet rHighAlph 
)

Verification of the observer property.

For verifying if a natural projection has the observer property, one step in the observer algorithm is evaluated. If the resulting generator equals the input generator, then the natural projection on the abstraction alphabet is an observer.

Parameters:
rLowGen Input generator
rHighAlph High level alphabet
Returns:
true if the observer property holds

bool faudes::IsNormal ( const Generator &  rK,
const Generator &  rL,
const EventSet &  rOAlph 
)

IsNormal: checks normality of a language K generated by rK wrt a language L generated by rL and the subset of observable events rOAlph.

This is done by checking if the following equality holds: pinv(p(K)) intersect L = K todo(?): check for efficient algorithm replacing above formula that returns false immediately after having found a non-normal string -> IsNormalFast() todo: implement test routines, verify correctness todo: compare speed with IsNormalAlt

Parameters:
rK generator of language K
rL generator of language L
rOAlph observable alphabet
Returns:
true if K is normal w.r.t. L and OAlph
Exceptions:
Exception 

bool faudes::IsNormalAlt ( const Generator &  rK,
const Generator &  rL,
const EventSet &  rOAlph 
)

IsNormalAlt: Alternative implementation of IsNormal().

using parallel composition instead of invProject and set intersection. Checks normality of a language K generated by rK w.r.t. a language L generated by rL and the subset of observable events rOAlph. This is done by checking if the following equality holds: p(K) || L = K todo(?): check for efficient algorithm replacing above formula that returns false immediately after having found a non-normal string -> IsNormalFast() todo: implement test routines, verify correctness todo: compare speed with IsNormal

Parameters:
rK generator of language K
rL generator of language L
rOAlph observable alphabet
Returns:
true if K is normal w.r.t. L and the observable alphabet
Exceptions:
Exception 

void faudes::IsObs ( const cGenerator &  rLowGen,
const EventSet &  rHighAlph,
bool  rRes 
)

Rti convenience wrapper.

Verification of the observer property.

Rti wrapper.

Parameters:
rLowGen Input cGenerator
rHighAlph High level alphabet
rRes Return True if LCC holds

bool faudes::IsOCC ( const Generator &  rLowGen,
const EventSet &  rControllableEvents,
const EventSet &  rHighAlph 
)

Verification of output control consistency (OCC).

For verifying if a natural projection fulfills the output control consistency condition, a backward reachability is conducted. If starting from a state, where an uncontrollable high-level event is feasible, a controllable event can be reached on a local backward path, OCC is violated.

Parameters:
rLowGen Input generator
rControllableEvents set of controllable events
rHighAlph High level alphabet
Returns:
true if OCC holds

void faudes::LanguageDisjoint ( const vGenerator &  rGen1,
const vGenerator &  rGen2,
bool &  rRes 
)

Run-time interface wrappers.

void faudes::LanguageEquality ( const vGenerator &  rGen1,
const vGenerator &  rGen2,
bool &  rRes 
)

void faudes::LanguageInclusion ( const vGenerator &  rGen1,
const vGenerator &  rGen2,
bool &  rRes 
)

void faudes::LocalAccessibleReach ( const vGenerator &  rLowGen,
const EventSet &  rHighAlph,
Idx  lowState,
StateSet &  rAccessibleReach 
)

Compute the accessible reach for a local automaton.

Parameters:
rLowGen Low level generator
rHighAlph High level alphabet
lowState Low level entry state
rAccessibleReach Result

void faudes::LocalCoaccessibleReach ( const TransSetX2EvX1 &  rRevTransRel,
const EventSet &  rHighAlph,
Idx  lowState,
StateSet &  rCoaccessibleReach 
)

Compute the coaccessible reach for a local automaton.

Parameters:
rRevTransRel Reverse sorted transition relation
rHighAlph High level alphabet
lowState Low level exit state
rCoaccessibleReach Result

void faudes::LowExitStates ( const EventSet &  rHighAlph,
const std::map< Idx, StateSet > &  rEntryStatesMap,
const TransSetX2EvX1 &  rLowRevTransRel,
Idx  highState,
StateSet &  rLowExitStates 
)

LowExitStates call-by-reference function:.

Compute the low level exit states for a corresponding hi level state

Parameters:
rHighAlph High level events
rEntryStatesMap Entry states map (see CreateEntryStatesMap(resmap))
rLowRevTransRel Reverse sorted low level transition relation
highState Hi level state for which to compute low level exit states
rLowExitStates Reference to StateSet for low level exit states (result)
Exceptions:
Exception Hi level state not found in entry states map (with FAUDES_CHECKED)

StateSet faudes::LowExitStates ( const vGenerator &  rLowGen,
const EventSet &  rHighAlph,
const std::map< Idx, StateSet > &  rEntryStatesMap,
const TransSetX2EvX1 &  rLowRevTransRel,
Idx  highState 
)

LowExitStates return-copy function:.

Wrapper for the corresponding call-by-reference function. Creates new StateSet, calls function and returns StateSet containing low level exit states.

Parameters:
rLowGen Low level generator (just needed for determining statetable)
rHighAlph High level events
rEntryStatesMap Entry states map (see CreateEntryStatesMap(resmap))
rLowRevTransRel Reverse sorted low level transition relation
highState Hi level state for which to compute low level exit states
Exceptions:
Exception Hi level state not found in entry states map (with FAUDES_CHECKED) (id 502)

bool faudes::MutualControllability ( const cGenerator &  rGen1,
const cGenerator &  rGen2,
StateSet &  rForbidden1,
StateSet &  rForbidden2 
)

Verification of mutual controllability.

This function checks if two generators are mutually controllable w.r.t. each other. Additionally, this function provides the states where mutual controllability fails in case the condition is violated.

Parameters:
rGen1 Generator 1
rGen2 Generator 2
rForbidden1 Forbidden states in Generator 1
rForbidden2 Forbidden states in Generator 2
Returns:
True if mutual controllability is fulfilled

void faudes::NormalityConsistencyCheck ( const Generator &  rK,
const Generator &  rL,
const EventSet &  rOAlph 
)

NormalityConsistencyCheck: Consistency check for normality input data.

Used e.g. in IsNormal(), IsNormalAlt() and SupNorm(). See exceptions.

Parameters:
rK generator of language K
rL generator of language L
rOAlph observable alphabet
Exceptions:
Exception 
  • nondeterministic parameter(s) (id: 101)
  • rOAlph not subset of rL.Alphabet() (id: 100)
  • Alphabets of generators don't match (id: 100)
  • K is not subset of L (id 0)

void faudes::Parallel ( const mtcGenerator &  rGen1,
const mtcGenerator &  rGen2,
std::map< std::pair< Idx, Idx >, Idx > &  rReverseCompositionMap,
mtcGenerator &  rResGen 
)

Parallel composition of two mtcGenerators.

Parameters:
rGen1 First mtcGenerator for parallel composition
rGen2 Second mtcGenerator for parallel composition
rReverseCompositionMap 
rResGen Generator in which the result of the parallel composition is saved

void faudes::Parallel ( const vGenerator &  rGen1,
const vGenerator &  rGen2,
std::map< std::pair< Idx, Idx >, Idx > &  rReverseCompositionMap,
vGenerator &  rResGen 
)

Parallel composition.

See Parallel(const vGenerator&, const vGenerator&, vGenerator&). This version fills given reverse composition map to map pairs of old states to new states.

Parameters:
rGen1 First generator
rGen2 Second generator
rReverseCompositionMap Reverse composition map (map< pair<Idx,Idx>, Idx>)
rResGen Reference to resulting parallel composition generator

std::string faudes::PrependPath ( const std::string &  rPathName,
const std::string &  rFileName 
)

Construct full name from directory and filename.

Parameters:
rPathName Directory eg "/home/friend/data"
rFileName File eg "generator.gen"
Returns:
Path eg "/home/friend/data/generator.gen"

void faudes::ProcessDot ( const std::string &  rDotFile,
const std::string &  rOutFile,
const std::string &  rOutFormat = "",
const std::string &  rDotExec = "dot" 
)

Convenience function: process dot file to graphics output.

If no output format is given, try to guess from filename extension.

Parameters:
rDotFile name of dot file
rOutFile name of graphics file
rOutFormat graphics format eg "png", "jpg"
rDotExec path/name of executable
Exceptions:
Exception 
  • error in systemcall (id 3)
  • unkown format (id 3)

void faudes::Project ( const mtcGenerator &  rGen,
const EventSet &  rProjectAlphabet,
std::map< Idx, StateSet > &  rEntryStatesMap,
mtcGenerator &  rResGen 
)

Minimized Deterministic projection.

Does not modify generator. Calls project, determine and statemin. See functions for details.

Parameters:
rGen Reference to generator
rProjectAlphabet Projection alphabet
rEntryStatesMap Reference to entry states map, see Deterministic(..) (result)
rResGen Reference to resulting deterministic generator (result)

void faudes::Project ( const vGenerator &  rGen,
const EventSet &  rProjectAlphabet,
std::map< Idx, StateSet > &  rEntryStatesMap,
vGenerator &  rResGen 
)

Minimized Deterministic projection.

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

Parameters:
rGen Reference to generator
rProjectAlphabet Projection alphabet
rEntryStatesMap Reference to entry states map, see Deterministic(..) (result)
rResGen Reference to resulting deterministic generator (result)

void faudes::ReachableEvents ( const vGenerator &  rLowGen,
const EventSet &  rHighAlph,
Idx  lowState,
EventSet &  rReachableEvents 
)

ReachableEvents call-by-reference function:.

Compute the set of hi level events which can be reached from a low level state. Resulting set will be cleared first.

Parameters:
rLowGen Low level generator
rHighAlph High level alphabet
lowState Low level state
rReachableEvents Reference to EventSet which will contain the reachable high level events (result)

EventSet faudes::ReachableEvents ( const vGenerator &  rLowGen,
const EventSet &  rHighAlph,
Idx  lowState 
)

ReachableEvents return-copy function:.

Wrapper for the corresponding call-by-reference function. Creates new EventSet, calls function and returns EventSet containing the reachable hi level events.

Parameters:
rLowGen Low level generator
rHighAlph High level alphabet
lowState Low level state

void faudes::rec_OptimalColorSet ( const mtcGenerator rGen,
const vector< Idx > &  rColorVector,
Idx  colorNumber,
ColorSet rOptimalColors,
Idx &  rOptimalNumberStates,
Idx &  rOptimalNumberColors,
const EventSet rHighAlph,
EventSet rOptimalHighAlph 
)

Recursively find an optimal set of colors to be removed.

This function recursively enumerates all possible subsets of colors that can be removed without affecting supervisor synthesis and remembers the color set that leads to the smallest hierarchical abstraction. It is called by the function OptimalColorSet.

Parameters:
rGen input colored marking generator
rColorVector set of colors of the generator (ordered!)
colorNumber number of colors currently removed
rOptimalColors current optimal set of colors
rOptimalNumberStates current optimal number of states
rOptimalNumberColors size of the optimal color set
rHighAlph initial high-level alphabet
rOptimalHighAlph optimal high-level alphabet

void faudes::recursiveCheckLCC ( const TransSetX2EvX1 &  rRevTransSet,
const EventSet &  rControllableEvents,
const EventSet &  rHighAlph,
Idx  currentState,
StateSet &  rDoneStates 
)

Find states that fulfill the lcc condition.

This function performs a backward reachability computation to determine states where the lcc condition is fulfilled

The alphabet rHighAlph has to be a subset of the alphabet of rGen. rGen must be a deterministic generator. There are no further restrictions on parameters.

Parameters:
rRevTransSet Reversely ordered transition relation
rControllableEvents Set of controllable events
rHighAlph Abstraction alphabet
currentState Index of the start state of the backward reachability computation
rDoneStates Set of already investigated states
Returns:
True if the condition is fulfilled, false otherwise

bool faudes::recursiveCheckMSABackward ( const vGenerator &  rGen,
const TransSetX2EvX1 &  rRevTransSet,
const EventSet &  rHighAlph,
Idx  currentState,
StateSet &  rDoneStates 
)

Check if the msa-observer conditions is fulfilled for a given state.

This function performs a backward reachability computation to determine if the msa-observer condition is fulfilled for a given state.

The alphabet rHighAlph has to be a subset of the alphabet of rGen. rGen must be a deterministic generator. There are no further restrictions on parameters.

Parameters:
rGen Generator for which the dynamic system is computed
rRevTransSet Reversely ordered transition relation
rHighAlph Abstraction alphabet
currentState Index of the state to be checked
rDoneStates Set of already investigated states
Returns:
True if the condition is fulfilled, false otherwise

bool faudes::recursiveCheckMSAForward ( const vGenerator &  rGen,
const EventSet &  rHighAlph,
Idx  currentState,
StateSet &  rDoneStates 
)

Check if the msa-observer conditions is fulfilled for a given state.

This function performs a forward reachability computation to determine if the msa-observer condition is fulfilled for a given state.

The alphabet rHighAlph has to be a subset of the alphabet of rGen. rGen must be a deterministic generator. There are no further restrictions on parameters.

Parameters:
rGen Generator for which the dynamic system is computed
rHighAlph Abstraction alphabet
currentState Index of the state to be checked
rDoneStates Set of already investigated states
Returns:
True if the condition is fulfilled, false otherwise

bool faudes::relabel ( vGenerator &  rGenRelabel,
EventSet &  rControllableEvents,
EventSet &  rHighAlph,
std::vector< Idx > &  rNewPartitions,
std::map< Idx, Idx > &  rMapStateToPartition,
std::map< Transition, Transition > &  rMapChangedTransReverse,
std::map< Transition, Idx > &  rMapChangedTrans,
std::map< Idx, EventSet > &  rMapRelabeledEvents 
)

Relabeling algorithm for the computation of an Lm-observer.

This function checks the termination criterion of the observer algorithm. If required, transitions of the input generator are relabeled.

The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenRelabel. There are no further restrictions on parameters.

Parameters:
rGenRelabel Generator whose transitions are modified
rControllableEvents Set of controllable events
rHighAlph Abstraction alphabet
rNewPartitions Vector containing the indices of the equivalence classes that partition the state space of rGenRelabel
rMapStateToPartition Maps each state of rGenRelabel to an equivalence class that must also be contained in rNewPartitions
rMapChangedTransReverse Maps the relabeled transitions to the original transitions
rMapChangedTrans Maps the the modified original transitions to its new events
rMapRelabeledEvents Maps the original events to the set of new events they were relabeled with

bool faudes::relabel ( vGenerator &  rGenRelabel,
EventSet &  rControllableEvents,
EventSet &  rHighAlph,
vector< Idx > &  rNewPartitions,
map< Idx, Idx > &  rMapStateToPartition,
map< Transition, Transition > &  rMapChangedTransReverse,
map< Transition, Idx > &  rMapChangedTrans,
map< Idx, EventSet > &  rMapRelabeledEvents 
)

bool faudes::RemoveFile ( const std::string &  rFileName  ) 

Delete a file.

Parameters:
rFileName Name of file to delete

void faudes::SearchScc ( const Idx  state,
int &  rCount,
const Generator rGen,
StateSet rNewStates,
std::stack< Idx > &  rSTACK,
StateSet rStackStates,
std::map< const Idx, int > &  rDFN,
std::map< const Idx, int > &  rLOWLINK,
std::set< StateSet > &  rSccSet,
StateSet rRoots 
)

Search for strongly connected components (SCC)*** This function partitions the stateset of a generator into equivalence classes such that states x1 and x2 are equivalent iff there is a path from x1 to x2 AND a path from x2 to x1.

This function implements the algorithm based on a depth first search presented in: -Aho, Hopcroft, Ullman: The Design and Analysis of Computer Algorithms-

Most of the comments in this function have been literally taken from this book!

Parameters:
state State, from which the current recursion is started.
rCount denotes the current depth of the recursion.
rGen Generator under investigation
rNewStates Set of states that up to now were not found by the depth first search
rSTACK stack of state indeces
rStackStates set of states whose indeces are on STACK.
rDFN map assigning to each state its Depth-First Number
rLOWLINK map assigning to each state its LOWLINK Number
rSccSet result - the set of strongly connected components
rRoots,: result - the set of states that each are root of some SCC.

void faudes::SetComposedStateNames ( const vGenerator &  rGen1,
const vGenerator &  rGen2,
std::map< std::pair< Idx, Idx >, Idx > &  rReverseCompositionMap,
vGenerator &  rGen12 
)

Helper: uses reverse composition map to track state names in a paralell composition.

Purely cosmetic.

Parameters:
rGen1 First generator
rGen2 Second generator
rReverseCompositionMap Reverse composition map (map< pair<Idx,Idx>, Idx>)
rGen12 Reference to resulting parallel composition generator

void faudes::SParallel ( const vGenerator &  rGen1,
const vGenerator &  rGen2,
std::map< std::pair< Idx, Idx >, Idx > &  rReverseCompositionMap,
vGenerator &  rResGen 
)

Shared event parallel composition.

See SParallel(const vGenerator&, const vGenerator&, vGenerator&). This version fills given reverse composition map to map pairs of old states to new states.

Parameters:
rGen1 First generator
rGen2 Second generator
rReverseCompositionMap Reverse composition map (map< pair<Idx,Idx>, Idx>)
rResGen Reference to resulting parallel composition generator

void faudes::StateMin ( mtcGenerator &  rGen,
mtcGenerator &  rResGen,
std::vector< StateSet > &  rSubsets,
std::vector< Idx > &  rNewIndices 
)

State Minimization This function implements the (n*log n) set partitioning algorithm by John E.

Hopcroft extended to colored marking. Given generator will be made accessible before computing minimized generator.

Parameters:
rGen mtcGenerator
rResGen Minimized mtcGenerator (result)
rSubsets Vector of subsets that will be constructed during running the algorithm (optional parameter)
rNewIndices Vector of new state indices corresponding to the subsets (optional parameter)
Exceptions:
Exception 
  • Input automaton nondeterministic (id 505)

void faudes::StateMin ( mtcGenerator &  rGen,
mtcGenerator &  rResGen 
)

State Minimization This function implements the (n*log n) set partitioning algorithm by John E.

Hopcroft extended to colored marking. Given generator will be made accessible before computing minimized generator.

Parameters:
rGen mtcGenerator
rResGen Minimized mtcGenerator (result)
Exceptions:
Exception 
  • Input automaton nondeterministic (id 505)

void faudes::StateMin ( vGenerator &  rGen,
vGenerator &  rResGen,
std::vector< StateSet > &  rSubsets,
std::vector< Idx > &  rNewIndices 
)

State set minimization.

This function implements the (n*log n) set partitioning algorithm by John E. Hopcroft. Given generator will be made accessible before computing minimized generator. See also StateMin(vGenerator&,vGenerator&).

Parameters:
rGen Generator
rResGen Minimized generator (result)
rSubsets Vector of subsets that will be constructed during running the algorithm (optional parameter)
rNewIndices Vector of new state indices corresponding to the subsets (optional parameter)
Exceptions:
Exception Input automaton nondeterministic (id 101)

void faudes::StateMin ( vGenerator &  rGen,
vGenerator &  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 given generator will be made accessible before computing minimized generator. See also StateMin(vGenerator&,vGenerator&,std::vector<StateSet>&,std::vector<Idx>&).

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

std::string faudes::StringSubstitute ( const std::string &  rString,
const std::string &  rFrom,
const std::string &  rTo 
)

Substitute in string.

Parameters:
rString Source string to substitute
rFrom String to match
rTo Replacement to fill in
Returns:
Result string

void faudes::SupCon ( const mtcGenerator &  rPlantGen,
const mtcGenerator &  rSpecGen,
std::map< std::pair< Idx, Idx >, Idx > &  rReverseCompositionMap,
mtcGenerator &  rResGen 
)

Supremal Controllable Sublanguage.

Only for deterministic plant + spec. Throws exception if plant or spec is nondeterministic.

Real SupCon function

Finds the "largest" sublanguage of h for that language of g is controllable with respect to h. Differing from theory the marked language of h may not be a sublanguage of g but both must share the same alphabet.

See "C.G CASSANDRAS AND S. LAFORTUNE. Introduction to Discrete Event Systems. Kluwer, 1999." for base algorithm.

This version creates a "reverse composition map" given as reference parameter.

Parameters:
rPlantGen Plant mtcGenerator
rSpecGen Specification mtcGenerator
rReverseCompositionMap std::map< std::pair<Idx,Idx>, Idx> as in the parallel composition function
rResGen Reference to resulting mtcGenerator, the minimal restrictive supervisor
Exceptions:
Exception 
  • Alphabets of generators don't match (id 500)
  • plant nondeterministic (id 501)
  • spec nondeterministic (id 503)
  • plant and spec nondeterministic (id 504)

void faudes::SupCon ( const vGenerator &  rPlantGen,
const EventSet &  rCAlph,
const vGenerator &  rSpecGen,
std::map< std::pair< Idx, Idx >, Idx > &  rReverseCompositionMap,
vGenerator &  rResGen 
)

Supremal Controllable Sublanguage.

Only for deterministic plant + spec. Throws exception if plant or spec is nondeterministic.

Real SupCon function

Finds the "largest" sublanguage of h for that language of g is controllable with respect to h. Note that the language of h is not rtequired to be a a sublanguage of g, but both languages must share the same alphabet.

See "C.G CASSANDRAS AND S. LAFORTUNE. Introduction to Discrete Event Systems. Kluwer, 1999." for base algorithm.

This version creates a "reverse composition map" given as reference parameter.

Parameters:
rPlantGen Plant Generator
rCAlph Controllable events
rSpecGen Specification Generator
rReverseCompositionMap std::map< std::pair<Idx,Idx>, Idx> as in the parallel composition function
rResGen Reference to resulting Generator, the minimal restrictive supervisor
Exceptions:
Exception 
  • alphabets of generators don't match (id 100)
  • plant nondeterministic (id 201)
  • spec nondeterministic (id 203)
  • plant and spec nondeterministic (id 204)

bool faudes::SupConComplete ( const Generator &  rPlant,
const EventSet  rCAlph,
const Generator &  rSpec,
Generator &  rResGen 
)

SupConComplete: Supremal Controllable and Complete Sublanguage - alternative for CompleteSynth() - UNDER CONSTRUCTION.

CURRENTLY SLOWER THAN COMPLETESYNTH()! Computes the supremal sublanguage of the language generated by rSpec that is complete controllable wrt language generated by rPlant and wrt the set rCAlph of controllable events. The result is stored in rClosedLoop. Method: Using the functions IsComplete() and IsControllable(), this function iteratively determines and erases the set of incomplete and/or uncontrollable states. For a proof of correcctness, see:

R. Kumar, V. Garg, and S.I. Marcus. On supervisory control of sequential behaviors. IEEE Transactions on Automatic Control, Vol. 37: pp.1978-1985, 1992.

Determinism: parameters have to be deterministic. Result is deterministic.

Parameters:
rPlant Plant Generator
rCAlph Controllable events
rSpec Specification Generator
rResGen Reference to resulting generator
Exceptions:
Exception 

void faudes::SupConNB ( const mtcGenerator &  rPlantGen,
const mtcGenerator &  rSpecGen,
std::map< std::pair< Idx, Idx >, Idx > &  rReverseCompositionMap,
mtcGenerator &  rResGen 
)

Nonblocking Supremal Controllable Sublanguage.

Only for deterministic plant + spec. Throws exception if plant or spec is nondeterministic.

Real SupConNB function

Finds the "largest" sublanguage of h for that language of g is controllable with respect to h. Differing from theory the marked language of h may not be a sublanguage of g but both must share the same alphabet.

See "C.G CASSANDRAS AND S. LAFORTUNE. Introduction to Discrete Event Systems. Kluwer, 1999." for base algorithm.

This version creates a "reverse composition map" given as reference parameter.

Parameters:
rPlantGen Plant mtcGenerator
rSpecGen Specification mtcGenerator
rReverseCompositionMap std::map< std::pair<Idx,Idx>, Idx> as in the parallel composition function
rResGen Reference to resulting mtcGenerator, the minimal restrictive nonblocking supervisor
Exceptions:
Exception 
  • Alphabets of generators don't match (id 500)
  • plant nondeterministic (id 501)
  • spec nondeterministic (id 503)
  • plant and spec nondeterministic (id 504)

void faudes::SupConNBNonDet ( const vGenerator &  rPlantGen,
const EventSet &  rCAlph,
const vGenerator &  rSpecGen,
std::map< std::pair< Idx, Idx >, Idx > &  rReverseCompositionMap,
Generator  rDetPlantGen,
Generator  rDetSpecGen,
std::map< Idx, StateSet > &  rPowerStatesPlant,
std::map< Idx, StateSet > &  rPowerStatesSpec,
bool &  rDetPlantBool,
bool &  rDetSpecBool,
vGenerator &  rResGen 
)

Nonblocking Supremal Controllable Sublanguage.

For deterministic and nondeterministic plant or spec.

  • If rPlantGen is deterministic, rDetPlantGen will be unchanged. rDetPlantBool will be set to false.

  • If rSpecGen is deterministic, rDetSpecGen will be unchanged rDetSpecBool will be set to false

  • If rPlantGen is nondeterministic, rDetPlantGen will contain deterministic plant generator. rDetPlantBool will be set to true. rPowerStatesPlant will contain the mapping of deterministic states to subsets of nondeterministic states

  • If rSpecGen is nondeterministic, rDetPlantGen will contain deterministic spec generator. rDetSpecBool will be set to true. rPowerStatesSpec will contain the mapping of deterministic states to subsets of nondeterministic states

Finds the "largest" sublanguage of h for that language of g is controllable with respect to h. Differing from theory the marked language of h may not be a sublanguage of g but both must share the same alphabet.

See "C.G CASSANDRAS AND S. LAFORTUNE. Introduction to Discrete Event Systems. Kluwer, 1999." for base algorithm.

This version creates a "reverse composition map" given as reference parameter.

Parameters:
rPlantGen Plant Generator
rCAlph Controllable events
rSpecGen Specification Generator
rReverseCompositionMap std::map< std::pair<Idx,Idx>, Idx> as in the parallel composition function
rDetPlantGen Deterministic plant generator (if rPlantGen is nondeterministic)
rDetSpecGen Deterministic spec generator (if rSpecGen is nondeterministic)
rPowerStatesPlant Mapping of deterministic states to set of nondeterministic states
rPowerStatesSpec Mapping of deterministic states to set of nondeterministic states
rDetPlantBool true if rPlantGen is deterministic, false if not
rDetSpecBool true if rSpecGen is deterministic, false if not
rResGen Reference to resulting Generator, the minimal restrictive nonblocking supervisor
Exceptions:
Exception Alphabets of generators don't match (id 500)

void faudes::SupConNBUnchecked ( const vGenerator &  rPlantGen,
const EventSet &  rCAlph,
const vGenerator &  rSpecGen,
std::map< std::pair< Idx, Idx >, Idx > &  rReverseCompositionMap,
vGenerator &  rResGen 
)

Nonblocking Supremal Controllable Sublanguage (internal function).

This version of SupConNB creates a "reverse composition map" given as reference parameter. It is used by the user function to set up descriptive state names of the supervisor.

Parameters:
rPlantGen Plant Generator
rCAlph Controllable events
rSpecGen Specification Generator
rReverseCompositionMap std::map< std::pair<Idx,Idx>, Idx> as in the parallel composition function
rResGen Reference to resulting cGenerator, the minimal restrictive nonblocking supervisor
Exceptions:
Exception 
  • alphabets of generators don't match (id 100)
  • plant nondeterministic (id 201)
  • spec nondeterministic (id 203)
  • plant and spec nondeterministic (id 204)

void faudes::SupconParallel ( const mtcGenerator &  rPlantGen,
const mtcGenerator &  rSpecGen,
const EventSet &  rUAlph,
std::map< std::pair< Idx, Idx >, Idx > &  rReverseCompositionMap,
mtcGenerator &  rResGen 
)

Fast parallel composition for computation for the SupConNB.

Composition stops at transition paths that leave the specification by uncontrollable events in plant.

Parameters:
rPlantGen Plant mtcGenerator
rSpecGen Specification mtcGenerator
rUAlph Uncontrollable Events
rReverseCompositionMap std::map< std::pair<Idx,Idx>, Idx> as in the parallel composition function
rResGen Reference to resulting mtcGenerator, the less restrictive supervisor

void faudes::SupconParallel ( const vGenerator &  rPlantGen,
const EventSet &  rCAlph,
const vGenerator &  rSpecGen,
std::map< std::pair< Idx, Idx >, Idx > &  rReverseCompositionMap,
vGenerator &  rResGen 
)

Parallel composition optimized for the purpose of SupCon (internal function).

Composition stops at transition paths that violate the specification by uncontrollable plant transitions.

Parameters:
rPlantGen Plant Generator
rCAlph Uncontrollable Events
rSpecGen Specification Generator
rReverseCompositionMap std::map< std::pair<Idx,Idx>, Idx> as in the parallel composition function
rResGen Reference to resulting Generator, the less restrictive supervisor

bool faudes::SupConUnchecked ( const mtcGenerator &  rPlantGen,
const EventSet &  rCAlph,
mtcGenerator &  rSupGen 
)

Supremal Controllable Sublangauge (Real SupCon function; unchecked).

Both, plant and spec MUST be deterministic and share the same alphabet!!!

Most likely will result in blocking states.

Parameters:
rPlantGen Plant generator
rCAlph Controllable events
rSupGen Specification generator
Returns:
True if no state has been deleted. Otherwise false.
Exceptions:
Exception 
  • Alphabets of generators don't match (id 500)
  • Plant generator nondeterministic (id 501)
  • Specification generator nondeterministic (id 503)
  • Plant & Spec generator nondeterministic (id 504)

bool faudes::SupConUnchecked ( const vGenerator &  rPlantGen,
const EventSet &  rCAlph,
vGenerator &  rSupCandGen 
)

Supremal Controllable Sublangauge (internal function).

Calls IsControllable to indetify "critical" states in the supervisor candidate. Then deletes critical states from the candidate supervisor in order to achieve controllability.

In general, the result is blocking.

Parameters:
rPlantGen Plant generator
rCAlph Controllable events
rSupCandGen Supervisor candidate generator
Returns:
True if no state has been deleted. Else false.

bool faudes::SupNorm ( const Generator &  rK,
Generator &  rL,
const EventSet &  rOAlph,
Generator &  rResult 
)

SupNorm: compute supremal normal and closed sublanguage.

SupNorm calculates the supremal sublanguage of the closed language K (prefix closure of the language marked by rK) that is normal w.r.t. the closed language L (prefix closure of the language marked by rL) and the set of observable events. Method: The supremal normal sublanguage is computed according to the Lin-Brandt-Formula: supnorm(K)wrt(L)=K-Pinv[P(L-K)]Sigma* SupNorm returns false on empty result. Parameters have to be deterministic, result is deterministic. Note: rL is not const, as the prefix closure is taken during computation. However, its original marked language is restored before return. See also supnorm_turorial.cpp todo: check for efficient algorithm replacing above formula

Parameters:
rK generates the closed language K=L(rK)
rL generates the closed language L=L(rL)
rOAlph observable alphabet
rResult generates the supremal normal and closed sublanguage, where Lm(rResult) is intersection of L(rResult) and Lm(rL) (marking consistent to rL)
Returns:
true for nonempty result
Exceptions:
Exception 
  • Alphabets of generators don't match (id 500)
  • rOAlph not subset of rL.Alphabet() (id 506)
  • K is not subset of L. (id 0)

bool faudes::SupNormAlt ( const Generator &  rK,
Generator &  rL,
const EventSet &  rOAlph,
Generator &  rResult 
)

SupNormAlt: Alternative implementation of SupNorm().

using SupPrefixClosed() instead of concatenating Sigma*. SupNormAlt calculates the supremal sublanguage of the closed language K (language generated by rK) that is normal w.r.t. the closed language L (language generated by rL) and the set of observable events: SupNormClosedAlt(K)wrt(L)=SupClosed(K-Pinv[P(L-K)])

SupNormAlt returns false on empty result. todo: implement test routines, verify correctness todo: check for efficient algorithm replacing above formula

Parameters:
rK generates the closed language K=L(rK)
rL generates the closed language L=L(rL)
rOAlph observable alphabet
rResult generates the supremal normal and closed sublanguage, where Lm(rResult) is intersection of L(rResult) and Lm(rL) (marking consistent to rL)
Returns:
true for nonempty result
Exceptions:
Exception 
  • Alphabets of generators don't match (id 500)
  • rOAlph not subset of rL.Alphabet() (id 506)
  • K is not subset of L. (id 0)

bool faudes::SupPrefixClosed ( const Generator &  rK,
Generator &  rResult 
)

SupPrefixClosed: supremal closed sublanguage of K by cancelling all tranistions leading to a non-marked state.

Returns false on empty result. todo: implement test routines, verify correctness

Parameters:
rK marks the (not necessarily closed) language K=Lm(rK)
rResult generates and marks the supremal closed sublanguage, where L(rResult)=Lm(rResult)
Returns:
true for nonempty result
Exceptions:
Exception 
  • todo: check determinism of rK

Idx faudes::ToIdx ( const std::string &  rString  ) 

Convert a string to Idx.

Parameters:
rString string to convert
Returns:
Idx
Exceptions:
Idx overflow (id 600)

std::string faudes::ToStringFloat ( double  number  ) 

float to string

Parameters:
number double
Returns:
string

std::string faudes::ToStringInteger ( long int  number  ) 

integer to string

Parameters:
number integer
Returns:
string

std::string faudes::ToStringInteger16 ( long int  number  ) 

integer to string base 16

Parameters:
number integer
Returns:
string

void faudes::TraverseUncontrollableBackwards ( const EventSet &  rCAlph,
TransSetX2EvX1 &  rtransrel,
StateSet &  rCriticalStates,
Idx  current 
)

Helper function for IsControllable.

The state given as "current" is considered critical. Itself and all uncontrollable predecessor states are added to the set "rCriticalStates".

Parameters:
rCAlph Set of controllable events
rtransrel Reverse sorted transition relation
rCriticalStates Set of critical states in composition generator
current Current state

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

void faudes::UniqueInit ( mtcGenerator &  rGen  ) 

bool faudes::YclessScc ( const Generator &  rGen,
const EventSet &  rYc,
std::set< StateSet > &  rSccSet 
)


Variable Documentation

std::ostream * faudes::pDebugStream = NULL

Stream to debug to.

int faudes::ran_initialized = 0 [static]

long faudes::ran_seed[256] = { 123456789 */ } [static]

int faudes::ran_stream = 0 [static]

libFAUDES 2.13a c++ source docu by doxygen 1.5.6