DiaDes
0.1
DIAgnosis of Discrete-Event System
|
An observable Component defined as a automaton. More...
#include <ObservableComponent.hh>
Static Public Member Functions | |
static string | typeName () |
Static Public Member Functions inherited from Diades::Automata::Component | |
static string | typeName () |
the name by default More... | |
Private Attributes | |
vector< Diades::Graph::NodeMap< unordered_set< Transition > > > | _observableTransitionsWithSource |
vector< Diades::Graph::NodeMap< unordered_set< Transition > > > | _observableTransitionsWithTarget |
vector< unordered_set< State > > | _sourceWithObservableEvent |
vector< unordered_set< State > > | _targetWithObservableEvent |
vector< list< Transition > > | _transitionsWithObservableEvent |
ObservableMask | _mask |
Import/Export management | |
methods to import/export an ObservableComponent | |
virtual bool | component2dot (const string &fileName) const |
virtual bool | component2dot (ostream &os) const |
virtual void | updateMask (const Event &event, const set< string > &obsLabel) |
virtual bool | exportDesCompModel (const string &filename) const |
virtual bool | exportDesCompModel (ostream &os) const |
virtual bool | parseDesCompFaultyEvents (istream &stream) |
virtual bool | parseDesCompNormalEvents (istream &stream) |
virtual bool | parseDesCompObservableEvents (istream &stream) |
virtual void | exportDesCompEvent (ostream &os, const Event &evt) const |
Additional Inherited Members | |
Static Public Attributes inherited from Diades::Automata::Component | |
static const string | defaultComponentName |
Protected Member Functions inherited from Diades::Automata::Component | |
virtual void | determine (const Component *comp, const unordered_set< State > &acceptors, unordered_set< State > &newAcceptors) |
virtual void | determine (const Component *comp) |
virtual bool | parseDesCompName (istream &stream) |
virtual bool | parseDesCompStates (istream &stream) |
virtual bool | parseDesCompMaskedEvents (istream &stream, unsigned number, map< string, set< string > > &maskEvents) |
virtual bool | parseDesCompTransitions (istream &stream) |
Protected Attributes inherited from Diades::Automata::Component | |
Diades::Graph::Graph | _behav |
unordered_set< State > | _initial |
Diades::Graph::NodeMap< int > | _isInitial |
An observable Component defined as a automaton.
An ObservableComponent is a Component whose observability is defined by an ObservableMask object. An ObservableComponent is typically defined by a 'des_comp' file.
This example will generate an ObservableComponent whose name is 'comp'. It contains 5 states, namely 0 1 2 3 4 and has an initial state that is 0. It contains 1 fault event (f), 1 unobservable event (uo), 0 shared events 2 observable events (o1, o2). The event uo is not observable but it emit either o1 or o2 or nothing @ . Finally the number of transitions is 7, one transition from state 0 to state 1 labelled with f, one transition from state 1 to state 2 labelled with o1, ... NOTE THAT THE NOTION OF SHARED EVENTS HAS DISAPPEARED Test of the whole class done on July 31th 2009
Definition at line 62 of file ObservableComponent.hh.
a reference wrapper on an constant ObservableComponent
Definition at line 70 of file ObservableComponent.hh.
Exception | exception returned by any ObservableComponent |
Definition at line 93 of file ObservableComponent.hh.
a reference wrapper on a non-constant ObservableComponent
Definition at line 77 of file ObservableComponent.hh.
|
inline |
Default constructor: create an invalid component
Definition at line 114 of file ObservableComponent.hh.
References clear(), mask(), setMask(), and ~ObservableComponent().
Diades::Automata::ObservableComponent::ObservableComponent | ( | const ObservableComponent & | component | ) |
Copy constructor: create a copy
Diades::Automata::ObservableComponent::~ObservableComponent | ( | ) |
Destructor
Referenced by ObservableComponent().
|
inline |
State iterator on states that are the sources of a given event
e | an Event |
Definition at line 279 of file ObservableComponent.hh.
References containsObservableEvent(), Diades::Automata::Event::id(), and require.
|
inline |
State iterator on states that are the targets of a given event
e | an Event |
Definition at line 304 of file ObservableComponent.hh.
References containsObservableEvent(), Diades::Automata::Event::id(), and require.
|
virtual |
Clear the ObservableComponent
Reimplemented from Diades::Automata::Component.
Referenced by ObservableComponent().
|
virtual |
ObservableComponent serialization (see boost serialization)
ar | boost archive |
version | the version number |
fileName | exported file |
Reimplemented from Diades::Automata::Component.
Referenced by inputObservableTransitionEnd(), and MealyEncoding().
|
virtual |
|
inline |
Events of the ObservableComponent that are not output of the ObservableMask.
Be careful, here a non-observable event may be observed in an indirect way (for instance if it is detectable due to the mask). However, if it is detectable it is by the occurrence of another event which is an output of the ObservableMask.
Be careful, here a non-observable event may be observed in an indirect way (for instance if it is detectable due to the mask). However, if it is detectable it is by the occurrence of another event which is an output of the ObservableMask.
Be careful, here a non-observable event may be observed in an indirect way (for instance if it is detectable due to the mask). However, if it is detectable it is by the occurrence of another event which is an output of the ObservableMask.
Definition at line 255 of file ObservableComponent.hh.
References Diades::Automata::ObservableMask::containsObservableEvent(), Diades::Automata::Event::isValid(), and require.
Referenced by beginOfSourceStateOfObservableEvent(), beginOfTargetStateOfObservableEvent(), endOfSourceStateOfObservableEvent(), endOfTargetStateOfObservableEvent(), inputObservableTransitionBegin(), inputObservableTransitionEnd(), observableTransitionBegin(), observableTransitionEnd(), outputObservableTransitionBegin(), and outputObservableTransitionEnd().
|
inline |
State iterator on states that are the sources of a given event
e | an Event |
Definition at line 291 of file ObservableComponent.hh.
References containsObservableEvent(), Diades::Automata::Event::id(), and require.
|
inline |
State iterator on states that are the targets of a given event
e | an Event |
Definition at line 316 of file ObservableComponent.hh.
References containsObservableEvent(), Diades::Automata::Event::id(), and require.
|
protectedvirtual |
Event export to the model file "des_comp"
os | output stream |
evt | the event to export |
Referenced by inputObservableTransitionEnd().
|
virtual |
Component export to the old model file "des_comp"
filename | name of an oldmodel file |
Reimplemented from Diades::Automata::Component.
Referenced by inputObservableTransitionEnd(), MealyEncoding(), and synchroniseModels().
|
virtual |
Component export to the model file "des_comp"
os | output stream |
|
inline |
Transition iterator on the input transitions of a given state labelled with a given event
s | a State |
e | an Event |
Definition at line 405 of file ObservableComponent.hh.
References Diades::Automata::Component::_behav, containsObservableEvent(), Diades::Automata::Event::id(), and require.
|
inline |
Transition iterator on the input transitions of a given state labelled with a given event
s | a State |
e | an Event |
Definition at line 422 of file ObservableComponent.hh.
References Diades::Automata::Component::_behav, component2dot(), containsObservableEvent(), Diades::Automata::Component::events(), exportDesCompEvent(), exportDesCompModel(), Diades::Automata::Event::id(), Diades::Automata::makeUniversalBehaviour(), mask(), Diades::Automata::Component::name(), parseDesCompFaultyEvents(), parseDesCompNormalEvents(), parseDesCompObservableEvents(), project(), require, and updateMask().
|
inline |
Get the current mask
Definition at line 162 of file ObservableComponent.hh.
References _mask.
Referenced by component2Orange(), Diades::Automata::FaultDiagnosis::componentDiagnose(), exportBackwardToDot(), exportToDot(), Diades::Automata::FaultDiagnosis::globalModelDiagnose(), inputObservableTransitionEnd(), Diades::Automata::interactiveSimulation(), main(), ObservableComponent(), printStatistics(), Diades::Automata::randomSimulateState(), and runGlobalDiagnosisProblem().
|
inline |
Number of observable events output of the ObservableMask
Definition at line 197 of file ObservableComponent.hh.
References Diades::Automata::ObservableMask::numberOfObservableEvents().
|
inline |
Observable events output of the ObservableMask
Definition at line 173 of file ObservableComponent.hh.
References Diades::Automata::ObservableMask::observableBegin().
Referenced by component2Orange(), and main().
|
inline |
Observable events output of the ObservableMask
Definition at line 184 of file ObservableComponent.hh.
References Diades::Automata::ObservableMask::observableEnd().
Referenced by component2Orange(), and main().
|
inline |
Transition iterator
e | an observable Event |
Definition at line 329 of file ObservableComponent.hh.
References containsObservableEvent(), Diades::Automata::Event::id(), and require.
|
inline |
Transition iterator
e | an Event |
Definition at line 340 of file ObservableComponent.hh.
References containsObservableEvent(), Diades::Automata::Event::id(), and require.
|
inline |
Transition iterator on the output transitions of a given state labelled with a given observable event
s | a State |
e | an Event |
Definition at line 371 of file ObservableComponent.hh.
References Diades::Automata::Component::_behav, containsObservableEvent(), Diades::Automata::Event::id(), and require.
|
inline |
Transition iterator on the output transitions of a given state labelled with a given observable event
s | a State |
e | an observable Event |
Definition at line 388 of file ObservableComponent.hh.
References Diades::Automata::Component::_behav, containsObservableEvent(), Diades::Automata::Event::id(), and require.
|
protectedvirtual |
stream | the input stream parse the faulty events of the component in a des_comp file |
Reimplemented from Diades::Automata::Component.
Referenced by inputObservableTransitionEnd().
|
protectedvirtual |
stream | the input stream parse the normal events of the component in a des_comp file |
Reimplemented from Diades::Automata::Component.
Referenced by inputObservableTransitionEnd().
|
protectedvirtual |
stream | the input stream parse the observable events of the component in a des_comp file here an observable event is just consider as a normal event |
Reimplemented from Diades::Automata::Component.
Referenced by inputObservableTransitionEnd().
|
virtual |
Projection of the ObservableComponent comp The current ObservableComponent is the result of the projection of comp over the set of events projectedEvents
comp | ObservableComponent to project |
projectedEvents | set of projected events |
Referenced by getSynchronisedInteraction(), and inputObservableTransitionEnd().
|
virtual |
Projection of the ObservableComponent comp The current ObservableComponent is the result of the projection of comp over the set of events projectedEvents
comp | ObservableComponent to project |
projectedEvents | set of projected events |
dictionary | the dictionnary that associates to each state of the abstracted component the set of states of the original component. |
void Diades::Automata::ObservableComponent::setMask | ( | const ObservableMask & | mask | ) |
Mask application
mask | the ObservableMask to apply on the Component |
Referenced by MealyEncoding(), ObservableComponent(), and synchroniseModels().
|
inlinestatic |
Definition at line 87 of file ObservableComponent.hh.
|
inline |
Transition iterator
Definition at line 351 of file ObservableComponent.hh.
References Diades::Automata::Event::id(), and Diades::Automata::ObservableMask::noEvent().
|
inline |
Transition iterator
Definition at line 359 of file ObservableComponent.hh.
References Diades::Automata::Event::id(), and Diades::Automata::ObservableMask::noEvent().
|
virtual |
event | the event whose mak will be updated |
obsLabel | the label of the observable events in the mask of event to update |
Referenced by inputObservableTransitionEnd().
|
private |
Definition at line 102 of file ObservableComponent.hh.
Referenced by mask().
|
private |
Definition at line 97 of file ObservableComponent.hh.
|
private |
Definition at line 98 of file ObservableComponent.hh.
|
private |
Definition at line 99 of file ObservableComponent.hh.
|
private |
Definition at line 100 of file ObservableComponent.hh.
|
private |
Definition at line 101 of file ObservableComponent.hh.