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 Synchronized parallel execution of TimedGenerators. More...
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
Read-only access to individual executors. Definition at line 180 of file sp_pexecutor.h.
Internal non-const iterator. Definition at line 580 of file sp_pexecutor.h.
Typedef for parallel clock values. Definition at line 73 of file sp_pexecutor.h.
Typedef for parallel discrete state. Definition at line 70 of file sp_pexecutor.h. Provide typedef from Executor. Definition at line 86 of file sp_pexecutor.h. Constructor & Destructor Documentation
Construct an emtpy ParallelExecuter. Definition at line 22 of file sp_pexecutor.cpp.
Copy constructor. Definition at line 27 of file sp_pexecutor.cpp.
Construct from file. This constructor uses the DoRead method to initialize from file.
Definition at line 33 of file sp_pexecutor.cpp.
Explicit destructor. Definition at line 39 of file sp_pexecutor.cpp. Member Function Documentation
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.
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.
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.
Overall alphabet. Reimplemented in faudes::ProposingExecutor. Definition at line 229 of file sp_pexecutor.cpp.
Definition at line 183 of file sp_pexecutor.h.
Definition at line 181 of file sp_pexecutor.h.
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 internal data (eg overall alphabet) Reimplemented in faudes::LoggingExecutor. Definition at line 62 of file sp_pexecutor.cpp.
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.
Compute enabled core routine (non const) Definition at line 240 of file sp_pexecutor.cpp.
Pretty printable string of clock name. Definition at line 505 of file sp_pexecutor.cpp.
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.
Pretty printable string of parallel state. Definition at line 516 of file sp_pexecutor.cpp.
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.
Reimplemented in faudes::LoggingExecutor. Definition at line 324 of file sp_pexecutor.cpp.
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.
Pretty printable string of current state. Definition at line 511 of file sp_pexecutor.cpp.
Get logical time, ie number of transitions so far,. Reimplemented in faudes::LoggingExecutor. Definition at line 440 of file sp_pexecutor.cpp.
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.
Get clock time. Reimplemented in faudes::LoggingExecutor. Definition at line 427 of file sp_pexecutor.cpp.
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.
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.
Assignment method.
Definition at line 44 of file sp_pexecutor.cpp.
Reads parallel executor from TokenReader, see also public wrappers Read() in faudes::Type.
Reimplemented from faudes::Type. Reimplemented in faudes::LoggingExecutor, and faudes::ProposingExecutor. Definition at line 175 of file sp_pexecutor.cpp.
Write to TokenWriter, see also public wrappers XWrite() in faudes::Type.
Definition at line 194 of file sp_pexecutor.cpp.
Write to TokenWriter, see also public wrappers Write() in faudes::Type.
Reimplemented from faudes::Type. Reimplemented in faudes::LoggingExecutor, and faudes::ProposingExecutor. Definition at line 130 of file sp_pexecutor.cpp.
Write generator files section to TokenWriter.
Definition at line 159 of file sp_pexecutor.cpp.
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.
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.
Get interval on which the respective guard is satisfied. Returns empty, if the event is not active or if the guards are never simultanuosly satisfied in all executors.
Definition at line 307 of file sp_pexecutor.cpp.
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.
Get maximal duration that can pass without executing an event.
Definition at line 270 of file sp_pexecutor.cpp.
Definition at line 182 of file sp_pexecutor.h.
Pretty printable string of event. Definition at line 499 of file sp_pexecutor.cpp.
Event index lookup. This convenience method refers to the global event symbol table.
Definition at line 197 of file sp_pexecutor.h.
Event name lookup. This convenience method refers to the global event symbol table.
Definition at line 210 of file sp_pexecutor.h.
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.
Let time pass without executing a transition. Return false if the duration specified cannot elapse without an event being executed.
Reimplemented in faudes::ProposingExecutor, and faudes::LoggingExecutor. Definition at line 364 of file sp_pexecutor.cpp.
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.
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.
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.
Pretty printable string of parallel state. Definition at line 480 of file sp_pexecutor.cpp.
Pretty printable string of timed parallel state. Definition at line 453 of file sp_pexecutor.cpp.
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.
Number of TimedGenerators. Definition at line 123 of file sp_pexecutor.cpp.
Pretty printable string of timed event. Definition at line 493 of file sp_pexecutor.cpp.
update parallel timed state() Definition at line 52 of file sp_pexecutor.cpp.
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
overall alphabet Definition at line 583 of file sp_pexecutor.h.
current state Definition at line 607 of file sp_pexecutor.h.
global time (step) Definition at line 589 of file sp_pexecutor.h.
global time (real) Definition at line 586 of file sp_pexecutor.h.
disabled events Definition at line 598 of file sp_pexecutor.h.
enabled events Definition at line 595 of file sp_pexecutor.h.
enabled interval Definition at line 601 of file sp_pexecutor.h.
enabled time Definition at line 592 of file sp_pexecutor.h.
validity flag for fevents and ftime Definition at line 604 of file sp_pexecutor.h.
list of executors Definition at line 577 of file sp_pexecutor.h.
list of executors Definition at line 574 of file sp_pexecutor.h.
recent event Definition at line 569 of file sp_pexecutor.h. The documentation for this class was generated from the following files: libFAUDES 2.28a --- 2016.09.13 --- c++ api documentaion by doxygen |