aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
O3prm.h
Go to the documentation of this file.
1 /**
2  *
3  * Copyright (c) 2005-2021 by Pierre-Henri WUILLEMIN(@LIP6) & Christophe GONZALES(@AMU)
4  * info_at_agrum_dot_org
5  *
6  * This library is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this library. If not, see <http://www.gnu.org/licenses/>.
18  *
19  */
20 
21 
22 /**
23  * @file
24  * @brief Headers for the AST of the O3PRM language.
25  *
26  * @author Christophe GONZALES(@AMU) and Pierre-Henri WUILLEMIN(@LIP6)
27  * @author Lionel TORTI
28  */
29 
30 #include <string>
31 #include <utility>
32 #include <vector>
33 
34 #include <agrum/agrum.h>
35 #include <agrum/tools/core/hashTable.h>
36 #include <agrum/tools/core/math/formula.h>
37 
38 #ifndef GUM_PRM_O3PRM_PRM_H
39 # define GUM_PRM_O3PRM_PRM_H
40 
41 namespace gum {
42  namespace prm {
43  namespace o3prm {
44 
45  /**
46  * @class O3Position
47  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
48  * @ingroup o3prm_group
49  *
50  * @brief The O3Position is part of the AST of the O3PRM language.
51  */
52  class O3Position {
53  public:
54  O3Position();
55  O3Position(const std::string& filename, int line, int column);
56  O3Position(const O3Position& src);
57  O3Position(O3Position&& src);
58  ~O3Position();
59 
60  O3Position& operator=(const O3Position& src);
62 
63  std::string& file();
64  const std::string& file() const;
65 
66  int& line();
67  int line() const;
68 
69  int& column();
70  int column() const;
71 
72  private:
73  std::string _file_;
74  int _line_;
75  int _column_;
76  };
77 
78  /**
79  * @class O3Formula
80  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
81  * @ingroup o3prm_group
82  *
83  * @brief The O3Formula is part of the AST of the O3PRM language.
84  */
85  class O3Formula {
86  public:
87  O3Formula();
88  O3Formula(const O3Position& pos, const Formula& formula);
89  O3Formula(const O3Formula& src);
90  O3Formula(O3Formula&& src);
91  ~O3Formula();
92 
93  O3Formula& operator=(const O3Formula& src);
94  O3Formula& operator=(O3Formula&& src);
95 
97  const O3Position& position() const;
98 
99  Formula& formula();
100  const Formula& formula() const;
101 
102  private:
105  };
106 
107  /**
108  * @class O3Float
109  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
110  * @ingroup o3prm_group
111  *
112  * @brief The O3Float is part of the AST of the O3PRM language.
113  */
114  class O3Float {
115  public:
116  O3Float();
117  O3Float(const O3Position& pos, float value);
118  O3Float(const O3Float& src);
119  O3Float(O3Float&& src);
120  ~O3Float();
121 
122  O3Float& operator=(const O3Float& src);
123  O3Float& operator=(O3Float&& src);
124 
125  O3Position& position();
126  const O3Position& position() const;
127 
128  float& value();
129  float value() const;
130 
131  private:
133  float _value_;
134  };
135 
136  /**
137  * @class O3Integer
138  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
139  * @ingroup o3prm_group
140  *
141  * @brief The O3Integer is part of the AST of the O3PRM language.
142  */
143  class O3Integer {
144  public:
145  O3Integer();
146  O3Integer(const O3Position& pos, int value);
147  O3Integer(const O3Integer& src);
148  O3Integer(O3Integer&& src);
149  ~O3Integer();
150 
151  O3Integer& operator=(const O3Integer& src);
152  O3Integer& operator=(O3Integer&& src);
153 
154  O3Position& position();
155  const O3Position& position() const;
156 
157  int& value();
158  int value() const;
159 
160  private:
162  int _value_;
163  };
164 
165  /**
166  * @class O3Label
167  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
168  * @ingroup o3prm_group
169  *
170  * @brief The O3Label is part of the AST of the O3PRM language.
171  */
172  class O3Label {
173  public:
174  O3Label();
175  O3Label(const O3Position& pos, const std::string& label);
176  O3Label(const O3Label& src);
177  O3Label(O3Label&& src);
178  ~O3Label();
179 
180  O3Label& operator=(const O3Label& src);
181  O3Label& operator=(O3Label&& src);
182 
183  O3Position& position();
184  const O3Position& position() const;
185 
186  std::string& label();
187  const std::string& label() const;
188 
189  private:
191  std::string _label_;
192  };
193 
194  std::ostream& operator<<(std::ostream& o, const O3Label& src);
195 
196  /**
197  * @class O3Type
198  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
199  * @ingroup o3prm_group
200  *
201  * @brief The O3Type is part of the AST of the O3PRM language.
202  */
203  class O3Type {
204  public:
205  using LabelPair = std::pair< O3Label, O3Label >;
207 
208  O3Type();
209  O3Type(const O3Type& src);
210  O3Type(O3Type&& src);
211  ~O3Type();
212 
213  O3Type& operator=(const O3Type& src);
214  O3Type& operator=(O3Type&& src);
215 
216  O3Position& position();
217  const O3Position& position() const;
218 
219  O3Label& name();
220  const O3Label& name() const;
221 
222  O3Label& superLabel();
223  const O3Label& superLabel() const;
224 
225  LabelMap& labels();
226  const LabelMap& labels() const;
227 
228  bool& deprecated();
229  const bool& deprecated() const;
230 
231  private:
237  };
238 
239  /**
240  * @class O3IntType
241  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
242  * @ingroup o3prm_group
243  *
244  * @brief The O3IntType is part of the AST of the O3PRM language.
245  */
246  class O3IntType {
247  public:
248  O3IntType();
249  O3IntType(const O3IntType& src);
250  O3IntType(O3IntType&& src);
251  ~O3IntType();
252 
253  O3IntType& operator=(const O3IntType& src);
254  O3IntType& operator=(O3IntType&& src);
255 
256  O3Position& position();
257  const O3Position& position() const;
258 
259  O3Label& name();
260  const O3Label& name() const;
261 
262  O3Integer& start();
263  const O3Integer& start() const;
264 
265  O3Integer& end();
266  const O3Integer& end() const;
267 
268  bool& deprecated();
269  const bool& deprecated() const;
270 
271  private:
277  };
278 
279  /**
280  * @class O3RealType
281  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
282  * @ingroup o3prm_group
283  *
284  * @brief The O3RealType is part of the AST of the O3PRM language.
285  */
286  class O3RealType {
287  public:
288  O3RealType();
289  O3RealType(const O3RealType& src);
290  O3RealType(O3RealType&& src);
291  ~O3RealType();
292 
293  O3RealType& operator=(const O3RealType& src);
294  O3RealType& operator=(O3RealType&& src);
295 
296  O3Position& position();
297  const O3Position& position() const;
298 
299  O3Label& name();
300  const O3Label& name() const;
301 
302  std::vector< O3Float >& values();
303  const std::vector< O3Float >& values() const;
304 
305  bool& deprecated();
306  const bool& deprecated() const;
307 
308  private:
313  };
314 
315  /**
316  * @class O3InterfaceElement
317  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
318  * @ingroup o3prm_group
319  *
320  * @brief The O3InterfaceElement is part of the AST of the O3PRM language.
321  */
323  public:
325  O3InterfaceElement(const O3Label& type, const O3Label& name, bool isArray);
329 
332 
333  O3Label& type();
334  const O3Label& type() const;
335 
336  O3Label& name();
337  const O3Label& name() const;
338 
339  bool& isArray();
340  bool isArray() const;
341 
342  private:
345  bool _isArray_;
346  };
347 
348  /**
349  * @class O3Interface
350  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
351  * @ingroup o3prm_group
352  *
353  * @brief The O3Interface is part of the AST of the O3PRM language.
354  */
355  class O3Interface {
356  public:
358 
359  O3Interface();
360  O3Interface(const O3Interface& src);
361  O3Interface(O3Interface&& src);
362  ~O3Interface();
363 
364  O3Interface& operator=(const O3Interface& src);
366 
367  O3Position& position();
368  const O3Position& position() const;
369 
370  O3Label& name();
371  const O3Label& name() const;
372 
373  O3Label& superLabel();
374  const O3Label& superLabel() const;
375 
377  const O3InterfaceElementList& elements() const;
378 
379  private:
384  };
385 
386  /**
387  * @class O3Parameter
388  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
389  * @ingroup o3prm_group
390  *
391  * @brief The O3Parameter is part of the AST of the O3PRM language.
392  */
393  class O3Parameter {
394  public:
395  enum class PRMType
396  {
397  NONE,
398  INT,
399  FLOAT
400  };
401 
402  O3Parameter();
403  O3Parameter(const O3Position& pos, const O3Label& name, const O3Integer& value);
404  O3Parameter(const O3Position& pos, const O3Label& name, const O3Float& value);
405  O3Parameter(const O3Parameter& src);
406  O3Parameter(O3Parameter&& src);
407  ~O3Parameter();
408 
409  O3Parameter& operator=(const O3Parameter& src);
411 
412  PRMType& type();
413  PRMType type() const;
414 
415  O3Position& position();
416  const O3Position& position() const;
417 
418  O3Label& name();
419  const O3Label& name() const;
420 
421  O3Float& value();
422  const O3Float& value() const;
423 
424  private:
429  };
430 
431  /**
432  * @class O3ReferenceSlot
433  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
434  * @ingroup o3prm_group
435  *
436  * @brief The O3ReferenceSlot is part of the AST of the O3PRM language.
437  */
439  public:
440  O3ReferenceSlot();
441  O3ReferenceSlot(const O3Label& type, const O3Label& name, bool isArray);
442  O3ReferenceSlot(const O3ReferenceSlot& src);
444  ~O3ReferenceSlot();
445 
448 
449  O3Label& type();
450  const O3Label& type() const;
451 
452  O3Label& name();
453  const O3Label& name() const;
454 
455  bool& isArray();
456  bool isArray() const;
457 
458  private:
461  bool _isArray_;
462  };
463 
464  /**
465  * @class O3Attribute
466  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
467  * @ingroup o3prm_group
468  *
469  * @brief The O3Attribute is part of the AST of the O3PRM language.
470  */
471  class O3Attribute {
472  public:
474 
475  O3Attribute();
476  O3Attribute(const O3Label& type, const O3Label& name, const O3LabelList& parents);
477  O3Attribute(const O3Attribute& src);
478  O3Attribute(O3Attribute&& src);
479  virtual ~O3Attribute();
480 
481  virtual O3Attribute& operator=(const O3Attribute& src);
482  virtual O3Attribute& operator=(O3Attribute&& src);
483 
484  virtual O3Label& type();
485  virtual const O3Label& type() const;
486 
487  virtual O3Label& name();
488  virtual const O3Label& name() const;
489 
490  virtual O3LabelList& parents();
491  virtual const O3LabelList& parents() const;
492 
493  virtual std::unique_ptr< O3Attribute > copy() const = 0;
494 
495  private:
499  };
500 
501  /**
502  * @class O3RawCPT
503  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
504  * @ingroup o3prm_group
505  *
506  * @brief The O3RawCPT is part of the AST of the O3PRM language.
507  */
508  class O3RawCPT: public O3Attribute {
509  public:
511 
512  O3RawCPT();
513  O3RawCPT(const O3Label& type,
514  const O3Label& name,
515  const O3Attribute::O3LabelList& parents,
516  const O3FormulaList& values);
517  O3RawCPT(const O3RawCPT& src);
518  O3RawCPT(O3RawCPT&& src);
519  ~O3RawCPT();
520 
521  virtual O3RawCPT& operator=(const O3RawCPT& src);
522  virtual O3RawCPT& operator=(O3RawCPT&& src);
523 
524  virtual O3FormulaList& values();
525  virtual const O3FormulaList& values() const;
526 
527  virtual std::unique_ptr< O3Attribute > copy() const;
528 
529  private:
531  };
532 
533  /**
534  * @class O3RuleCPT
535  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
536  * @ingroup o3prm_group
537  *
538  * @brief The O3RuleCPT is part of the AST of the O3PRM language.
539  */
540  class O3RuleCPT: public O3Attribute {
541  public:
546 
547  O3RuleCPT();
548  O3RuleCPT(const O3Label& type,
549  const O3Label& name,
550  const O3Attribute::O3LabelList& parents,
551  O3RuleList&& rules);
552  O3RuleCPT(const O3RuleCPT& src);
553  O3RuleCPT(O3RuleCPT&& src);
554  ~O3RuleCPT();
555 
556  virtual O3RuleCPT& operator=(const O3RuleCPT& src);
557  virtual O3RuleCPT& operator=(O3RuleCPT&& src);
558 
559  virtual O3RuleList& rules();
560  virtual const O3RuleList& rules() const;
561 
562  virtual std::unique_ptr< O3Attribute > copy() const;
563 
564  private:
566  };
567 
568  /**
569  * @class O3Aggregate
570  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
571  * @ingroup o3prm_group
572  *
573  * @brief The O3Aggregate is part of the AST of the O3PRM language.
574  */
575  class O3Aggregate {
576  public:
578 
579  O3Aggregate();
580  O3Aggregate(const O3Aggregate& src);
581  O3Aggregate(O3Aggregate&& src);
582  virtual ~O3Aggregate();
583 
584  O3Aggregate& operator=(const O3Aggregate& src);
586 
588  const O3Label& variableType() const;
589 
591  const O3Label& aggregateType() const;
592 
593  O3Label& name();
594  const O3Label& name() const;
595 
596  O3LabelList& parents();
597  const O3LabelList& parents() const;
598 
600  const O3LabelList& parameters() const;
601 
602  private:
608  };
609 
610  /**
611  * @class O3Class
612  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
613  * @ingroup o3prm_group
614  *
615  * @brief The O3Class is part of the AST of the O3PRM language.
616  */
617  class O3Class {
618  public:
624 
625  O3Class();
626  O3Class(const O3Class& src);
627  O3Class(O3Class&& src);
628  ~O3Class();
629 
630  O3Class& operator=(const O3Class& src);
631  O3Class& operator=(O3Class&& src);
632 
633  O3Position& position();
634  const O3Position& position() const;
635 
636  O3Label& name();
637  const O3Label& name() const;
638 
639  O3Label& superLabel();
640  const O3Label& superLabel() const;
641 
643  const O3LabelList& interfaces() const;
644 
646  const O3ParameterList& parameters() const;
647 
649  const O3ReferenceSlotList& referenceSlots() const;
650 
652  const O3AttributeList& attributes() const;
653 
655  const O3AggregateList& aggregates() const;
656 
657  private:
666  };
667 
668  /**
669  * @class O3Assignment
670  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
671  * @ingroup o3prm_group
672  *
673  * @brief The O3Assignment is part of the AST of the O3PRM language.
674  */
675  class O3Assignment {
676  public:
677  O3Assignment();
678  O3Assignment(const O3Assignment& src);
679  O3Assignment(O3Assignment&& src);
680  ~O3Assignment();
681 
682  O3Assignment& operator=(const O3Assignment& src);
684 
686  const O3Label& leftInstance() const;
687 
688  O3Integer& leftIndex();
689  const O3Integer& leftIndex() const;
690 
692  const O3Label& leftReference() const;
693 
695  const O3Label& rightInstance() const;
696 
698  const O3Integer& rightIndex() const;
699 
700  private:
706  };
707 
708  /**
709  * @class O3Increment
710  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
711  * @ingroup o3prm_group
712  *
713  * @brief The O3Increment is part of the AST of the O3PRM language.
714  */
715  class O3Increment {
716  public:
717  O3Increment();
718  O3Increment(const O3Increment& src);
719  O3Increment(O3Increment&& src);
720  ~O3Increment();
721 
722  O3Increment& operator=(const O3Increment& src);
724 
726  const O3Label& leftInstance() const;
727 
728  O3Integer& leftIndex();
729  const O3Integer& leftIndex() const;
730 
732  const O3Label& leftReference() const;
733 
735  const O3Label& rightInstance() const;
736 
738  const O3Integer& rightIndex() const;
739 
740  private:
746  };
747 
748  /**
749  * @class O3InstanceParameter
750  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
751  * @ingroup o3prm_group
752  *
753  * @brief The O3InstanceParameter is part of the AST of the O3PRM
754  * language.
755  */
757  public:
762 
765 
766  O3Label& name();
767  const O3Label& name() const;
768 
769  O3Float& value();
770  const O3Float& value() const;
771 
772  bool& isInteger();
773  bool isInteger() const;
774 
775  private:
779  };
780 
781  /**
782  * @class O3Instance
783  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
784  * @ingroup o3prm_group
785  *
786  * @brief The O3Instance is part of the AST of the O3PRM language.
787  */
788  class O3Instance {
789  public:
791 
792  O3Instance();
793  O3Instance(const O3Instance& src);
794  O3Instance(O3Instance&& src);
795  ~O3Instance();
796 
797  O3Instance& operator=(const O3Instance& src);
798  O3Instance& operator=(O3Instance&& src);
799 
800  O3Label& type();
801  const O3Label& type() const;
802 
803  O3Label& name();
804  const O3Label& name() const;
805 
806  O3Integer& size();
807  const O3Integer& size() const;
808 
810  const O3InstanceParameterList& parameters() const;
811 
812  private:
817  };
818 
819  /**
820  * @class O3System
821  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
822  * @ingroup o3prm_group
823  *
824  * @brief The O3System is part of the AST of the O3PRM language.
825  */
826  class O3System {
827  public:
831 
832  O3System();
833  O3System(const O3System& src);
834  O3System(O3System&& src);
835  ~O3System();
836 
837  O3System& operator=(const O3System& src);
838  O3System& operator=(O3System&& src);
839 
840  O3Label& name();
841  const O3Label& name() const;
842 
844  const O3InstanceList& instances() const;
845 
847  const O3AssignmentList& assignments() const;
848 
850  const O3IncrementList& increments() const;
851 
852  private:
857  };
858 
859  /**
860  * @class O3Import
861  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
862  * @ingroup o3prm_group
863  *
864  * @brief The O3Import is part of the AST of the O3PRM language.
865  */
866  class O3Import {
867  public:
868  O3Import();
869  O3Import(const O3Import& src);
870  O3Import(O3Import&& src);
871  ~O3Import();
872 
873  O3Import& operator=(const O3Import& src);
874  O3Import& operator=(O3Import&& src);
875 
876  O3Label& import();
877  const O3Label& import() const;
878 
879  private:
881  };
882 
883  /**
884  * @class O3PRM
885  * @headerfile O3prm.h <agrum/PRM/o3prm/O3prm.h>
886  * @ingroup o3prm_group
887  *
888  * @brief The O3PRM is part of the AST of the O3PRM language.
889  */
890  class O3PRM {
891  public:
899 
900  O3PRM();
901  O3PRM(const O3PRM& src);
902  O3PRM(O3PRM&& src);
903  ~O3PRM();
904 
905  O3PRM& operator=(const O3PRM& src);
906  O3PRM& operator=(O3PRM&& src);
907 
908  O3TypeList& types();
909  const O3TypeList& types() const;
910 
912  const O3IntTypeList& int_types() const;
913 
915  const O3RealTypeList& real_types() const;
916 
918  const O3InterfaceList& interfaces() const;
919 
920  O3ClassList& classes();
921  const O3ClassList& classes() const;
922 
924  const O3SystemList& systems() const;
925 
927  const O3ImportList& imports() const;
928 
929  private:
937  };
938 
939  } // namespace o3prm
940  } // namespace prm
941 } // namespace gum
942 
943 #endif // GUM_PRM_O3PRM_PRM_H
std::unique_ptr< O3AttributeList > _attrs_
Definition: O3prm.h:664
O3ReferenceSlot(const O3Label &type, const O3Label &name, bool isArray)
Definition: O3prm.cpp:987
virtual O3RuleCPT & operator=(const O3RuleCPT &src)
Definition: O3prm.cpp:779
O3RealType(O3RealType &&src)
Definition: O3prm.cpp:384
std::unique_ptr< O3RuleList > _rules_
Definition: O3prm.h:565
O3LabelList & parents()
Definition: O3prm.cpp:1088
virtual O3RuleCPT & operator=(O3RuleCPT &&src)
Definition: O3prm.cpp:787
O3ClassList & classes()
Definition: O3prm.cpp:530
O3Class(O3Class &&src)
Definition: O3prm.cpp:844
O3ReferenceSlot & operator=(const O3ReferenceSlot &src)
Definition: O3prm.cpp:1008
O3IncrementList & increments()
Definition: O3prm.cpp:1337
virtual O3LabelList & parents()
Definition: O3prm.cpp:696
const O3Integer & leftIndex() const
Definition: O3prm.cpp:1210
const O3IntTypeList & int_types() const
Definition: O3prm.cpp:522
const O3Float & value() const
Definition: O3prm.cpp:1381
virtual std::unique_ptr< O3Attribute > copy() const =0
O3Label _superLabel_
Definition: O3prm.h:234
const O3Label & superLabel() const
Definition: O3prm.cpp:640
const bool & deprecated() const
Definition: O3prm.cpp:314
O3ReferenceSlot(O3ReferenceSlot &&src)
Definition: O3prm.cpp:997
O3TypeList _types_
Definition: O3prm.h:930
virtual O3Attribute & operator=(O3Attribute &&src)
Definition: O3prm.cpp:682
O3Position & operator=(const O3Position &src)
Definition: O3prm.cpp:59
O3IntType(O3IntType &&src)
Definition: O3prm.cpp:327
const O3Label & type() const
Definition: O3prm.cpp:1025
O3Formula(O3Formula &&src)
Definition: O3prm.cpp:184
O3Label(const O3Position &pos, const std::string &label)
Definition: O3prm.cpp:219
O3Position & position()
Definition: O3prm.cpp:633
O3Position _pos_
Definition: O3prm.h:658
The O3Increment is part of the AST of the O3PRM language.
Definition: O3prm.h:715
O3InstanceParameter & operator=(O3InstanceParameter &&src)
Definition: O3prm.cpp:1369
O3Position & position()
Definition: O3prm.cpp:253
O3Position & position()
Definition: O3prm.cpp:310
O3Formula & operator=(const O3Formula &src)
Definition: O3prm.cpp:194
O3Attribute(const O3Attribute &src)
Definition: O3prm.cpp:658
const O3Label & leftInstance() const
Definition: O3prm.cpp:1206
virtual const O3FormulaList & values() const
Definition: O3prm.cpp:745
virtual O3RuleList & rules()
Definition: O3prm.cpp:795
O3Formula(const O3Formula &src)
Definition: O3prm.cpp:179
const O3InterfaceList & interfaces() const
Definition: O3prm.cpp:528
O3IntTypeList _int_types_
Definition: O3prm.h:931
The O3InstanceParameter is part of the AST of the O3PRM language.
Definition: O3prm.h:756
const O3Integer & size() const
Definition: O3prm.cpp:1273
const O3Label & name() const
Definition: O3prm.cpp:1377
O3Increment & operator=(const O3Increment &src)
Definition: O3prm.cpp:1186
O3Increment(O3Increment &&src)
Definition: O3prm.cpp:1173
The O3Parameter is part of the AST of the O3PRM language.
Definition: O3prm.h:393
virtual const O3LabelList & parents() const
Definition: O3prm.cpp:697
O3InterfaceElement(O3InterfaceElement &&src)
Definition: O3prm.cpp:559
O3PRM & operator=(const O3PRM &src)
Definition: O3prm.cpp:480
The O3IntType is part of the AST of the O3PRM language.
Definition: O3prm.h:246
const O3Label & name() const
Definition: O3prm.cpp:302
O3RuleCPT(const O3RuleCPT &src)
Definition: O3prm.cpp:765
O3Label & name()
Definition: O3prm.cpp:301
O3Position & position()
Definition: O3prm.cpp:368
O3Position & position()
Definition: O3prm.cpp:973
O3ReferenceSlotList & referenceSlots()
Definition: O3prm.cpp:912
O3RawCPT(const O3RawCPT &src)
Definition: O3prm.cpp:713
O3Type(const O3Type &src)
Definition: O3prm.cpp:263
const O3Position & position() const
Definition: O3prm.cpp:311
const O3Position & position() const
Definition: O3prm.cpp:252
INLINE void emplace(Args &&... args)
Definition: set_tpl.h:643
std::string _file_
Definition: O3prm.h:73
O3RealType & operator=(O3RealType &&src)
Definition: O3prm.cpp:405
O3RealTypeList & real_types()
Definition: O3prm.cpp:524
O3Interface & operator=(const O3Interface &src)
Definition: O3prm.cpp:614
O3Parameter & operator=(O3Parameter &&src)
Definition: O3prm.cpp:961
const O3Integer & start() const
Definition: O3prm.cpp:363
The O3Aggregate is part of the AST of the O3PRM language.
Definition: O3prm.h:575
const O3Label & leftInstance() const
Definition: O3prm.cpp:1141
const std::string & label() const
Definition: O3prm.cpp:255
const O3Position & position() const
Definition: O3prm.cpp:416
const LabelMap & labels() const
Definition: O3prm.cpp:308
O3Position(O3Position &&src)
Definition: O3prm.cpp:48
O3ReferenceSlot(const O3ReferenceSlot &src)
Definition: O3prm.cpp:992
const O3Label & variableType() const
Definition: O3prm.cpp:1078
O3AggregateList & aggregates()
Definition: O3prm.cpp:918
const O3Position & position() const
Definition: O3prm.cpp:164
const O3LabelList & parameters() const
Definition: O3prm.cpp:1094
const std::string & file() const
Definition: O3prm.cpp:76
const O3TypeList & types() const
Definition: O3prm.cpp:519
O3Instance(const O3Instance &src)
Definition: O3prm.cpp:1230
const O3Label & type() const
Definition: O3prm.cpp:584
The O3RealType is part of the AST of the O3PRM language.
Definition: O3prm.h:286
O3Integer & start()
Definition: O3prm.cpp:362
const O3Position & position() const
Definition: O3prm.cpp:634
O3InstanceParameterList & parameters()
Definition: O3prm.cpp:1281
const O3InstanceParameterList & parameters() const
Definition: O3prm.cpp:1277
const O3Label & name() const
Definition: O3prm.cpp:637
O3Label(const O3Label &src)
Definition: O3prm.cpp:224
The O3Type is part of the AST of the O3PRM language.
Definition: O3prm.h:203
const O3RealTypeList & real_types() const
Definition: O3prm.cpp:525
O3InterfaceElement & operator=(O3InterfaceElement &&src)
Definition: O3prm.cpp:575
O3RealType & operator=(const O3RealType &src)
Definition: O3prm.cpp:395
O3InstanceList & instances()
Definition: O3prm.cpp:1329
O3Parameter(const O3Position &pos, const O3Label &name, const O3Float &value)
Definition: O3prm.cpp:931
O3Assignment & operator=(const O3Assignment &src)
Definition: O3prm.cpp:1121
const O3ImportList & imports() const
Definition: O3prm.cpp:540
O3InterfaceList _interfaces_
Definition: O3prm.h:933
O3Position(const std::string &filename, int line, int column)
Definition: O3prm.cpp:38
The O3Label is part of the AST of the O3PRM language.
Definition: O3prm.h:172
The O3Attribute is part of the AST of the O3PRM language.
Definition: O3prm.h:471
std::unique_ptr< O3InterfaceElementList > _elts_
Definition: O3prm.h:383
O3PRM & operator=(O3PRM &&src)
Definition: O3prm.cpp:506
O3AssignmentList _assigments_
Definition: O3prm.h:855
O3Position & position()
Definition: O3prm.cpp:165
virtual O3FormulaList & values()
Definition: O3prm.cpp:743
const O3Label & name() const
Definition: O3prm.cpp:1086
O3Attribute(const O3Label &type, const O3Label &name, const O3LabelList &parents)
Definition: O3prm.cpp:650
O3Instance(O3Instance &&src)
Definition: O3prm.cpp:1236
const O3Label & rightInstance() const
Definition: O3prm.cpp:1218
O3Formula(const O3Position &pos, const Formula &formula)
Definition: O3prm.cpp:174
The O3Import is part of the AST of the O3PRM language.
Definition: O3prm.h:866
const O3LabelList & parents() const
Definition: O3prm.cpp:1090
const O3Label & superLabel() const
Definition: O3prm.cpp:902
O3LabelList & parameters()
Definition: O3prm.cpp:1092
O3ParameterList & parameters()
Definition: O3prm.cpp:909
const O3InterfaceElementList & elements() const
Definition: O3prm.cpp:643
O3LabelList _parameters_
Definition: O3prm.h:607
const O3Label & name() const
Definition: O3prm.cpp:419
O3SystemList _systems_
Definition: O3prm.h:935
virtual const O3RuleList & rules() const
Definition: O3prm.cpp:796
const O3ParameterList & parameters() const
Definition: O3prm.cpp:908
O3Import(O3Import &&src)
Definition: O3prm.cpp:1398
const std::vector< O3Float > & values() const
Definition: O3prm.cpp:422
O3Aggregate & operator=(O3Aggregate &&src)
Definition: O3prm.cpp:1066
O3Integer(const O3Integer &src)
Definition: O3prm.cpp:93
std::string & label()
Definition: O3prm.cpp:256
O3RuleCPT(O3RuleCPT &&src)
Definition: O3prm.cpp:770
virtual std::unique_ptr< O3Attribute > copy() const
Definition: O3prm.cpp:747
virtual O3Attribute & operator=(const O3Attribute &src)
Definition: O3prm.cpp:674
O3Parameter(O3Parameter &&src)
Definition: O3prm.cpp:941
std::string & file()
Definition: O3prm.cpp:75
O3Parameter & operator=(const O3Parameter &src)
Definition: O3prm.cpp:952
O3Formula & operator=(O3Formula &&src)
Definition: O3prm.cpp:201
The O3RuleCPT is part of the AST of the O3PRM language.
Definition: O3prm.h:540
const O3Position & position() const
Definition: O3prm.cpp:369
const O3Label & leftReference() const
Definition: O3prm.cpp:1149
O3Assignment(const O3Assignment &src)
Definition: O3prm.cpp:1101
O3ImportList _imports_
Definition: O3prm.h:936
std::vector< O3Float > & values()
Definition: O3prm.cpp:421
const O3Position & position() const
Definition: O3prm.cpp:974
The O3Position is part of the AST of the O3PRM language.
Definition: O3prm.h:52
O3InstanceParameter(const O3InstanceParameter &src)
Definition: O3prm.cpp:1348
O3Float(const O3Position &pos, float value)
Definition: O3prm.cpp:132
std::vector< O3Float > _values_
Definition: O3prm.h:311
const O3Integer & leftIndex() const
Definition: O3prm.cpp:1145
O3ClassList _classes_
Definition: O3prm.h:934
std::unique_ptr< O3ReferenceSlotList > _refs_
Definition: O3prm.h:663
The O3Class is part of the AST of the O3PRM language.
Definition: O3prm.h:617
O3Label & superLabel()
Definition: O3prm.cpp:903
const bool & deprecated() const
Definition: O3prm.cpp:425
O3Integer & rightIndex()
Definition: O3prm.cpp:1220
const O3Label & import() const
Definition: O3prm.cpp:1419
O3Label(O3Label &&src)
Definition: O3prm.cpp:228
std::unique_ptr< O3AggregateList > _aggs_
Definition: O3prm.h:665
const O3AttributeList & attributes() const
Definition: O3prm.cpp:916
virtual O3RawCPT & operator=(const O3RawCPT &src)
Definition: O3prm.cpp:728
O3Integer & operator=(const O3Integer &src)
Definition: O3prm.cpp:107
O3Integer & operator=(O3Integer &&src)
Definition: O3prm.cpp:114
The O3Instance is part of the AST of the O3PRM language.
Definition: O3prm.h:788
O3Float(O3Float &&src)
Definition: O3prm.cpp:140
O3IntType & operator=(const O3IntType &src)
Definition: O3prm.cpp:339
O3InterfaceElement(const O3Label &type, const O3Label &name, bool isArray)
Definition: O3prm.cpp:546
O3Position & operator=(O3Position &&src)
Definition: O3prm.cpp:67
O3ImportList & imports()
Definition: O3prm.cpp:538
const O3ReferenceSlotList & referenceSlots() const
Definition: O3prm.cpp:911
O3Position & position()
Definition: O3prm.cpp:122
O3Parameter(const O3Parameter &src)
Definition: O3prm.cpp:936
virtual O3RawCPT & operator=(O3RawCPT &&src)
Definition: O3prm.cpp:736
The O3ReferenceSlot is part of the AST of the O3PRM language.
Definition: O3prm.h:438
const O3ClassList & classes() const
Definition: O3prm.cpp:532
const O3Integer & rightIndex() const
Definition: O3prm.cpp:1159
O3Interface(O3Interface &&src)
Definition: O3prm.cpp:603
const O3Label & aggregateType() const
Definition: O3prm.cpp:1082
virtual O3Label & type()
Definition: O3prm.cpp:690
const Formula & formula() const
Definition: O3prm.cpp:211
O3AssignmentList & assignments()
Definition: O3prm.cpp:1333
O3Integer(O3Integer &&src)
Definition: O3prm.cpp:97
O3IntTypeList & int_types()
Definition: O3prm.cpp:521
O3Increment(const O3Increment &src)
Definition: O3prm.cpp:1166
std::unique_ptr< Formula > _formula_
Definition: O3prm.h:104
O3Assignment(O3Assignment &&src)
Definition: O3prm.cpp:1108
ParamScopeData(const std::string &s, const PRMReferenceSlot< GUM_SCALAR > &ref, Idx d)
O3Instance & operator=(const O3Instance &src)
Definition: O3prm.cpp:1247
O3Position _pos_
Definition: O3prm.h:190
O3Aggregate & operator=(const O3Aggregate &src)
Definition: O3prm.cpp:1056
std::unique_ptr< O3LabelList > _interfaces_
Definition: O3prm.h:661
The O3System is part of the AST of the O3PRM language.
Definition: O3prm.h:826
O3AttributeList & attributes()
Definition: O3prm.cpp:914
std::unique_ptr< O3FormulaList > _values_
Definition: O3prm.h:530
virtual std::unique_ptr< O3Attribute > copy() const
Definition: O3prm.cpp:798
const O3Position & position() const
Definition: O3prm.cpp:121
O3Label & operator=(O3Label &&src)
Definition: O3prm.cpp:245
const O3InstanceList & instances() const
Definition: O3prm.cpp:1327
O3SystemList & systems()
Definition: O3prm.cpp:534
O3Import(const O3Import &src)
Definition: O3prm.cpp:1394
O3InstanceParameterList _parameters_
Definition: O3prm.h:816
O3RealType(const O3RealType &src)
Definition: O3prm.cpp:379
O3InterfaceList & interfaces()
Definition: O3prm.cpp:527
virtual const O3Label & type() const
Definition: O3prm.cpp:691
const O3AssignmentList & assignments() const
Definition: O3prm.cpp:1331
const bool & deprecated() const
Definition: O3prm.cpp:372
const O3Label & name() const
Definition: O3prm.cpp:977
O3InterfaceElement(const O3InterfaceElement &src)
Definition: O3prm.cpp:554
O3InterfaceElementList & elements()
Definition: O3prm.cpp:642
The O3Float is part of the AST of the O3PRM language.
Definition: O3prm.h:114
O3Position & position()
Definition: O3prm.cpp:415
The O3RawCPT is part of the AST of the O3PRM language.
Definition: O3prm.h:508
O3Import & operator=(O3Import &&src)
Definition: O3prm.cpp:1413
const O3LabelList & interfaces() const
Definition: O3prm.cpp:905
O3System(O3System &&src)
Definition: O3prm.cpp:1294
O3Increment & operator=(O3Increment &&src)
Definition: O3prm.cpp:1196
O3RuleCPT(const O3Label &type, const O3Label &name, const O3Attribute::O3LabelList &parents, O3RuleList &&rules)
Definition: O3prm.cpp:756
O3Interface & operator=(O3Interface &&src)
Definition: O3prm.cpp:624
O3PRM(const O3PRM &src)
Definition: O3prm.cpp:442
O3InterfaceElement & operator=(const O3InterfaceElement &src)
Definition: O3prm.cpp:567
const O3Label & superLabel() const
Definition: O3prm.cpp:305
O3Import & operator=(const O3Import &src)
Definition: O3prm.cpp:1407
O3Parameter(const O3Position &pos, const O3Label &name, const O3Integer &value)
Definition: O3prm.cpp:925
The O3Assignment is part of the AST of the O3PRM language.
Definition: O3prm.h:675
const O3Float & value() const
Definition: O3prm.cpp:980
O3Interface(const O3Interface &src)
Definition: O3prm.cpp:596
std::unique_ptr< O3ParameterList > _params_
Definition: O3prm.h:662
O3IntType(const O3IntType &src)
Definition: O3prm.cpp:321
const O3Label & name() const
Definition: O3prm.cpp:1269
O3PRM(O3PRM &&src)
Definition: O3prm.cpp:467
const O3Position & position() const
Definition: O3prm.cpp:896
O3Class & operator=(O3Class &&src)
Definition: O3prm.cpp:883
std::string _label_
Definition: O3prm.h:191
O3Assignment & operator=(O3Assignment &&src)
Definition: O3prm.cpp:1131
O3Label & superLabel()
Definition: O3prm.cpp:304
O3LabelList & interfaces()
Definition: O3prm.cpp:906
O3Position _pos_
Definition: O3prm.h:232
const O3IncrementList & increments() const
Definition: O3prm.cpp:1335
O3Integer(const O3Position &pos, int value)
Definition: O3prm.cpp:89
O3Aggregate(const O3Aggregate &src)
Definition: O3prm.cpp:1038
O3IncrementList _increments_
Definition: O3prm.h:856
float value() const
Definition: O3prm.cpp:167
const O3Label & leftReference() const
Definition: O3prm.cpp:1214
O3Float & operator=(const O3Float &src)
Definition: O3prm.cpp:150
O3Float(const O3Float &src)
Definition: O3prm.cpp:136
O3TypeList & types()
Definition: O3prm.cpp:518
O3System(const O3System &src)
Definition: O3prm.cpp:1288
The O3Integer is part of the AST of the O3PRM language.
Definition: O3prm.h:143
O3Position _pos_
Definition: O3prm.h:132
O3IntType & operator=(O3IntType &&src)
Definition: O3prm.cpp:349
O3ReferenceSlot & operator=(O3ReferenceSlot &&src)
Definition: O3prm.cpp:1016
The O3InterfaceElement is part of the AST of the O3PRM language.
Definition: O3prm.h:322
O3Aggregate(O3Aggregate &&src)
Definition: O3prm.cpp:1044
const O3Integer & end() const
Definition: O3prm.cpp:366
const O3Label & name() const
Definition: O3prm.cpp:899
The O3PRM is part of the AST of the O3PRM language.
Definition: O3prm.h:890
O3Class(const O3Class &src)
Definition: O3prm.cpp:822
const O3Label & name() const
Definition: O3prm.cpp:1323
O3Attribute(O3Attribute &&src)
Definition: O3prm.cpp:663
O3Label & operator=(const O3Label &src)
Definition: O3prm.cpp:238
O3Type & operator=(O3Type &&src)
Definition: O3prm.cpp:291
O3InstanceList _instances_
Definition: O3prm.h:854
const O3Integer & rightIndex() const
Definition: O3prm.cpp:1221
O3RealTypeList _real_types_
Definition: O3prm.h:932
O3RawCPT(const O3Label &type, const O3Label &name, const O3Attribute::O3LabelList &parents, const O3FormulaList &values)
Definition: O3prm.cpp:703
const O3Label & rightInstance() const
Definition: O3prm.cpp:1153
O3Type & operator=(const O3Type &src)
Definition: O3prm.cpp:281
const O3Label & name() const
Definition: O3prm.cpp:587
const O3Label & name() const
Definition: O3prm.cpp:360
O3Position & position()
Definition: O3prm.cpp:897
O3Class & operator=(const O3Class &src)
Definition: O3prm.cpp:857
const O3AggregateList & aggregates() const
Definition: O3prm.cpp:919
The O3Interface is part of the AST of the O3PRM language.
Definition: O3prm.h:355
O3System & operator=(O3System &&src)
Definition: O3prm.cpp:1314
PRMType type() const
Definition: O3prm.cpp:971
O3InstanceParameter(O3InstanceParameter &&src)
Definition: O3prm.cpp:1353
virtual O3Label & name()
Definition: O3prm.cpp:693
O3Instance & operator=(O3Instance &&src)
Definition: O3prm.cpp:1256
O3Position(const O3Position &src)
Definition: O3prm.cpp:43
virtual const O3Label & name() const
Definition: O3prm.cpp:694
The O3Formula is part of the AST of the O3PRM language.
Definition: O3prm.h:85
const O3Label & type() const
Definition: O3prm.cpp:1265
O3RawCPT(O3RawCPT &&src)
Definition: O3prm.cpp:719
const O3Label & name() const
Definition: O3prm.cpp:1028
O3Type(O3Type &&src)
Definition: O3prm.cpp:269
LabelMap & labels()
Definition: O3prm.cpp:307
O3Position & position()
Definition: O3prm.cpp:209
O3InstanceParameter & operator=(const O3InstanceParameter &src)
Definition: O3prm.cpp:1361
const O3SystemList & systems() const
Definition: O3prm.cpp:536
O3Float & operator=(O3Float &&src)
Definition: O3prm.cpp:157
O3System & operator=(const O3System &src)
Definition: O3prm.cpp:1305
const O3Position & position() const
Definition: O3prm.cpp:208