DiaDes
0.1
DIAgnosis of Discrete-Event System
|
#include <ParametrizedSynchronisation.hh>
Static Public Member Functions | |
static string | typeName () |
![]() | |
static string | typeName () |
Private Types | |
using | NullEvent = typename StateMachine::NullEventPropertyId |
Private Attributes | |
bool | _locked |
std::unordered_map< typename Ptr< Component >::ConstP, std::set< Event > > | _isSynchronized |
const Event | _nullEvent = NullEvent().nullValue() |
Additional Inherited Members | |
![]() | |
ComponentVector | _components |
std::list< SyncEvent > | _synchros |
This class allows to setup a customised set of synchronisation rules by successively adding set of events to synchronise. Once the set of events to synchronise is declared, it is required to close the rules. Closing the rules consists in adding the SynchronisationEvent objects that will correspond to the events that are not synchronised (but that are asynchronous and thus must be triggered). In case new events should be synchronised, it is possible to open again but a closure is necessary before using this SynchronisationRules object again.
Definition at line 33 of file ParametrizedSynchronisation.hh.
using Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::Component = typename SR::Component |
Definition at line 44 of file ParametrizedSynchronisation.hh.
using Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::ComponentIterator = typename SR::ComponentIterator |
Definition at line 48 of file ParametrizedSynchronisation.hh.
using Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::ComponentVector = typename SR::ComponentVector |
Definition at line 47 of file ParametrizedSynchronisation.hh.
using Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::Event = typename SR::Event |
Definition at line 46 of file ParametrizedSynchronisation.hh.
using Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::Exception = Diades::Utils::Exception<ParametrizedSynchronisation> |
Definition at line 42 of file ParametrizedSynchronisation.hh.
|
private |
Definition at line 56 of file ParametrizedSynchronisation.hh.
using Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::Size = typename SR::Size |
Definition at line 49 of file ParametrizedSynchronisation.hh.
using Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::SR = SynchronisationRules<StateMachine> |
Definition at line 43 of file ParametrizedSynchronisation.hh.
using Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::SyncEvent = typename SR::SyncEvent |
Definition at line 45 of file ParametrizedSynchronisation.hh.
using Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::SynchronisationIterator = typename SR::SynchronisationIterator |
Definition at line 51 of file ParametrizedSynchronisation.hh.
using Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::SynchronisationList = typename SR::SynchronisationList |
Definition at line 50 of file ParametrizedSynchronisation.hh.
|
default |
Default constructor
|
default |
Copy constructor (default)
other |
|
default |
Move constructor (default)
other |
|
virtualdefault |
Destructor
|
inline |
components | the set of components If no synchronise operation is performed but just a closing operation, then generate the free product of components |
Definition at line 99 of file ParametrizedSynchronisation.hh.
|
inlinevirtual |
clear the object (components + rules)
Reimplemented from Diades::Automata::Experimental::SynchronisationRules< StateMachine >.
Definition at line 269 of file ParametrizedSynchronisation.hh.
References Diades::Automata::Experimental::SynchronisationRules< StateMachine >::clear().
Referenced by Diades::Automata::Experimental::descriptorToRules(), and Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::init().
|
inlinevirtual |
clear the rules
Reimplemented from Diades::Automata::Experimental::SynchronisationRules< StateMachine >.
Definition at line 280 of file ParametrizedSynchronisation.hh.
References Diades::Automata::Experimental::SynchronisationRules< StateMachine >::clearRules().
Referenced by Diades::Automata::Experimental::descriptorToRules().
|
inline |
closure. Complement the SynchronisationRules but adding SynchronisationEvents representing the fact that the synchronisation is asynchronous. That is if e1 is not synchronised with anything (by the use of the synchronise operator) then close() will add the SynchronisationEvent (empty,empty,e1,....empty) to th set of rules. Create an encoding of the resulting set of SynchronisationEvent by calling the EventEncoder.
Definition at line 217 of file ParametrizedSynchronisation.hh.
References Diades::Automata::Experimental::SynchronisationRules< StateMachine >::_components, Diades::Automata::Experimental::SynchronisationRules< StateMachine >::_synchros, Diades::Automata::Experimental::SynchronisationRules< StateMachine >::beginOfComponents(), Diades::Automata::Experimental::SynchronisationRules< StateMachine >::endOfComponents(), ensure, Diades::Utils::Ptr< T >::get(), Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::isLocked(), Diades::Automata::Experimental::SynchronisationRules< StateMachine >::isValid(), and require.
Referenced by Diades::Automata::Experimental::descriptorToRules().
|
inline |
components | the set of components If no synchronise operation is performed but just a closing operation, then generate the free product of components |
Definition at line 112 of file ParametrizedSynchronisation.hh.
References Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::clear(), and Diades::Automata::Experimental::SynchronisationRules< StateMachine >::setComponentVector().
|
inline |
Definition at line 260 of file ParametrizedSynchronisation.hh.
References Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::_locked.
Referenced by Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::close(), and Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::synchronise().
|
inline |
when close() is called, it is then not possible to use the synchronise method again until the method open() is called
Definition at line 251 of file ParametrizedSynchronisation.hh.
|
default |
|
default |
|
inline |
e | Event Add the synchronisation of the transition labelled with event e in the set of synchronised rules BE AWARE that I will not check whether you attempt to insert the same synchronisation twice! It is your responsability... |
Definition at line 125 of file ParametrizedSynchronisation.hh.
References Diades::Automata::Experimental::SynchronisationRules< StateMachine >::_components, Diades::Automata::Experimental::SynchronisationRules< StateMachine >::_synchros, Diades::Automata::Experimental::SynchronisationRules< StateMachine >::beginOfComponents(), Diades::Automata::Experimental::SynchronisationRules< StateMachine >::endOfComponents(), ensure, Diades::Utils::Ptr< T >::get(), Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::isLocked(), Diades::Automata::Experimental::SynchronisationRules< StateMachine >::isValid(), and require.
Referenced by Diades::Automata::Experimental::descriptorToRules(), and Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::synchronise().
|
inline |
begin | the begin iterator on the range of pairs <Component::ConstPointer,Event> (use a map, unordered_map,...) |
end | the end iterator on the range of pairs <Component::ConstPointer,Event> (use a map, unordered_map,...) BE AWARE that I will not check whether you attempt to insert the same synchronisation twice! It is your responsability... |
Definition at line 165 of file ParametrizedSynchronisation.hh.
References Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::synchronise().
|
inline |
begin | the begin iterator on the range of pairs <Component::ConstPointer,Event> (use a map, unordered_map,...) |
end | the end iterator on the range of pairs <Component::ConstPointer,Event> (use a map, unordered_map,...) |
relaxation | Relaxation mode Add the synchronisation of the transitions labelled with the set of event e in the set of synchronised rules for instance if e = (<comp1,e1>,<comp2,e2>) then a transition from comp1 labelled with e1 will be synchronised with a transition from comp2 labelled with e2. If relaxation mode is set to true, the synchronisation will be relaxed in the sense that transitions from comp1 labelled with e1 will also be triggered asynchronously, similar for transitions e2 from comp2 and (see KanJohn et al, Synthesis of a Distributed and Accurate Diagnoser, DX2010) BE AWARE that I will not check whether you attempt to insert the same synchronisation twice! It is your responsability... |
Definition at line 185 of file ParametrizedSynchronisation.hh.
References Diades::Automata::Experimental::SynchronisationRules< StateMachine >::_components, Diades::Automata::Experimental::SynchronisationRules< StateMachine >::_synchros, ensure, Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::isLocked(), Diades::Automata::Experimental::SynchronisationRules< StateMachine >::isValid(), and require.
|
inlinestatic |
Definition at line 38 of file ParametrizedSynchronisation.hh.
|
private |
Definition at line 55 of file ParametrizedSynchronisation.hh.
|
private |
Definition at line 54 of file ParametrizedSynchronisation.hh.
Referenced by Diades::Automata::Experimental::ParametrizedSynchronisation< StateMachine >::isLocked().
|
private |
Definition at line 57 of file ParametrizedSynchronisation.hh.