hio_plant.h
Go to the documentation of this file.
1 /** @file hio_plant.h Generator with I/O-plant attributes */
2 
3 /* Hierarchical IO Systems Plug-In for FAU Discrete Event Systems Library (libfaudes)
4 
5  Copyright (C) 2006 Sebastian Perk
6  Copyright (C) 2006 Thomas Moor
7  Copyright (C) 2006 Klaus Schmidt
8 
9 */
10 
11 #ifndef FAUDES_HIO_PLANT_H
12 #define FAUDES_HIO_PLANT_H
13 
14 #include "corefaudes.h"
15 #include "hio_attributes.h"
16 
17 namespace faudes {
18 
19 
20 /**
21  * Generator with I/O-plant attributes. The HioPlant is a variant of the
22  * Generator to add an interface for events and states with I/O-plant attributes,
23  * built from HioEvent- and HioStateFlags
24  * - event attributes: YP = Y && P
25  * UP = U && P
26  * YE = Y && E
27  * UE = U && E
28  * - state attributes: QYpYe = QY && QP && QE
29  * QUp = QU && QP
30  * QUe = QU && QE
31  *
32  * Technically, the construct is based on the specialized attribute classes
33  * faudes::HioEventFlags and faudes::HioStateFlags that provide attributes with
34  * semantics for hierarchical I/O properties. The THioPlant expects attribute template
35  * parameters with the minimum interface defined in HioEventFlags and HioStateFlags.
36  * Thus, you can add further semantics by deriving a class HioEventFlagsAndMore from
37  * HioEventFlags (same for HioStateFlags) and use this as event attribute parameter for
38  * THioPlant. To model a plain finite state machine plus I/O-plant properties, use THioPlant
39  * with HioEventFlags and HioStateFlags for the event and state attribute parameters
40  * and AttributeVoid for the other parameters.
41  * For convenience, this has been typedefed as HioPlant.
42  *
43  * @ingroup hiosysplugin
44  */
45 
46 template <class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
47  class THioPlant : public TaGenerator<GlobalAttr, StateAttr, EventAttr, TransAttr> {
48  public:
49  /**
50  * Creates an empty HioPlant object
51  */
52  THioPlant(void);
53 
54  /**
55  * HioPlant from a std Generator. Copy constructor
56  *
57  * @param rOtherGen
58  */
59  THioPlant(const Generator& rOtherGen);
60 
61  /**
62  * HioPlant from a std Generator and event sets. Copy constructor
63  *
64  * @param rOtherGen
65  * Generator
66  * @param rYp
67  * alphabet Yp
68  * @param rUp
69  * alphabet Up
70  * @param rYe
71  * alphabet Ye
72  * @param rUe
73  * alphabet Ue
74  */
75  THioPlant(
76  const Generator& rOtherGen,
77  const EventSet& rYp,
78  const EventSet& rUp,
79  const EventSet& rYe,
80  const EventSet& rUe
81  );
82 
83  /**
84  * HioPlant from a HioPlant. Copy constructor
85  *
86  * @param rOtherGen
87  */
88  THioPlant(const THioPlant& rOtherGen);
89 
90  /**
91  * construct a HioPlant from file
92  *
93  * @param rFileName
94  * Filename
95  *
96  * @exception Exception
97  * If opening/reading fails an Exception object is thrown (id 1, 50, 51)
98  */
99  THioPlant(const std::string& rFileName);
100 
101  /**
102  * Construct on heap
103  *
104  * @return
105  * new Generator
106  */
107  virtual THioPlant* New(void) const;
108 
109  /**
110  * Construct copy on heap
111  *
112  * @return
113  * new Generator
114  */
115  virtual THioPlant* Copy(void) const;
116 
117  /**
118  * Create empty HioPlant with same symboltable as this
119  *
120  * @return
121  * New Generator
122  */
123  THioPlant NewHioPlant(void) const;
124 
125  /**
126  * Assignment operator (uses copy )
127  * Note: you must reimplement this operator in derived
128  * classes in order to handle internal pointers correctly
129  *
130  * @param rOtherGen
131  * Other generator
132  */
133  virtual THioPlant& operator= (const THioPlant& rOtherGen) {this->Assign(rOtherGen); return *this;};
134 
135  /**
136  * Assignment operator (uses copy )
137  *
138  * @param rOtherGen
139  * Other generator
140  */
141  virtual THioPlant& operator= (const Generator& rOtherGen) {this->Assign(rOtherGen); return *this;};
142 
143 //**************** I/O plant event attributes ********************/
144 
145  /**
146  * Add an existing Yp-event to generator.
147  * An entry in the global event table will be made.
148  *
149  * @param index
150  * Event index
151  */
152  void InsYpEvent(Idx index);
153 
154  /**
155  * Add new named Yp-event to generator.
156  * An entry in the global event table will be made if event is new.
157  *
158  * @param rName
159  * Name of the event to add
160  *
161  * @return
162  * New global unique index
163  */
164  Idx InsYpEvent(const std::string& rName);
165 
166  /**
167  * Add an existing Up-event to generator.
168  * An entry in the global event table will be made.
169  *
170  * @param index
171  * Event index
172  */
173  void InsUpEvent(Idx index);
174 
175  /**
176  * Add new named Up-event to generator.
177  * An entry in the global event table will be made if event is new.
178  *
179  * @param rName
180  * Name of the event to add
181  *
182  * @return
183  * New global unique index
184  */
185  Idx InsUpEvent(const std::string& rName);
186 
187  /**
188  * Mark event as Yp-event (by index)
189  *
190  * @param index
191  * Event index
192  */
193  void SetYp(Idx index);
194 
195  /**
196  * Mark event as Yp-event(by name)
197  *
198  * @param rName
199  * Event name
200  */
201  void SetYp(const std::string& rName);
202 
203  /**
204  * Mark set of events as Yp-events
205  *
206  * @param rEvents
207  * EventSet
208  */
209  void SetYp(const EventSet& rEvents);
210 
211  /**
212  * Mark event Up-event(by index)
213  *
214  * @param index
215  * Event index
216  */
217  void SetUp(Idx index);
218 
219  /**
220  * Mark event Up-event(by name)
221  *
222  * @param rName
223  * Event name
224  */
225  void SetUp(const std::string& rName);
226 
227  /**
228  * Mark set of events as Up-events
229  *
230  * @param rEvents
231  * EventSet
232  */
233  void SetUp(const EventSet& rEvents);
234 
235  /**
236  * Is event Yp-event(by index)
237  *
238  * @param index
239  * Event index
240  *
241  * @return
242  * True / false
243  */
244  bool IsYp(Idx index) const;
245 
246  /**
247  * Is event Yp-event(by name)
248  *
249  * @param rName
250  * Event name
251  *
252  * @return
253  * True / false
254  */
255  bool IsYp(const std::string& rName) const;
256 
257  /**
258  * Is event Up-event(by index)
259  *
260  * @param index
261  * Event index
262  *
263  * @return
264  * True / false
265  */
266  bool IsUp(Idx index) const;
267 
268  /**
269  * Is event Up-event(by name)
270  *
271  * @param rName
272  * Event name
273  *
274  * @return
275  * True / false
276  */
277  bool IsUp(const std::string& rName) const;
278 
279  /**
280  * Get EventSet with Yp-events
281  *
282  * @return
283  * EventSet of Yp-events
284  */
285  EventSet YpEvents(void) const;
286 
287  /**
288  * Get EventSet with Up-events
289  *
290  * @return
291  * EventSet of Up-events
292  */
293  EventSet UpEvents(void) const;
294 
295  /**
296  * Add an existing Ye-event to generator.
297  * An entry in the global event table will be made.
298  *
299  * @param index
300  * Event index
301  */
302  void InsYeEvent(Idx index);
303 
304  /**
305  * Add new named Ye-event to generator.
306  * An entry in the global event table will be made if event is new.
307  *
308  * @param rName
309  * Name of the event to add
310  *
311  * @return
312  * New global unique index
313  */
314  Idx InsYeEvent(const std::string& rName);
315 
316  /**
317  * Add an existing Ue-event to generator.
318  * An entry in the global event table will be made.
319  *
320  * @param index
321  * Event index
322  */
323  void InsUeEvent(Idx index);
324 
325  /**
326  * Add new named Ue-event to generator.
327  * An entry in the global event table will be made if event is new.
328  *
329  * @param rName
330  * Name of the event to add
331  *
332  * @return
333  * New global unique index
334  */
335  Idx InsUeEvent(const std::string& rName);
336 
337  /**
338  * Mark event as Ye-event (by index)
339  *
340  * @param index
341  * Event index
342  */
343  void SetYe(Idx index);
344 
345  /**
346  * Mark event as Ye-event (by name)
347  *
348  * @param rName
349  * Event name
350  */
351  void SetYe(const std::string& rName);
352 
353  /**
354  * Mark set of events as Ye-events
355  *
356  * @param rEvents
357  * EventSet
358  */
359  void SetYe(const EventSet& rEvents);
360 
361  /**
362  * Mark event as Ue-event (by index)
363  *
364  * @param index
365  * Event index
366  */
367  void SetUe(Idx index);
368 
369  /**
370  * Mark event as Ue-event (by name)
371  *
372  * @param rName
373  * Event name
374  */
375  void SetUe(const std::string& rName);
376 
377  /**
378  * Mark set of events as Ue-events
379  *
380  * @param rEvents
381  * EventSet
382  */
383  void SetUe(const EventSet& rEvents);
384 
385  /**
386  * Is event Ye-event (by index)
387  *
388  * @param index
389  * Event index
390  *
391  * @return
392  * True / false
393  */
394  bool IsYe(Idx index) const;
395 
396  /**
397  * Is event Ye-event (by name)
398  *
399  * @param rName
400  * Event name
401  *
402  * @return
403  * True / false
404  */
405  bool IsYe(const std::string& rName) const;
406 
407  /**
408  * Is event Ue-event (by index)
409  *
410  * @param index
411  * Event index
412  *
413  * @return
414  * True / false
415  */
416  bool IsUe(Idx index) const;
417 
418  /**
419  * Is event Ue-event (by name)
420  *
421  * @param rName
422  * Event name
423  *
424  * @return
425  * True / false
426  */
427  bool IsUe(const std::string& rName) const;
428 
429  /**
430  * Get EventSet with Ye-events
431  *
432  * @return
433  * EventSet of Ye-events
434  */
435  EventSet YeEvents(void) const;
436 
437  /**
438  * Get EventSet with Ue-events
439  *
440  * @return
441  * EventSet of Ue-events
442  */
443  EventSet UeEvents(void) const;
444 
445 
446 //************** query elementary event attributes ****************************/
447  /**
448  * Is event Y-event? (by index)
449  *
450  * @param index
451  * Event index
452  *
453  * @return
454  * True / false
455  */
456  bool IsY(Idx index) const;
457 
458  /**
459  * Is event Y-event? (by name)
460  *
461  * @param rName
462  * Event name
463  *
464  * @return
465  * True / false
466  */
467  bool IsY(const std::string& rName) const;
468 
469  /**
470  * Get EventSet with Y-events
471  *
472  * @return
473  * EventSet of Y-events
474  */
475  EventSet YEvents(void) const;
476 
477  /**
478  * Is event U-event? (by index)
479  *
480  * @param index
481  * Event index
482  *
483  * @return
484  * True / false
485  */
486  bool IsU(Idx index) const;
487 
488  /**
489  * Is event U-event? (by name)
490  *
491  * @param rName
492  * Event name
493  *
494  * @return
495  * True / false
496  */
497  bool IsU(const std::string& rName) const;
498 
499  /**
500  * Get EventSet with U-events
501  *
502  * @return
503  * EventSet of U-events
504  */
505  EventSet UEvents(void) const;
506 
507  /**
508  * Is event P-event? (by index)
509  *
510  * @param index
511  * Event index
512  *
513  * @return
514  * True / false
515  */
516  bool IsP(Idx index) const;
517 
518  /**
519  * Is event P-event? (by name)
520  *
521  * @param rName
522  * Event name
523  *
524  * @return
525  * True / false
526  */
527  bool IsP(const std::string& rName) const;
528 
529  /**
530  * Get EventSet with P-events
531  *
532  * @return
533  * EventSet of P-events
534  */
535  EventSet PEvents(void) const;
536 
537  /**
538  * Is event E-event? (by index)
539  *
540  * @param index
541  * Event index
542  *
543  * @return
544  * True / false
545  */
546  bool IsE(Idx index) const;
547 
548  /**
549  * Is event E-event? (by name)
550  *
551  * @param rName
552  * Event name
553  *
554  * @return
555  * True / false
556  */
557  bool IsE(const std::string& rName) const;
558 
559  /**
560  * Get EventSet with E-events
561  *
562  * @return
563  * EventSet of E-events
564  */
565  EventSet EEvents(void) const;
566 /******************************************************/
567 
568 
569 /*************** I/O plant state attributes **********************/
570 
571  /**
572  * Mark state as QYpYe-state (by index)
573  *
574  * @param index
575  * State index
576  */
577  void SetQYpYe(Idx index);
578 
579  /**
580  * Mark state as QYpYe-state (by name)
581  *
582  * @param rName
583  * State name
584  */
585  void SetQYpYe(const std::string& rName);
586 
587  /**
588  * Mark set of states as QYpYe-states
589  *
590  * @param rStates
591  * StateSet
592  */
593  void SetQYpYe(const StateSet& rStates);
594 
595  /** Mark state as NOT QYpYe-state (by index)
596  *
597  * @param index
598  * State index
599  */
600  void ClrQYpYe(Idx index);
601 
602  /**
603  * Mark state as NOT QYpYe-state (by name)
604  *
605  * @param rName
606  * State name
607  */
608  void ClrQYpYe(const std::string& rName);
609 
610  /**
611  * Mark set of states as NOT QYpYe-states (by index)
612  *
613  * @param rStates
614  * StateSet
615  */
616  void ClrQYpYe(const StateSet& rStates);
617 
618  /** Is state QYpYe-state (by index)
619  *
620  * @param index
621  * State index
622  *
623  * @return
624  * True / false
625  */
626  bool IsQYpYe(Idx index) const;
627 
628  /**
629  * Is state QYpYe-state (by name)
630  *
631  * @param rName
632  * State name
633  *
634  * @return
635  * True / false
636  */
637  bool IsQYpYe(const std::string& rName) const;
638 
639  /**
640  * Get StateSet with QYpYe-states
641  *
642  * @return
643  * StateSet of QYpYe-states
644  */
645  StateSet QYpYeStates(void) const;
646 
647  /**
648  * Mark state as QUp-state (by index)
649  *
650  * @param index
651  * State index
652  */
653  void SetQUp(Idx index);
654 
655  /**
656  * Mark state as QUp-state (by name)
657  *
658  * @param rName
659  * State name
660  */
661  void SetQUp(const std::string& rName);
662 
663  /**
664  * Mark set of states as QUp-states
665  *
666  * @param rStates
667  * StateSet
668  */
669  void SetQUp(const StateSet& rStates);
670 
671  /** Mark state as NOT QUp-state (by index)
672  *
673  * @param index
674  * State index
675  */
676  void ClrQUp(Idx index);
677 
678  /**
679  * Mark state as NOT QUp-state (by name)
680  *
681  * @param rName
682  * State name
683  */
684  void ClrQUp(const std::string& rName);
685 
686  /**
687  * Mark set of states as NOT QUp-states (by index)
688  *
689  * @param rStates
690  * StateSet
691  */
692  void ClrQUp(const StateSet& rStates);
693 
694  /** Is state QUp-state (by index)
695  *
696  * @param index
697  * State index
698  *
699  * @return
700  * True / false
701  */
702  bool IsQUp(Idx index) const;
703 
704  /**
705  * Is state QUp-state (by name)
706  *
707  * @param rName
708  * State name
709  *
710  * @return
711  * True / false
712  */
713  bool IsQUp(const std::string& rName) const;
714 
715  /**
716  * Get StateSet with QUp-states
717  *
718  * @return
719  * StateSet of QUp-states
720  */
721  StateSet QUpStates(void) const;
722 
723  /**
724  * Mark state as QUe-state (by index)
725  *
726  * @param index
727  * State index
728  */
729  void SetQUe(Idx index);
730 
731  /**
732  * Mark state as QUe-state (by name)
733  *
734  * @param rName
735  * State name
736  */
737  void SetQUe(const std::string& rName);
738 
739  /**
740  * Mark set of states as QUe-states
741  *
742  * @param rStates
743  * StateSet
744  */
745  void SetQUe(const StateSet& rStates);
746 
747  /** Mark state as NOT QUe-state (by index)
748  *
749  * @param index
750  * State index
751  */
752  void ClrQUe(Idx index);
753 
754  /**
755  * Mark state as NOT QUe-state (by name)
756  *
757  * @param rName
758  * State name
759  */
760  void ClrQUe(const std::string& rName);
761 
762  /**
763  * Mark set of states as NOT QUe-states (by index)
764  *
765  * @param rStates
766  * StateSet
767  */
768  void ClrQUe(const StateSet& rStates);
769 
770  /** Is state QUe-state (by index)
771  *
772  * @param index
773  * State index
774  *
775  * @return
776  * True / false
777  */
778  bool IsQUe(Idx index) const;
779 
780  /**
781  * Is state QUe-state (by name)
782  *
783  * @param rName
784  * State name
785  *
786  * @return
787  * True / false
788  */
789  bool IsQUe(const std::string& rName) const;
790 
791  /**
792  * Get StateSet with QUe-states
793  *
794  * @return
795  * StateSet of QUe-states
796  */
797  StateSet QUeStates(void) const;
798 
799  /**
800  * Mark state as Err-state (by index)
801  *
802  * @param index
803  * State index
804  */
805  void SetErr(Idx index);
806 
807  /**
808  * Mark state as Err-state (by name)
809  *
810  * @param rName
811  * State name
812  */
813  void SetErr(const std::string& rName);
814 
815  /**
816  * Mark set of states as Err-states
817  *
818  * @param rStates
819  * StateSet
820  */
821  void SetErr(const StateSet& rStates);
822 
823  /** Mark state as NOT Err-state (by index)
824  *
825  * @param index
826  * State index
827  */
828  void ClrErr(Idx index);
829 
830  /**
831  * Mark state as NOT Err-state (by name)
832  *
833  * @param rName
834  * State name
835  */
836  void ClrErr(const std::string& rName);
837 
838  /**
839  * Mark set of states as NOT Err-states (by index)
840  *
841  * @param rStates
842  * StateSet
843  */
844  void ClrErr(const StateSet& rStates);
845 
846  /** Is state Err-state (by index)
847  *
848  * @param index
849  * State index
850  *
851  * @return
852  * True / false
853  */
854  bool IsErr(Idx index) const;
855 
856  /**
857  * Is state Err-state (by name)
858  *
859  * @param rName
860  * State name
861  *
862  * @return
863  * True / false
864  */
865  bool IsErr(const std::string& rName) const;
866 
867  /**
868  * Get StateSet with Err-states
869  *
870  * @return
871  * StateSet of Err-states
872  */
873  StateSet ErrStates(void) const;
874 
875  /**
876  * Updates internal attributes.
877  * This method sets the state partition attributes.
878  *
879  * @return True if value changed
880  */
881  virtual bool UpdateAttributes(void) {IsHioPlantForm(*this); return true;};
882 
883  private:
884 
885  protected:
886 }; // end class THioPlant
887 
888 
889 // convenience typedef for std HioPlant
891 
892 /* convenience access to relevant scopes */
893 #define THIS THioPlant<GlobalAttr, StateAttr, EventAttr, TransAttr>
894 #define BASE TaGenerator<GlobalAttr, StateAttr, EventAttr, TransAttr>
895 #define TEMP template <class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
896 
897 
898 // THioPlant(void)
899 TEMP THIS::THioPlant(void) : BASE() {
900  FD_DG("HioPlant(" << this << ")::HioPlant()");
901 }
902 
903 // THioPlant(rOtherGen)
904 TEMP THIS::THioPlant(const THioPlant& rOtherGen) : BASE(rOtherGen) {
905  FD_DG("HioPlant(" << this << ")::HioPlant(rOtherGen)");
906 }
907 
908 // THioPlant(rOtherGen)
909 TEMP THIS::THioPlant(const Generator& rOtherGen) : BASE(rOtherGen) {
910  FD_DG("HioPlant(" << this << ")::HioPlant(rOtherGen)");
911 }
912 
913 // THioPlant(rOtherGen,rYp,rUp,rYe,rUe)
914 TEMP THIS::THioPlant(
915 const Generator& rOtherGen,
916  const EventSet& rYp,
917  const EventSet& rUp,
918  const EventSet& rYe,
919  const EventSet& rUe
920 ) : BASE(rOtherGen) {
921  FD_DG("HioPlant(" << this << ")::HioPlant(rOtherGen)");
922  SetYp(rYp);
923  SetUp(rUp);
924  SetYe(rYe);
925  SetUe(rUe);
926 }
927 
928 // THioPlant(rFileName)
929 TEMP THIS::THioPlant(const std::string& rFileName) : BASE(rFileName) {
930  FD_DG("HioPlant(" << this << ")::HioPlant(rFilename) : done");
931 }
932 
933 // New()
934 TEMP THIS* THIS::New(void) const {
935  // allocate
936  THIS* res = new THIS();
937  // fix base data
938  res->EventSymbolTablep(BASE::mpEventSymbolTable);
939  res->mStateNamesEnabled=BASE::mStateNamesEnabled;
940  return res;
941 }
942 
943 // Copy()
944 TEMP THIS* THIS::Copy(void) const {
945  return new THIS(*this);
946 }
947 
948 // NewHioPlant()
949 TEMP THIS THIS::NewHioPlant(void) const {
950  // call base (fixes by assignment constructor)
951  THIS res= BASE::NewAGen();
952  return res;
953 }
954 
955 
956 /******************************************************/
957 
958  // IsY(index)
959  TEMP bool THIS::IsY(Idx index) const {
960  EventAttr attr=BASE::EventAttribute(index);
961  return attr.IsY();
962  }
963 
964  // IsY(rName)
965  TEMP bool THIS::IsY(const std::string& rName) const {
966  EventAttr attr=BASE::EventAttribute(rName);
967  return attr.IsY();
968  }
969 
970  // IsU(index)
971  TEMP bool THIS::IsU(Idx index) const {
972  EventAttr attr=BASE::EventAttribute(index);
973  return attr.IsU();
974  }
975 
976  // IsU(rName)
977  TEMP bool THIS::IsU(const std::string& rName) const {
978  EventAttr attr=BASE::EventAttribute(rName);
979  return attr.IsU();
980  }
981 
982  //YEvents()
983  TEMP EventSet THIS::YEvents(void) const {
984  FD_DG("HioPlant(" << this << ")::YEvents()");
985  EventSet res;
986  EventSet::Iterator it;
987  for(it=BASE::AlphabetBegin(); it!=BASE::AlphabetEnd(); it++) {
988  if(IsY(*it)) res.Insert(*it);
989  }
990  return res;
991  }
992 
993  //UEvents()
994  TEMP EventSet THIS::UEvents(void) const {
995  FD_DG("HioPlant(" << this << ")::UEvents()");
996  EventSet res;
997  EventSet::Iterator it;
998  for(it=BASE::AlphabetBegin(); it!=BASE::AlphabetEnd(); it++) {
999  if(IsU(*it)) res.Insert(*it);
1000  }
1001  return res;
1002  }
1003 
1004 /*****************************************************************/
1005 
1006  // InsYpEvent(index)
1007  TEMP void THIS::InsYpEvent(Idx index) {
1008  FD_DG("HioPlant(" << this << ")::InsYpEvent(" << index << ")");
1009  EventAttr attr;
1010  attr.SetY();
1011  attr.SetP();
1012  BASE::InsEvent(index,attr);
1013  }
1014 
1015  // InsYpEvent(rName)
1016  TEMP Idx THIS::InsYpEvent(const std::string& rName) {
1017  FD_DG("HioPlant(" << this << ")::InsYpEvent(" << rName << ")");
1018  EventAttr attr;
1019  attr.SetY();
1020  attr.SetP();
1021  return BASE::InsEvent(rName,attr);
1022  }
1023 
1024  // InsUpEvent(index)
1025  TEMP void THIS::InsUpEvent(Idx index) {
1026  FD_DG("HioPlant(" << this << ")::InsUpEvent(" << index << ")");
1027  EventAttr attr;
1028  attr.SetU();
1029  attr.SetP();
1030  BASE::InsEvent(index,attr);
1031  }
1032 
1033  // InsUpEvent(rName)
1034  TEMP Idx THIS::InsUpEvent(const std::string& rName) {
1035  FD_DG("HioPlant(" << this << ")::InsUpEvent(" << rName << ")");
1036  EventAttr attr;
1037  attr.SetU();
1038  attr.SetP();
1039  return BASE::InsEvent(rName,attr);
1040  }
1041 
1042  // SetYp(index)
1043  TEMP void THIS::SetYp(Idx index) {
1044  FD_DG("HioPlant(" << this << ")::SetYp(" << index << ")");
1045  EventAttr attr=BASE::EventAttribute(index);
1046  attr.SetY();
1047  attr.SetP();
1048  BASE::pAlphabet->Attribute(index,attr);
1049  }
1050 
1051  // SetYp(rName)
1052  TEMP void THIS::SetYp(const std::string& rName) {
1053  FD_DG("HioPlant(" << this << ")::SetYp(" << rName << ")");
1054  Idx index = BASE::EventIndex(rName);
1055  SetYp(index);
1056  }
1057 
1058  //SetYp(rEvents)
1059  TEMP void THIS::SetYp(const EventSet& rEvents) {
1060  FD_DG("HioPlant(" << this << ")::SetYp(rEvents)");
1061  EventSet::Iterator it;
1062  for(it=rEvents.Begin(); it!=rEvents.End(); it++) {
1063  SetYp(*it);
1064  }
1065  }
1066 
1067  // SetUp(index)
1068  TEMP void THIS::SetUp(Idx index) {
1069  FD_DG("HioPlant(" << this << ")::SetUp(" << index << ")");
1070  EventAttr attr=BASE::EventAttribute(index);
1071  attr.SetU();
1072  attr.SetP();
1073  BASE::pAlphabet->Attribute(index,attr);
1074  }
1075 
1076  // SetUp(rName)
1077  TEMP void THIS::SetUp(const std::string& rName) {
1078  FD_DG("HioPlant(" << this << ")::SetUp(" << rName << ")");
1079  Idx index = BASE::EventIndex(rName);
1080  SetUp(index);
1081  }
1082 
1083  //SetUp(rEvents)
1084  TEMP void THIS::SetUp(const EventSet& rEvents) {
1085  FD_DG("HioPlant(" << this << ")::SetUp(rEvents)");
1086  EventSet::Iterator it;
1087  for(it=rEvents.Begin(); it!=rEvents.End(); it++) {
1088  SetUp(*it);
1089  }
1090  }
1091 
1092 // IsYp(index)
1093  TEMP bool THIS::IsYp(Idx index) const {
1094  EventAttr attr=BASE::EventAttribute(index);
1095  return (attr.IsY() && attr.IsP());
1096  }
1097 
1098  // IsYp(rName)
1099  TEMP bool THIS::IsYp(const std::string& rName) const {
1100  EventAttr attr=BASE::EventAttribute(rName);
1101  return (attr.IsY() && attr.IsP());
1102  }
1103 
1104 // IsUp(index)
1105  TEMP bool THIS::IsUp(Idx index) const {
1106  EventAttr attr=BASE::EventAttribute(index);
1107  return (attr.IsU() && attr.IsP());
1108  }
1109 
1110  // IsUp(rName)
1111  TEMP bool THIS::IsUp(const std::string& rName) const {
1112  EventAttr attr=BASE::EventAttribute(rName);
1113  return (attr.IsU() && attr.IsP());
1114  }
1115 
1116  //YpEvents()
1117  TEMP EventSet THIS::YpEvents(void) const {
1118  FD_DG("HioPlant(" << this << ")::YpEvents()");
1119  EventSet res;
1120  EventSet::Iterator it;
1121  for(it=BASE::AlphabetBegin(); it!=BASE::AlphabetEnd(); it++) {
1122  if(IsYp(*it)) res.Insert(*it);
1123  }
1124  return res;
1125  }
1126 
1127  //UpEvents()
1128  TEMP EventSet THIS::UpEvents(void) const {
1129  FD_DG("HioPlant(" << this << ")::UpEvents()");
1130  EventSet res;
1131  EventSet::Iterator it;
1132  for(it=BASE::AlphabetBegin(); it!=BASE::AlphabetEnd(); it++) {
1133  if(IsUp(*it)) res.Insert(*it);
1134  }
1135  return res;
1136  }
1137 
1138 /*******************************************************************/
1139 
1140  // InsYeEvent(index)
1141  TEMP void THIS::InsYeEvent(Idx index) {
1142  FD_DG("HioPlant(" << this << ")::InsYeEvent(" << index << ")");
1143  EventAttr attr;
1144  attr.SetY();
1145  attr.SetE();
1146  BASE::InsEvent(index,attr);
1147  }
1148 
1149  // InsYeEvent(rName)
1150  TEMP Idx THIS::InsYeEvent(const std::string& rName) {
1151  FD_DG("HioPlant(" << this << ")::InsYeEvent(" << rName << ")");
1152  EventAttr attr;
1153  attr.SetY();
1154  attr.SetE();
1155  return BASE::InsEvent(rName,attr);
1156  }
1157 
1158  // InsUeEvent(index)
1159  TEMP void THIS::InsUeEvent(Idx index) {
1160  FD_DG("HioPlant(" << this << ")::InsUeEvent(" << index << ")");
1161  EventAttr attr;
1162  attr.SetU();
1163  attr.SetE();
1164  BASE::InsEvent(index,attr);
1165  }
1166 
1167  // InsUeEvent(rName)
1168  TEMP Idx THIS::InsUeEvent(const std::string& rName) {
1169  FD_DG("HioPlant(" << this << ")::InsUeEvent(" << rName << ")");
1170  EventAttr attr;
1171  attr.SetU();
1172  attr.SetE();
1173  return BASE::InsEvent(rName,attr);
1174  }
1175 
1176  // SetYe(index)
1177  TEMP void THIS::SetYe(Idx index) {
1178  FD_DG("HioPlant(" << this << ")::SetYe(" << index << ")");
1179  EventAttr attr=BASE::EventAttribute(index);
1180  attr.SetY();
1181  attr.SetE();
1182  BASE::pAlphabet->Attribute(index,attr);
1183  }
1184 
1185  // SetYe(rName)
1186  TEMP void THIS::SetYe(const std::string& rName) {
1187  FD_DG("HioPlant(" << this << ")::SetYe(" << rName << ")");
1188  Idx index = BASE::EventIndex(rName);
1189  SetYe(index);
1190  }
1191 
1192  //SetYe(rEvents)
1193  TEMP void THIS::SetYe(const EventSet& rEvents) {
1194  FD_DG("HioPlant(" << this << ")::SetYe(rEvents)");
1195  EventSet::Iterator it;
1196  for(it=rEvents.Begin(); it!=rEvents.End(); it++) {
1197  SetYe(*it);
1198  }
1199  }
1200 
1201  // SetUe(index)
1202  TEMP void THIS::SetUe(Idx index) {
1203  FD_DG("HioPlant(" << this << ")::SetUe(" << index << ")");
1204  EventAttr attr=BASE::EventAttribute(index);
1205  attr.SetU();
1206  attr.SetE();
1207  BASE::pAlphabet->Attribute(index,attr);
1208  }
1209 
1210  // SetUe(rName)
1211  TEMP void THIS::SetUe(const std::string& rName) {
1212  FD_DG("HioPlant(" << this << ")::SetUe(" << rName << ")");
1213  Idx index = BASE::EventIndex(rName);
1214  SetUe(index);
1215  }
1216 
1217  //SetUe(rEvents)
1218  TEMP void THIS::SetUe(const EventSet& rEvents) {
1219  FD_DG("HioPlant(" << this << ")::SetUe(rEvents)");
1220  EventSet::Iterator it;
1221  for(it=rEvents.Begin(); it!=rEvents.End(); it++) {
1222  SetUe(*it);
1223  }
1224  }
1225 
1226  // IsYe(index)
1227  TEMP bool THIS::IsYe(Idx index) const {
1228  EventAttr attr=BASE::EventAttribute(index);
1229  return (attr.IsY() && attr.IsE());
1230  }
1231 
1232  // IsYe(rName)
1233  TEMP bool THIS::IsYe(const std::string& rName) const {
1234  EventAttr attr=BASE::EventAttribute(rName);
1235  return (attr.IsY() && attr.IsE());
1236  }
1237 
1238  // IsUe(index)
1239  TEMP bool THIS::IsUe(Idx index) const {
1240  EventAttr attr=BASE::EventAttribute(index);
1241  return (attr.IsU() && attr.IsE());
1242  }
1243 
1244  // IsUe(rName)
1245  TEMP bool THIS::IsUe(const std::string& rName) const {
1246  EventAttr attr=BASE::EventAttribute(rName);
1247  return (attr.IsU() && attr.IsE());
1248  }
1249 
1250  //YeEvents()
1251  TEMP EventSet THIS::YeEvents(void) const {
1252  FD_DG("HioPlant(" << this << ")::YeEvents()");
1253  EventSet res;
1254  EventSet::Iterator it;
1255  for(it=BASE::AlphabetBegin(); it!=BASE::AlphabetEnd(); it++) {
1256  if(IsYe(*it)) res.Insert(*it);
1257  }
1258  return res;
1259  }
1260 
1261  //UeEvents()
1262  TEMP EventSet THIS::UeEvents(void) const {
1263  FD_DG("HioPlant(" << this << ")::UeEvents()");
1264  EventSet res;
1265  EventSet::Iterator it;
1266  for(it=BASE::AlphabetBegin(); it!=BASE::AlphabetEnd(); it++) {
1267  if(IsUe(*it)) res.Insert(*it);
1268  }
1269  return res;
1270  }
1271 
1272 /*****************************************************************/
1273 
1274  // IsP(index)
1275  TEMP bool THIS::IsP(Idx index) const {
1276  EventAttr attr=BASE::EventAttribute(index);
1277  return attr.IsP();
1278  }
1279 
1280  // IsP(rName)
1281  TEMP bool THIS::IsP(const std::string& rName) const {
1282  EventAttr attr=BASE::EventAttribute(rName);
1283  return attr.IsP();
1284  }
1285 
1286  // IsE(index)
1287  TEMP bool THIS::IsE(Idx index) const {
1288  EventAttr attr=BASE::EventAttribute(index);
1289  return attr.IsE();
1290  }
1291 
1292  // IsE(rName)
1293  TEMP bool THIS::IsE(const std::string& rName) const {
1294  EventAttr attr=BASE::EventAttribute(rName);
1295  return attr.IsE();
1296  }
1297 
1298  //PEvents()
1299  TEMP EventSet THIS::PEvents(void) const {
1300  FD_DG("HioPlant(" << this << ")::PEvents()");
1301  EventSet res;
1302  EventSet::Iterator it;
1303  for(it=BASE::AlphabetBegin(); it!=BASE::AlphabetEnd(); it++) {
1304  if(IsP(*it)) res.Insert(*it);
1305  }
1306  return res;
1307  }
1308 
1309  //EEvents()
1310  TEMP EventSet THIS::EEvents(void) const {
1311  FD_DG("HioPlant(" << this << ")::EEvents()");
1312  EventSet res;
1313  EventSet::Iterator it;
1314  for(it=BASE::AlphabetBegin(); it!=BASE::AlphabetEnd(); it++) {
1315  if(IsE(*it)) res.Insert(*it);
1316  }
1317  return res;
1318  }
1319 
1320 /*******************************************************************/
1321 
1322 /*******************************************************************
1323  *****************Implementation of the state attributes*************
1324 *******************************************************************/
1325 
1326  // SetQYpYe(index)
1327  TEMP void THIS::SetQYpYe(Idx index) {
1328  FD_DG("HioPlant(" << this << ")::SetQYpYe(" << index << ")");
1329  StateAttr attr=BASE::StateAttribute(index);
1330  attr.SetQY();
1331  attr.SetQP();
1332  attr.SetQE();
1333  attr.ClrQU();
1334  attr.ClrQC();
1335  attr.ClrQL();
1336  attr.ClrQYcUp();
1337  attr.ClrQYlUe();
1338  BASE::pStates->Attribute(index,attr);
1339  }
1340 
1341  // SetQYpYe(rName)
1342  TEMP void THIS::SetQYpYe(const std::string& rName) {
1343  FD_DG("HioPlant(" << this << ")::SetQYpYe(" << rName << ")");
1344  Idx index = BASE::StateIndex(rName);
1345  SetQYpYe(index);
1346  }
1347 
1348  //SetQYpYe(rStates)
1349  TEMP void THIS::SetQYpYe(const StateSet& rStates) {
1350  FD_DG("HioPlant(" << this << ")::SetQYpYe(rStates)");
1351  StateSet::Iterator sit;
1352  for(sit=rStates.Begin(); sit!=rStates.End(); sit++) {
1353  SetQYpYe(*sit);
1354  }
1355  }
1356 
1357  // ClrQYpYe(index)
1358  TEMP void THIS::ClrQYpYe(Idx index) {
1359  FD_DG("HioPlant(" << this << ")::ClrQYpYe(" << index << ")");
1360  StateAttr attr=BASE::StateAttribute(index);
1361  attr.ClrQY();
1362  attr.ClrQP();
1363  attr.ClrQE();
1364  BASE::pStates->Attribute(index,attr);
1365  }
1366 
1367  // ClrQYpYe(rName)
1368  TEMP void THIS::ClrQYpYe(const std::string& rName) {
1369  FD_DG("HioPlant(" << this << ")::ClrQYpYe(" << rName << ")");
1370  Idx index = BASE::StateIndex(rName);
1371  ClrQYpYe(index);
1372  }
1373 
1374  //ClrQYpYe(rStates)
1375  TEMP void THIS::ClrQYpYe(const StateSet& rStates) {
1376  FD_DG("HioPlant(" << this << ")::ClrQYpYe(rStates)");
1377  StateSet::Iterator sit;
1378  for(sit=rStates.Begin(); sit!=rStates.End(); sit++) {
1379  ClrQYpYe(*sit);
1380  }
1381  }
1382 
1383  // IsQYpYe(index)
1384  TEMP bool THIS::IsQYpYe(Idx index) const {
1385  StateAttr attr=BASE::StateAttribute(index);
1386  return attr.IsQY() && attr.IsQP() && attr.IsQE();
1387  }
1388 
1389  // IsQYpYe(rName)
1390  TEMP bool THIS::IsQYpYe(const std::string& rName) const {
1391  Idx index = BASE::StateIndex(rName);
1392  return IsQYpYe(index);
1393  }
1394 
1395  //QYpYeStates()
1396  TEMP StateSet THIS::QYpYeStates(void) const {
1397  FD_DG("HioPlant(" << this << ")::QYpYeStates()");
1398  StateSet res;
1399  StateSet::Iterator sit;
1400  for(sit=BASE::StatesBegin(); sit!=BASE::StatesEnd(); sit++) {
1401  if(IsQYpYe(*sit)) res.Insert(*sit);
1402  }
1403  return res;
1404  }
1405 /***************************************************************************/
1406 
1407  // SetQUp(index)
1408  TEMP void THIS::SetQUp(Idx index) {
1409  FD_DG("HioPlant(" << this << ")::SetQUp(" << index << ")");
1410  StateAttr attr=BASE::StateAttribute(index);
1411  attr.SetQU();
1412  attr.SetQP();
1413  attr.ClrQY();
1414  attr.ClrQC();
1415  attr.ClrQE();
1416  attr.ClrQL();
1417  attr.ClrQYcUp();
1418  attr.ClrQYlUe();
1419  BASE::pStates->Attribute(index,attr);
1420  }
1421 
1422  // SetQUp(rName)
1423  TEMP void THIS::SetQUp(const std::string& rName) {
1424  FD_DG("HioPlant(" << this << ")::SetQUp(" << rName << ")");
1425  Idx index = BASE::StateIndex(rName);
1426  SetQUp(index);
1427  }
1428 
1429  //SetQUp(rStates)
1430  TEMP void THIS::SetQUp(const StateSet& rStates) {
1431  FD_DG("HioPlant(" << this << ")::SetQUp(rStates)");
1432  StateSet::Iterator sit;
1433  for(sit=rStates.Begin(); sit!=rStates.End(); sit++) {
1434  SetQUp(*sit);
1435  }
1436  }
1437 
1438  // ClrQUp(index)
1439  TEMP void THIS::ClrQUp(Idx index) {
1440  FD_DG("HioPlant(" << this << ")::ClrQUp(" << index << ")");
1441  StateAttr attr=BASE::StateAttribute(index);
1442  attr.ClrQU();
1443  attr.ClrQP();
1444  BASE::pStates->Attribute(index,attr);
1445  }
1446 
1447  // ClrQUp(rName)
1448  TEMP void THIS::ClrQUp(const std::string& rName) {
1449  FD_DG("HioPlant(" << this << ")::ClrQUp(" << rName << ")");
1450  Idx index = BASE::StateIndex(rName);
1451  ClrQUp(index);
1452  }
1453 
1454  //ClrQUp(rStates)
1455  TEMP void THIS::ClrQUp(const StateSet& rStates) {
1456  FD_DG("HioPlant(" << this << ")::ClrQUp(rStates)");
1457  StateSet::Iterator sit;
1458  for(sit=rStates.Begin(); sit!=rStates.End(); sit++) {
1459  ClrQUp(*sit);
1460  }
1461  }
1462 
1463  // IsQUp(index)
1464  TEMP bool THIS::IsQUp(Idx index) const {
1465  StateAttr attr=BASE::StateAttribute(index);
1466  return attr.IsQU() && attr.IsQP();
1467  }
1468 
1469  // IsQUp(rName)
1470  TEMP bool THIS::IsQUp(const std::string& rName) const {
1471  Idx index = BASE::StateIndex(rName);
1472  return IsQUp(index);
1473  }
1474 
1475  //QUpStates()
1476  TEMP StateSet THIS::QUpStates(void) const {
1477  FD_DG("HioPlant(" << this << ")::QUpStates()");
1478  StateSet res;
1479  StateSet::Iterator sit;
1480  for(sit=BASE::StatesBegin(); sit!=BASE::StatesEnd(); sit++) {
1481  if(IsQUp(*sit)) res.Insert(*sit);
1482  }
1483  return res;
1484  }
1485 /***************************************************************************/
1486 
1487 /***************************************************************************/
1488 
1489  // SetQUe(index)
1490  TEMP void THIS::SetQUe(Idx index) {
1491  FD_DG("HioPlant(" << this << ")::SetQUe(" << index << ")");
1492  StateAttr attr=BASE::StateAttribute(index);
1493  attr.SetQU();
1494  attr.SetQE();
1495  attr.ClrQY();
1496  attr.ClrQC();
1497  attr.ClrQP();
1498  attr.ClrQL();
1499  attr.ClrQYcUp();
1500  attr.ClrQYlUe();
1501  BASE::pStates->Attribute(index,attr);
1502  }
1503 
1504  // SetQUe(rName)
1505  TEMP void THIS::SetQUe(const std::string& rName) {
1506  FD_DG("HioPlant(" << this << ")::SetQUe(" << rName << ")");
1507  Idx index = BASE::StateIndex(rName);
1508  SetQUe(index);
1509  }
1510 
1511  //SetQUe(rStates)
1512  TEMP void THIS::SetQUe(const StateSet& rStates) {
1513  FD_DG("HioPlant(" << this << ")::SetQUe(rStates)");
1514  StateSet::Iterator sit;
1515  for(sit=rStates.Begin(); sit!=rStates.End(); sit++) {
1516  SetQUe(*sit);
1517  }
1518  }
1519 
1520  // ClrQUe(index)
1521  TEMP void THIS::ClrQUe(Idx index) {
1522  FD_DG("HioPlant(" << this << ")::ClrQUe(" << index << ")");
1523  StateAttr attr=BASE::StateAttribute(index);
1524  attr.ClrQU();
1525  attr.ClrQE();
1526  BASE::pStates->Attribute(index,attr);
1527  }
1528 
1529  // ClrQUe(rName)
1530  TEMP void THIS::ClrQUe(const std::string& rName) {
1531  FD_DG("HioPlant(" << this << ")::ClrQUe(" << rName << ")");
1532  Idx index = BASE::StateIndex(rName);
1533  ClrQUe(index);
1534  }
1535 
1536  //ClrQUe(rStates)
1537  TEMP void THIS::ClrQUe(const StateSet& rStates) {
1538  FD_DG("HioPlant(" << this << ")::ClrQUe(rStates)");
1539  StateSet::Iterator sit;
1540  for(sit=rStates.Begin(); sit!=rStates.End(); sit++) {
1541  ClrQUe(*sit);
1542  }
1543  }
1544 
1545  // IsQUe(index)
1546  TEMP bool THIS::IsQUe(Idx index) const {
1547  StateAttr attr=BASE::StateAttribute(index);
1548  return attr.IsQU() && attr.IsQE();
1549  }
1550 
1551  // IsQUe(rName)
1552  TEMP bool THIS::IsQUe(const std::string& rName) const {
1553  Idx index = BASE::StateIndex(rName);
1554  return IsQUe(index);
1555  }
1556 
1557  //QUeStates()
1558  TEMP StateSet THIS::QUeStates(void) const {
1559  FD_DG("HioPlant(" << this << ")::QUeStates()");
1560  StateSet res;
1561  StateSet::Iterator sit;
1562  for(sit=BASE::StatesBegin(); sit!=BASE::StatesEnd(); sit++) {
1563  if(IsQUe(*sit)) res.Insert(*sit);
1564  }
1565  return res;
1566  }
1567 
1568  // SetErr(index)
1569  TEMP void THIS::SetErr(Idx index) {
1570  FD_DG("HioPlant(" << this << ")::SetErr(" << index << ")");
1571  StateAttr attr=BASE::StateAttribute(index);
1572  attr.SetErr();
1573  BASE::pStates->Attribute(index,attr);
1574  }
1575 
1576  // SetErr(rName)
1577  TEMP void THIS::SetErr(const std::string& rName) {
1578  FD_DG("HioPlant(" << this << ")::SetErr(" << rName << ")");
1579  Idx index = BASE::StateIndex(rName);
1580  SetErr(index);
1581  }
1582 
1583  //SetErr(rStates)
1584  TEMP void THIS::SetErr(const StateSet& rStates) {
1585  FD_DG("HioPlant(" << this << ")::SetErr(rStates)");
1586  StateSet::Iterator sit;
1587  for(sit=rStates.Begin(); sit!=rStates.End(); sit++) {
1588  SetErr(*sit);
1589  }
1590  }
1591 
1592  // ClrErr(index)
1593  TEMP void THIS::ClrErr(Idx index) {
1594  FD_DG("HioPlant(" << this << ")::ClrErr(" << index << ")");
1595  StateAttr attr=BASE::StateAttribute(index);
1596  attr.ClrErr();
1597  BASE::pStates->Attribute(index,attr);
1598  }
1599 
1600  // ClrErr(rName)
1601  TEMP void THIS::ClrErr(const std::string& rName) {
1602  FD_DG("HioPlant(" << this << ")::ClrErr(" << rName << ")");
1603  Idx index = BASE::StateIndex(rName);
1604  ClrErr(index);
1605  }
1606 
1607  //ClrErr(rStates)
1608  TEMP void THIS::ClrErr(const StateSet& rStates) {
1609  FD_DG("HioPlant(" << this << ")::ClrErr(rStates)");
1610  StateSet::Iterator sit;
1611  for(sit=rStates.Begin(); sit!=rStates.End(); sit++) {
1612  ClrErr(*sit);
1613  }
1614  }
1615 
1616  // IsErr(index)
1617  TEMP bool THIS::IsErr(Idx index) const {
1618  StateAttr attr=BASE::StateAttribute(index);
1619  return attr.IsErr();
1620  }
1621 
1622  // IsErr(rName)
1623  TEMP bool THIS::IsErr(const std::string& rName) const {
1624  Idx index = BASE::StateIndex(rName);
1625  return IsErr(index);
1626  }
1627 
1628  //ErrStates()
1629  TEMP StateSet THIS::ErrStates(void) const {
1630  FD_DG("HioPlant(" << this << ")::ErrStates()");
1631  StateSet res;
1632  StateSet::Iterator sit;
1633  for(sit=BASE::StatesBegin(); sit!=BASE::StatesEnd(); sit++) {
1634  if(IsErr(*sit)) res.Insert(*sit);
1635  }
1636  return res;
1637  }
1638 
1639 /***************************************************************************/
1640 
1641 #undef TEMP
1642 #undef BASE
1643 #undef THIS
1644 
1645 /**
1646  * IsHioPlantForm: check if rHioPlant is in I/O-plant form and assign state
1647  * attributes.
1648  * This function tests if rHioPlant meets the I/O-plant form that has been formally
1649  * defined by S.Perk. If so, then the alphabet of and the language marked by
1650  * rHioPlant formally describe an I/O plant. During the test, the HioStateFlags are
1651  * set according to the active event set or the respective state, for example:
1652  * The QYpYe flag is assigned to a state if its active even set is a subset of the
1653  * union of the YP- and the YE-Alphabet.
1654  * The assignment of HioStateFlags is complete only if IsHioPlantForm() returns true.
1655  * Method: all conditions in the formal I/O-plant form definition are checked
1656  * individually. If crucial conditions are violated, the test of remaining
1657  * conditions is omitted.
1658  *
1659  * @param rHioPlant
1660  * HioPlant to check, HioStateFlags are set
1661  * @param rQYpYe
1662  * State set containing all QYpYe states
1663  * @param rQUp
1664  * State set containing all QUp states
1665  * @param rQUe
1666  * State set containing all QUe states
1667  * @param rErrEvSet
1668  * Event set for possible 'bad' events
1669  * @param rErrTrSet
1670  * Event set for possible 'bad' transition relations
1671  * @param rErrStSet
1672  * Event set for possible 'bad' states
1673  * @param rReportStr
1674  * Information about test results
1675  * @return
1676  * true if rHioPlant is in I/O-plant form
1677  */
1678 bool IsHioPlantForm(HioPlant& rHioPlant,
1679  StateSet& rQYpYe,
1680  StateSet& rQUp,
1681  StateSet& rQUe,
1682  EventSet& rErrEvSet,
1683  TransSet& rErrTrSet,
1684  StateSet& rErrStSet,
1685  std::string& rReportStr);
1686 
1687 /**
1688  * IsHioPlantForm: check if rHioPlant is in I/O-plant form and assign state
1689  * attributes.
1690  * This function tests if rHioPlant meets the I/O-plant form that has been formally
1691  * defined by S.Perk. If so, then the alphabet of and the language marked by
1692  * rHioPlant formally describe an I/O plant. During the test, the HioStateFlags are
1693  * set according to the active event set or the respective state, for example:
1694  * The QYpYe flag is assigned to a state if its active even set is a subset of the
1695  * union of the YP- and the YE-Alphabet.
1696  * The assignment of HioStateFlags is complete only if IsHioPlantForm() returns true.
1697  * Method: all conditions in the formal I/O-plant form definition are checked
1698  * individually. If crucial conditions are violated, the test of remaining
1699  * conditions is omitted.
1700  *
1701  * @param rHioPlant
1702  * HioPlant to check, HioStateFlags are set
1703  * @param rReportStr
1704  * Information about test results
1705  * @return
1706  * true if rHioPlant is in I/O-plant form
1707  */
1708 bool IsHioPlantForm(HioPlant& rHioPlant,std::string& rReportStr);
1709 
1710 /**
1711  * IsHioPlantForm: check if rHioPlant is in I/O-plant form and assign state
1712  * attributes.
1713  * This function tests if rHioPlant meets the I/O-plant form that has been formally
1714  * defined by S.Perk. If so, then the alphabet of and the language marked by
1715  * rHioPlant formally describe an I/O plant. During the test, the HioStateFlags are
1716  * set according to the active event set or the respective state, for example:
1717  * The QYpYe flag is assigned to a state if its active eventset is a subset of the
1718  * union of the YP- and the YE-Alphabet.
1719  * The assignment of HioStateFlags is complete only if IsHioPlantForm() returns true.
1720  * Method: all conditions of the formal I/O-plant form definition are checked
1721  * individually. If crucial conditions are violated, the test of remaining
1722  * conditions is omitted.
1723  *
1724  * @param rHioPlant
1725  * HioPlant to check, HioStateFlags are set
1726  * @return
1727  * true if rHioPlant is in I/O-plant form
1728  */
1729 bool IsHioPlantForm(HioPlant& rHioPlant);
1730 
1731 
1732 /**
1733  * Function definition for run-time interface
1734  */
1735 bool IsHioPlantForm(HioPlant& rHioPlant, std::string& rReportStr);
1736 
1737 /**
1738  * Function definition for run-time interface
1739  */
1740 bool IsHioPlantForm(HioPlant& rHioPlant);
1741 
1742 /**
1743  * Function definition for run-time interface
1744  */
1745 bool IsHioPlantForm(HioPlant& rHioPlant,
1746  StateSet& rQYpYe,
1747  StateSet& rQUp,
1748  StateSet& rQUe,
1749  EventSet& rErrEvSet,
1750  TransSet& rErrTrSet,
1751  StateSet& rErrStSet,
1752  std::string& rReportStr);
1753 
1754 
1755 /**
1756  * Function definition for run-time interface
1757  *
1758  * @param rPlant
1759  * HioPlant
1760  */
1761 void HioStatePartition(HioPlant& rPlant);
1762 
1763 
1764 
1765 
1766 
1767 } // namespace faudes
1768 
1769 #endif

libFAUDES 2.24g --- 2014.09.15 --- c++ api documentaion by doxygen