|
|
||||||
|
Classes |
Public Types |
Public Member Functions |
Protected Member Functions |
Protected Attributes |
Private Types |
Private Member Functions |
Private Attributes |
List of all members
faudes::ParallelExecutor Class Reference Detailed DescriptionSynchronized parallel execution of TimedGenerators. SynchronisationThe ParallelExecutor executes a family of timed generators with synchronized shared events according to Alur semantics. That is, we assume disjoint clock sets and synchronize shared events w.r.t. occurence at clock time. ImplementationThe external interface of a ParallelExecutor is the same as the single Executor, in that it indicats enabled events and in that it provides methods for executing events or letting time pass. Technically, a ParallelExecutor is a vector of executors. Clocks are treated on a per executor basis. That is, values of clocks in one generator are not effected by the reset of another generator, even if the respestive clock variables have the same index and name. File IOFor token IO, the ParallelExecutor reads and writes the generators to execute within a section with default label "Executor". For disk space efficiency, the token IO format will use refernces by (relative) filename if the latter is known. Since TimedGenerators read any generator type from file, so does the ParallelExecutor. Example: <Executor>
<Generators>
"./some_generator.gen"
"./other_generator.gen"
</Generators>
</Executor>
Definition at line 64 of file sp_pexecutor.h.
Member Typedef Documentation◆ Iterator
Read-only access to individual executors. Definition at line 180 of file sp_pexecutor.h. ◆ iterator
Internal non-const iterator. Definition at line 578 of file sp_pexecutor.h. ◆ ParallelClock
Typedef for parallel clock values. Definition at line 73 of file sp_pexecutor.h. ◆ ParallelState
Typedef for parallel discrete state. Definition at line 70 of file sp_pexecutor.h. ◆ TimedStateProvide typedef from Executor. Definition at line 86 of file sp_pexecutor.h. Constructor & Destructor Documentation◆ ParallelExecutor() [1/3]
Construct an emtpy ParallelExecuter. Definition at line 22 of file sp_pexecutor.cpp. ◆ ParallelExecutor() [2/3]
Copy constructor. Definition at line 27 of file sp_pexecutor.cpp. ◆ ParallelExecutor() [3/3]
Construct from file. This constructor uses the DoRead method to initialize from file.
Definition at line 33 of file sp_pexecutor.cpp. ◆ ~ParallelExecutor()
Explicit destructor. Definition at line 39 of file sp_pexecutor.cpp. Member Function Documentation◆ Active() [1/2]
Test whether an event is active at current (discrete) state. By "active" we refer to the untimed transition structure, that is, we ignore clock values etc.
Definition at line 532 of file sp_pexecutor.cpp. ◆ Active() [2/2]
Test whether an event is active in a given discrete state. By "active" we refer to the untimed transition structure, that is, we ignore clock values etc.
Definition at line 537 of file sp_pexecutor.cpp. ◆ ActiveEventSet()
Get events that are active in all TimedGenerators. By "active" we refer to the untimed transition structure, that is, we ignore clock values etc.
Definition at line 521 of file sp_pexecutor.cpp. ◆ Alphabet()
Overall alphabet. Definition at line 229 of file sp_pexecutor.cpp. ◆ At()
Definition at line 183 of file sp_pexecutor.h. ◆ Begin()
Definition at line 181 of file sp_pexecutor.h. ◆ Clear()
Clear all data. Removes all generators/executors and resets the current state to a void value. Reimplemented from faudes::Type. Reimplemented in faudes::ProposingExecutor, faudes::LoggingExecutor, and faudes::DeviceExecutor. Definition at line 115 of file sp_pexecutor.cpp. ◆ Compile()
compile internal data (eg overall alphabet) Reimplemented in faudes::LoggingExecutor. Definition at line 62 of file sp_pexecutor.cpp. ◆ ComputeEnabled()
Compute enabled events and enabled interval (fake const) this is public only for performance experiments — dont use Definition at line 234 of file sp_pexecutor.cpp. ◆ ComputeEnabledNonConst()
Compute enabled core routine (non const) Definition at line 240 of file sp_pexecutor.cpp. ◆ CStr()
Pretty printable string of clock name. Definition at line 505 of file sp_pexecutor.cpp. ◆ CurrentParallelState()
Get current discrete state vector of the ParallelExecutor. By "the current discrete state" we refer to a vector of indices that indicate the current state of the untimed transition structure.
Definition at line 319 of file sp_pexecutor.cpp. ◆ CurrentParallelStateStr()
Pretty printable string of parallel state Definition at line 516 of file sp_pexecutor.cpp. ◆ CurrentParallelTimedState() [1/2]
Set current state of the ParallelExecutor. This resets the parallel executor to the given state, incl clock values. Both, clock time and logical time is also reset (to 0).
Reimplemented in faudes::LoggingExecutor. Definition at line 329 of file sp_pexecutor.cpp. ◆ CurrentParallelTimedState() [2/2]
Get current state of the ParallelExecutor. With "the current state" w refer to all data relevant for events generated in future. This data consists of a discrete state vector and a mapping from clocks to closk values.
Definition at line 324 of file sp_pexecutor.cpp. ◆ CurrentParallelTimedStateStr()
Pretty printable string of current state. Definition at line 511 of file sp_pexecutor.cpp. ◆ CurrentStep() [1/2]
Set logical time (# of steps) This does not affect clocks and, hence, is purely cosmetic. Note that, in contrast to clock time, the individual generators do not agree in logical time. The trace buffer will get out of order and should be cleared.
Reimplemented in faudes::LoggingExecutor. Definition at line 432 of file sp_pexecutor.cpp. ◆ CurrentStep() [2/2]
Get logical time, ie number of transitions so far,. Definition at line 440 of file sp_pexecutor.cpp. ◆ CurrentTime() [1/2]
Set clock time. This does not affect clocks and, hence, is purely cosmetic. The trace buffer will record an invalid event.
Reimplemented in faudes::LoggingExecutor. Definition at line 419 of file sp_pexecutor.cpp. ◆ CurrentTime() [2/2]
Get clock time. Definition at line 427 of file sp_pexecutor.cpp. ◆ DisabledEvents()
Get events that are disabled at current (timed) state. By "disabled" we refer to the synchronizes timed generators, that is, we do care about clock values, invariants and guards.
Definition at line 283 of file sp_pexecutor.cpp. ◆ DoAssign()
Assignment method.
Definition at line 44 of file sp_pexecutor.cpp. ◆ DoRead()
Reads parallel executor from TokenReader, see also public wrappers Read() in faudes::Type.
Reimplemented from faudes::Type. Reimplemented in faudes::ProposingExecutor, and faudes::LoggingExecutor. Definition at line 175 of file sp_pexecutor.cpp. ◆ DoReadGenerators()
Reads generator files section from TokenReader.
Definition at line 194 of file sp_pexecutor.cpp. ◆ DoWrite()
Write to TokenWriter, see also public wrappers Write() in faudes::Type.
Reimplemented from faudes::Type. Reimplemented in faudes::ProposingExecutor, and faudes::LoggingExecutor. Definition at line 130 of file sp_pexecutor.cpp. ◆ DoWriteGenerators()
Write generator files section to TokenWriter.
Definition at line 159 of file sp_pexecutor.cpp. ◆ EnabledEvents()
Get events that are enabled at current (timed) state. By "enabled" we refer to the synchronizes timed generators, that is, we do care about clock values, invariants and guards.
Definition at line 277 of file sp_pexecutor.cpp. ◆ EnabledEventTime()
Get interval on which the specified event is enabled. Returns empty, if the event is not active or never simultanuosly enabled in all executors.
Definition at line 295 of file sp_pexecutor.cpp. ◆ EnabledGuardTime()
Get interval on which the respective guard is satisfied. Returns empty, if the event is not active or if the guards
Definition at line 307 of file sp_pexecutor.cpp. ◆ EnabledInterval()
Get an interval on which the set of enabled events is constant. Note: while this implementation tries to come up with a potentially large interval, it is not guaranteed to be maximal.
Definition at line 289 of file sp_pexecutor.cpp. ◆ EnabledTime()
Get maximal duration that can pass without executing an event.
Definition at line 270 of file sp_pexecutor.cpp. ◆ End()
Definition at line 182 of file sp_pexecutor.h. ◆ EStr()
Pretty printable string of event. Definition at line 499 of file sp_pexecutor.cpp. ◆ EventIndex()
Event index lookup. This convenience method refers to the global event symbol table.
Definition at line 197 of file sp_pexecutor.h. ◆ EventName()
Event name lookup. This convenience method refers to the global event symbol table.
Definition at line 210 of file sp_pexecutor.h. ◆ ExecuteEvent()
Execute transition. Returns false if the transition cannot be executed at the current time.
Reimplemented in faudes::ProposingExecutor, faudes::LoggingExecutor, and faudes::DeviceExecutor. Definition at line 389 of file sp_pexecutor.cpp. ◆ ExecuteTime()
Let time pass without executing a transition. Return false if the duration specified
Reimplemented in faudes::ProposingExecutor, and faudes::LoggingExecutor. Definition at line 364 of file sp_pexecutor.cpp. ◆ Insert() [1/2]
Add a TimedGenerator from file. This method uses the TimedGenerator's read to find the first generator in the file. If the generator found is not a TimedGenerator, timing data defaults to infinite invariants/guards and empty resets. After inserting generators and before starting to execute, you must call Reset() to update internal datastructures.
Definition at line 91 of file sp_pexecutor.cpp. ◆ Insert() [2/2]
Add a TimedGenerator. After inserting generators and before starting to execute, you must call Reset() to update internal datastructures.
Definition at line 106 of file sp_pexecutor.cpp. ◆ IsDeadlocked()
Test for deadlocked. The parallel executor is deadlocked if neither time can pass nor an event can be executed. Prototypical examples for such a situation is that the indvidual executers fail to agree on a common time interval, at which shaered events are enabled.
Definition at line 445 of file sp_pexecutor.cpp. ◆ PSStr()
Pretty printable string of parallel state. Definition at line 480 of file sp_pexecutor.cpp. ◆ PTSStr()
Pretty printable string of timed parallel state. Definition at line 453 of file sp_pexecutor.cpp. ◆ Reset()
Goto initial state. Reset all clock values to zero, assign initial states to each executor. Reimplemented in faudes::ProposingExecutor, and faudes::LoggingExecutor. Definition at line 84 of file sp_pexecutor.cpp. ◆ Size()
Number of TimedGenerators. Definition at line 123 of file sp_pexecutor.cpp. ◆ TEStr()
Pretty printable string of timed event. Definition at line 493 of file sp_pexecutor.cpp. ◆ UpdateParallelTimedState()
update parallel timed state() Definition at line 52 of file sp_pexecutor.cpp. ◆ Valid()
Check validity of executors. This is currently not implemented.
Reimplemented in faudes::LoggingExecutor. Definition at line 244 of file sp_pexecutor.h. Member Data Documentation◆ mAlphabet
overall alphabet Definition at line 581 of file sp_pexecutor.h. ◆ mCurrentParallelTimedState
current state Definition at line 605 of file sp_pexecutor.h. ◆ mCurrentStep
global time (step) Definition at line 587 of file sp_pexecutor.h. ◆ mCurrentTime
global time (real) Definition at line 584 of file sp_pexecutor.h. ◆ mDEvents
disabled events Definition at line 596 of file sp_pexecutor.h. ◆ mEEvents
enabled events Definition at line 593 of file sp_pexecutor.h. ◆ mEInterval
enabled interval Definition at line 599 of file sp_pexecutor.h. ◆ mETime
enabled time Definition at line 590 of file sp_pexecutor.h. ◆ mEValid
validity flag for fevents and ftime Definition at line 602 of file sp_pexecutor.h. ◆ mExecutorNames
list of executors Definition at line 575 of file sp_pexecutor.h. ◆ mExecutors
list of executors Definition at line 572 of file sp_pexecutor.h. ◆ mRecentEvent
recent event Definition at line 567 of file sp_pexecutor.h. The documentation for this class was generated from the following files: libFAUDES 2.32b --- 2024.03.01 --- c++ api documentaion by doxygen |