1--  Tree node definitions.
2--  Copyright (C) 2002, 2003, 2004, 2005 Tristan Gingold
3--
4--  This program is free software: you can redistribute it and/or modify
5--  it under the terms of the GNU General Public License as published by
6--  the Free Software Foundation, either version 2 of the License, or
7--  (at your option) any later version.
8--
9--  This program is distributed in the hope that it will be useful,
10--  but WITHOUT ANY WARRANTY; without even the implied warranty of
11--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12--  GNU General Public License for more details.
13--
14--  You should have received a copy of the GNU General Public License
15--  along with this program.  If not, see <gnu.org/licenses>.
16with Ada.Unchecked_Deallocation;
17with Types; use Types;
18with Vhdl.Tokens; use Vhdl.Tokens;
19with Vhdl.Nodes_Priv;
20with Vhdl.Lists;
21with Vhdl.Flists;
22with PSL.Types; use PSL.Types;
23
24package Vhdl.Nodes is
25   --  This package defines the semantic tree and functions to handle it.
26   --  The tree is roughly based on IIR (Internal Intermediate Representation),
27   --  [AIRE/CE Advanced Intermediate Representation with Extensibility,
28   --   Common Environment.  http://www.vhdl.org/aire/index.html [DEAD LINK] ]
29   --  but oriented object features are not used, and often, functions
30   --  or fields have changed.
31
32   --  Note: this tree is also used during syntactic analysis, but with
33   --  a little bit different meanings for the fields.
34   --  The parser (parse package) build the tree.
35   --  The semantic pass (sem, sem_expr, sem_names, ...) transforms it into a
36   --  semantic tree.
37
38   --  Documentation:
39   --  Only the semantic aspect is to be fully documented.
40   --  The syntactic aspect is only used between parse and sem.
41
42   --  Each node of the tree is a record of type iir, based on the private (so
43   --  hidden) type nodes.node_type.
44   --
45   --  Each node in the tree should be referenced only once (as this is a
46   --  tree).  There are some exceptions to this rule for space optimization
47   --  purpose:
48   --    - the interface list of implicit subprograms are shared among the
49   --      implicit subprograms.
50   --
51   --  As the tree represents an AST it is in fact a graph: for there are links
52   --  from names to the declaration.  However these links are marked
53   --  explicitly as Ref.  A Ref doesn't own the node.
54   --
55   --  The distinction between owner and reference is very important as it
56   --  allows to use this meta-model for processing: displaying the tree
57   --  (without creating infinite loops), copying the tree for instantiation...
58   --
59   --  There is a little bit of overhead due to this choice:
60   --    - some fields looks duplicated: for example an object declaration has
61   --      both a type field and a subtype indication field, array subtypes
62   --      have both an index_subtype_list and an index_constraint_list.
63   --    - Maybe_Ref trick: the Is_Ref flag tells whether the Maybe_Ref are
64   --      owner or ref.
65   --    - Maybe_Forward_Ref: the Is_Forward_Ref tells whether the field is
66   --      ref or forward_ref
67
68   --  The root of a semantic tree is a library_declaration.
69   --  All the library_declarations are kept in a private list, held by
70   --  package libraries.
71   --  Example of a tree:
72   --   library_declaration
73   --   +-- design_file
74   --       +-- design_unit
75   --       |   +-- entity_declaration
76   --       +-- design_unit
77   --           +-- architecture_body
78   --  ...
79
80   --  Since the tree can represent all the libraries and their contents, it
81   --  is not always loaded into memory.
82   --  When a library is loaded, only library_declaration, design_file,
83   --  design_unit and library_unit nodes are created.  When a design_unit is
84   --  really loaded, the design_unit node is not replaced but modified (ie,
85   --  access to this node are still valid).
86
87   --  To add a new kind of node:
88   --   the name should be of the form iir_kind_NAME
89   --   add iir_kind_NAME in the definition of type iir_kind_type
90   --   document the node below: grammar, methods.
91   --   for each methods, add the name if the case statement in the body
92   --     (this enables the methods)
93   --   add an entry in disp_tree (debugging)
94   --   handle this node in Errorout.Disp_Node
95
96   --  Meta-grammar
97   --  This file is processed by a tool to automatically generate the body, so
98   --  it must follow a meta-grammar.
99   --
100   --  The low level representation is described in nodes.ads.
101   --
102   --  The literals for the nodes must be declared in this file like this:
103   --   type Iir_Kind is
104   --      (
105   --       Iir_Kind_AAA,
106   --   ...
107   --       Iir_Kind_ZZZ
108   --      );
109   --  The tool doesn't check for uniqueness as this is done by the compiler.
110   --
111   --  It is possible to declare ranges of kinds like this:
112   --   subtype Iir_Kinds_RANGE is Iir_Kind range
113   --     Iir_Kind_FIRST ..
114   --   --Iir_Kind_MID
115   --     Iir_Kind_LAST;
116   --  Literals Iir_Kind_MID are optional (FIXME: make them required ?), but
117   --  if present all the values between FIRST and LAST must be present.
118   --
119   --  The methods appear after the comment: '   -- General methods.'
120   --  They have the following format:
121   --    --  Field: FIELD ATTR (CONV)
122   --   function Get_NAME (PNAME : PTYPE) return RTYPE;
123   --   procedure Set_NAME (PNAME : PTYPE; RNAME : RTYPE);
124   --  'FIELD' indicate which field of the node is used to store the value.
125   --  ATTR is optional and if present must be one of:
126   --     Ref: the field is a reference to an existing node
127   --     Chain: the field contains a chain of nodes
128   --     Chain_Next: the field contains the next element of a chain (present
129   --      only on one field: Set/Get_Chain).
130   --  ' (CONV)' is present if the type of the value (indicated by RTYPE) is
131   --  different from the type of the field.  CONV can be either 'uc' or 'pos'.
132   --  'uc' indicates an unchecked conversion while 'pos' a pos/val conversion.
133   --
134   --  Nodes content is described between '   -- Start of Iir_Kind.' and
135   --  '   -- End of Iir_Kind.' like this:
136   --   -- Iir_Kind_NODE1 (FORMAT1)
137   --   -- Iir_Kind_NODE2 (FORMAT2)
138   --   --
139   --   --   Get/Set_NAME1 (FIELD1)
140   --   --
141   --   --   Get/Set_NAME2 (FIELD2)
142   --   --   Get/Set_NAME3 (Alias FIELD2)
143   --   --
144   --   -- Only for Iir_Kind_NODE1:
145   --   --   Get/Set_NAME4 (FIELD3)
146   --  Several nodes can be described at once; at least one must be described.
147   --  Fields FIELD1, FIELD2, FIELD3 must be different, unless 'Alias ' is
148   --  present.  The number of spaces is significant.  The 'Only for ' lines
149   --  are optional and there may be several of them.
150
151   -------------------------------------------------
152   -- General methods (can be used on all nodes): --
153   -------------------------------------------------
154
155   --  Create a node of kind KIND.
156   --    function Create_Iir (Kind: Iir_Kind) return Iir;
157   --
158   --  Deallocate a node.  Deallocate fields that where allocated by
159   --  create_iir.
160   --   procedure Free_Iir (Target: in out Iir);
161   --
162   --  Get the kind of the iir.
163   --  See below for the (public) list of kinds.
164   --   function Get_Kind (N : Iir) return Iir_Kind;
165
166   --  Get the location of the node: ie the current position in the source
167   --  file when the node was created.  This is a little bit fuzzy.
168   --
169   --   procedure Set_Location (Target : Iir; Location: Location_Type);
170   --   function Get_Location (Target : Iir) return Location_Type;
171   --
172   --  Copy a location from a node to another one.
173   --   procedure Location_Copy (Target: in out Iir; Src: in Iir);
174
175   --  The next line marks the start of the node description.
176   -- Start of Iir_Kind.
177
178   --------------------------------------------------
179   --  A set of methods are associated with a kind.  --
180   --------------------------------------------------
181
182   -- Iir_Kind_Design_File (Medium)
183   --  LRM93 11
184   --  design_file ::= design_unit { design_unit }
185   --
186   --  The library containing this design file.
187   --   Get/Set_Library (Field0)
188   --   Get/Set_Parent (Alias Field0)
189   --
190   --   Get/Set_File_Dependence_List (Field1)
191   --
192   --   Get/Set_Chain (Field2)
193   --
194   --  Time when the whole file has been analyzed.  This allows ordering
195   --  analysis and detecting obsolete units across libraries.
196   --   Get/Set_Analysis_Time_Stamp (Field3)
197   --
198   --   Get/Set_File_Checksum (Field4)
199   --
200   --  Get the chain of unit contained in the file.  This is a simply linked
201   --  chain, but the tail is kept to speed-up appending operation.
202   --   Get/Set_First_Design_Unit (Field5)
203   --
204   --   Get/Set_Last_Design_Unit (Field6)
205   --
206   --   Get/Set_Design_File_Source (Field7)
207   --
208   --  Identifier for the design file file name and dirname.
209   --   Get/Set_Design_File_Filename (Field12)
210   --   Get/Set_Design_File_Directory (Field11)
211   --
212   --  Flag used during elaboration.  Set when the file was already seen.
213   --   Get/Set_Elab_Flag (Flag3)
214
215   -- Iir_Kind_Design_Unit (Medium)
216   --  LRM93 11
217   --  design_unit ::= context_clause library_unit
218   --
219   --  The design_file containing this design unit.
220   --   Get/Set_Design_File (Field0)
221   --   Get/Set_Parent (Alias Field0)
222   --
223   --  Get the chain of context clause.
224   --   Get/Set_Context_Items (Field1)
225   --
226   --   Get/Set_Chain (Field2)
227   --
228   --   Get/Set_Identifier (Field3)
229   --
230   --  This is a symbolic date, only used as a order of analysis of design
231   --  units.
232   --   Get/Set_Date (Field4)
233   --
234   --  Get/Set the library unit, which can be an entity, an architecture,
235   --  a package, a package body or a configuration.
236   --   Get/Set_Library_Unit (Field5)
237   --
238   --  Collision chain for units.
239   --   Get/Set_Hash_Chain (Field7)
240   --
241   --  Get the list of design units that must be analysed before this unit.
242   --  See LRM93 11.4 for the rules defining the order of analysis.
243   --   Get/Set_Dependence_List (Field8)
244   --
245   --  FIXME: this field can be put in the library_unit, since it is only used
246   --  when the units have been analyzed.
247   --   Get/Set_Analysis_Checks_List (Field9)
248   --
249   --  Set the line and the offset in the line, only for the library manager.
250   --  This is valid until the file is really loaded in memory.  On loading,
251   --  location will contain all this information.
252   --   Get/Set_Design_Unit_Source_Pos (Field10)
253   --
254   --   Get/Set_Design_Unit_Source_Line (Field11)
255   --
256   --   Get/Set_Design_Unit_Source_Col (Field12)
257   --
258   --  Get/Set the date state, which indicates whether this design unit is in
259   --  memory or not.
260   --   Get/Set_Date_State (State1)
261   --
262   --  Flag used during elaboration.  Set when the file was already seen.
263   --   Get/Set_Elab_Flag (Flag3)
264   --
265   --  Flags used during configuration
266   --   Get/Set_Configuration_Mark_Flag (Flag4)
267   --   Get/Set_Configuration_Done_Flag (Flag5)
268
269   -- Iir_Kind_Library_Clause (Short)
270   --
271   --  LRM08 13.2 Design libraries
272   --
273   --  library_clause ::= LIBRARY logical_name_list ;
274   --
275   --  logical_name_list ::= logical_name { , logical_name }
276   --
277   --  logical_name ::= identifier
278   --
279   --  Note: a library_clause node is created for every logical_name.
280   --  As a consequence, the scope of the library starts after the logical_name
281   --  and not after the library_clause.  However, since an identifier
282   --  can only be used as a logical_name, and since the second occurrence has
283   --  no effect, this is correct.
284   --
285   --   Get/Set_Parent (Field0)
286   --
287   --   Get/Set_Identifier (Field3)
288   --
289   --   Get/Set_Library_Declaration (Field1)
290   --
291   --   Get/Set_Chain (Field2)
292   --
293   --   Get/Set_Has_Identifier_List (Flag3)
294
295   ---------------
296   --  Literals --
297   ---------------
298
299   -- Iir_Kind_String_Literal8 (Short)
300   --
301   --  Number of literals in the expanded string.
302   --   Get/Set_String_Length (Field4)
303   --
304   --  Before analysis, this is the ASCII code of each character in the string.
305   --  After analysis, this is the position of each literal.
306   --   Get/Set_String8_Id (Field5)
307   --
308   --   Get/Set_Literal_Length (Field0)
309   --
310   --  Used for computed literals.  Literal_Origin contains the expression
311   --  whose value was computed during analysis and replaces the expression.
312   --   Get/Set_Literal_Origin (Field2)
313   --
314   --  Same as Type, but marked as property of that node.
315   --   Get/Set_Literal_Subtype (Field3)
316   --
317   --   Get/Set_Type (Field1)
318   --
319   --  Base of the bit_string (corresponds to letters 'b', 'o', 'd' or 'x' in
320   --  the base specifier).
321   --   Get/Set_Bit_String_Base (Flag12,Flag13,Flag14)
322   --
323   --   Get/Set_Expr_Staticness (State1)
324   --
325   --  True if the bit string is signed, (ie letter 's' is present in the base
326   --  specifier).
327   --   Get/Set_Has_Signed (Flag1)
328   --
329   --  True if the letter 'u' is present in the base specifier.
330   --   Get/Set_Has_Sign (Flag2)
331   --
332   --  True if the integer specifying the length is present.
333   --   Get/Set_Has_Length (Flag3)
334
335   -- Iir_Kind_Integer_Literal (Short)
336   --
337   --  Get/Set the value of the integer.
338   --   Get/Set_Value (Field4,Field5)
339   --
340   --   Get/Set_Literal_Length (Field0)
341   --
342   --   Get/Set_Literal_Origin (Field2)
343   --
344   --   Get/Set_Type (Field1)
345   --
346   --   Get/Set_Expr_Staticness (State1)
347
348   -- Iir_Kind_Floating_Point_Literal (Short)
349   --
350   --  The value of the literal.
351   --   Get/Set_Fp_Value (Field4,Field5)
352   --
353   --   Get/Set_Literal_Length (Field0)
354   --
355   --   Get/Set_Literal_Origin (Field2)
356   --
357   --   Get/Set_Type (Field1)
358   --
359   --   Get/Set_Expr_Staticness (State1)
360
361   -- Iir_Kind_Null_Literal (Short)
362   --  The null literal, which can be a disconnection or a null access.
363   --
364   --   Get/Set_Type (Field1)
365   --
366   --   Get/Set_Expr_Staticness (State1)
367
368   -- Iir_Kind_Physical_Int_Literal (Short)
369   -- Iir_Kind_Physical_Fp_Literal (Short)
370   --
371   -- Only for Iir_Kind_Physical_Int_Literal:
372   --  The multiplicand.
373   --   Get/Set_Value (Field4,Field5)
374   --
375   -- Only for Iir_Kind_Physical_Fp_Literal:
376   --  The multiplicand.
377   --   Get/Set_Fp_Value (Field4,Field5)
378   --
379   --  The name of the physical unit.
380   --   Get/Set_Unit_Name (Field3)
381   --
382   --   Get/Set_Literal_Length (Field0)
383   --
384   --   Get/Set_Literal_Origin (Field2)
385   --
386   --   Get/Set_Type (Field1)
387   --
388   --  Must be set to locally except for time literal, which is globally.
389   --   Get/Set_Expr_Staticness (State1)
390
391   -- Iir_Kind_Simple_Aggregate (Short)
392   --  This node can only be generated by evaluation: it is an unidimensional
393   --  positional aggregate.
394   --
395   --  Same as Type, but marked as property of that node.
396   --   Get/Set_Literal_Subtype (Field3)
397   --
398   --   Get/Set_Literal_Origin (Field2)
399   --
400   --  List of elements (Index 0 is for the leftest element).
401   --   Get/Set_Simple_Aggregate_List (Field4)
402   --
403   --   Get/Set_Type (Field1)
404   --
405   --   Get/Set_Expr_Staticness (State1)
406
407   -- Iir_Kind_Overflow_Literal (Short)
408   --  This node can only be generated by evaluation to represent an error: out
409   --  of range, division by zero...
410   --
411   --   Get/Set_Literal_Origin (Field2)
412   --
413   --   Get/Set_Type (Field1)
414   --
415   --   Get/Set_Expr_Staticness (State1)
416
417   -- Iir_Kind_Unaffected_Waveform (Short)
418   --  The 'unaffected' reserved word when it appears in the sources.
419   --
420   --  Unaffected replaces a waveform element, so it is considered to be part
421   --  of a chain.  But it is always alone in the chain.
422   --   Get/Set_Chain (Field2)
423
424   -------------
425   --  Tuples --
426   -------------
427
428   -- Iir_Kind_Association_Element_By_Expression (Short)
429   -- Iir_Kind_Association_Element_Open (Short)
430   -- Iir_Kind_Association_Element_By_Individual (Short)
431   -- Iir_Kind_Association_Element_Package (Short)
432   -- Iir_Kind_Association_Element_Type (Short)
433   -- Iir_Kind_Association_Element_Subprogram (Short)
434   -- Iir_Kind_Association_Element_Terminal (Short)
435   --  These are used for association element of an association list with
436   --  an interface (ie subprogram call, port map, generic map).
437   --
438   --   Get/Set_Formal (Field1)
439   --
440   --   Get/Set_Chain (Field2)
441   --
442   -- Only for Iir_Kind_Association_Element_By_Expression:
443   -- Only for Iir_Kind_Association_Element_Package:
444   -- Only for Iir_Kind_Association_Element_Type:
445   -- Only for Iir_Kind_Association_Element_Subprogram:
446   -- Only for Iir_Kind_Association_Element_Terminal:
447   --   Get/Set_Actual (Field3)
448   --
449   -- Only for Iir_Kind_Association_Element_By_Individual:
450   --   Get/Set_Individual_Association_Chain (Field4)
451   --
452   --  A function call or a type conversion for the actual.
453   --  FIXME: should be a name ?
454   -- Only for Iir_Kind_Association_Element_By_Expression:
455   --   Get/Set_Actual_Conversion (Field4)
456   --
457   -- Only for Iir_Kind_Association_Element_Type:
458   --   Get/Set_Subprogram_Association_Chain (Field4)
459   --
460   --  A function call or a type conversion for the formal.
461   -- Only for Iir_Kind_Association_Element_By_Expression:
462   --   Get/Set_Formal_Conversion (Field5)
463   --
464   --  Owner of Actual_Type if needed.
465   -- Only for Iir_Kind_Association_Element_By_Individual:
466   --   Get/Set_Actual_Type_Definition (Field3)
467   --
468   -- Only for Iir_Kind_Association_Element_By_Individual:
469   -- Only for Iir_Kind_Association_Element_Type:
470   --   Get/Set_Actual_Type (Field5)
471   --
472   --  Get/Set the whole association flag (true if the formal is associated in
473   --  whole and not individually, see LRM93 4.3.2.2)
474   --   Get/Set_Whole_Association_Flag (Flag1)
475   --
476   --   Get/Set_Collapse_Signal_Flag (Flag2)
477   --
478   -- Only for Iir_Kind_Association_Element_Open:
479   --   Get/Set_Artificial_Flag (Flag3)
480   --
481   --   Get/Set_In_Formal_Flag (Flag4)
482   --
483   -- Only for Iir_Kind_Association_Element_By_Individual:
484   --  Must be Locally unless there is an error on one choice.
485   --   Get/Set_Choice_Staticness (State1)
486
487   -- Iir_Kind_Waveform_Element (Short)
488   --
489   --   Get/Set_We_Value (Field1)
490   --
491   --   Get/Set_Time (Field3)
492   --
493   --   Get/Set_Chain (Field2)
494
495   -- Iir_Kind_Conditional_Waveform (Short)
496   --
497   --   Get/Set_Condition (Field1)
498   --
499   --   Get/Set_Waveform_Chain (Field5)
500   --
501   --   Get/Set_Chain (Field2)
502   --
503   --   Get/Set_Is_Ref (Flag12)
504
505   -- Iir_Kind_Conditional_Expression (Short)
506   --  LRM08 10.5.3
507   --  conditional_expressions ::=
508   --      expression WHEN condition
509   --    { ELSE expression WHEN condition }
510   --    [ ELSE expression ]
511   --
512   --   Get/Set_Condition (Field1)
513   --
514   --   Get/Set_Expression (Field5)
515   --
516   --   Get/Set_Chain (Field2)
517   --
518   --   Get/Set_Is_Ref (Flag12)
519
520   -- Iir_Kind_Choice_By_Others (Short)
521   -- Iir_Kind_Choice_By_None (Short)
522   -- Iir_Kind_Choice_By_Range (Short)
523   -- Iir_Kind_Choice_By_Name (Short)
524   -- Iir_Kind_Choice_By_Expression (Short)
525   --  (Iir_Kinds_Choice)
526   --
527   --  Used by:
528   --  Iir_Kind_Aggregate
529   --  Iir_Kind_Case_Statement
530   --  Iir_Kind_Case_Generate_Statement
531   --  Iir_Kind_Concurrent_Selected_Signal_Assignment
532   --  Iir_Kind_Simultaneous_Case_Statement
533   --
534   --  The location of the first alternative is set on:
535   --  'when' for case statement, selected assignment and case generate,
536   --  '(' or ',' for aggregates.
537   --  The location of the following alternatives is set on '|'.
538   --
539   --   Get/Set_Parent (Field0)
540   --
541   --  For a list of choices, only the first one is associated, the following
542   --  associations have the same_alternative_flag set.
543   --   Get/Set_Chain (Field2)
544   --
545   --  Should be a simple_name.
546   -- Only for Iir_Kind_Choice_By_Name:
547   --   Get/Set_Choice_Name (Field5)
548   --
549   -- Only for Iir_Kind_Choice_By_Expression:
550   --   Get/Set_Choice_Expression (Field5)
551   --
552   -- Only for Iir_Kind_Choice_By_Range:
553   --   Get/Set_Choice_Range (Field5)
554   --
555   --  Get/Set what is associated with the choice.  There are two different
556   --  nodes, one for simple association and the other for chain association.
557   --  They don't have the same properties (normal vs chain), so the right
558   --  field must be selected according to the property to have working
559   --  walkers. Both fields are never used at the same time.
560   --
561   --  For:
562   --  * an expression for an aggregate
563   --  * an individual association
564   --  * a generate_statement_body chain for a case_generate_statement
565   --   Get/Set_Associated_Expr (Field3)
566   --   Get/Set_Associated_Block (Alias Field3)
567   --
568   --  For
569   --  * a waveform_chain for a concurrent_selected_signal_assignment,
570   --  * a sequential statement chain for a case_statement.
571   --   Get/Set_Associated_Chain (Field4)
572   --
573   --  Set when share the same association as the previous one.
574   --   Get/Set_Same_Alternative_Flag (Flag1)
575   --
576   --  For aggregates: if True, associated expression is for one element.
577   --   Get/Set_Element_Type_Flag (Flag2)
578   --
579   -- Only for Iir_Kind_Choice_By_Range:
580   -- Only for Iir_Kind_Choice_By_Expression:
581   --   Get/Set_Choice_Staticness (State1)
582
583   -- Iir_Kind_Entity_Aspect_Entity (Short)
584   --
585   --   Get/Set_Entity_Name (Field2)
586   --
587   --  A simple name for the architecture.  The named entity can be:
588   --  * Null_Iir if the architecture is not known.
589   --  * a design unit if the architecture is known but not loaded.
590   --  * an architecture body if the architecture is loaded.
591   --   Get/Set_Architecture (Field3)
592
593   -- Iir_Kind_Entity_Aspect_Open (Short)
594
595   -- Iir_Kind_Entity_Aspect_Configuration (Short)
596   --
597   --   Get/Set_Configuration_Name (Field1)
598
599   -- Iir_Kind_Psl_Hierarchical_Name (Short)
600   --
601   --   Get/Set_Entity_Name (Field2)
602   --
603   --   Get/Set_Architecture (Field3)
604
605   -- Iir_Kind_Block_Configuration (Short)
606   --
607   --  LRM08 3.4.2 Block configuration
608   --  block_configuration ::=
609   --    FOR block_specification
610   --      { use_clause }
611   --      { configuration_item }
612   --    END FOR;
613   --
614   --  configuration_item ::=
615   --      block_configuration
616   --    | component_configuration
617   --
618   --  block_specification ::=
619   --      /architecture_/name
620   --    | /block_statement_/label
621   --    | /generate_statement_/label [ ( generate_specification ) ]
622   --
623   --   Get/Set_Parent (Field0)
624   --
625   --  Only use_clause are allowed here.
626   --   Get/Set_Declaration_Chain (Field1)
627   --
628   --   Get/Set_Chain (Field2)
629   --
630   --   Get/Set_Configuration_Item_Chain (Field3)
631   --
632   --  Single linked list of block configuration that apply to the same
633   --  for scheme generate block.
634   --   Get/Set_Prev_Block_Configuration (Field4)
635   --
636   --  Note: for default block configurations of iterative generate statement,
637   --  the block specification is an indexed_name, whose index_list is others.
638   --  The name designates either a block statement or a generate statement
639   --  body.
640   --   Get/Set_Block_Specification (Field5)
641
642   -- Iir_Kind_Binding_Indication (Medium)
643   --
644   --   Get/Set_Default_Entity_Aspect (Field1)
645   --
646   --  The entity aspect.
647   --  It is a iir_kind_entity_aspect_entity, iir_kind_entity_aspect_open or
648   --  iir_kind_entity_aspect_configuration.  This may be transformed into a
649   --  declaration by semantic.
650   --   Get/Set_Entity_Aspect (Field3)
651   --
652   --   Get/Set_Generic_Map_Aspect_Chain (Field8)
653   --
654   --   Get/Set_Port_Map_Aspect_Chain (Field9)
655
656   -- Iir_Kind_Component_Configuration (Short)
657   -- Iir_Kind_Configuration_Specification (Short)
658   --
659   --  LRM08 7.3 Configuration specification
660   --
661   --  configuration_specification ::=
662   --      simple_configuration_specification
663   --    | compound_configuration_specification
664   --
665   --  simple_configuration_specification ::=
666   --     FOR component_specification binding_indication ;
667   --     [ END FOR ; ]
668   --
669   --  compound_configuration_specification ::=
670   --     FOR component_specification binding_indication ;
671   --        verification_unit_binding_indication ;
672   --        { verification_unit_binding_indication ; }
673   --     END FOR ;
674   --
675   --  component_specification ::=
676   --     instantiation_list : component_name
677   --
678   --  instantiation_list ::=
679   --      instantiation_label { , instantiation_label }
680   --    | OTHERS
681   --    | ALL
682   --
683   --  The location points to 'for'.
684   --
685   --  The declaration containing this type declaration.
686   --   Get/Set_Parent (Field0)
687   --
688   --   Get/Set_Component_Name (Field5)
689   --
690   --  A list, list_others or list_all.
691   --   Get/Set_Instantiation_List (Field1)
692   --
693   -- Only for Iir_Kind_Component_Configuration:
694   --   Get/Set_Block_Configuration (Field4)
695   --
696   --   Get/Set_Binding_Indication (Field3)
697   --
698   --   Get/Set_Chain (Field2)
699   --
700   --   Get/Set_Is_Ref (Flag12)
701
702   -- Iir_Kind_Disconnection_Specification (Short)
703   --
704   --  LRM08 7.4 Disconnection specification
705   --
706   --  disconnection_specification ::=
707   --    DISCONNECT guarded_signal_specification AFTER time_expression ;
708   --
709   --  guarded_signal_specification ::=
710   --    guarded_signal_list : type_mark
711   --
712   --  signal_list ::=
713   --       signal_name { , signal_name }
714   --     | OTHERS
715   --     | ALL
716   --
717   --  The declaration containing this type declaration.
718   --   Get/Set_Parent (Field0)
719   --
720   --   Get/Set_Signal_List (Field3)
721   --
722   --   Get/Set_Type_Mark (Field4)
723   --
724   --   Get/Set_Expression (Field5)
725   --
726   --   Get/Set_Chain (Field2)
727   --
728   --   Get/Set_Is_Ref (Flag12)
729
730   -- Iir_Kind_Step_Limit_Specification (Short)
731   --
732   --  AMS-LRM17 7.5 Step limit specification
733   --
734   --  step_limit_specification ::=
735   --    LIMIT quantity_specification WITH real_expression ;
736   --
737   --  quantity_specification ::=
738   --    quantity_list : type_mark
739   --
740   --  quantity_list ::=
741   --       quantity_name { , quantity_name }
742   --     | OTHERS
743   --     | ALL
744   --
745   --   Get/Set_Parent (Field0)
746   --
747   --   Get/Set_Quantity_List (Field3)
748   --
749   --   Get/Set_Type_Mark (Field4)
750   --
751   --   Get/Set_Expression (Field5)
752   --
753   --   Get/Set_Chain (Field2)
754   --
755   --   Get/Set_Is_Ref (Flag12)
756
757   -- Iir_Kind_Block_Header (Medium)
758   --
759   --   Get/Set_Generic_Chain (Field6)
760   --
761   --   Get/Set_Port_Chain (Field7)
762   --
763   --   Get/Set_Generic_Map_Aspect_Chain (Field8)
764   --
765   --   Get/Set_Port_Map_Aspect_Chain (Field9)
766
767   -- Iir_Kind_Entity_Class (Short)
768   --
769   --   Get/Set_Chain (Field2)
770   --
771   --   Get/Set_Entity_Class (Field3)
772
773   -- Iir_Kind_Attribute_Specification (Medium)
774   --
775   --  LRM08 7.2 Attribute specification
776   --
777   --  attribute_specification ::=
778   --     ATTRIBUTE attribute_designator OF entity_specification
779   --        IS expression ;
780   --
781   --  entity_specification ::= entity_name_list : entity_class
782   --
783   --  entity_name_list ::=
784   --       entity_designator { , entity_designator }
785   --     | OTHERS
786   --     | ALL
787   --
788   --  entity_designator ::= entity_tag [ signature ]
789   --
790   --  entity_tag ::= simple_name | character_literal | operator_symbol
791   --
792   --  LRM08 8.6 Attribute names
793   --
794   --  attribute_designator ::= /attribute/_simple_name
795   --
796   --   Get/Set_Parent (Field0)
797   --
798   --   Get/Set_Chain (Field2)
799   --
800   --   Get/Set_Entity_Class (Field3)
801   --
802   --   Get/Set_Entity_Name_List (Field8)
803   --
804   --   Get/Set_Expression (Field5)
805   --
806   --   Get/Set_Attribute_Value_Spec_Chain (Field4)
807   --
808   --  Always a simple name.
809   --   Get/Set_Attribute_Designator (Field6)
810   --
811   --   Get/Set_Attribute_Specification_Chain (Field7)
812   --
813   --   Get/Set_Static_Attribute_Flag (Flag2)
814
815   -- Iir_Kind_Attribute_Value (Short)
816   --  An attribute value is the element of the chain of attribute of an
817   --  entity, marking the entity as decorated by the attribute.
818   --  This node is built only by sem.
819   --  In fact, the node is member of the chain of attribute of an entity, and
820   --  of the chain of a parent node containing all the attributes value for
821   --  a scope.
822   --  This makes elaboration (and more precisely, expression evaluation)
823   --  easier.
824   --
825   --  Chain of attribute_value for the attribute specification
826   --   Get/Set_Spec_Chain (Field2)
827   --
828   --   Get/Set_Type (Field1)
829   --
830   --  Chain of all attribute_value for the node containing declarations
831   --   Get/Set_Value_Chain (Field0)
832   --
833   --   Get/Set_Designated_Entity (Field3)
834   --
835   --   Get/Set_Attribute_Specification (Field4)
836   --
837   --   Get/Set_Base_Name (Field5)
838   --
839   --   Get/Set_Expr_Staticness (State1)
840   --
841   --   Get/Set_Name_Staticness (State2)
842
843   -- Iir_Kind_Psl_Expression (Short)
844   --
845   --   Get/Set_Type (Field1)
846   --
847   --   Get/Set_Psl_Expression (Field3)
848
849   -- Iir_Kind_Psl_Prev (Short)
850   --
851   --   Get/Set_Type (Field1)
852   --
853   --   Get/Set_Expression (Field5)
854   --
855   --   Get/Set_Count_Expression (Field2)
856   --
857   --   Get/Set_Clock_Expression (Field4)
858   --
859   --  Reference to the default_clock node.
860   --   Get/Set_Default_Clock (Field3)
861   --
862   --   Get/Set_Expr_Staticness (State1)
863
864   -- Iir_Kind_Psl_Stable (Short)
865   -- Iir_Kind_Psl_Rose (Short)
866   -- Iir_Kind_Psl_Fell (Short)
867   --
868   --   Get/Set_Type (Field1)
869   --
870   --   Get/Set_Expression (Field5)
871   --
872   --   Get/Set_Clock_Expression (Field4)
873   --
874   --  Reference to the default_clock node.
875   --   Get/Set_Default_Clock (Field3)
876   --
877   --   Get/Set_Expr_Staticness (State1)
878
879   -- Iir_Kind_Signature (Medium)
880   --
881   --  LRM08 4.5.3 Signatures
882   --
883   --  signature ::= '[' [ type_mark { , type_mark } ] [ RETURN type_mark ] ']'
884   --
885   --   Get/Set_Signature_Prefix (Field1)
886   --
887   --   Get/Set_Type_Marks_List (Field2)
888   --
889   --   Get/Set_Return_Type_Mark (Field8)
890
891   -- Iir_Kind_Overload_List (Short)
892   --
893   --   Get/Set_Overload_List (Field1)
894
895   -------------------
896   --  Declarations --
897   -------------------
898
899   -- Iir_Kind_Entity_Declaration (Medium)
900   --
901   --   Get/Set_Parent (Field0)
902   --   Get/Set_Design_Unit (Alias Field0)
903   --
904   --   Get/Set_Identifier (Field3)
905   --
906   --   Get/Set_Generic_Chain (Field6)
907   --
908   --   Get/Set_Port_Chain (Field7)
909   --
910   --   Get/Set_Declaration_Chain (Field1)
911   --
912   --   Get/Set_Concurrent_Statement_Chain (Field4)
913   --
914   --   Get/Set_Attribute_Value_Chain (Field5)
915   --
916   --   Get/Set_Bound_Vunit_Chain (Field8)
917   --
918   --   Get/Set_Visible_Flag (Flag4)
919   --
920   --   Get/Set_Is_Within_Flag (Flag5)
921   --
922   --   Get/Set_End_Has_Reserved_Id (Flag8)
923   --
924   --   Get/Set_End_Has_Identifier (Flag9)
925   --
926   --   Get/Set_Has_Begin (Flag10)
927
928   -- Iir_Kind_Architecture_Body (Medium)
929   --
930   --   Get/Set_Parent (Field0)
931   --   Get/Set_Design_Unit (Alias Field0)
932   --
933   --  Name of the entity declaration for the architecture.
934   --   Get/Set_Entity_Name (Field2)
935   --
936   --   Get/Set_Declaration_Chain (Field1)
937   --
938   --   Get/Set_Identifier (Field3)
939   --
940   --   Get/Set_Concurrent_Statement_Chain (Field4)
941   --
942   --   Get/Set_Attribute_Value_Chain (Field5)
943   --
944   --  The default configuration created by canon.  This is a design unit.
945   --   Get/Set_Default_Configuration_Declaration (Field6)
946   --
947   --   Get/Set_Bound_Vunit_Chain (Field8)
948   --
949   --   Get/Set_Foreign_Flag (Flag3)
950   --
951   --   Get/Set_Visible_Flag (Flag4)
952   --
953   --   Get/Set_Is_Within_Flag (Flag5)
954   --
955   --   Get/Set_End_Has_Reserved_Id (Flag8)
956   --
957   --   Get/Set_End_Has_Identifier (Flag9)
958
959   -- Iir_Kind_Configuration_Declaration (Short)
960   --
961   --   Get/Set_Parent (Field0)
962   --   Get/Set_Design_Unit (Alias Field0)
963   --
964   --   Get/Set_Declaration_Chain (Field1)
965   --
966   --  Name of the entity of a configuration.
967   --   Get/Set_Entity_Name (Field2)
968   --
969   --   Get/Set_Identifier (Field3)
970   --
971   --   Get/Set_Attribute_Value_Chain (Field5)
972   --
973   --   Get/Set_Block_Configuration (Field4)
974   --
975   --   Get/Set_Visible_Flag (Flag4)
976   --
977   --   Get/Set_Is_Within_Flag (Flag5)
978   --
979   --   Get/Set_End_Has_Reserved_Id (Flag8)
980   --
981   --   Get/Set_End_Has_Identifier (Flag9)
982
983   -- Iir_Kind_Package_Header (Medium)
984   --
985   --   Get/Set_Generic_Chain (Field6)
986   --
987   --   Get/Set_Generic_Map_Aspect_Chain (Field8)
988
989   -- Iir_Kind_Package_Declaration (Medium)
990   --
991   --   Get/Set_Parent (Field0)
992   --   Get/Set_Design_Unit (Alias Field0)
993   --
994   --   Get/Set_Identifier (Field3)
995   --
996   --   Get/Set_Package_Header (Field6)
997   --
998   --   Get/Set_Declaration_Chain (Field1)
999   --
1000   --  For nested packages
1001   --   Get/Set_Chain (Field2)
1002   --
1003   --   Get/Set_Attribute_Value_Chain (Field5)
1004   --
1005   --  The package body (not the unit).
1006   --   Get/Set_Package_Body (Field4)
1007   --
1008   --   Get/Set_Package_Origin (Field7)
1009   --
1010   --  If true, the package need a body.
1011   --   Get/Set_Need_Body (Flag1)
1012   --
1013   --  True for uninstantiated package that will be macro-expanded for
1014   --  simulation.  The macro-expansion is done by canon, so controlled by
1015   --  back-end.  The reason of macro-expansion is presence of interface
1016   --  type.
1017   --   Get/Set_Macro_Expanded_Flag (Flag2)
1018   --
1019   --  True if the package declaration has least one package instantiation
1020   --  declaration whose uninstantiated declaration needs both a body and
1021   --  macro-expansion.  In that case, the instantiation needs macro-expansion
1022   --  of their body.
1023   --   Get/Set_Need_Instance_Bodies (Flag3)
1024   --
1025   --   Get/Set_Is_Within_Flag (Flag5)
1026   --
1027   --   Get/Set_Visible_Flag (Flag4)
1028   --
1029   --   Get/Set_End_Has_Reserved_Id (Flag8)
1030   --
1031   --   Get/Set_End_Has_Identifier (Flag9)
1032
1033   -- Iir_Kind_Package_Body (Short)
1034   --  Note: a body is not a declaration, that's the reason why there is no
1035   --  _declaration suffix in the name.
1036   --
1037   --   Get/Set_Parent (Field0)
1038   --   Get/Set_Design_Unit (Alias Field0)
1039   --
1040   --   Get/Set_Declaration_Chain (Field1)
1041   --
1042   --  For nested packages.
1043   --   Get/Set_Chain (Field2)
1044   --
1045   --   Get/Set_Identifier (Field3)
1046   --
1047   --   Get/Set_Attribute_Value_Chain (Field5)
1048   --
1049   --  The corresponding package declaration.
1050   --   Get/Set_Package (Field4)
1051   --
1052   --   Get/Set_End_Has_Reserved_Id (Flag8)
1053   --
1054   --   Get/Set_End_Has_Identifier (Flag9)
1055
1056   -- Iir_Kind_Package_Instantiation_Declaration (Medium)
1057   --
1058   --   Get/Set_Parent (Field0)
1059   --   Get/Set_Design_Unit (Alias Field0)
1060   --
1061   --   Get/Set_Identifier (Field3)
1062   --
1063   --  The name of the uninstantiated package as it appear in the sources.  May
1064   --  be Null_Iir.
1065   --   Get/Set_Uninstantiated_Package_Name (Field7)
1066   --
1067   --  The uninstantiated package declaration.
1068   --   Get/Set_Uninstantiated_Package_Decl (Field9)
1069   --
1070   --   Get/Set_Instance_Source_File (Field10)
1071   --
1072   --   Get/Set_Generic_Chain (Field6)
1073   --
1074   --   Get/Set_Generic_Map_Aspect_Chain (Field8)
1075   --
1076   --   Get/Set_Declaration_Chain (Field1)
1077   --
1078   --  For nested packages
1079   --   Get/Set_Chain (Field2)
1080   --
1081   --   Get/Set_Attribute_Value_Chain (Field5)
1082   --
1083   --  For macro-expanded packages: the body.
1084   --   Get/Set_Instance_Package_Body (Field4)
1085   --
1086   --   Get/Set_Visible_Flag (Flag4)
1087   --
1088   --   Get/Set_End_Has_Reserved_Id (Flag8)
1089   --
1090   --   Get/Set_End_Has_Identifier (Flag9)
1091
1092   -- Iir_Kind_Context_Declaration (Short)
1093   --
1094   --   Get/Set_Parent (Field0)
1095   --   Get/Set_Design_Unit (Alias Field0)
1096   --
1097   --  Get the chain of context clause.
1098   --   Get/Set_Context_Items (Field1)
1099   --
1100   --   Get/Set_Identifier (Field3)
1101   --
1102   --   Get/Set_Visible_Flag (Flag4)
1103   --
1104   --   Get/Set_End_Has_Reserved_Id (Flag8)
1105   --
1106   --   Get/Set_End_Has_Identifier (Flag9)
1107
1108   -- Iir_Kind_Vunit_Declaration (Medium)
1109   -- Iir_Kind_Vmode_Declaration (Medium)
1110   -- Iir_Kind_Vprop_Declaration (Medium)
1111   --
1112   --   Get/Set_Parent (Field0)
1113   --   Get/Set_Design_Unit (Alias Field0)
1114   --
1115   --   Get/Set_Identifier (Field3)
1116   --
1117   --   Get/Set_Hierarchical_Name (Field1)
1118   --
1119   --   Get/Set_Inherit_Spec_Chain (Field2)
1120   --
1121   --   Get/Set_Attribute_Value_Chain (Field5)
1122   --
1123   --   Get/Set_Vunit_Item_Chain (Field6)
1124   --
1125   --   Get/Set_Verification_Block_Configuration (Field4)
1126   --
1127   -- Only for Iir_Kind_Vunit_Declaration:
1128   --   Get/Set_Bound_Vunit_Chain (Field8)
1129   --
1130   --   Get/Set_Visible_Flag (Flag4)
1131   --
1132   --   Get/Set_Is_Within_Flag (Flag5)
1133   --
1134   --   Get/Set_End_Has_Reserved_Id (Flag8)
1135   --
1136   --   Get/Set_End_Has_Identifier (Flag9)
1137   --
1138   --   Get/Set_Has_Begin (Flag10)
1139
1140   -- Iir_Kind_Library_Declaration (Short)
1141   --
1142   --  Design files in the library.
1143   --   Get/Set_Design_File_Chain (Field1)
1144   --
1145   --   Get/Set_Chain (Field2)
1146   --
1147   --  This node is used to contain all a library.  Only internally used.
1148   --  Name (identifier) of the library.
1149   --   Get/Set_Identifier (Field3)
1150   --
1151   --  Most recent date in this library.
1152   --   Get/Set_Date (Field4)
1153   --
1154   --   Get/Set_Library_Directory (Field5)
1155   --
1156   --  Used to compute dependencies.
1157   --   Get/Set_Elab_Flag (Flag3)
1158   --
1159   --   Get/Set_Visible_Flag (Flag4)
1160   --
1161   --  Set on vendor libraries to turn off warnings on unbounded instantiation.
1162   --  The vendor libraries are those providing components/entities for
1163   --  hard-macros.
1164   --   Get/Set_Vendor_Library_Flag (Flag1)
1165
1166   -- Iir_Kind_Component_Declaration (Medium)
1167   --
1168   --   Get/Set_Parent (Field0)
1169   --
1170   --   Get/Set_Chain (Field2)
1171   --
1172   --   Get/Set_Identifier (Field3)
1173   --
1174   --   Get/Set_Generic_Chain (Field6)
1175   --
1176   --   Get/Set_Port_Chain (Field7)
1177   --
1178   --   Get/Set_Visible_Flag (Flag4)
1179   --
1180   --   Get/Set_Use_Flag (Flag6)
1181   --
1182   --   Get/Set_Has_Is (Flag7)
1183   --
1184   --   Get/Set_End_Has_Reserved_Id (Flag8)
1185   --
1186   --   Get/Set_End_Has_Identifier (Flag9)
1187
1188   --  LRM08 6.6 Alias declarations
1189   --
1190   --  alias_declaration ::=
1191   --     ALIAS alias_designator [ : subtype_indication ] IS
1192   --        name [ signature ] ;
1193   --
1194   --  alias_designator ::= identifier | character_literal | operator_symbol
1195   --
1196   --  Object aliases and non-object aliases are represented by two different
1197   --  nodes, as their semantic is different.  The parser only creates object
1198   --  alias declaration nodes, but sem_decl replaces the node for non-object
1199   --  alias declarations.
1200
1201   -- Iir_Kind_Object_Alias_Declaration (Short)
1202   --
1203   --   Get/Set_Parent (Field0)
1204   --
1205   --   Get/Set_Chain (Field2)
1206   --
1207   --   Get/Set_Identifier (Field3)
1208   --
1209   --   Get/Set_Name (Field4)
1210   --
1211   --  The subtype indication may not be present.
1212   --   Get/Set_Subtype_Indication (Field5)
1213   --
1214   --  The type can be deduced from the subtype indication, but this field is
1215   --  present for uniformity (and speed).
1216   --   Get/Set_Type (Field1)
1217   --
1218   --   Get/Set_Expr_Staticness (State1)
1219   --
1220   --   Get/Set_Name_Staticness (State2)
1221   --
1222   --   Get/Set_Visible_Flag (Flag4)
1223   --
1224   --   Get/Set_After_Drivers_Flag (Flag5)
1225   --
1226   --   Get/Set_Use_Flag (Flag6)
1227   --
1228   --   Get/Set_Is_Ref (Flag12)
1229
1230   -- Iir_Kind_Non_Object_Alias_Declaration (Short)
1231   --
1232   --   Get/Set_Parent (Field0)
1233   --
1234   --   Get/Set_Chain (Field2)
1235   --
1236   --   Get/Set_Identifier (Field3)
1237   --
1238   --   Get/Set_Name (Field4)
1239   --
1240   --   Get/Set_Alias_Signature (Field5)
1241   --
1242   --  Set when the alias was implicitly created (by Sem) because of an
1243   --  explicit alias of a type.
1244   --   Get/Set_Implicit_Alias_Flag (Flag1)
1245   --
1246   --   Get/Set_Visible_Flag (Flag4)
1247   --
1248   --   Get/Set_Use_Flag (Flag6)
1249
1250   -- Iir_Kind_Anonymous_Type_Declaration (Short)
1251   --
1252   --   Get/Set_Parent (Field0)
1253   --
1254   --   Get/Set_Type_Definition (Field1)
1255   --
1256   --   Get/Set_Chain (Field2)
1257   --
1258   --  Used for informative purpose only.
1259   --   Get/Set_Identifier (Field3)
1260   --
1261   --   Get/Set_Subtype_Definition (Field4)
1262   --
1263   --  Set if the type declaration completes an incomplete type declaration
1264   --   Get/Set_Incomplete_Type_Declaration (Field5)
1265
1266   -- Iir_Kind_Type_Declaration (Short)
1267   --
1268   --  LRM08 6.3 Type declarations
1269   --
1270   --  type_declaration ::=
1271   --       full_type_declaration
1272   --     | incomplete_type_declaration
1273   --
1274   --  full_type_declaration ::=
1275   --     TYPE identifier IS type_definition ;
1276   --
1277   --  type_definition ::=
1278   --       scalar_type_definition
1279   --     | composite_type_definition
1280   --     | access_type_definition
1281   --     | file_type_definition
1282   --     | protected_type_definition
1283   --
1284   --  LRM08 5.4.2 Incomplete type declarations
1285   --
1286   --  incomplete_type_declaration ::=
1287   --       TYPE identifier ;
1288   --
1289   --   Get/Set_Parent (Field0)
1290   --
1291   --  Definition of the type.
1292   --  Note: the type definition can be a real type (unconstrained array,
1293   --  enumeration, file, record, access) or a subtype (integer, floating
1294   --  point).
1295   --  The parser set this field to null_iir for an incomplete type
1296   --  declaration.  This field is set to an incomplete_type_definition node
1297   --  when analyzed.
1298   --   Get/Set_Type_Definition (Field1)
1299   --   Get/Set_Type (Alias Field1)
1300   --
1301   --   Get/Set_Chain (Field2)
1302   --
1303   --   Get/Set_Identifier (Field3)
1304   --
1305   --  Set if the type declaration completes an incomplete type declaration
1306   --   Get/Set_Incomplete_Type_Declaration (Field5)
1307   --
1308   --   Get/Set_Visible_Flag (Flag4)
1309   --
1310   --   Get/Set_Use_Flag (Flag6)
1311
1312   -- Iir_Kind_Subtype_Declaration (Short)
1313   --
1314   --  LRM08 6.3 Subtype declarations
1315   --
1316   --  subtype_declaration ::=
1317   --     SUBTYPE identifier IS subtype_indication ;
1318   --
1319   --   Get/Set_Parent (Field0)
1320   --
1321   --   Get/Set_Chain (Field2)
1322   --
1323   --   Get/Set_Identifier (Field3)
1324   --
1325   --  For integer and real types, the subtype_indication of the implicitly
1326   --  declared subtype for the type is the subtype definition.
1327   --   Get/Set_Subtype_Indication (Field5)
1328   --
1329   --   Get/Set_Type (Field1)
1330   --
1331   --   Get/Set_Visible_Flag (Flag4)
1332   --
1333   --   Get/Set_Use_Flag (Flag6)
1334   --
1335   --   Get/Set_Is_Ref (Flag12)
1336
1337   -- Iir_Kind_Nature_Declaration (Short)
1338   --
1339   --  AMS-LRM17 6.11 Nature and subnature declarations
1340   --  nature_declaration ::=
1341   --    NATURE identifier IS nature_definition ;
1342   --
1343   --   Get/Set_Parent (Field0)
1344   --
1345   --   Get/Set_Nature_Definition (Field1)
1346   --   Get/Set_Nature (Alias Field1)
1347   --
1348   --   Get/Set_Chain (Field2)
1349   --
1350   --   Get/Set_Identifier (Field3)
1351   --
1352   --   Get/Set_Visible_Flag (Flag4)
1353   --
1354   --   Get/Set_Use_Flag (Flag6)
1355
1356   -- Iir_Kind_Subnature_Declaration (Short)
1357   --
1358   --  AMS-LRM17 6.11 Nature and subnature declarations
1359   --  subnature_declaration ::=
1360   --    SUBNATURE identifier IS subnature_indication ;
1361   --
1362   --   Get/Set_Parent (Field0)
1363   --
1364   --   Get/Set_Identifier (Field3)
1365   --
1366   --   Get/Set_Subnature_Indication (Field5)
1367   --
1368   --   Get/Set_Nature (Field1)
1369   --
1370   --   Get/Set_Chain (Field2)
1371   --
1372   --   Get/Set_Visible_Flag (Flag4)
1373   --
1374   --   Get/Set_Use_Flag (Flag6)
1375
1376   -- Iir_Kind_Interface_Signal_Declaration (Short)
1377   -- Iir_Kind_Interface_Constant_Declaration (Short)
1378   -- Iir_Kind_Interface_Variable_Declaration (Short)
1379   -- Iir_Kind_Interface_File_Declaration (Short)
1380   -- Iir_Kind_Interface_Quantity_Declaration (Short)
1381   --
1382   --  Get/Set the parent of an interface declaration.
1383   --  The parent is an entity declaration, a subprogram specification, a
1384   --  component declaration, a loop statement, a block declaration or ??
1385   --  Useful to distinguish a port and an interface.
1386   --   Get/Set_Parent (Field0)
1387   --
1388   --   Get/Set_Chain (Field2)
1389   --
1390   --   Get/Set_Identifier (Field3)
1391   --
1392   --   Get/Set_Subtype_Indication (Field5)
1393   --
1394   --  Must always be null_iir for iir_kind_interface_file_declaration.
1395   --   Get/Set_Default_Value (Field4)
1396   --
1397   --  The type can be deduced from the subtype indication, but this field is
1398   --  present for uniformity (and speed).
1399   --   Get/Set_Type (Field1)
1400   --
1401   --   Get/Set_Mode (Flag13,Flag14,Flag15)
1402   --
1403   -- Only for Iir_Kind_Interface_Signal_Declaration:
1404   --   Get/Set_Has_Disconnect_Flag (Flag1)
1405   --
1406   -- Only for Iir_Kind_Interface_Signal_Declaration:
1407   --   Get/Set_Has_Active_Flag (Flag2)
1408   --
1409   --   Get/Set_Has_Identifier_List (Flag3)
1410   --
1411   --   Get/Set_Visible_Flag (Flag4)
1412   --
1413   --   Get/Set_After_Drivers_Flag (Flag5)
1414   --
1415   --   Get/Set_Use_Flag (Flag6)
1416   --
1417   -- Only for Iir_Kind_Interface_Signal_Declaration:
1418   --   Get/Set_Guarded_Signal_Flag (Flag8)
1419   --
1420   -- Only for Iir_Kind_Interface_Signal_Declaration:
1421   --   Get/Set_Signal_Kind (Flag9)
1422   --
1423   --   Get/Set_Has_Mode (Flag10)
1424   --
1425   --   Get/Set_Has_Class (Flag11)
1426   --
1427   --   Get/Set_Is_Ref (Flag12)
1428   --
1429   -- Only for Iir_Kind_Interface_Signal_Declaration:
1430   -- Only for Iir_Kind_Interface_Constant_Declaration:
1431   --   Get/Set_Open_Flag (Flag7)
1432   --
1433   --   Get/Set_Expr_Staticness (State1)
1434   --
1435   --   Get/Set_Name_Staticness (State2)
1436
1437   -- Iir_Kind_Interface_Terminal_Declaration (Short)
1438   --
1439   --   Get/Set_Parent (Field0)
1440   --
1441   --   Get/Set_Chain (Field2)
1442   --
1443   --   Get/Set_Identifier (Field3)
1444   --
1445   --   Get/Set_Subnature_Indication (Field5)
1446   --
1447   --   Get/Set_Nature (Field1)
1448   --
1449   --   Get/Set_Has_Identifier_List (Flag3)
1450   --
1451   --   Get/Set_Visible_Flag (Flag4)
1452   --
1453   --   Get/Set_Use_Flag (Flag6)
1454   --
1455   --   Get/Set_Has_Mode (Flag10)
1456   --
1457   --   Get/Set_Has_Class (Flag11)
1458   --
1459   --   Get/Set_Is_Ref (Flag12)
1460   --
1461   --   Get/Set_Name_Staticness (State2)
1462
1463   -- Iir_Kind_Interface_Type_Declaration (Short)
1464   --
1465   --   Get/Set_Parent (Field0)
1466   --
1467   --   Get/Set_Type (Field1)
1468   --
1469   --   Get/Set_Chain (Field2)
1470   --
1471   --   Get/Set_Identifier (Field3)
1472   --
1473   --   Get/Set_Interface_Type_Subprograms (Field4)
1474   --
1475   --   Get/Set_Has_Identifier_List (Flag3)
1476   --
1477   --   Get/Set_Visible_Flag (Flag4)
1478   --
1479   --   Get/Set_Use_Flag (Flag6)
1480   --
1481   --   Get/Set_Is_Ref (Flag12)
1482   --
1483   --   Get/Set_Open_Flag (Flag7)
1484   --
1485   --   Get/Set_Name_Staticness (State2)
1486
1487   -- Iir_Kind_Interface_Package_Declaration (Medium)
1488   --
1489   --  LRM08 6.5.5 Interface package declarations
1490   --
1491   --  interface_package_declaration ::=
1492   --     PACKAGE identifier IS NEW /uninstantiated_package/_name
1493   --        interface_package_generic_map_aspect
1494   --
1495   --  interface_package_generic_map_aspect ::=
1496   --       generic_map_aspect
1497   --     | GENERIC MAP ( <> )                  --  Represented by Null_Iir
1498   --     | GENERIC MAP ( DEFAULT )             --  Not yet implemented
1499   --
1500   --   Get/Set_Parent (Field0)
1501   --
1502   --   Get/Set_Identifier (Field3)
1503   --
1504   --   Get/Set_Uninstantiated_Package_Name (Field7)
1505   --
1506   --   Get/Set_Uninstantiated_Package_Decl (Field9)
1507   --
1508   --   Get/Set_Instance_Source_File (Field10)
1509   --
1510   --   Get/Set_Generic_Chain (Field6)
1511   --
1512   --   Get/Set_Generic_Map_Aspect_Chain (Field8)
1513   --
1514   --   Get/Set_Declaration_Chain (Field1)
1515   --
1516   --   Get/Set_Chain (Field2)
1517   --
1518   --   Get/Set_Attribute_Value_Chain (Field5)
1519   --
1520   --   Get/Set_Visible_Flag (Flag4)
1521   --
1522   --   Get/Set_Is_Within_Flag (Flag5)
1523   --
1524   --   Get/Set_Open_Flag (Flag7)
1525
1526   -- Iir_Kind_Function_Declaration (Medium)
1527   -- Iir_Kind_Procedure_Declaration (Medium)
1528   --
1529   --  LRM08 4.2 Subprogram declarations
1530   --
1531   --  subprogram_declaration ::= subprogram_specification ;
1532   --
1533   --  subprogram_specification ::=
1534   --     procedure_specification | function_specification
1535   --
1536   --  procedure_specification ::=
1537   --     PROCEDURE designator
1538   --        subprogram_header
1539   --        [ [ PARAMETER ] ( formal_parameter_list ) ]
1540   --
1541   --  function_specification ::=
1542   --     [ PURE | IMPURE ] FUNCTION designator
1543   --        subprogram_header
1544   --        [ [ PARAMETER ] ( formal_parameter_list ) ] RETURN type_mark
1545   --
1546   --  designator ::= identifier | operator_symbol
1547   --
1548   --  operator_symbol ::= string_literal
1549   --
1550   --  Note: the subprogram specification of a body is kept, but should be
1551   --  ignored if there is a subprogram declaration.  The function
1552   --  Is_Second_Subprogram_Specification returns True on such specification.
1553   --
1554   --  The declaration containing this subprogram declaration.
1555   --   Get/Set_Parent (Field0)
1556   --
1557   -- Only for Iir_Kind_Function_Declaration:
1558   --   Get/Set_Return_Type (Field1)
1559   --
1560   -- Only for Iir_Kind_Function_Declaration:
1561   --   Get/Set_Type (Alias Field1)
1562   --
1563   --   Get/Set_Chain (Field2)
1564   --
1565   --  For string, the identifier is the corresponding reserved word.
1566   --   Get/Set_Identifier (Field3)
1567   --
1568   --   Get/Set_Subprogram_Hash (Field4)
1569   --
1570   --   Get/Set_Interface_Declaration_Chain (Field5)
1571   --
1572   --   Get/Set_Generic_Chain (Field6)
1573   --
1574   --  --Get/Set_Generic_Map_Aspect_Chain (Field8)
1575   --
1576   --   Get/Set_Implicit_Definition (Field7)
1577   --
1578   --   Get/Set_Return_Type_Mark (Field8)
1579   --
1580   --   Get/Set_Subprogram_Body (Field9)
1581   --
1582   --   Get/Set_Subprogram_Depth (Field10)
1583   --
1584   --   Get/Set_Overload_Number (Field12)
1585   --
1586   --   Get/Set_Seen_Flag (Flag1)
1587   --
1588   -- Only for Iir_Kind_Function_Declaration:
1589   --   Get/Set_Pure_Flag (Flag2)
1590   --
1591   -- Only for Iir_Kind_Procedure_Declaration:
1592   --   Get/Set_Passive_Flag (Flag2)
1593   --
1594   --   Get/Set_Foreign_Flag (Flag3)
1595   --
1596   --   Get/Set_Visible_Flag (Flag4)
1597   --
1598   --   Get/Set_Is_Within_Flag (Flag5)
1599   --
1600   --   Get/Set_Use_Flag (Flag6)
1601   --
1602   -- Only for Iir_Kind_Function_Declaration:
1603   --   Get/Set_Resolution_Function_Flag (Flag13)
1604   --
1605   -- Only for Iir_Kind_Function_Declaration:
1606   --   Get/Set_Has_Pure (Flag8)
1607   --
1608   --  True is the specification is immediately followed by a body.
1609   --   Get/Set_Has_Body (Flag9)
1610   --
1611   --   Get/Set_Has_Parameter (Flag10)
1612   --
1613   -- Only for Iir_Kind_Procedure_Declaration:
1614   --   Get/Set_Suspend_Flag (Flag11)
1615   --
1616   --  For an explicit subprogram: true if the declaration is an homograph of
1617   --  an implicit operation of a type.
1618   --   Get/Set_Hide_Implicit_Flag (Flag12)
1619   --
1620   --   Get/Set_Wait_State (State1)
1621   --
1622   -- Only for Iir_Kind_Procedure_Declaration:
1623   --   Get/Set_Purity_State (State2)
1624   --
1625   --   Get/Set_All_Sensitized_State (State3)
1626
1627   -- Iir_Kind_Function_Body (Medium)
1628   -- Iir_Kind_Procedure_Body (Medium)
1629   --
1630   --  LRM08 4.3 Subprogram bodies
1631   --
1632   --  subprogram_body ::=
1633   --     subprogram_specification IS
1634   --        subprogram_declarative_part
1635   --     BEGIN
1636   --        subprogram_statement_part
1637   --     END [ subprogram_kind ] [ designator ] ;
1638   --
1639   --  subprogram_kind ::= PROCEDURE | FUNCTION
1640   --
1641   --   Get/Set_Parent (Field0)
1642   --
1643   --  The parse stage always puts a declaration before a body.
1644   --  Sem will remove the declaration if there is a forward declaration.
1645   --
1646   --   Get/Set_Declaration_Chain (Field1)
1647   --
1648   --   Get/Set_Chain (Field2)
1649   --
1650   --   Get/Set_Impure_Depth (Field3)
1651   --
1652   --   Get/Set_Attribute_Value_Chain (Field5)
1653   --
1654   --   Get/Set_Sequential_Statement_Chain (Field4)
1655   --
1656   --   Get/Set_Subprogram_Specification (Field6)
1657   --
1658   --   Get/Set_Callees_List (Field7)
1659   --
1660   --   Get/Set_End_Has_Reserved_Id (Flag8)
1661   --
1662   --   Get/Set_End_Has_Identifier (Flag9)
1663   --
1664   -- Only for Iir_Kind_Procedure_Body:
1665   --   Get/Set_Suspend_Flag (Flag11)
1666
1667   -- Iir_Kind_Function_Instantiation_Declaration (Medium)
1668   -- Iir_Kind_Procedure_Instantiation_Declaration (Medium)
1669   --
1670   --   Get/Set_Parent (Field0)
1671   --
1672   -- Only for Iir_Kind_Function_Instantiation_Declaration:
1673   --   Get/Set_Return_Type (Field1)
1674   --
1675   -- Only for Iir_Kind_Function_Instantiation_Declaration:
1676   --   Get/Set_Type (Alias Field1)
1677   --
1678   --   Get/Set_Chain (Field2)
1679   --
1680   --   Get/Set_Identifier (Field3)
1681   --
1682   --   Get/Set_Subprogram_Hash (Field4)
1683   --
1684   --   Get/Set_Interface_Declaration_Chain (Field5)
1685   --
1686   --   Get/Set_Generic_Chain (Field6)
1687   --
1688   --  A signature or a simple name.
1689   --   Get/Set_Uninstantiated_Subprogram_Name (Field7)
1690   --
1691   --   Get/Set_Generic_Map_Aspect_Chain (Field8)
1692   --
1693   --   Get/Set_Instance_Source_File (Field10)
1694   --
1695   --   Get/Set_Visible_Flag (Flag4)
1696
1697   -- Iir_Kind_Interface_Function_Declaration (Medium)
1698   -- Iir_Kind_Interface_Procedure_Declaration (Medium)
1699   --
1700   --  LRM08 6.5.4 Interface subprogram declarations
1701   --
1702   --  interface_subprogram_declaration ::=
1703   --     interface_subprogram_specification
1704   --       [ IS interface_subprogram_default ]
1705   --
1706   --  interface_subprogram_specification ::=
1707   --     interface_procedure_specification | interface_function_specification
1708   --
1709   --  interface_procedure_specification ::=
1710   --     PROCEDURE designator
1711   --        [ [ PARAMETER ] ( formal_parameter_list ) ]
1712   --
1713   --  interface_function_specification ::=
1714   --     [ PURE | IMPURE ] FUNCTION designator
1715   --        [ [ PARAMETER ] ( formal_parameter_list ) ] RETURN type_mark
1716   --
1717   --   Get/Set_Parent (Field0)
1718   --
1719   -- Only for Iir_Kind_Interface_Function_Declaration:
1720   --   Get/Set_Return_Type (Field1)
1721   --
1722   -- Only for Iir_Kind_Interface_Function_Declaration:
1723   --   Get/Set_Type (Alias Field1)
1724   --
1725   --   Get/Set_Chain (Field2)
1726   --
1727   --  For string, the identifier is the corresponding reserved word.
1728   --   Get/Set_Identifier (Field3)
1729   --
1730   --   Get/Set_Subprogram_Hash (Field4)
1731   --
1732   --   Get/Set_Interface_Declaration_Chain (Field5)
1733   --
1734   --   Get/Set_Return_Type_Mark (Field8)
1735   --
1736   --   Get/Set_Subprogram_Depth (Field10)
1737   --
1738   --   Get/Set_Seen_Flag (Flag1)
1739   --
1740   -- Only for Iir_Kind_Interface_Function_Declaration:
1741   --   Get/Set_Pure_Flag (Flag2)
1742   --
1743   --   Get/Set_Foreign_Flag (Flag3)
1744   --
1745   --   Get/Set_Visible_Flag (Flag4)
1746   --
1747   --   Get/Set_Use_Flag (Flag6)
1748   --
1749   -- Only for Iir_Kind_Interface_Function_Declaration:
1750   --   Get/Set_Resolution_Function_Flag (Flag13)
1751   --
1752   -- Only for Iir_Kind_Interface_Function_Declaration:
1753   --   Get/Set_Has_Pure (Flag8)
1754   --
1755   --   Get/Set_Has_Parameter (Flag10)
1756   --
1757   --   Get/Set_All_Sensitized_State (State3)
1758   --
1759   --   Get/Set_Open_Flag (Flag7)
1760
1761   -- Iir_Kind_Signal_Declaration (Short)
1762   --
1763   --   Get/Set_Parent (Field0)
1764   --
1765   --   Get/Set_Chain (Field2)
1766   --
1767   --   Get/Set_Identifier (Field3)
1768   --
1769   --   Get/Set_Subtype_Indication (Field5)
1770   --
1771   --   Get/Set_Default_Value (Field4)
1772   --
1773   --   Get/Set_Type (Field1)
1774   --
1775   --  For a non-resolved signal: null_iir if the signal has no driver, or
1776   --  a process/concurrent_statement for which the signal should have a
1777   --  driver.  This is used to catch at analyse time unresolved signals with
1778   --  several drivers.
1779   --  -- Get/Set_Signal_Driver (Field7)
1780   --
1781   --   Get/Set_Has_Disconnect_Flag (Flag1)
1782   --
1783   --   Get/Set_Has_Active_Flag (Flag2)
1784   --
1785   --   Get/Set_Has_Identifier_List (Flag3)
1786   --
1787   --   Get/Set_Visible_Flag (Flag4)
1788   --
1789   --   Get/Set_After_Drivers_Flag (Flag5)
1790   --
1791   --   Get/Set_Use_Flag (Flag6)
1792   --
1793   --   Get/Set_Guarded_Signal_Flag (Flag8)
1794   --
1795   --   Get/Set_Signal_Kind (Flag9)
1796   --
1797   --   Get/Set_Is_Ref (Flag12)
1798   --
1799   --   Get/Set_Expr_Staticness (State1)
1800   --
1801   --   Get/Set_Name_Staticness (State2)
1802
1803   -- Iir_Kind_Guard_Signal_Declaration (Short)
1804   --
1805   --   Get/Set_Parent (Field0)
1806   --
1807   --   Get/Set_Type (Field1)
1808   --
1809   --   Get/Set_Guard_Expression (Field2)
1810   --
1811   --   Get/Set_Identifier (Field3)
1812   --
1813   --   Get/Set_Guard_Sensitivity_List (Field4)
1814   --
1815   --   Get/Set_Block_Statement (Field5)
1816   --
1817   --   Get/Set_Has_Active_Flag (Flag2)
1818   --
1819   --   Get/Set_Visible_Flag (Flag4)
1820   --
1821   --   Get/Set_Use_Flag (Flag6)
1822   --
1823   --   Get/Set_Guarded_Signal_Flag (Flag8)
1824   --
1825   --   Get/Set_Signal_Kind (Flag9)
1826   --
1827   --   Get/Set_Expr_Staticness (State1)
1828   --
1829   --   Get/Set_Name_Staticness (State2)
1830   --
1831   --   Get/Set_Is_Ref (Flag12)
1832
1833   -- Iir_Kind_Anonymous_Signal_Declaration (Short)
1834   --
1835   --  Anonymous signal created for vhdl 2008 port association with a non
1836   --  globally static expression.
1837   --
1838   --   Get/Set_Parent (Field0)
1839   --
1840   --   Get/Set_Chain (Field2)
1841   --
1842   --   Get/Set_Identifier (Field3)
1843   --
1844   --  Must be Null.
1845   --   Get/Set_Default_Value (Field4)
1846   --
1847   --  The expression that is assigned to the signal.
1848   --   Get/Set_Expression (Field5)
1849   --
1850   --   Get/Set_Type (Field1)
1851   --
1852   --   Get/Set_After_Drivers_Flag (Flag5)
1853   --
1854   --   Get/Set_Is_Ref (Flag12)
1855   --
1856   --   Get/Set_Expr_Staticness (State1)
1857
1858   -- Iir_Kind_Signal_Attribute_Declaration (Short)
1859   --
1860   --  Chain of implicit signals created from signal attribute.  This is just
1861   --  an helper so that translation can create these implicit signals at the
1862   --  same time as user signal declarations.
1863   --
1864   --   Get/Set_Parent (Field0)
1865   --
1866   --   Get/Set_Chain (Field2)
1867   --
1868   --  Chain of signals
1869   --   Get/Set_Signal_Attribute_Chain (Field3)
1870
1871   -- Iir_Kind_Constant_Declaration (Medium)
1872   -- Iir_Kind_Iterator_Declaration (Short)
1873   --
1874   --   Get/Set_Parent (Field0)
1875   --
1876   --   Get/Set_Chain (Field2)
1877   --
1878   --   Get/Set_Identifier (Field3)
1879   --
1880   --  For iterator, this is the reconstructed subtype indication.
1881   --   Get/Set_Subtype_Indication (Field5)
1882   --
1883   -- Only for Iir_Kind_Iterator_Declaration:
1884   --   Get/Set_Discrete_Range (Field4)
1885   --
1886   -- Only for Iir_Kind_Constant_Declaration:
1887   --  Default value of a deferred constant points to the full constant
1888   --  declaration.
1889   --   Get/Set_Default_Value (Field4)
1890   --
1891   --  Note that the type may be extracted from the default_value if the
1892   --  subtype indication is unconstrained.
1893   --   Get/Set_Type (Field1)
1894   --
1895   -- Only for Iir_Kind_Constant_Declaration:
1896   --  Summary:
1897   --  |  constant C1 : integer;        -- Deferred declaration (in a package)
1898   --  |  constant C2 : integer := 4;   -- Declaration
1899   --  |  constant C1 : integer := 3;   -- Full declaration (in a body)
1900   --  | NAME   Deferred_declaration  Deferred_declaration_flag
1901   --  |  C1      Null_iir or C1' (*)     True
1902   --  |  C2      Null_Iir                False
1903   --  |  C1'     C1                      False
1904   --  |(*): Deferred_declaration is Null_Iir as long as the full declaration
1905   --  |   has not been analyzed.
1906   --   Get/Set_Deferred_Declaration (Field6)
1907   --
1908   -- Only for Iir_Kind_Constant_Declaration:
1909   --   Get/Set_Deferred_Declaration_Flag (Flag1)
1910   --
1911   --   Get/Set_Has_Identifier_List (Flag3)
1912   --
1913   --   Get/Set_Visible_Flag (Flag4)
1914   --
1915   --   Get/Set_Use_Flag (Flag6)
1916   --
1917   --   Get/Set_Is_Ref (Flag12)
1918   --
1919   --   Get/Set_Expr_Staticness (State1)
1920   --
1921   --   Get/Set_Name_Staticness (State2)
1922
1923   -- Iir_Kind_Variable_Declaration (Short)
1924   --
1925   --   Get/Set_Parent (Field0)
1926   --
1927   --   Get/Set_Chain (Field2)
1928   --
1929   --   Get/Set_Identifier (Field3)
1930   --
1931   --   Get/Set_Subtype_Indication (Field5)
1932   --
1933   --   Get/Set_Default_Value (Field4)
1934   --
1935   --   Get/Set_Type (Field1)
1936   --
1937   --  True if the variable is a shared variable.
1938   --   Get/Set_Shared_Flag (Flag2)
1939   --
1940   --   Get/Set_Has_Identifier_List (Flag3)
1941   --
1942   --   Get/Set_Visible_Flag (Flag4)
1943   --
1944   --   Get/Set_Use_Flag (Flag6)
1945   --
1946   --   Get/Set_Is_Ref (Flag12)
1947   --
1948   --   Get/Set_Expr_Staticness (State1)
1949   --
1950   --   Get/Set_Name_Staticness (State2)
1951
1952   -- Iir_Kind_File_Declaration (Medium)
1953   --
1954   --  LRM08 6.4.2.5 File declarations
1955   --
1956   --  file_declaration ::=
1957   --     FILE identifier_list : subtype_indication [ file_open_information ] ;
1958   --
1959   --  file_open_information ::=
1960   --     [ OPEN file_open_kind_expression ] IS file_logical_name
1961   --
1962   --  file_logical_name ::= string_expression
1963   --
1964   --  LRM87
1965   --
1966   --  file_declaration ::=
1967   --     FILE identifier : subtype_indication IS [ mode ] file_logical_name ;
1968   --
1969   --   Get/Set_Parent (Field0)
1970   --
1971   --   Get/Set_Type (Field1)
1972   --
1973   --   Get/Set_Chain (Field2)
1974   --
1975   --   Get/Set_Identifier (Field3)
1976   --
1977   --   Get/Set_Subtype_Indication (Field5)
1978   --
1979   --   Get/Set_File_Logical_Name (Field6)
1980   --
1981   --  This is not used in vhdl 87.
1982   --   Get/Set_File_Open_Kind (Field7)
1983   --
1984   --  This is used only in vhdl 87.
1985   --   Get/Set_Mode (Flag13,Flag14,Flag15)
1986   --
1987   --   Get/Set_Has_Identifier_List (Flag3)
1988   --
1989   --   Get/Set_Visible_Flag (Flag4)
1990   --
1991   --   Get/Set_Use_Flag (Flag6)
1992   --
1993   --   Get/Set_Has_Mode (Flag10)
1994   --
1995   --   Get/Set_Expr_Staticness (State1)
1996   --
1997   --   Get/Set_Name_Staticness (State2)
1998   --
1999   --   Get/Set_Is_Ref (Flag12)
2000
2001   -- Iir_Kind_Element_Declaration (Short)
2002   --
2003   --  LRM08 5.3.3 Record types
2004   --
2005   --  element_declaration ::=
2006   --     identifier_list : element_subtype_definition ;
2007   --
2008   --  identifier_list ::= identifier { , identifier }
2009   --
2010   --  element_subtype_definition ::= subtype_indication
2011   --
2012   --   Get/Set_Parent (Field0)
2013   --
2014   --   Get/Set_Identifier (Field3)
2015   --
2016   --   Get/Set_Subtype_Indication (Field5)
2017   --
2018   --  Return the position of the element in the record, starting from 0 for
2019   --  the first record element, increasing by one for each successive element.
2020   --   Get/Set_Element_Position (Field4)
2021   --
2022   --  The type can be deduced from the subtype indication, but this field is
2023   --  present for uniformity (and speed).
2024   --   Get/Set_Type (Field1)
2025   --
2026   --   Get/Set_Has_Identifier_List (Flag3)
2027   --
2028   --   Get/Set_Visible_Flag (Flag4)
2029   --
2030   --   Get/Set_Is_Ref (Flag12)
2031
2032   -- Iir_Kind_Record_Element_Constraint (Short)
2033   --
2034   --  Record subtype definition which defines this constraint.
2035   --   Get/Set_Parent (Field0)
2036   --
2037   --  For Owned_Elements_Chain, so that the node has an owner.
2038   --   Get/Set_Chain (Field2)
2039   --
2040   --   Get/Set_Identifier (Field3)
2041   --
2042   --  Return the position of the element in the record, starting from 0 for
2043   --  the first record element, increasing by one for each successive element.
2044   --   Get/Set_Element_Position (Field4)
2045   --
2046   --   Get/Set_Subtype_Indication (Field5)
2047   --
2048   --   Get/Set_Type (Field1)
2049   --
2050   --   Get/Set_Visible_Flag (Flag4)
2051   --
2052   --   Get/Set_Is_Ref (Flag12)
2053
2054   -- Iir_Kind_Attribute_Declaration (Short)
2055   --
2056   --  LRM08 6.7 Attribute declarations
2057   --
2058   --  attribute_declaration ::=
2059   --     ATTRIBUTE identifier : type_mark ;
2060   --
2061   --   Get/Set_Parent (Field0)
2062   --
2063   --   Get/Set_Type (Field1)
2064   --
2065   --   Get/Set_Chain (Field2)
2066   --
2067   --   Get/Set_Identifier (Field3)
2068   --
2069   --   Get/Set_Type_Mark (Field4)
2070   --
2071   --   Get/Set_Visible_Flag (Flag4)
2072   --
2073   --   Get/Set_Use_Flag (Flag6)
2074
2075   -- Iir_Kind_Group_Template_Declaration (Short)
2076   --
2077   --   Get/Set_Parent (Field0)
2078   --
2079   --  List of entity class entry.
2080   --  To handle `<>', the last element of the list can be an entity_class of
2081   --  kind tok_box.
2082   --   Get/Set_Entity_Class_Entry_Chain (Field1)
2083   --
2084   --   Get/Set_Chain (Field2)
2085   --
2086   --   Get/Set_Identifier (Field3)
2087   --
2088   --   Get/Set_Visible_Flag (Flag4)
2089   --
2090   --   Get/Set_Use_Flag (Flag6)
2091
2092   -- Iir_Kind_Group_Declaration (Short)
2093   --
2094   --  The declaration containing this type declaration.
2095   --   Get/Set_Parent (Field0)
2096   --
2097   --  List of constituents.
2098   --   Get/Set_Group_Constituent_List (Field1)
2099   --
2100   --   Get/Set_Chain (Field2)
2101   --
2102   --   Get/Set_Identifier (Field3)
2103   --
2104   --   Get/Set_Group_Template_Name (Field5)
2105   --
2106   --   Get/Set_Visible_Flag (Flag4)
2107   --
2108   --   Get/Set_Use_Flag (Flag6)
2109
2110   -- Iir_Kind_Psl_Endpoint_Declaration (Medium)
2111   --
2112   --   Get/Set_Parent (Field0)
2113   --
2114   --  Always boolean.
2115   --   Get/Set_Type (Field1)
2116   --
2117   --   Get/Set_Chain (Field2)
2118   --
2119   --   Get/Set_Identifier (Field3)
2120   --
2121   --   Get/Set_Psl_Declaration (Field6)
2122   --
2123   --   Get/Set_PSL_Clock (Field7)
2124   --
2125   --   Get/Set_PSL_NFA (Field8)
2126   --
2127   --  Number of states in the NFA.
2128   --   Get/Set_PSL_Nbr_States (Field9)
2129   --
2130   --   Get/Set_PSL_Clock_Sensitivity (Field10)
2131   --
2132   --  True if at least one of the NFA edge has the EOS flag.
2133   --   Get/Set_PSL_EOS_Flag (Flag1)
2134   --
2135   --   Get/Set_Visible_Flag (Flag4)
2136   --
2137   --   Get/Set_Use_Flag (Flag6)
2138   --
2139   --   Get/Set_Expr_Staticness (State1)
2140   --
2141   --   Get/Set_Name_Staticness (State2)
2142
2143   -- Iir_Kind_Psl_Declaration (Medium)
2144   --  A psl sequence or property declaration.
2145   --
2146   --   Get/Set_Parent (Field0)
2147   --
2148   --   Get/Set_Chain (Field2)
2149   --
2150   --   Get/Set_Identifier (Field3)
2151   --
2152   --   Get/Set_Psl_Declaration (Field6)
2153   --
2154   --  Valid only for property declaration.
2155   --   Get/Set_PSL_Clock (Field7)
2156   --
2157   --  Valid only for property declaration without parameters.
2158   --   Get/Set_PSL_NFA (Field8)
2159   --
2160   --   Get/Set_Visible_Flag (Flag4)
2161   --
2162   --   Get/Set_Use_Flag (Flag6)
2163
2164   -- Iir_Kind_Terminal_Declaration (Short)
2165   --
2166   --   Get/Set_Parent (Field0)
2167   --
2168   --   Get/Set_Chain (Field2)
2169   --
2170   --   Get/Set_Identifier (Field3)
2171   --
2172   --   Get/Set_Subnature_Indication (Field5)
2173   --
2174   --   Get/Set_Nature (Field1)
2175   --
2176   --   Get/Set_Visible_Flag (Flag4)
2177   --
2178   --   Get/Set_Use_Flag (Flag6)
2179   --
2180   --   Get/Set_Has_Identifier_List (Flag3)
2181   --
2182   --   Get/Set_Name_Staticness (State2)
2183
2184   -- Iir_Kind_Free_Quantity_Declaration (Short)
2185   --
2186   --   Get/Set_Parent (Field0)
2187   --
2188   --   Get/Set_Chain (Field2)
2189   --
2190   --   Get/Set_Subtype_Indication (Field5)
2191   --
2192   --   Get/Set_Default_Value (Field4)
2193   --
2194   --   Get/Set_Identifier (Field3)
2195   --
2196   --   Get/Set_Type (Field1)
2197   --
2198   --   Get/Set_Visible_Flag (Flag4)
2199   --
2200   --   Get/Set_Use_Flag (Flag6)
2201   --
2202   --   Get/Set_Expr_Staticness (State1)
2203   --
2204   --   Get/Set_Name_Staticness (State2)
2205   --
2206   --   Get/Set_Has_Identifier_List (Flag3)
2207   --
2208   --   Get/Set_Is_Ref (Flag12)
2209
2210   -- Iir_Kind_Spectrum_Quantity_Declaration (Medium)
2211   --
2212   --   Get/Set_Parent (Field0)
2213   --
2214   --   Get/Set_Chain (Field2)
2215   --
2216   --   Get/Set_Identifier (Field3)
2217   --
2218   --   Get/Set_Subtype_Indication (Field5)
2219   --
2220   --   Get/Set_Magnitude_Expression (Field6)
2221   --
2222   --   Get/Set_Phase_Expression (Field7)
2223   --
2224   --   Get/Set_Type (Field1)
2225   --
2226   --   Get/Set_Visible_Flag (Flag4)
2227   --
2228   --   Get/Set_Use_Flag (Flag6)
2229   --
2230   --   Get/Set_Expr_Staticness (State1)
2231   --
2232   --   Get/Set_Name_Staticness (State2)
2233   --
2234   --   Get/Set_Has_Identifier_List (Flag3)
2235   --
2236   --   Get/Set_Is_Ref (Flag12)
2237
2238   -- Iir_Kind_Noise_Quantity_Declaration (Short)
2239   --
2240   --   Get/Set_Parent (Field0)
2241   --
2242   --   Get/Set_Chain (Field2)
2243   --
2244   --   Get/Set_Identifier (Field3)
2245   --
2246   --   Get/Set_Subtype_Indication (Field5)
2247   --
2248   --   Get/Set_Power_Expression (Field4)
2249   --
2250   --   Get/Set_Type (Field1)
2251   --
2252   --   Get/Set_Visible_Flag (Flag4)
2253   --
2254   --   Get/Set_Use_Flag (Flag6)
2255   --
2256   --   Get/Set_Expr_Staticness (State1)
2257   --
2258   --   Get/Set_Name_Staticness (State2)
2259   --
2260   --   Get/Set_Has_Identifier_List (Flag3)
2261   --
2262   --   Get/Set_Is_Ref (Flag12)
2263
2264   -- Iir_Kind_Across_Quantity_Declaration (Medium)
2265   -- Iir_Kind_Through_Quantity_Declaration (Medium)
2266   --
2267   --   Get/Set_Parent (Field0)
2268   --
2269   --   Get/Set_Type (Field1)
2270   --
2271   --   Get/Set_Chain (Field2)
2272   --
2273   --   Get/Set_Identifier (Field3)
2274   --
2275   --   Get/Set_Default_Value (Field4)
2276   --
2277   --   Get/Set_Tolerance (Field7)
2278   --
2279   --  Set only for the first declaration.
2280   --   Get/Set_Plus_Terminal_Name (Field8)
2281   --
2282   --  Set only for the first declaration.
2283   --   Get/Set_Minus_Terminal_Name (Field9)
2284   --
2285   --  Same as Plus_Terminal_Name when defined.
2286   --   Get/Set_Plus_Terminal (Field10)
2287   --
2288   --  Same as Minus_Terminal_Name when defined.
2289   --   Get/Set_Minus_Terminal (Field11)
2290   --
2291   --   Get/Set_Has_Identifier_List (Flag3)
2292   --
2293   --   Get/Set_Visible_Flag (Flag4)
2294   --
2295   --   Get/Set_Use_Flag (Flag6)
2296   --
2297   --   Get/Set_Expr_Staticness (State1)
2298   --
2299   --   Get/Set_Name_Staticness (State2)
2300   --
2301   --   Get/Set_Is_Ref (Flag12)
2302
2303   -- Iir_Kind_Use_Clause (Short)
2304   --
2305   --  LRM08 12.4 Use clauses
2306   --
2307   --  use_clause ::=
2308   --     USE selected_name { , selected_name } ;
2309   --
2310   --  Location is on 'USE'.
2311   --
2312   --   Get/Set_Parent (Field0)
2313   --
2314   --   Get/Set_Selected_Name (Field1)
2315   --
2316   --   Get/Set_Chain (Field2)
2317   --
2318   --   Get/Set_Use_Clause_Chain (Field3)
2319
2320   -- Iir_Kind_Context_Reference (Short)
2321   --
2322   --  LRM08 13.4 Context clauses
2323   --
2324   --  context_reference ::=
2325   --     CONTEXT selected_name { , selected_name }
2326   --
2327   --   Get/Set_Parent (Field0)
2328   --
2329   --   Get/Set_Selected_Name (Field1)
2330   --
2331   --   Get/Set_Chain (Field2)
2332   --
2333   --   Get/Set_Context_Reference_Chain (Field3)
2334
2335
2336   -----------------------
2337   --  type definitions --
2338   -----------------------
2339
2340   --  For Iir_Kinds_Type_And_Subtype_Definition:
2341   --
2342   --  Type_Declarator:
2343   --  Points to the type declaration or subtype declaration that has created
2344   --  this definition. For some types, such as integer and floating point
2345   --  types, both type and subtype points to the declaration.
2346   --  However, there are cases where a type definition doesn't point to
2347   --  a declarator: anonymous subtype created by index constraints, or
2348   --  anonymous subtype created by an object declaration.
2349   --  Note: a type definition cannot be anonymous.
2350   --   Get/Set_Type_Declarator (Field3)
2351   --
2352   --  The parent type.
2353   --  This is the type or subtype which was used to build a subtype.  This
2354   --  creates a path to the base type.  Only for subtypes.
2355   --   Get/Set_Parent_Type (Field4)
2356   --
2357   --  The staticness of a type, according to LRM93 7.4.1.
2358   --  Note: These types definition are always locally static:
2359   --  enumeration, integer, floating.
2360   --  However, their subtype are not necessary locally static.
2361   --   Get/Set_Type_Staticness (State1)
2362   --
2363   --  The resolved flag of a subtype, according to LRM93 2.4
2364   --   Get/Set_Resolved_Flag (Flag1)
2365   --
2366   --  The signal_type flag of a type definition.
2367   --  It is true when the type can be used for a signal.
2368   --   Get/Set_Signal_Type_Flag (Flag2)
2369   --
2370   --   Get/Set_Has_Signal_Flag (Flag3)
2371
2372   -- Iir_Kind_Enumeration_Type_Definition (Short)
2373   --
2374   --  Return the list of literals.  This list is created when the node is
2375   --  created.
2376   --   Get/Set_Enumeration_Literal_List (Field2)
2377   --
2378   --  Get the range of the type (This is just an ascending range from the
2379   --  first literal to the last declared literal).
2380   --   Get/Set_Range_Constraint (Field1)
2381   --
2382   --   Get/Set_Type_Declarator (Field3)
2383   --
2384   --   Get/Set_Resolved_Flag (Flag1)
2385   --
2386   --   Get/Set_Signal_Type_Flag (Flag2)
2387   --
2388   --   Get/Set_Has_Signal_Flag (Flag3)
2389   --
2390   --   Get/Set_Only_Characters_Flag (Flag4)
2391   --
2392   --   Get/Set_Is_Character_Type (Flag5)
2393   --
2394   --   Get/Set_Is_Ref (Flag12)
2395   --
2396   --   Get/Set_Type_Staticness (State1)
2397   --
2398   --  Note: only 8 or 32.
2399   --   Get/Set_Scalar_Size (Flag6,Flag7)
2400
2401   -- Iir_Kind_Enumeration_Literal (Short)
2402   --
2403   --  Nota: two literals of the same type are equal iff their value is the
2404   --  same; in other words, there may be several literals with the same
2405   --  value.
2406   --
2407   --  The parent of an enumeration_literal is the same parent as the type
2408   --  declaration.
2409   --   Get/Set_Parent (Field0)
2410   --
2411   --   Get/Set_Type (Field1)
2412   --   Get/Set_Return_Type (Alias Field1)
2413   --
2414   --   Get/Set_Literal_Origin (Field2)
2415   --
2416   --   Get/Set_Identifier (Field3)
2417   --
2418   --   Get/Set_Subprogram_Hash (Field4)
2419   --
2420   --  The value of an enumeration literal is the position.
2421   --   Get/Set_Enum_Pos (Field5)
2422   --
2423   --   Get/Set_Seen_Flag (Flag1)
2424   --
2425   --   Get/Set_Visible_Flag (Flag4)
2426   --
2427   --  Never set to true, but possible when used as a prefix of an expanded
2428   --  name in a overloaded subprogram.
2429   --   Get/Set_Is_Within_Flag (Flag5)
2430   --
2431   --   Get/Set_Expr_Staticness (State1)
2432   --
2433   --   Get/Set_Name_Staticness (State2)
2434
2435   -- Iir_Kind_Physical_Type_Definition (Short)
2436   --
2437   --  The range_constraint from the type declaration.
2438   --   Get/Set_Range_Constraint (Field1)
2439   --
2440   --   Get/Set_Unit_Chain (Field2)
2441   --   Get/Set_Primary_Unit (Alias Field2)
2442   --
2443   --   Get/Set_Type_Declarator (Field3)
2444   --
2445   --   Get/Set_Resolved_Flag (Flag1)
2446   --
2447   --   Get/Set_Signal_Type_Flag (Flag2)
2448   --
2449   --   Get/Set_Has_Signal_Flag (Flag3)
2450   --
2451   --   Get/Set_Type_Staticness (State1)
2452   --
2453   --   Get/Set_End_Has_Reserved_Id (Flag8)
2454   --
2455   --   Get/Set_End_Has_Identifier (Flag9)
2456   --
2457   --   Get/Set_Is_Ref (Flag12)
2458   --
2459   --   Get/Set_Scalar_Size (Flag6,Flag7)
2460
2461   -- Iir_Kind_Unit_Declaration (Short)
2462   --
2463   --  LRM08 5.2.4 Physical types
2464   --
2465   --  primary_unit_declaration ::= identifier ;
2466   --
2467   --  secondary_unit_declaration ::= identifier = physical_literal ;
2468   --
2469   --  physical_literal ::= [ abstract_literal ] /unit/_name
2470   --
2471   --  The parent of a physical unit is the same parent as the type
2472   --  declaration.
2473   --   Get/Set_Parent (Field0)
2474   --
2475   --   Get/Set_Type (Field1)
2476   --
2477   --   Get/Set_Chain (Field2)
2478   --
2479   --   Get/Set_Identifier (Field3)
2480   --
2481   --  The Physical_Literal is the expression that defines the value of a
2482   --  unit.  It is evaluated during analysis and thus expressed as a multiple
2483   --  of the primary unit.  That's true even for the primary unit whose value
2484   --  is thus 1.
2485   --   Get/Set_Physical_Literal (Field4)
2486   --
2487   --   Get/Set_Expr_Staticness (State1)
2488   --
2489   --   Get/Set_Name_Staticness (State2)
2490   --
2491   --   Get/Set_Visible_Flag (Flag4)
2492   --
2493   --  Used for time literals, to compute minimal resolution.
2494   --   Get/Set_Use_Flag (Flag6)
2495
2496   --  LRM08 5.2 Scalar types
2497   --
2498   --  range_constraint ::= RANGE range
2499   --
2500   --  range ::=
2501   --       range_attribute_name
2502   --     | simple_expression direction simple_expression
2503   --
2504   --  direction ::= to | downto
2505
2506   -- Iir_Kind_Integer_Type_Definition (Short)
2507   -- Iir_Kind_Floating_Type_Definition (Short)
2508   --
2509   --  The range_constraint from the type declaration.
2510   --   Get/Set_Range_Constraint (Field1)
2511   --
2512   --  The type declarator that has created this type.
2513   --   Get/Set_Type_Declarator (Field3)
2514   --
2515   --  Type staticness is always locally.
2516   --   Get/Set_Type_Staticness (State1)
2517   --
2518   --   Get/Set_Resolved_Flag (Flag1)
2519   --
2520   --   Get/Set_Signal_Type_Flag (Flag2)
2521   --
2522   --   Get/Set_Has_Signal_Flag (Flag3)
2523   --
2524   --   Get/Set_Is_Ref (Flag12)
2525   --
2526   --  Note: only 32 or 64.
2527   --   Get/Set_Scalar_Size (Flag6,Flag7)
2528
2529   -- Iir_Kind_Array_Type_Definition (Medium)
2530   --
2531   --  LRM08 5.3.2 Array types / LRM93 3.2.1
2532   --
2533   --  unbounded_array_definition ::=
2534   --     ARRAY ( index_subtype_definition { , index_subtype_definition } )
2535   --       OF element_subtype_indication
2536   --
2537   --  index_subtype_definition ::= type_mark RANGE <>
2538   --
2539   --  This is a list of type marks.
2540   --   Get/Set_Index_Subtype_Definition_List (Field6)
2541   --
2542   --   Get/Set_Element_Subtype_Indication (Field2)
2543   --
2544   --  Same as the index_subtype_definition_list.
2545   --   Get/Set_Index_Subtype_List (Field9)
2546   --
2547   --   Get/Set_Element_Subtype (Field1)
2548   --
2549   --   Get/Set_Type_Declarator (Field3)
2550   --
2551   --   Get/Set_Type_Staticness (State1)
2552   --
2553   --   Get/Set_Constraint_State (State2)
2554   --
2555   --   Get/Set_Resolved_Flag (Flag1)
2556   --
2557   --   Get/Set_Signal_Type_Flag (Flag2)
2558   --
2559   --   Get/Set_Has_Signal_Flag (Flag3)
2560   --
2561   --  Always false.
2562   --   Get/Set_Index_Constraint_Flag (Flag4)
2563
2564   -- Iir_Kind_Record_Type_Definition (Short)
2565   --
2566   --  LRM08 5.3.3 Record types / LRM93 3.2.2 Record types
2567   --
2568   --  record_type_definition ::=
2569   --     RECORD
2570   --        element_declaration
2571   --        { element_declaration }
2572   --     END RECORD [ /record_type/_simple_name ]
2573   --
2574   --   Get/Set_Elements_Declaration_List (Field1)
2575   --
2576   --   Get/Set_Type_Declarator (Field3)
2577   --
2578   --   Get/Set_Type_Staticness (State1)
2579   --
2580   --   Get/Set_Constraint_State (State2)
2581   --
2582   --   Get/Set_Resolved_Flag (Flag1)
2583   --
2584   --   Get/Set_Signal_Type_Flag (Flag2)
2585   --
2586   --   Get/Set_Has_Signal_Flag (Flag3)
2587   --
2588   --   Get/Set_End_Has_Reserved_Id (Flag8)
2589   --
2590   --   Get/Set_End_Has_Identifier (Flag9)
2591   --
2592   --  Always false for record type: elements are owned by this node.
2593   --   Get/Set_Is_Ref (Flag12)
2594
2595   -- Iir_Kind_Access_Type_Definition (Short)
2596   --
2597   --  LRM08 5.4 Access types
2598   --
2599   --  access_type_definition ::= ACCESS subtype_indication
2600   --
2601   --  The subtype_indication as it appears.  Can designate an
2602   --  incomplete_type_definition.
2603   --   Get/Set_Designated_Subtype_Indication (Field5)
2604   --
2605   --  The resolved designated type.
2606   --   Get/Set_Designated_Type (Field1)
2607   --
2608   --   Get/Set_Type_Declarator (Field3)
2609   --
2610   --  Next access type that also referenced the same incomplete type when
2611   --  defined.
2612   --   Get/Set_Incomplete_Type_Ref_Chain (Field0)
2613   --
2614   --   Get/Set_Resolved_Flag (Flag1)
2615   --
2616   --   Get/Set_Signal_Type_Flag (Flag2)
2617   --
2618   --   Get/Set_Type_Staticness (State1)
2619
2620   -- Iir_Kind_File_Type_Definition (Short)
2621   --
2622   --   Get/Set_File_Type_Mark (Field2)
2623   --
2624   --   Get/Set_Type_Declarator (Field3)
2625   --
2626   --   Get/Set_Resolved_Flag (Flag1)
2627   --
2628   --   Get/Set_Signal_Type_Flag (Flag2)
2629   --
2630   --  True if this is the std.textio.text file type, which may require special
2631   --  handling.
2632   --   Get/Set_Text_File_Flag (Flag4)
2633   --
2634   --   Get/Set_Type_Staticness (State1)
2635
2636   -- Iir_Kind_Incomplete_Type_Definition (Short)
2637   --  Type definition for an incomplete type.  This is created during the
2638   --  analysis of the incomplete type declaration.
2639   --
2640   --  Chain of access_type_definition that designated this type.  This is
2641   --  simply a forward_ref as the access type is declared after the
2642   --  incomplete type.
2643   --   Get/Set_Incomplete_Type_Ref_Chain (Field0)
2644   --
2645   --  Set to the incomplete type declaration.
2646   --   Get/Set_Type_Declarator (Field3)
2647   --
2648   --  Set to the complete type definition when completed.
2649   --   Get/Set_Complete_Type_Definition (Field5)
2650   --
2651   --   Get/Set_Type_Staticness (State1)
2652   --
2653   --   Get/Set_Resolved_Flag (Flag1)
2654   --
2655   --   Get/Set_Signal_Type_Flag (Flag2)
2656   --
2657   --   Get/Set_Has_Signal_Flag (Flag3)
2658
2659   -- Iir_Kind_Interface_Type_Definition (Short)
2660   --  Type definition for an interface type.
2661   --
2662   --  Set to interface type declaration.
2663   --   Get/Set_Type_Declarator (Field3)
2664   --
2665   --  Set only during analysis of association: type associated with this
2666   --  interface, so that references to this interface can use the actual
2667   --  type.
2668   --   Get/Set_Associated_Type (Field5)
2669   --
2670   --   Get/Set_Type_Staticness (State1)
2671   --
2672   --   Get/Set_Resolved_Flag (Flag1)
2673   --
2674   --   Get/Set_Signal_Type_Flag (Flag2)
2675   --
2676   --   Get/Set_Has_Signal_Flag (Flag3)
2677
2678   -- Iir_Kind_Protected_Type_Declaration (Short)
2679   --
2680   --   Get/Set_Declaration_Chain (Field1)
2681   --
2682   --   Get/Set_Protected_Type_Body (Field2)
2683   --
2684   --   Get/Set_Type_Declarator (Field3)
2685   --
2686   --   Get/Set_Attribute_Value_Chain (Field5)
2687   --
2688   --   Get/Set_Type_Staticness (State1)
2689   --
2690   --   Get/Set_Resolved_Flag (Flag1)
2691   --
2692   --   Get/Set_Signal_Type_Flag (Flag2)
2693   --
2694   --   Get/Set_End_Has_Reserved_Id (Flag8)
2695   --
2696   --   Get/Set_End_Has_Identifier (Flag9)
2697
2698   -- Iir_Kind_Protected_Type_Body (Short)
2699   --
2700   --   Get/Set_Parent (Field0)
2701   --
2702   --   Get/Set_Declaration_Chain (Field1)
2703   --
2704   --   Get/Set_Chain (Field2)
2705   --
2706   --   Get/Set_Identifier (Field3)
2707   --
2708   --   Get/Set_Protected_Type_Declaration (Field4)
2709   --
2710   --   Get/Set_Attribute_Value_Chain (Field5)
2711   --
2712   --   Get/Set_End_Has_Reserved_Id (Flag8)
2713   --
2714   --   Get/Set_End_Has_Identifier (Flag9)
2715
2716   -- Iir_Kind_Wildcard_Type_Definition (Short)
2717   --  A wildcard type doesn't correspond to a type defined by VHDL.  It
2718   --  is used only during analysis to temporary set the type of an entity
2719   --  when the type is not precisely known but restricted to some class of
2720   --  types.  Eg: the type of an aggregate is not known before being
2721   --  determined by the context, but can only be an array or a record.
2722   --  Wildcard types are statically created by std_package and the set of
2723   --  restrictions depends on the node.  See std_package.ads
2724   --
2725   --   Get/Set_Type_Declarator (Field3)
2726   --
2727   --   Get/Set_Resolved_Flag (Flag1)
2728   --
2729   --   Get/Set_Signal_Type_Flag (Flag2)
2730   --
2731   --   Get/Set_Type_Staticness (State1)
2732
2733   --------------------------
2734   --  subtype definitions --
2735   --------------------------
2736
2737   --  LRM08 6.3 Subtype declarations
2738   --
2739   --  subtype_indication ::=
2740   --    [ resolution_indication ] type_mark [ constraint ]
2741   --
2742   --  There is no unique representation for a subtype indication.  If there is
2743   --  only a type_mark, then a subtype indication is represented by a name
2744   --  (a simple name or an expanded name); otherwise it is represented by one
2745   --  of the subtype definition node.
2746   --
2747   --  resolution_indication ::=
2748   --     resolution_function_name | ( element_resolution )
2749   --
2750   --  element_resolution ::= array_element_resolution | record_resolution
2751   --
2752   --  If there is no constraint but a resolution function name, the subtype
2753   --  indication is represented by a subtype_definition (which will be
2754   --  replaced by the correct subtype definition).  If there is an array
2755   --  element resolution the subtype indication is represented by an array
2756   --  subtype definition, and if there is a record resolution, it is
2757   --  represented by a record subtype definition.
2758   --
2759   --  constraint ::=
2760   --     range_constraint
2761   --   | index_constraint
2762   --   | array_constraint
2763   --   | record_constraint
2764   --
2765   --  There is no node for constraint, it is directly represented by one of
2766   --  the rhs.
2767   --
2768   --  element_constraint ::=
2769   --     array_constraint
2770   --   | record_constraint
2771   --
2772   --  Likewise, there is no node for element_constraint.
2773   --
2774   --  index_constraint ::= ( discrete_range { , discrete_range } )
2775   --
2776   --  An index_constraint is represented by an array_subtype_definition.
2777   --
2778   --  discrete_range ::= /discrete/_subtype_indication | range
2779   --
2780   --  array_constraint ::=
2781   --     index_constraint [ array_element_constraint ]
2782   --   | ( OPEN ) [ array_element_constraint ]
2783   --
2784   --  An array_constraint is also represented by an array_subtype_definition.
2785   --
2786   --  array_element_constraint ::= element_constraint
2787   --
2788   --  There is no node for array_element_constraint.
2789   --
2790   --  record_constraint ::=
2791   --     ( record_element_constraint { , record_element_constraint } )
2792   --
2793   --  A record_constraint is represented by a record_subtype_definition.
2794   --
2795   --  record_element_constraint ::=
2796   --     record_element_simple_name element_constraint
2797   --
2798   --  Represented by Record_Element_Constraint.
2799
2800   -- Iir_Kind_Enumeration_Subtype_Definition (Short)
2801   -- Iir_Kind_Integer_Subtype_Definition (Short)
2802   -- Iir_Kind_Physical_Subtype_Definition (Short)
2803   --
2804   --   Get/Set_Range_Constraint (Field1)
2805   --
2806   --   Get/Set_Subtype_Type_Mark (Field2)
2807   --
2808   --   Get/Set_Type_Declarator (Field3)
2809   --
2810   --   Get/Set_Parent_Type (Field4)
2811   --
2812   --   Get/Set_Resolution_Indication (Field5)
2813   --
2814   --   Get/Set_Resolved_Flag (Flag1)
2815   --
2816   --   Get/Set_Signal_Type_Flag (Flag2)
2817   --
2818   --   Get/Set_Has_Signal_Flag (Flag3)
2819   --
2820   --   Get/Set_Is_Ref (Flag12)
2821   --
2822   --   Get/Set_Type_Staticness (State1)
2823
2824   -- Iir_Kind_Floating_Subtype_Definition (Medium)
2825   --
2826   --   Get/Set_Range_Constraint (Field1)
2827   --
2828   --   Get/Set_Subtype_Type_Mark (Field2)
2829   --
2830   --   Get/Set_Type_Declarator (Field3)
2831   --
2832   --   Get/Set_Parent_Type (Field4)
2833   --
2834   --   Get/Set_Resolution_Indication (Field5)
2835   --
2836   --   Get/Set_Tolerance (Field7)
2837   --
2838   --   Get/Set_Resolved_Flag (Flag1)
2839   --
2840   --   Get/Set_Signal_Type_Flag (Flag2)
2841   --
2842   --   Get/Set_Has_Signal_Flag (Flag3)
2843   --
2844   --   Get/Set_Is_Ref (Flag12)
2845   --
2846   --   Get/Set_Type_Staticness (State1)
2847
2848   -- Iir_Kind_Access_Subtype_Definition (Short)
2849   --
2850   --   Get/Set_Designated_Type (Field1)
2851   --
2852   --   Get/Set_Subtype_Type_Mark (Field2)
2853   --
2854   --   Get/Set_Type_Declarator (Field3)
2855   --
2856   --   Get/Set_Parent_Type (Field4)
2857   --
2858   --   Get/Set_Designated_Subtype_Indication (Field5)
2859   --
2860   --  Note: no resolution function for access subtype.
2861   --
2862   --   Get/Set_Type_Staticness (State1)
2863   --
2864   --   Get/Set_Resolved_Flag (Flag1)
2865   --
2866   --   Get/Set_Signal_Type_Flag (Flag2)
2867
2868   -- Iir_Kind_Array_Element_Resolution (Short)
2869   --
2870   --  LRM08 6.3 Subtype declarations
2871   --
2872   --  array_element_resolution ::= resolution_indication
2873   --
2874   --  The indication as it appears in the sources.
2875   --   Get/Set_Resolution_Indication (Field5)
2876   --
2877   --  The subtype definition of the element.  Owner of it.
2878   --   Get/Set_Element_Subtype_Indication (Field2)
2879
2880   -- Iir_Kind_Record_Resolution (Short)
2881   --
2882   --  LRM08 6.3 Subtype declarations
2883   --
2884   --  record_resolution ::=
2885   --     record_element_resolution { , record_element_resolution }
2886   --
2887   --   Get/Set_Record_Element_Resolution_Chain (Field1)
2888
2889   -- Iir_Kind_Record_Element_Resolution (Short)
2890   --
2891   --  LRM08 6.3 Subtype declarations
2892   --
2893   --  record_element_resolution ::=
2894   --     /record_element/_simple_name resolution_indication
2895   --
2896   --   Get/Set_Chain (Field2)
2897   --
2898   --   Get/Set_Identifier (Field3)
2899   --
2900   --   Get/Set_Resolution_Indication (Field5)
2901
2902   -- Iir_Kind_Record_Subtype_Definition (Medium)
2903   --
2904   --  Chain of new elements constraint.  Needed only for internal consistency
2905   --  of the tree (ownership).
2906   --   Get/Set_Owned_Elements_Chain (Field6)
2907   --
2908   --   Get/Set_Elements_Declaration_List (Field1)
2909   --
2910   --   Get/Set_Subtype_Type_Mark (Field2)
2911   --
2912   --   Get/Set_Type_Declarator (Field3)
2913   --
2914   --   Get/Set_Parent_Type (Field4)
2915   --
2916   --   Get/Set_Resolution_Indication (Field5)
2917   --
2918   --   Get/Set_Tolerance (Field7)
2919   --
2920   --   Get/Set_Resolved_Flag (Flag1)
2921   --
2922   --   Get/Set_Signal_Type_Flag (Flag2)
2923   --
2924   --   Get/Set_Has_Signal_Flag (Flag3)
2925   --
2926   --   Get/Set_Type_Staticness (State1)
2927   --
2928   --   Get/Set_Constraint_State (State2)
2929   --
2930   --  Always true for record subtype: elements are owned through
2931   --  Owned_Elements_Chain
2932   --   Get/Set_Is_Ref (Flag12)
2933
2934   -- Iir_Kind_Array_Subtype_Definition (Medium)
2935   --
2936   --   Get/Set_Subtype_Type_Mark (Field2)
2937   --
2938   --   Get/Set_Resolution_Indication (Field5)
2939   --
2940   --  The index_constraint list as it appears in the subtype indication (if
2941   --  present). This is a list of subtype indication.
2942   --   Get/Set_Index_Constraint_List (Field6)
2943   --
2944   --  The type of the index.  This is either the index_constraint list or the
2945   --  index subtypes of the type_mark.
2946   --   Get/Set_Index_Subtype_List (Field9)
2947   --
2948   --  Set when the element is re-constrained.
2949   --  Note that the element subtype may be different from the parent also if
2950   --  it is resolved.  This is mostly for ownership.
2951   --   Get/Set_Array_Element_Constraint (Field8)
2952   --
2953   --   Get/Set_Tolerance (Field7)
2954   --
2955   --   Get/Set_Element_Subtype (Field1)
2956   --
2957   --   Get/Set_Type_Declarator (Field3)
2958   --
2959   --   Get/Set_Parent_Type (Field4)
2960   --
2961   --   Get/Set_Type_Staticness (State1)
2962   --
2963   --   Get/Set_Constraint_State (State2)
2964   --
2965   --   Get/Set_Resolved_Flag (Flag1)
2966   --
2967   --   Get/Set_Signal_Type_Flag (Flag2)
2968   --
2969   --   Get/Set_Has_Signal_Flag (Flag3)
2970   --
2971   --  True if the indexes are constrained (either by this definition or by
2972   --  a parent).
2973   --   Get/Set_Index_Constraint_Flag (Flag4)
2974   --
2975   --  If True, an array constraint is lexically present (at least for the
2976   --  index).  This can be an index constraint or 'open'.
2977   --   Get/Set_Has_Array_Constraint_Flag (Flag5)
2978   --
2979   --  If True, an element constraint is lexically present.  It can be 'open'.
2980   --   Get/Set_Has_Element_Constraint_Flag (Flag6)
2981
2982   -- Iir_Kind_Range_Expression (Short)
2983   --
2984   --  There are two fields for both limits: those that own the node
2985   --  (Left_Limit_Expr and Right_Limit_Expr) and those that reference the node
2986   --  (Left_Limit and Right_Limit).  Always use the reference (they cannot be
2987   --  Null_Iir, while the owner nodes can be Null_Iir.  Set the owner nodes
2988   --  only for owning purpose.
2989   --   Get/Set_Left_Limit_Expr (Field2)
2990   --
2991   --   Get/Set_Right_Limit_Expr (Field3)
2992   --
2993   --   Get/Set_Range_Origin (Field0)
2994   --
2995   --   Get/Set_Type (Field1)
2996   --
2997   --   Get/Set_Left_Limit (Field4)
2998   --
2999   --   Get/Set_Right_Limit (Field5)
3000   --
3001   --   Get/Set_Expr_Staticness (State1)
3002   --
3003   --   Get/Set_Direction (Flag1)
3004
3005   -- Iir_Kind_Subtype_Definition (Medium)
3006   --  Such a node is only created by parse and transformed into the correct
3007   --  kind (enumeration_subtype, integer_subtype...) by sem.
3008   --
3009   --   Get/Set_Range_Constraint (Field1)
3010   --
3011   --   Get/Set_Subtype_Type_Mark (Field2)
3012   --
3013   --   Get/Set_Type_Declarator (Field3)
3014   --
3015   --   Get/Set_Parent_Type (Field4)
3016   --
3017   --   Get/Set_Resolution_Indication (Field5)
3018   --
3019   --   Get/Set_Tolerance (Field7)
3020   --
3021   --   Get/Set_Is_Ref (Flag12)
3022
3023   -------------------------
3024   --  Nature definitions --
3025   -------------------------
3026
3027   -- Iir_Kind_Scalar_Nature_Definition (Medium)
3028   --
3029   --   Get/Set_Reference (Field2)
3030   --
3031   --  The declarator that has created this nature type.
3032   --   Get/Set_Nature_Declarator (Field3)
3033   --
3034   --   Get/Set_Base_Nature (Field4)
3035   --
3036   --   Get/Set_Across_Type_Mark (Field9)
3037   --
3038   --   Get/Set_Through_Type_Mark (Field10)
3039   --
3040   --   Get/Set_Across_Type (Field11)
3041   --
3042   --   Get/Set_Through_Type (Field12)
3043   --
3044   --   Get/Set_Nature_Staticness (State1)
3045
3046   -- Iir_Kind_Array_Nature_Definition (Medium)
3047   --
3048   --  AMS-LRM17 5.8.3.2 Array Natures
3049   --
3050   --  This is a list of type marks.
3051   --   Get/Set_Index_Subtype_Definition_List (Field6)
3052   --
3053   --   Get/Set_Element_Subnature_Indication (Field2)
3054   --
3055   --  Same as the index_subtype_definition_list.
3056   --   Get/Set_Index_Subtype_List (Field9)
3057   --
3058   --   Get/Set_Element_Subnature (Field1)
3059   --
3060   --   Get/Set_Nature_Declarator (Field3)
3061   --
3062   --   Get/Set_Base_Nature (Field4)
3063   --
3064   --   Get/Set_Simple_Nature (Field7)
3065   --
3066   --   Get/Set_Nature_Staticness (State1)
3067   --
3068   --   Get/Set_Constraint_State (State2)
3069   --
3070   --  Always false.
3071   --   Get/Set_Index_Constraint_Flag (Flag4)
3072   --
3073   --   Get/Set_Across_Type_Definition (Field10)
3074   --
3075   --   Get/Set_Through_Type_Definition (Field5)
3076   --
3077   --   Get/Set_Across_Type (Field11)
3078   --
3079   --   Get/Set_Through_Type (Field12)
3080
3081   -- Iir_Kind_Array_Subnature_Definition (Medium)
3082   --
3083   --   Get/Set_Subnature_Nature_Mark (Field2)
3084   --
3085   --  The index_constraint list as it appears in the subtype indication (if
3086   --  present). This is a list of subtype indication.
3087   --   Get/Set_Index_Constraint_List (Field6)
3088   --
3089   --  The type of the index.  This is either the index_constraint list or the
3090   --  index subtypes of the type_mark.
3091   --   Get/Set_Index_Subtype_List (Field9)
3092   --
3093   --   Get/Set_Array_Element_Constraint (Field8)
3094   --
3095   --   Get/Set_Tolerance (Field7)
3096   --
3097   --   Get/Set_Element_Subnature (Field1)
3098   --
3099   --   Get/Set_Nature_Declarator (Field3)
3100   --
3101   --   Get/Set_Base_Nature (Field4)
3102   --
3103   --   Get/Set_Nature_Staticness (State1)
3104   --
3105   --   Get/Set_Constraint_State (State2)
3106   --
3107   --   Get/Set_Index_Constraint_Flag (Flag4)
3108   --
3109   --   Get/Set_Across_Type_Definition (Field10)
3110   --
3111   --   Get/Set_Through_Type_Definition (Field5)
3112   --
3113   --   Get/Set_Across_Type (Field11)
3114   --
3115   --   Get/Set_Through_Type (Field12)
3116
3117   -- Iir_Kind_Record_Nature_Definition (Medium)
3118   --
3119   --  AMS-LRM17 5.8.3.3 Record natures
3120   --  record_nature_definition ::=
3121   --     RECORD
3122   --        nature_element_declaration
3123   --        { nature_element_declaration }
3124   --     END RECORD [ /record_nature/_simple_name ]
3125   --
3126   --   Get/Set_Elements_Declaration_List (Field1)
3127   --
3128   --   Get/Set_Nature_Declarator (Field3)
3129   --
3130   --   Get/Set_Base_Nature (Field4)
3131   --
3132   --   Get/Set_Across_Type_Definition (Field10)
3133   --
3134   --   Get/Set_Through_Type_Definition (Field5)
3135   --
3136   --   Get/Set_Across_Type (Field11)
3137   --
3138   --   Get/Set_Through_Type (Field12)
3139   --
3140   --   Get/Set_Simple_Nature (Field7)
3141   --
3142   --   Get/Set_Nature_Staticness (State1)
3143   --
3144   --   Get/Set_Constraint_State (State2)
3145   --
3146   --   Get/Set_End_Has_Reserved_Id (Flag8)
3147   --
3148   --   Get/Set_End_Has_Identifier (Flag9)
3149   --
3150   --  Always false for record type: elements are owned by this node.
3151   --   Get/Set_Is_Ref (Flag12)
3152
3153   -- Iir_Kind_Nature_Element_Declaration (Short)
3154   --
3155   --  AMS-LRM17 5.8.3.3 Record natures
3156   --
3157   --  nature_element_declaration ::=
3158   --     identifier_list : element_subnature_definition ;
3159   --
3160   --  element_subnature_definition ::= subnature_indication
3161   --
3162   --   Get/Set_Parent (Field0)
3163   --
3164   --   Get/Set_Identifier (Field3)
3165   --
3166   --   Get/Set_Subnature_Indication (Field5)
3167   --
3168   --   Get/Set_Element_Position (Field4)
3169   --
3170   --   Get/Set_Nature (Field1)
3171   --
3172   --   Get/Set_Has_Identifier_List (Flag3)
3173   --
3174   --   Get/Set_Visible_Flag (Flag4)
3175
3176
3177   ----------------------------
3178   --  concurrent statements --
3179   ----------------------------
3180
3181   -- Iir_Kind_Concurrent_Conditional_Signal_Assignment (Medium)
3182   -- Iir_Kind_Concurrent_Selected_Signal_Assignment (Medium)
3183   -- Iir_Kind_Concurrent_Simple_Signal_Assignment (Medium)
3184   --
3185   --   Get/Set_Parent (Field0)
3186   --
3187   --   Get/Set_Target (Field1)
3188   --
3189   --   Get/Set_Chain (Field2)
3190   --
3191   --   Get/Set_Label (Field3)
3192   --   Get/Set_Identifier (Alias Field3)
3193   --
3194   --   Get/Set_Reject_Time_Expression (Field4)
3195   --
3196   -- Only for Iir_Kind_Concurrent_Simple_Signal_Assignment:
3197   --   Get/Set_Waveform_Chain (Field5)
3198   --
3199   -- Only for Iir_Kind_Concurrent_Selected_Signal_Assignment:
3200   --   Get/Set_Expression (Field5)
3201   --
3202   -- Only for Iir_Kind_Concurrent_Conditional_Signal_Assignment:
3203   --   Get/Set_Conditional_Waveform_Chain (Field5)
3204   --
3205   -- Only for Iir_Kind_Concurrent_Selected_Signal_Assignment:
3206   --   Get/Set_Selected_Waveform_Chain (Field7)
3207   --
3208   --  If the assignment is guarded, then get_guard must return the
3209   --  declaration of the signal guard, otherwise, null_iir.
3210   --  If the guard signal decl is not known, as a kludge and only to mark this
3211   --  assignment guarded, the guard can be this assignment.
3212   --   Get/Set_Guard (Field8)
3213   --
3214   --   Get/Set_Delay_Mechanism (Flag1)
3215   --
3216   --   Get/Set_Has_Delay_Mechanism (Flag2)
3217   --
3218   --   Get/Set_Postponed_Flag (Flag3)
3219   --
3220   --   Get/Set_Visible_Flag (Flag4)
3221   --
3222   --  True if the target of the assignment is guarded
3223   --   Get/Set_Guarded_Target_State (State1)
3224   --
3225   --   Get/Set_Is_Ref (Flag12)
3226
3227   -- Iir_Kind_Sensitized_Process_Statement (Medium)
3228   -- Iir_Kind_Process_Statement (Medium)
3229   --
3230   --  Location is on the label, or 'postponed' or 'process'.
3231   --
3232   --   Get/Set_Parent (Field0)
3233   --
3234   --   Get/Set_Declaration_Chain (Field1)
3235   --
3236   --   Get/Set_Chain (Field2)
3237   --
3238   --   Get/Set_Label (Field3)
3239   --   Get/Set_Identifier (Alias Field3)
3240   --
3241   --   Get/Set_Attribute_Value_Chain (Field5)
3242   --
3243   --  The concurrent statement at the origin of that process.  This is
3244   --  Null_Iir for a user process.
3245   --   Get/Set_Process_Origin (Field8)
3246   --
3247   --   Get/Set_Sequential_Statement_Chain (Field4)
3248   --
3249   -- Only for Iir_Kind_Sensitized_Process_Statement:
3250   --   Get/Set_Sensitivity_List (Field6)
3251   --
3252   --   Get/Set_Callees_List (Field7)
3253   --
3254   --   Get/Set_Wait_State (State1)
3255   --
3256   --   Get/Set_Seen_Flag (Flag1)
3257   --
3258   --   Get/Set_Passive_Flag (Flag2)
3259   --
3260   --   Get/Set_Postponed_Flag (Flag3)
3261   --
3262   --   Get/Set_Visible_Flag (Flag4)
3263   --
3264   --   Get/Set_Is_Within_Flag (Flag5)
3265   --
3266   --   Get/Set_Has_Label (Flag6)
3267   --
3268   --   Get/Set_Has_Is (Flag7)
3269   --
3270   --   Get/Set_End_Has_Reserved_Id (Flag8)
3271   --
3272   --   Get/Set_End_Has_Identifier (Flag9)
3273   --
3274   --   Get/Set_End_Has_Postponed (Flag10)
3275   --
3276   -- Only for Iir_Kind_Process_Statement:
3277   --   Get/Set_Suspend_Flag (Flag11)
3278   --
3279   -- Only for Iir_Kind_Sensitized_Process_Statement:
3280   --   Get/Set_Is_Ref (Flag12)
3281
3282   -- Iir_Kind_Concurrent_Assertion_Statement (Short)
3283   --
3284   --   Get/Set_Parent (Field0)
3285   --
3286   --   Get/Set_Assertion_Condition (Field1)
3287   --
3288   --   Get/Set_Chain (Field2)
3289   --
3290   --   Get/Set_Label (Field3)
3291   --   Get/Set_Identifier (Alias Field3)
3292   --
3293   --   Get/Set_Severity_Expression (Field4)
3294   --
3295   --   Get/Set_Report_Expression (Field5)
3296   --
3297   --   Get/Set_Postponed_Flag (Flag3)
3298   --
3299   --   Get/Set_Visible_Flag (Flag4)
3300
3301   -- Iir_Kind_Psl_Default_Clock (Short)
3302   --
3303   --   Get/Set_Parent (Field0)
3304   --
3305   --   Get/Set_Psl_Boolean (Field1)
3306   --
3307   --   Get/Set_Chain (Field2)
3308   --
3309   --   Get/Set_Label (Field3)
3310   --   Get/Set_Identifier (Alias Field3)
3311
3312   -- Iir_Kind_Psl_Assert_Directive (Medium)
3313   -- Iir_Kind_Psl_Assume_Directive (Medium)
3314   -- Iir_Kind_Psl_Cover_Directive (Medium)
3315   -- Iir_Kind_Psl_Restrict_Directive (Medium)
3316   --
3317   --   Get/Set_Parent (Field0)
3318   --
3319   -- Only for Iir_Kind_Psl_Assert_Directive:
3320   -- Only for Iir_Kind_Psl_Assume_Directive:
3321   --   Get/Set_Psl_Property (Field1)
3322   --
3323   -- Only for Iir_Kind_Psl_Cover_Directive:
3324   -- Only for Iir_Kind_Psl_Restrict_Directive:
3325   --   Get/Set_Psl_Sequence (Field1)
3326   --
3327   --   Get/Set_Chain (Field2)
3328   --
3329   --   Get/Set_Label (Field3)
3330   --   Get/Set_Identifier (Alias Field3)
3331   --
3332   -- Only for Iir_Kind_Psl_Assert_Directive:
3333   --   Get/Set_Severity_Expression (Field4)
3334   --
3335   -- Only for Iir_Kind_Psl_Assert_Directive:
3336   -- Only for Iir_Kind_Psl_Cover_Directive:
3337   --   Get/Set_Report_Expression (Field5)
3338   --
3339   --  The following fields are set by canon.
3340   --   Get/Set_PSL_Clock (Field7)
3341   --
3342   --   Get/Set_PSL_NFA (Field8)
3343   --
3344   --  Number of states in the NFA.
3345   --   Get/Set_PSL_Nbr_States (Field9)
3346   --
3347   --   Get/Set_PSL_Clock_Sensitivity (Field10)
3348   --
3349   --  True if at least one of the NFA edge has the EOS flag.
3350   --   Get/Set_PSL_EOS_Flag (Flag1)
3351   --
3352   --   Get/Set_Postponed_Flag (Flag3)
3353   --
3354   --   Get/Set_Visible_Flag (Flag4)
3355
3356   -- Iir_Kind_Component_Instantiation_Statement (Medium)
3357   --
3358   --  LRM08 11.7 Component instantiation statements
3359   --
3360   --  component_instantiation_statement ::=
3361   --     instantiation_label :
3362   --        instantiated_unit
3363   --           [ generic_map_aspect ]
3364   --           [ port_map_aspect ] ;
3365   --
3366   --  instantiated_unit ::=
3367   --       [ COMPONENT ] component_name
3368   --     | ENTITY entity_name [ ( architecture_identifier ) ]
3369   --     | CONFIGURATION configuration_name
3370   --
3371   --   Get/Set_Parent (Field0)
3372   --
3373   --  Unit instantiated.  This is a name, an entity_aspect_entity or an
3374   --  entity_aspect_configuration.
3375   --   Get/Set_Instantiated_Unit (Field1)
3376   --
3377   --   Get/Set_Chain (Field2)
3378   --
3379   --   Get/Set_Label (Field3)
3380   --   Get/Set_Identifier (Alias Field3)
3381   --
3382   --   Get/Set_Default_Binding_Indication (Field5)
3383   --
3384   --   Get/Set_Generic_Map_Aspect_Chain (Field8)
3385   --
3386   --   Get/Set_Port_Map_Aspect_Chain (Field9)
3387   --
3388   --  Configuration:
3389   --  In case of a configuration specification, the node is put into
3390   --  default configuration.  In the absence of a specification, the
3391   --  default entity aspect, if any; if none, this field is null_iir.
3392   --   Get/Set_Configuration_Specification (Field7)
3393   --
3394   --  During Sem and elaboration, the configuration field can be filled by
3395   --  a component configuration declaration.
3396   --
3397   --  Configuration for this component.
3398   --  FIXME: must be get/set_binding_indication.
3399   --   Get/Set_Component_Configuration (Field6)
3400   --
3401   --   Get/Set_Visible_Flag (Flag4)
3402   --
3403   --   Get/Set_Has_Component (Flag5)
3404
3405   -- Iir_Kind_Block_Statement (Medium)
3406   --  LRM08 11.2 Block statement
3407   --
3408   --  block_statement ::=
3409   --    block_label :
3410   --      BLOCK [ ( guard_condition ) ] [ IS ]
3411   --        block_header
3412   --        block_declarative_part
3413   --      BEGIN
3414   --        block_statement_part
3415   --      END BLOCK [ block_label ] ;
3416   --
3417   --   Get/Set_Parent (Field0)
3418   --
3419   --  get/set_guard_decl is used for semantic analysis, in order to add
3420   --  a signal declaration.
3421   --   Get/Set_Guard_Decl (Field8)
3422   --
3423   --   Get/Set_Block_Header (Field7)
3424   --
3425   --   Get/Set_Declaration_Chain (Field1)
3426   --
3427   --   Get/Set_Chain (Field2)
3428   --
3429   --   Get/Set_Label (Field3)
3430   --   Get/Set_Identifier (Alias Field3)
3431   --
3432   --   Get/Set_Attribute_Value_Chain (Field5)
3433   --
3434   --   Get/Set_Concurrent_Statement_Chain (Field4)
3435   --
3436   --   Get/Set_Block_Block_Configuration (Field6)
3437   --
3438   --   Get/Set_Visible_Flag (Flag4)
3439   --
3440   --   Get/Set_Is_Within_Flag (Flag5)
3441   --
3442   --   Get/Set_Has_Is (Flag7)
3443   --
3444   --   Get/Set_End_Has_Reserved_Id (Flag8)
3445   --
3446   --   Get/Set_End_Has_Identifier (Flag9)
3447
3448   -- Iir_Kind_Generate_Statement_Body (Short)
3449   --  LRM08 11.8 Generate statements
3450   --
3451   --  generate_statement_body ::=
3452   --        [ block_declarative_part
3453   --     BEGIN ]
3454   --        { concurrent_statement }
3455   --     [ END [ alternative_label ] ; ]
3456   --
3457   --   Get/Set_Parent (Field0)
3458   --
3459   --   Get/Set_Declaration_Chain (Field1)
3460   --
3461   --  The block configuration for this statement body.
3462   --   Get/Set_Generate_Block_Configuration (Field2)
3463   --
3464   --   Get/Set_Alternative_Label (Field3)
3465   --   Get/Set_Identifier (Alias Field3)
3466   --
3467   --   Get/Set_Attribute_Value_Chain (Field5)
3468   --
3469   --   Get/Set_Concurrent_Statement_Chain (Field4)
3470   --
3471   --   Get/Set_Is_Within_Flag (Flag5)
3472   --
3473   --   Get/Set_Has_Label (Flag6)
3474   --
3475   --   Get/Set_End_Has_Identifier (Flag9)
3476   --
3477   --   Get/Set_Has_Begin (Flag10)
3478   --
3479   --   Get/Set_Has_End (Flag11)
3480
3481   -- Iir_Kind_For_Generate_Statement (Short)
3482   --
3483   --   Get/Set_Parent (Field0)
3484   --
3485   --  The parameters specification is represented by an Iterator_Declaration.
3486   --   Get/Set_Parameter_Specification (Field1)
3487   --
3488   --   Get/Set_Chain (Field2)
3489   --
3490   --   Get/Set_Label (Field3)
3491   --   Get/Set_Identifier (Alias Field3)
3492   --
3493   --   Get/Set_Generate_Statement_Body (Field4)
3494   --
3495   --   Get/Set_Visible_Flag (Flag4)
3496   --
3497   --   Get/Set_Is_Within_Flag (Flag5)
3498   --
3499   --   Get/Set_End_Has_Reserved_Id (Flag8)
3500   --
3501   --   Get/Set_End_Has_Identifier (Flag9)
3502
3503   -- Iir_Kind_If_Generate_Else_Clause (Short)
3504   --
3505   --   Get/Set_Parent (Field0)
3506   --
3507   --  Null_Iir for the else clause.
3508   --   Get/Set_Condition (Field1)
3509   --
3510   --   Get/Set_Generate_Statement_Body (Field4)
3511   --
3512   --   Get/Set_Generate_Else_Clause (Field5)
3513   --
3514   --   Get/Set_Visible_Flag (Flag4)
3515   --
3516   --   Get/Set_Is_Ref (Flag12)
3517
3518   -- Iir_Kind_If_Generate_Statement (Short)
3519   --
3520   --   Get/Set_Parent (Field0)
3521   --
3522   --  Null_Iir for the else clause.
3523   --   Get/Set_Condition (Field1)
3524   --
3525   --   Get/Set_Chain (Field2)
3526   --
3527   --   Get/Set_Label (Field3)
3528   --   Get/Set_Identifier (Alias Field3)
3529   --
3530   --   Get/Set_Generate_Statement_Body (Field4)
3531   --
3532   --   Get/Set_Generate_Else_Clause (Field5)
3533   --
3534   --   Get/Set_Visible_Flag (Flag4)
3535   --
3536   --   Get/Set_Is_Within_Flag (Flag5)
3537   --
3538   --   Get/Set_End_Has_Reserved_Id (Flag8)
3539   --
3540   --   Get/Set_End_Has_Identifier (Flag9)
3541   --
3542   --   Get/Set_Is_Ref (Flag12)
3543
3544   -- Iir_Kind_Case_Generate_Statement (Short)
3545   --
3546   --   Get/Set_Parent (Field0)
3547   --
3548   --  Chain is composed of Iir_Kind_Choice_By_XXX.
3549   --   Get/Set_Case_Statement_Alternative_Chain (Field1)
3550   --
3551   --   Get/Set_Chain (Field2)
3552   --
3553   --   Get/Set_Label (Field3)
3554   --   Get/Set_Identifier (Alias Field3)
3555   --
3556   --   Get/Set_Expression (Field5)
3557   --
3558   --   Get/Set_Visible_Flag (Flag4)
3559   --
3560   --   Get/Set_Is_Within_Flag (Flag5)
3561   --
3562   --   Get/Set_End_Has_Reserved_Id (Flag8)
3563   --
3564   --   Get/Set_End_Has_Identifier (Flag9)
3565
3566   -- Iir_Kind_Simple_Simultaneous_Statement (Medium)
3567   --
3568   --   Get/Set_Parent (Field0)
3569   --
3570   --   Get/Set_Chain (Field2)
3571   --
3572   --   Get/Set_Label (Field3)
3573   --   Get/Set_Identifier (Alias Field3)
3574   --
3575   --   Get/Set_Simultaneous_Left (Field5)
3576   --
3577   --   Get/Set_Simultaneous_Right (Field6)
3578   --
3579   --   Get/Set_Tolerance (Field7)
3580   --
3581   --   Get/Set_Visible_Flag (Flag4)
3582
3583   -- Iir_Kind_Simultaneous_Null_Statement (Short)
3584   --
3585   --   Get/Set_Parent (Field0)
3586   --
3587   --   Get/Set_Chain (Field2)
3588   --
3589   --   Get/Set_Label (Field3)
3590   --   Get/Set_Identifier (Alias Field3)
3591   --
3592   --   Get/Set_Visible_Flag (Flag4)
3593
3594   -- Iir_Kind_Simultaneous_Procedural_Statement (Short)
3595   --
3596   --  AMS-LRM17 11.13 Simultaneous procedural statement
3597   --  simultaneous_procedural_statement ::=
3598   --    [ procedural_label : ]
3599   --      PROCEDURAL [ IS ]
3600   --        procedural_declarative_part
3601   --      BEGIN
3602   --        procedural_statement_part
3603   --      END PROCEDURAL [ procedural_label ] ;
3604   --
3605   --   Get/Set_Parent (Field0)
3606   --
3607   --   Get/Set_Chain (Field2)
3608   --
3609   --   Get/Set_Label (Field3)
3610   --   Get/Set_Identifier (Alias Field3)
3611   --
3612   --   Get/Set_Declaration_Chain (Field1)
3613   --
3614   --   Get/Set_Sequential_Statement_Chain (Field4)
3615   --
3616   --   Get/Set_Attribute_Value_Chain (Field5)
3617   --
3618   --   Get/Set_Visible_Flag (Flag4)
3619   --
3620   --   Get/Set_Is_Within_Flag (Flag5)
3621   --
3622   --   Get/Set_Has_Is (Flag7)
3623   --
3624   --   Get/Set_End_Has_Reserved_Id (Flag8)
3625   --
3626   --   Get/Set_End_Has_Identifier (Flag9)
3627
3628   -- Iir_Kind_Simultaneous_If_Statement (Short)
3629   -- Iir_Kind_Simultaneous_Elsif (Short)
3630   --
3631   --  AMS-LRM17 11.11 Simultaneous if statement
3632   --  simultaneous_if_statement ::=
3633   --    [ /if/_label : ]
3634   --      IF condition USE
3635   --        simultaneous_statement_part
3636   --      { ELSIF condition USE
3637   --        simultaneous_statement_part }
3638   --      [ ELSE
3639   --        simultaneous_statement_part ]
3640   --      END USE [ /if/_label ];
3641   --
3642   --   Get/Set_Parent (Field0)
3643   --
3644   -- Only for Iir_Kind_Simultaneous_If_Statement:
3645   --   Get/Set_Label (Field3)
3646   --
3647   -- Only for Iir_Kind_Simultaneous_If_Statement:
3648   --   Get/Set_Identifier (Alias Field3)
3649   --
3650   --   Get/Set_Condition (Field1)
3651   --
3652   --   Get/Set_Simultaneous_Statement_Chain (Field4)
3653   --
3654   --   Get/Set_Else_Clause (Field5)
3655   --
3656   -- Only for Iir_Kind_Simultaneous_If_Statement:
3657   --   Get/Set_Chain (Field2)
3658   --
3659   -- Only for Iir_Kind_Simultaneous_If_Statement:
3660   --   Get/Set_Visible_Flag (Flag4)
3661   --
3662   --   Get/Set_Is_Ref (Flag12)
3663   --
3664   --   Get/Set_End_Has_Identifier (Flag9)
3665
3666   -- Iir_Kind_Simultaneous_Case_Statement (Short)
3667   --
3668   --   Get/Set_Parent (Field0)
3669   --
3670   --  Chain is composed of Iir_Kind_Choice_By_XXX.
3671   --   Get/Set_Case_Statement_Alternative_Chain (Field1)
3672   --
3673   --   Get/Set_Chain (Field2)
3674   --
3675   --   Get/Set_Label (Field3)
3676   --   Get/Set_Identifier (Alias Field3)
3677   --
3678   --   Get/Set_Expression (Field5)
3679   --
3680   --   Get/Set_Visible_Flag (Flag4)
3681   --
3682   --   Get/Set_Is_Within_Flag (Flag5)
3683   --
3684   --   Get/Set_End_Has_Reserved_Id (Flag8)
3685   --
3686   --   Get/Set_End_Has_Identifier (Flag9)
3687
3688   ----------------------------
3689   --  sequential statements --
3690   ----------------------------
3691
3692   -- Iir_Kind_If_Statement (Short)
3693   -- Iir_Kind_Elsif (Short)
3694   --
3695   --  LRM08 10.8
3696   --  if_statement ::=
3697   --    [ /if/_label : ]
3698   --       IF condition THEN
3699   --          sequence_of_statements
3700   --       { ELSIF condition THEN
3701   --          sequence_of_statements }
3702   --       [ ELSE
3703   --          sequence_of_statements ]
3704   --       END IF [ /if/_label ] ;
3705   --
3706   --   Get/Set_Parent (Field0)
3707   --
3708   -- Only for Iir_Kind_If_Statement:
3709   --   Get/Set_Label (Field3)
3710   --
3711   -- Only for Iir_Kind_If_Statement:
3712   --   Get/Set_Identifier (Alias Field3)
3713   --
3714   --  May be NULL only for an iir_kind_elsif node, and then means the else
3715   --  clause.
3716   --   Get/Set_Condition (Field1)
3717   --
3718   --   Get/Set_Sequential_Statement_Chain (Field4)
3719   --
3720   --  Must be an Iir_kind_elsif node, or NULL for no more elsif clauses.
3721   --   Get/Set_Else_Clause (Field5)
3722   --
3723   -- Only for Iir_Kind_If_Statement:
3724   --   Get/Set_Chain (Field2)
3725   --
3726   -- Only for Iir_Kind_If_Statement:
3727   --   Get/Set_Visible_Flag (Flag4)
3728   --
3729   --   Get/Set_End_Has_Identifier (Flag9)
3730   --
3731   -- Only for Iir_Kind_If_Statement:
3732   --   Get/Set_Suspend_Flag (Flag11)
3733   --
3734   --   Get/Set_Is_Ref (Flag12)
3735
3736   --  LRM08 10.10 Loop statement / LRM93 8.9
3737   --
3738   --  loop_statement ::=
3739   --     [ loop_label : ]
3740   --        [ iteration_scheme ] LOOP
3741   --           sequence_of_statements
3742   --        END LOOP [ loop_label ] ;
3743   --
3744   --  iteration_scheme ::=
3745   --       WHILE condition
3746   --     | FOR loop_parameter_specification
3747   --
3748   --  parameter_specification ::=
3749   --     identifier IN discrete_range
3750
3751   -- Iir_Kind_For_Loop_Statement (Short)
3752   --
3753   --   Get/Set_Parent (Field0)
3754   --
3755   --  The parameters specification is represented by an Iterator_Declaration.
3756   --   Get/Set_Parameter_Specification (Field1)
3757   --
3758   --   Get/Set_Chain (Field2)
3759   --
3760   --   Get/Set_Label (Field3)
3761   --   Get/Set_Identifier (Alias Field3)
3762   --
3763   --   Get/Set_Sequential_Statement_Chain (Field4)
3764   --
3765   --   Get/Set_Visible_Flag (Flag4)
3766   --
3767   --   Get/Set_Is_Within_Flag (Flag5)
3768   --
3769   --   Get/Set_Exit_Flag (Flag1)
3770   --
3771   --   Get/Set_Next_Flag (Flag2)
3772   --
3773   --   Get/Set_End_Has_Identifier (Flag9)
3774   --
3775   --   Get/Set_Suspend_Flag (Flag11)
3776
3777   -- Iir_Kind_While_Loop_Statement (Short)
3778   --
3779   --   Get/Set_Parent (Field0)
3780   --
3781   --   Get/Set_Condition (Field1)
3782   --
3783   --   Get/Set_Chain (Field2)
3784   --
3785   --   Get/Set_Label (Field3)
3786   --   Get/Set_Identifier (Alias Field3)
3787   --
3788   --   Get/Set_Sequential_Statement_Chain (Field4)
3789   --
3790   --   Get/Set_Visible_Flag (Flag4)
3791   --
3792   --   Get/Set_Exit_Flag (Flag1)
3793   --
3794   --   Get/Set_Next_Flag (Flag2)
3795   --
3796   --   Get/Set_End_Has_Identifier (Flag9)
3797   --
3798   --   Get/Set_Suspend_Flag (Flag11)
3799   --
3800   --   Get/Set_Is_Ref (Flag12)
3801
3802   -- Iir_Kind_Exit_Statement (Short)
3803   -- Iir_Kind_Next_Statement (Short)
3804   --
3805   --  LRM08 10.11 Next statement
3806   --
3807   --  next_statement ::=
3808   --     [ label : ] NEXT [ loop_label ] [ WHEN condition ] ;
3809   --
3810   --  LRM08 10.12 Exit statement
3811   --
3812   --  exit_statement ::=
3813   --     [ label : ] exit [ loop_label ] [ when condition ] ;
3814   --
3815   --   Get/Set_Parent (Field0)
3816   --
3817   --   Get/Set_Condition (Field1)
3818   --
3819   --   Get/Set_Chain (Field2)
3820   --
3821   --   Get/Set_Label (Field3)
3822   --   Get/Set_Identifier (Alias Field3)
3823   --
3824   --   Get/Set_Loop_Label (Field5)
3825   --
3826   --   Get/Set_Visible_Flag (Flag4)
3827   --
3828   --   Get/Set_Is_Ref (Flag12)
3829
3830   -- Iir_Kind_Signal_Force_Assignment_Statement (Short)
3831   -- Iir_Kind_Signal_Release_Assignment_Statement (Short)
3832   --
3833   --   Get/Set_Parent (Field0)
3834   --
3835   --   Get/Set_Target (Field1)
3836   --
3837   --   Get/Set_Chain (Field2)
3838   --
3839   --   Get/Set_Label (Field3)
3840   --   Get/Set_Identifier (Alias Field3)
3841   --
3842   -- Only for Iir_Kind_Signal_Force_Assignment_Statement:
3843   --   Get/Set_Expression (Field5)
3844   --
3845   --   Get/Set_Force_Mode (Flag1)
3846   --
3847   --   Get/Set_Visible_Flag (Flag4)
3848   --
3849   --  True if the target of the assignment is guarded
3850   --   Get/Set_Guarded_Target_State (State1)
3851   --
3852   --   Get/Set_Is_Ref (Flag12)
3853   --
3854   --   Get/Set_Has_Force_Mode (Flag2)
3855
3856   -- Iir_Kind_Simple_Signal_Assignment_Statement (Short)
3857   -- Iir_Kind_Conditional_Signal_Assignment_Statement (Short)
3858   -- Iir_Kind_Selected_Waveform_Assignment_Statement (Medium)
3859   --
3860   --   Get/Set_Parent (Field0)
3861   --
3862   --   Get/Set_Target (Field1)
3863   --
3864   --   Get/Set_Chain (Field2)
3865   --
3866   --   Get/Set_Label (Field3)
3867   --   Get/Set_Identifier (Alias Field3)
3868   --
3869   --   Get/Set_Reject_Time_Expression (Field4)
3870   --
3871   -- Only for Iir_Kind_Simple_Signal_Assignment_Statement:
3872   --  The waveform.
3873   --  If the waveform_chain is null_iir, then the signal assignment is a
3874   --  disconnection statement, ie TARGET <= null_iir after disconection_time,
3875   --  where disconnection_time is specified by a disconnection specification.
3876   --   Get/Set_Waveform_Chain (Field5)
3877   --
3878   -- Only for Iir_Kind_Conditional_Signal_Assignment_Statement:
3879   --   Get/Set_Conditional_Waveform_Chain (Field5)
3880   --
3881   -- Only for Iir_Kind_Selected_Waveform_Assignment_Statement:
3882   --   Get/Set_Expression (Field5)
3883   --
3884   -- Only for Iir_Kind_Selected_Waveform_Assignment_Statement:
3885   --   Get/Set_Selected_Waveform_Chain (Field7)
3886   --
3887   --   Get/Set_Delay_Mechanism (Flag1)
3888   --
3889   --   Get/Set_Has_Delay_Mechanism (Flag2)
3890   --
3891   --   Get/Set_Visible_Flag (Flag4)
3892   --
3893   --  True if the target of the assignment is guarded
3894   --   Get/Set_Guarded_Target_State (State1)
3895   --
3896   --   Get/Set_Is_Ref (Flag12)
3897
3898   -- Iir_Kind_Variable_Assignment_Statement (Short)
3899   --
3900   --   Get/Set_Parent (Field0)
3901   --
3902   --   Get/Set_Target (Field1)
3903   --
3904   --   Get/Set_Chain (Field2)
3905   --
3906   --   Get/Set_Label (Field3)
3907   --   Get/Set_Identifier (Alias Field3)
3908   --
3909   --   Get/Set_Expression (Field5)
3910   --
3911   --   Get/Set_Visible_Flag (Flag4)
3912   --
3913   --   Get/Set_Is_Ref (Flag12)
3914
3915   -- Iir_Kind_Conditional_Variable_Assignment_Statement (Short)
3916   --
3917   --   Get/Set_Parent (Field0)
3918   --
3919   --   Get/Set_Target (Field1)
3920   --
3921   --   Get/Set_Chain (Field2)
3922   --
3923   --   Get/Set_Label (Field3)
3924   --   Get/Set_Identifier (Alias Field3)
3925   --
3926   --  Chain of conditional_expressions.
3927   --   Get/Set_Conditional_Expression_Chain (Field5)
3928   --
3929   --   Get/Set_Visible_Flag (Flag4)
3930   --
3931   --   Get/Set_Is_Ref (Flag12)
3932
3933   -- Iir_Kind_Assertion_Statement (Short)
3934   --
3935   --   Get/Set_Parent (Field0)
3936   --
3937   --   Get/Set_Assertion_Condition (Field1)
3938   --
3939   --   Get/Set_Chain (Field2)
3940   --
3941   --   Get/Set_Label (Field3)
3942   --   Get/Set_Identifier (Alias Field3)
3943   --
3944   --   Get/Set_Severity_Expression (Field4)
3945   --
3946   --   Get/Set_Report_Expression (Field5)
3947   --
3948   --   Get/Set_Visible_Flag (Flag4)
3949
3950   -- Iir_Kind_Report_Statement (Short)
3951   --
3952   --   Get/Set_Parent (Field0)
3953   --
3954   --   Get/Set_Chain (Field2)
3955   --
3956   --   Get/Set_Label (Field3)
3957   --   Get/Set_Identifier (Alias Field3)
3958   --
3959   --   Get/Set_Severity_Expression (Field4)
3960   --
3961   --   Get/Set_Report_Expression (Field5)
3962   --
3963   --   Get/Set_Visible_Flag (Flag4)
3964
3965   -- Iir_Kind_Wait_Statement (Medium)
3966   --
3967   --   Get/Set_Parent (Field0)
3968   --
3969   --   Get/Set_Timeout_Clause (Field1)
3970   --
3971   --   Get/Set_Chain (Field2)
3972   --
3973   --   Get/Set_Label (Field3)
3974   --   Get/Set_Identifier (Alias Field3)
3975   --
3976   --   Get/Set_Condition_Clause (Field5)
3977   --
3978   --   Get/Set_Sensitivity_List (Field6)
3979   --
3980   --   Get/Set_Visible_Flag (Flag4)
3981   --
3982   --   Get/Set_Is_Ref (Flag12)
3983
3984   -- Iir_Kind_Return_Statement (Short)
3985   --
3986   --   Get/Set_Parent (Field0)
3987   --
3988   --  Type of the return value of the function.  This is a copy of
3989   --  return_type.
3990   --   Get/Set_Type (Field1)
3991   --
3992   --   Get/Set_Chain (Field2)
3993   --
3994   --   Get/Set_Label (Field3)
3995   --   Get/Set_Identifier (Alias Field3)
3996   --
3997   --   Get/Set_Expression (Field5)
3998   --
3999   --   Get/Set_Visible_Flag (Flag4)
4000
4001   -- Iir_Kind_Case_Statement (Short)
4002   --
4003   --   Get/Set_Parent (Field0)
4004   --
4005   --   Get/Set_Expression (Field5)
4006   --
4007   --  Chain is composed of Iir_Kind_Choice_By_XXX.
4008   --   Get/Set_Case_Statement_Alternative_Chain (Field1)
4009   --
4010   --   Get/Set_Chain (Field2)
4011   --
4012   --   Get/Set_Label (Field3)
4013   --   Get/Set_Identifier (Alias Field3)
4014   --
4015   --   Get/Set_Visible_Flag (Flag4)
4016   --
4017   --   Get/Set_End_Has_Identifier (Flag9)
4018   --
4019   --   Get/Set_Suspend_Flag (Flag11)
4020
4021   -- Iir_Kind_Procedure_Call_Statement (Short)
4022   -- Iir_Kind_Concurrent_Procedure_Call_Statement (Short)
4023   --
4024   --   Get/Set_Parent (Field0)
4025   --
4026   --   Get/Set_Procedure_Call (Field1)
4027   --
4028   --   Get/Set_Chain (Field2)
4029   --
4030   --   Get/Set_Label (Field3)
4031   --   Get/Set_Identifier (Alias Field3)
4032   --
4033   -- Only for Iir_Kind_Concurrent_Procedure_Call_Statement:
4034   --   Get/Set_Postponed_Flag (Flag3)
4035   --
4036   --   Get/Set_Visible_Flag (Flag4)
4037   --
4038   --   Get/Set_Suspend_Flag (Flag11)
4039
4040   -- Iir_Kind_Procedure_Call (Short)
4041   --
4042   --   Get/Set_Prefix (Field0)
4043   --
4044   --   Get/Set_Parameter_Association_Chain (Field2)
4045   --
4046   --  Procedure declaration corresponding to the procedure to call.
4047   --   Get/Set_Implementation (Field3)
4048   --
4049   --   Get/Set_Method_Object (Field4)
4050
4051   -- Iir_Kind_Null_Statement (Short)
4052   --
4053   --   Get/Set_Parent (Field0)
4054   --
4055   --   Get/Set_Chain (Field2)
4056   --
4057   --   Get/Set_Label (Field3)
4058   --   Get/Set_Identifier (Alias Field3)
4059   --
4060   --   Get/Set_Visible_Flag (Flag4)
4061
4062   -- Iir_Kind_Break_Statement (Short)
4063   -- Iir_Kind_Concurrent_Break_Statement (Medium)
4064   --
4065   --   Get/Set_Parent (Field0)
4066   --
4067   --   Get/Set_Condition (Field1)
4068   --
4069   --   Get/Set_Chain (Field2)
4070   --
4071   --   Get/Set_Label (Field3)
4072   --   Get/Set_Identifier (Alias Field3)
4073   --
4074   -- Only for Iir_Kind_Concurrent_Break_Statement:
4075   --   Get/Set_Sensitivity_List (Field6)
4076   --
4077   --   Get/Set_Break_Element (Field4)
4078   --
4079   --   Get/Set_Visible_Flag (Flag4)
4080   --
4081   --   Get/Set_Is_Ref (Flag12)
4082
4083   -- Iir_Kind_Break_Element (Short)
4084   --
4085   --   Get/Set_Chain (Field2)
4086   --
4087   --   Get/Set_Selector_Quantity (Field3)
4088   --
4089   --   Get/Set_Break_Quantity (Field4)
4090   --
4091   --   Get/Set_Expression (Field5)
4092
4093   ----------------
4094   --  operators --
4095   ----------------
4096
4097   -- Iir_Kinds_Monadic_Operator (Short)
4098   --
4099   --   Get/Set_Type (Field1)
4100   --
4101   --   Get/Set_Operand (Field2)
4102   --   Get/Set_Left (Alias Field2)
4103   --
4104   --  Function declaration corresponding to the function to call.
4105   --   Get/Set_Implementation (Field3)
4106   --
4107   --  Expr_staticness is defined by LRM93 7.4
4108   --   Get/Set_Expr_Staticness (State1)
4109
4110   -- Iir_Kinds_Dyadic_Operator (Short)
4111   --
4112   --   Get/Set_Type (Field1)
4113   --
4114   --  Left and Right operands.
4115   --   Get/Set_Left (Field2)
4116   --
4117   --  Function declaration corresponding to the function to call.
4118   --   Get/Set_Implementation (Field3)
4119   --
4120   --   Get/Set_Right (Field4)
4121   --
4122   --   Get/Set_Expr_Staticness (State1)
4123
4124   -- Iir_Kind_Function_Call (Short)
4125   --
4126   --   Get/Set_Prefix (Field0)
4127   --
4128   --   Get/Set_Type (Field1)
4129   --
4130   --   Get/Set_Parameter_Association_Chain (Field2)
4131   --
4132   --  Function declaration corresponding to the function to call.
4133   --   Get/Set_Implementation (Field3)
4134   --
4135   --   Get/Set_Method_Object (Field4)
4136   --
4137   --   Get/Set_Base_Name (Field5)
4138   --
4139   --   Get/Set_Expr_Staticness (State1)
4140   --
4141   --   Get/Set_Name_Staticness (State2)
4142
4143   -- Iir_Kind_Aggregate (Short)
4144   --
4145   --   Get/Set_Association_Choices_Chain (Field4)
4146   --
4147   --  Same as Type, but marked as property of that node.
4148   --   Get/Set_Literal_Subtype (Field3)
4149   --
4150   --  Exist for symmetry with other literals, but must never be set.  The
4151   --  content of the aggregate is modified during evaluation, not the
4152   --  aggregate itself.
4153   --   Get/Set_Literal_Origin (Field2)
4154   --
4155   --   Get/Set_Aggregate_Info (Field5)
4156   --
4157   --   Get/Set_Type (Field1)
4158   --
4159   --   Get/Set_Expr_Staticness (State1)
4160   --
4161   --  If true, the aggregate can be statically built.  This is an optimization
4162   --  and the conditions are defined in sem_expr.
4163   --   Get/Set_Aggregate_Expand_Flag (Flag1)
4164
4165   -- Iir_Kind_Aggregate_Info (Short)
4166   --
4167   --  Get info for the next dimension.  NULL_IIR terminated.
4168   --   Get/Set_Sub_Aggregate_Info (Field1)
4169   --
4170   --  For array aggregate only:
4171   --  If TRUE, the choices are not locally static.
4172   --  This flag is only valid when the array aggregate is constrained, ie
4173   --  has no 'others' choice.
4174   --   Get/Set_Aggr_Dynamic_Flag (Flag3)
4175   --
4176   --  If TRUE, the aggregate is named, else it is positional.
4177   --   Get/Set_Aggr_Named_Flag (Flag4)
4178   --
4179   --  The following three fields are used to check bounds of an array
4180   --  aggregate.
4181   --  For named aggregate, low and high bounds are computed, for positional
4182   --  aggregate, the (minimum) number of elements is computed.
4183   --  Note there may be elements beyond the bounds, due to other choice.
4184   --  These fields may apply for the aggregate or for the aggregate and its
4185   --  brothers if the node is for a sub-aggregate.
4186   --
4187   --  The low and high index choice, if any.
4188   --   Get/Set_Aggr_Low_Limit (Field2)
4189   --
4190   --   Get/Set_Aggr_High_Limit (Field3)
4191   --
4192   --  The minimum number of elements, if any.  This is a minimax.
4193   --   Get/Set_Aggr_Min_Length (Field4)
4194   --
4195   --  True if the choice list has an 'others' choice.
4196   --   Get/Set_Aggr_Others_Flag (Flag2)
4197
4198   -- Iir_Kind_Parenthesis_Expression (Short)
4199   --
4200   --   Get/Set_Expression (Field5)
4201   --
4202   --   Get/Set_Type (Field1)
4203   --
4204   --   Get/Set_Expr_Staticness (State1)
4205
4206   -- Iir_Kind_Qualified_Expression (Short)
4207   --
4208   --  LRM08 9.3.5 Qualified expressions
4209   --
4210   --  qualified_expression ::=
4211   --       type_mark ' ( expression )
4212   --     | type_mark ' aggregate
4213   --
4214   --   Get/Set_Type_Mark (Field4)
4215   --
4216   --   Get/Set_Expression (Field5)
4217   --
4218   --   Get/Set_Type (Field1)
4219   --
4220   --   Get/Set_Expr_Staticness (State1)
4221
4222   -- Iir_Kind_Type_Conversion (Short)
4223   --
4224   --  LRM08 9.3.6 Type conversions
4225   --
4226   --  type_conversion ::= type_mark ( expression )
4227   --
4228   --   Get/Set_Type (Field1)
4229   --
4230   --  If the type mark denotes an unconstrained array and the expression is
4231   --  locally static, the result should be locally static according to vhdl93
4232   --  (which is not clear on that point).  As a subtype is created, it is
4233   --  referenced by this field.
4234   --   Get/Set_Type_Conversion_Subtype (Field3)
4235   --
4236   --   Get/Set_Type_Mark (Field4)
4237   --
4238   --   Get/Set_Expression (Field5)
4239   --
4240   --   Get/Set_Expr_Staticness (State1)
4241
4242   -- Iir_Kind_Allocator_By_Expression (Short)
4243   -- Iir_Kind_Allocator_By_Subtype (Short)
4244   --
4245   --  LRM08 9.3.7 Allocators
4246   --
4247   --  allocator ::=
4248   --      NEW subtype_indication
4249   --    | NEW qualified_expression
4250   --
4251   --   Get/Set_Type (Field1)
4252   --
4253   -- Only for Iir_Kind_Allocator_By_Expression:
4254   --  Contains the expression for a by expression allocator.
4255   --   Get/Set_Expression (Field5)
4256   --
4257   -- Only for Iir_Kind_Allocator_By_Subtype:
4258   --  Contains the subtype indication for a by subtype allocator.
4259   --   Get/Set_Subtype_Indication (Field5)
4260   --
4261   -- Only for Iir_Kind_Allocator_By_Subtype:
4262   --  Same as subtype indication but set when the allocator defines a new
4263   --  subtype.  Used to track when an anonymous subtype is created.
4264   --   Get/Set_Allocator_Subtype (Field3)
4265   --
4266   --  To ease analysis: set to the designated type (either the type of the
4267   --  expression or the subtype)
4268   --   Get/Set_Allocator_Designated_Type (Field2)
4269   --
4270   --   Get/Set_Expr_Staticness (State1)
4271   --
4272   --   Get/Set_Is_Ref (Flag12)
4273
4274   ------------
4275   --  Names --
4276   ------------
4277
4278   -- Iir_Kind_Simple_Name (Short)
4279   --
4280   --   Get/Set_Type (Field1)
4281   --
4282   --   Get/Set_Alias_Declaration (Field2)
4283   --
4284   --   Get/Set_Identifier (Field3)
4285   --
4286   --   Get/Set_Named_Entity (Field4)
4287   --
4288   --   Get/Set_Base_Name (Field5)
4289   --
4290   --   Get/Set_Is_Forward_Ref (Flag1)
4291   --
4292   --   Get/Set_Expr_Staticness (State1)
4293   --
4294   --   Get/Set_Name_Staticness (State2)
4295
4296   -- Iir_Kind_Character_Literal (Short)
4297   --
4298   --   Get/Set_Type (Field1)
4299   --
4300   --   Get/Set_Alias_Declaration (Field2)
4301   --
4302   --   Get/Set_Identifier (Field3)
4303   --
4304   --   Get/Set_Named_Entity (Field4)
4305   --
4306   --   Get/Set_Base_Name (Field5)
4307   --
4308   --   Get/Set_Is_Forward_Ref (Flag1)
4309   --
4310   --   Get/Set_Expr_Staticness (State1)
4311   --
4312   --   Get/Set_Name_Staticness (State2)
4313
4314   -- Iir_Kind_Operator_Symbol (Short)
4315   --
4316   --   Get/Set_Type (Field1)
4317   --
4318   --   Get/Set_Alias_Declaration (Field2)
4319   --
4320   --   Get/Set_Identifier (Field3)
4321   --
4322   --   Get/Set_Named_Entity (Field4)
4323   --
4324   --   Get/Set_Base_Name (Field5)
4325   --
4326   --   Get/Set_Is_Forward_Ref (Flag1)
4327
4328   -- Iir_Kind_Reference_Name (Short)
4329   --
4330   --  This doesn't correspond to a name in the sources.  This is an artificial
4331   --  name in the tree which is owned and reference another name.
4332   --
4333   --   Get/Set_Type (Field1)
4334   --
4335   --   Get/Set_Named_Entity (Field4)
4336   --
4337   --  The name from which the reference was created.  Can be Null_Iir if the
4338   --  reference was created directly from a declaration.
4339   --   Get/Set_Referenced_Name (Field2)
4340   --
4341   --   Get/Set_Is_Forward_Ref (Flag1)
4342   --
4343   --   Get/Set_Expr_Staticness (State1)
4344
4345   -- Iir_Kind_Selected_Name (Short)
4346   --
4347   --   Get/Set_Prefix (Field0)
4348   --
4349   --   Get/Set_Type (Field1)
4350   --
4351   --   Get/Set_Alias_Declaration (Field2)
4352   --
4353   --   Get/Set_Identifier (Field3)
4354   --
4355   --   Get/Set_Named_Entity (Field4)
4356   --
4357   --   Get/Set_Base_Name (Field5)
4358   --
4359   --   Get/Set_Is_Forward_Ref (Flag1)
4360   --
4361   --   Get/Set_Expr_Staticness (State1)
4362   --
4363   --   Get/Set_Name_Staticness (State2)
4364
4365   -- Iir_Kind_External_Constant_Name (Short)
4366   -- Iir_Kind_External_Signal_Name (Short)
4367   -- Iir_Kind_External_Variable_Name (Short)
4368   --
4369   --   Get/Set_Parent (Field0)
4370   --
4371   --   Get/Set_Type (Field1)
4372   --
4373   --   Get/Set_Chain (Field2)
4374   --
4375   --   Get/Set_External_Pathname (Field3)
4376   --
4377   --   Get/Set_Named_Entity (Field4)
4378   --
4379   --   Get/Set_Subtype_Indication (Field5)
4380   --
4381   -- Only for Iir_Kind_External_Variable_Name:
4382   --   Get/Set_Shared_Flag (Flag2)
4383   --
4384   --   Get/Set_Expr_Staticness (State1)
4385   --
4386   --   Get/Set_Name_Staticness (State2)
4387   --
4388   --   Get/Set_Is_Ref (Flag12)
4389
4390   -- Iir_Kind_Selected_By_All_Name (Short)
4391   --
4392   --   Get/Set_Prefix (Field0)
4393   --
4394   --   Get/Set_Type (Field1)
4395   --
4396   --   Get/Set_Named_Entity (Field4)
4397   --
4398   --   Get/Set_Base_Name (Field5)
4399   --
4400   --   Get/Set_Is_Forward_Ref (Flag1)
4401   --
4402   --   Get/Set_Expr_Staticness (State1)
4403
4404   -- Iir_Kind_Indexed_Name (Short)
4405   --  Select the element designed with the INDEX_LIST from array PREFIX.
4406   --
4407   --   Get/Set_Prefix (Field0)
4408   --
4409   --   Get/Set_Type (Field1)
4410   --
4411   --   Get/Set_Index_List (Field2)
4412   --
4413   --   Get/Set_Base_Name (Field5)
4414   --
4415   --   Get/Set_Expr_Staticness (State1)
4416   --
4417   --   Get/Set_Name_Staticness (State2)
4418
4419   -- Iir_Kind_Slice_Name (Short)
4420   --
4421   --   Get/Set_Prefix (Field0)
4422   --
4423   --   Get/Set_Suffix (Field2)
4424   --
4425   --   Get/Set_Slice_Subtype (Field3)
4426   --
4427   --   Get/Set_Type (Field1)
4428   --
4429   --   Get/Set_Base_Name (Field5)
4430   --
4431   --   Get/Set_Expr_Staticness (State1)
4432   --
4433   --   Get/Set_Name_Staticness (State2)
4434
4435   -- Iir_Kind_Parenthesis_Name (Short)
4436   --  Created by the parser, and mutated into the correct iir node: it can be
4437   --  either a function call, an indexed array, a type conversion or a slice
4438   --  name.
4439   --
4440   --   Get/Set_Prefix (Field0)
4441   --
4442   --  Always returns null_iir.
4443   --   Get/Set_Type (Field1)
4444   --
4445   --   Get/Set_Association_Chain (Field2)
4446   --
4447   --   Get/Set_Named_Entity (Field4)
4448   --
4449   --   Get/Set_Is_Forward_Ref (Flag1)
4450
4451   -- Iir_Kind_Selected_Element (Short)
4452   --  A record element selection.  This corresponds to a refined selected
4453   --  names.  The production doesn't exist in the VHDL grammar.
4454   --
4455   --   Get/Set_Prefix (Field0)
4456   --
4457   --   Get/Set_Type (Field1)
4458   --
4459   --   Get/Set_Identifier (Field3)
4460   --
4461   --  The selected element.
4462   --   Get/Set_Named_Entity (Field4)
4463   --
4464   --   Get/Set_Base_Name (Field5)
4465   --
4466   --   Get/Set_Expr_Staticness (State1)
4467   --
4468   --   Get/Set_Name_Staticness (State2)
4469   --
4470   --  Always false.
4471   --   Get/Set_Is_Forward_Ref (Flag1)
4472
4473   -- Iir_Kind_Implicit_Dereference (Short)
4474   -- Iir_Kind_Dereference (Short)
4475   --  An implicit access dereference.
4476   --
4477   --   Get/Set_Prefix (Field0)
4478   --
4479   --   Get/Set_Type (Field1)
4480   --
4481   --   Get/Set_Base_Name (Field5)
4482   --
4483   --   Get/Set_Expr_Staticness (State1)
4484   --
4485   --   Get/Set_Name_Staticness (State2)
4486
4487   -- Iir_Kind_Package_Pathname (Short)
4488   --  This node represents only the library_logical_name. Package and object
4489   --  simple_names are represented by Selected_Name.
4490   --
4491   --   Get/Set_Pathname_Suffix (Field2)
4492   --
4493   --   Get/Set_Identifier (Field3)
4494   --
4495   --   Get/Set_Named_Entity (Field4)
4496   --
4497   --   Get/Set_Is_Forward_Ref (Flag1)
4498
4499   -- Iir_Kind_Absolute_Pathname (Short)
4500   --  Represents only the '.'.
4501   --
4502   --   Get/Set_Pathname_Suffix (Field2)
4503
4504   -- Iir_Kind_Relative_Pathname (Short)
4505   --  Represents only one '^.'
4506   --
4507   --   Get/Set_Pathname_Suffix (Field2)
4508
4509   -- Iir_Kind_Pathname_Element (Short)
4510   --
4511   --   Get/Set_Pathname_Suffix (Field2)
4512   --
4513   --   Get/Set_Identifier (Field3)
4514   --
4515   --   Get/Set_Named_Entity (Field4)
4516   --
4517   --   Get/Set_Pathname_Expression (Field5)
4518   --
4519   --   Get/Set_Is_Forward_Ref (Flag1)
4520
4521   -----------------
4522   --  Attributes --
4523   -----------------
4524
4525   -- Iir_Kind_Attribute_Name (Short)
4526   --
4527   --   Get/Set_Prefix (Field0)
4528   --
4529   --   Get/Set_Type (Field1)
4530   --
4531   --   Get/Set_Attribute_Signature (Field2)
4532   --
4533   --   Get/Set_Identifier (Field3)
4534   --
4535   --   Get/Set_Named_Entity (Field4)
4536   --
4537   --   Get/Set_Base_Name (Field5)
4538   --
4539   --   Get/Set_Is_Forward_Ref (Flag1)
4540   --
4541   --   Get/Set_Expr_Staticness (State1)
4542   --
4543   --   Get/Set_Name_Staticness (State2)
4544
4545   -- Iir_Kind_Base_Attribute (Short)
4546   --
4547   --   Get/Set_Prefix (Field0)
4548   --
4549   --   Get/Set_Type (Field1)
4550
4551   -- Iir_Kind_Across_Attribute (Short)
4552   -- Iir_Kind_Through_Attribute (Short)
4553   --
4554   --   Get/Set_Prefix (Field0)
4555   --
4556   --   Get/Set_Type (Field1)
4557   --
4558   --   Get/Set_Base_Name (Field5)
4559   --
4560   --   Get/Set_Type_Staticness (State1)
4561   --
4562   --   Get/Set_Name_Staticness (State2)
4563
4564   -- Iir_Kind_Nature_Reference_Attribute (Short)
4565   --
4566   --   Get/Set_Prefix (Field0)
4567   --
4568   --   Get/Set_Nature (Field1)
4569   --
4570   --   Get/Set_Base_Name (Field5)
4571   --
4572   --   Get/Set_Name_Staticness (State2)
4573
4574   -- Iir_Kind_Above_Attribute (Short)
4575   -- Iir_Kind_Dot_Attribute (Short)
4576   -- Iir_Kind_Integ_Attribute (Short)
4577   -- Iir_Kind_Quantity_Delayed_Attribute (Short)
4578   --
4579   --   Get/Set_Prefix (Field0)
4580   --
4581   --   Get/Set_Type (Field1)
4582   --
4583   --   Get/Set_Attr_Chain (Field2)
4584   --
4585   --  Head of the chain.  Used only to ease the reconstruction of the chain.
4586   --   Get/Set_Signal_Attribute_Declaration (Field3)
4587   --
4588   -- Only for Iir_Kind_Above_Attribute:
4589   -- Only for Iir_Kind_Quantity_Delayed_Attribute:
4590   --   Get/Set_Parameter (Field4)
4591   --
4592   --   Get/Set_Base_Name (Field5)
4593   --
4594   --   Get/Set_Name_Staticness (State2)
4595   --
4596   --   Get/Set_Expr_Staticness (State1)
4597
4598   -- Iir_Kind_Ramp_Attribute (Medium)
4599   -- Iir_Kind_Signal_Slew_Attribute (Medium)
4600   -- Iir_Kind_Quantity_Slew_Attribute (Medium)
4601   -- Iir_Kind_Zoh_Attribute (Medium)
4602   -- Iir_Kind_Ltf_Attribute (Medium)
4603   -- Iir_Kind_Ztf_Attribute (Medium)
4604   --
4605   --   Get/Set_Prefix (Field0)
4606   --
4607   --   Get/Set_Type (Field1)
4608   --
4609   --   Get/Set_Attr_Chain (Field2)
4610   --
4611   --   Get/Set_Parameter (Field4)
4612   --
4613   --   Get/Set_Parameter_2 (Field6)
4614   --
4615   -- Only for Iir_Kind_Ztf_Attribute:
4616   --   Get/Set_Parameter_3 (Field7)
4617   --
4618   -- Only for Iir_Kind_Ztf_Attribute:
4619   --   Get/Set_Parameter_4 (Field8)
4620   --
4621   --   Get/Set_Base_Name (Field5)
4622   --
4623   --   Get/Set_Name_Staticness (State2)
4624   --
4625   --   Get/Set_Expr_Staticness (State1)
4626
4627   -- Iir_Kind_Left_Type_Attribute (Short)
4628   -- Iir_Kind_Right_Type_Attribute (Short)
4629   -- Iir_Kind_High_Type_Attribute (Short)
4630   -- Iir_Kind_Low_Type_Attribute (Short)
4631   -- Iir_Kind_Ascending_Type_Attribute (Short)
4632   --
4633   --   Get/Set_Prefix (Field0)
4634   --
4635   --   Get/Set_Type (Field1)
4636   --
4637   --   Get/Set_Base_Name (Field5)
4638   --
4639   --   Get/Set_Expr_Staticness (State1)
4640   --
4641   --   Get/Set_Name_Staticness (State2)
4642
4643   -- Iir_Kind_Range_Array_Attribute (Short)
4644   -- Iir_Kind_Reverse_Range_Array_Attribute (Short)
4645   -- Iir_Kind_Left_Array_Attribute (Short)
4646   -- Iir_Kind_Right_Array_Attribute (Short)
4647   -- Iir_Kind_High_Array_Attribute (Short)
4648   -- Iir_Kind_Low_Array_Attribute (Short)
4649   -- Iir_Kind_Ascending_Array_Attribute (Short)
4650   -- Iir_Kind_Length_Array_Attribute (Short)
4651   --
4652   --   Get/Set_Prefix (Field0)
4653   --
4654   --   Get/Set_Type (Field1)
4655   --
4656   --  Set only when known to be constrained.
4657   --   Get/Set_Index_Subtype (Field2)
4658   --
4659   --   Get/Set_Parameter (Field4)
4660   --
4661   --   Get/Set_Base_Name (Field5)
4662   --
4663   --   Get/Set_Expr_Staticness (State1)
4664   --
4665   --   Get/Set_Name_Staticness (State2)
4666
4667   -- Iir_Kind_Subtype_Attribute (Short)
4668   -- Iir_Kind_Element_Attribute (Short)
4669   --
4670   --   Get/Set_Prefix (Field0)
4671   --
4672   --   Get/Set_Type (Field1)
4673   --
4674   --   Get/Set_Base_Name (Field5)
4675   --
4676   --   Get/Set_Type_Staticness (State1)
4677   --
4678   --   Get/Set_Name_Staticness (State2)
4679
4680   -- Iir_Kind_Stable_Attribute (Short)
4681   -- Iir_Kind_Delayed_Attribute (Short)
4682   -- Iir_Kind_Quiet_Attribute (Short)
4683   -- Iir_Kind_Transaction_Attribute (Short)
4684   --  (Iir_Kinds_Signal_Attribute)
4685   --
4686   --   Get/Set_Prefix (Field0)
4687   --
4688   --  Not used by Iir_Kind_Transaction_Attribute
4689   --   Get/Set_Parameter (Field4)
4690   --
4691   --   Get/Set_Type (Field1)
4692   --
4693   --  Next attribute signal in the chain owned by the
4694   --  signal_attribute_declaration.  Usual Get/Set_Chain is not used here as
4695   --  the chain is composed only of forward references.
4696   --   Get/Set_Attr_Chain (Field2)
4697   --
4698   --  Head of the chain.  Used only to ease the reconstruction of the chain.
4699   --   Get/Set_Signal_Attribute_Declaration (Field3)
4700   --
4701   --   Get/Set_Base_Name (Field5)
4702   --
4703   --   Get/Set_Has_Active_Flag (Flag2)
4704   --
4705   --   Get/Set_Expr_Staticness (State1)
4706   --
4707   --   Get/Set_Name_Staticness (State2)
4708
4709   -- Iir_Kind_Event_Attribute (Short)
4710   -- Iir_Kind_Last_Event_Attribute (Short)
4711   -- Iir_Kind_Last_Value_Attribute (Short)
4712   -- Iir_Kind_Active_Attribute (Short)
4713   -- Iir_Kind_Last_Active_Attribute (Short)
4714   -- Iir_Kind_Driving_Attribute (Short)
4715   -- Iir_Kind_Driving_Value_Attribute (Short)
4716   --
4717   --   Get/Set_Prefix (Field0)
4718   --
4719   --   Get/Set_Type (Field1)
4720   --
4721   --   Get/Set_Expr_Staticness (State1)
4722   --
4723   --   Get/Set_Name_Staticness (State2)
4724
4725   -- Iir_Kind_Pos_Attribute (Short)
4726   -- Iir_Kind_Val_Attribute (Short)
4727   -- Iir_Kind_Succ_Attribute (Short)
4728   -- Iir_Kind_Pred_Attribute (Short)
4729   -- Iir_Kind_Leftof_Attribute (Short)
4730   -- Iir_Kind_Rightof_Attribute (Short)
4731   --
4732   --   Get/Set_Prefix (Field0)
4733   --
4734   --   Get/Set_Type (Field1)
4735   --
4736   --   Get/Set_Parameter (Field4)
4737   --
4738   --   Get/Set_Base_Name (Field5)
4739   --
4740   --   Get/Set_Expr_Staticness (State1)
4741   --
4742   --   Get/Set_Name_Staticness (State2)
4743
4744   -- Iir_Kind_Image_Attribute (Short)
4745   -- Iir_Kind_Value_Attribute (Short)
4746   --
4747   --   Get/Set_Prefix (Field0)
4748   --
4749   --   Get/Set_Type (Field1)
4750   --
4751   --   Get/Set_Parameter (Field4)
4752   --
4753   --   Get/Set_Base_Name (Field5)
4754   --
4755   --   Get/Set_Expr_Staticness (State1)
4756   --
4757   --   Get/Set_Name_Staticness (State2)
4758
4759   -- Iir_Kind_Simple_Name_Attribute (Short)
4760   -- Iir_Kind_Instance_Name_Attribute (Short)
4761   -- Iir_Kind_Path_Name_Attribute (Short)
4762   --
4763   --   Get/Set_Prefix (Field0)
4764   --
4765   -- Only for Iir_Kind_Simple_Name_Attribute:
4766   --   Get/Set_Simple_Name_Identifier (Field3)
4767   --
4768   -- Only for Iir_Kind_Simple_Name_Attribute:
4769   --   Get/Set_Simple_Name_Subtype (Field4)
4770   --
4771   --   Get/Set_Type (Field1)
4772   --
4773   --   Get/Set_Base_Name (Field5)
4774   --
4775   --   Get/Set_Expr_Staticness (State1)
4776   --
4777   --   Get/Set_Name_Staticness (State2)
4778
4779   -- Iir_Kind_Behavior_Attribute (Short)
4780   -- Iir_Kind_Structure_Attribute (Short)
4781   --  FIXME: to describe (Short)
4782
4783   -- Iir_Kind_Error (Short)
4784   --  Can be used instead of an expression or a type.
4785   --   Get/Set_Type (Field1)
4786   --   Get/Set_Nature (Alias Field1)
4787   --
4788   --   Get/Set_Error_Origin (Field2)
4789   --
4790   --   Get/Set_Type_Declarator (Field3)
4791   --
4792   --   Get/Set_Expr_Staticness (State1)
4793   --
4794   --   Get/Set_Type_Staticness (Alias State1)
4795   --
4796   --   Get/Set_Resolved_Flag (Flag1)
4797   --
4798   --   Get/Set_Signal_Type_Flag (Flag2)
4799   --
4800   --   Get/Set_Has_Signal_Flag (Flag3)
4801
4802   -- Iir_Kind_Unused (Short)
4803
4804   -- End of Iir_Kind.
4805
4806
4807   type Iir_Kind is
4808     (
4809      Iir_Kind_Unused,
4810      Iir_Kind_Error,
4811
4812      Iir_Kind_Design_File,
4813      Iir_Kind_Design_Unit,
4814      Iir_Kind_Library_Clause,
4815      Iir_Kind_Use_Clause,
4816      Iir_Kind_Context_Reference,
4817
4818   -- Literals.
4819      Iir_Kind_Integer_Literal,
4820      Iir_Kind_Floating_Point_Literal,
4821      Iir_Kind_Null_Literal,
4822      Iir_Kind_String_Literal8,
4823      Iir_Kind_Physical_Int_Literal,
4824      Iir_Kind_Physical_Fp_Literal,
4825      Iir_Kind_Simple_Aggregate,
4826      Iir_Kind_Overflow_Literal,
4827
4828      Iir_Kind_Unaffected_Waveform,
4829
4830   -- Tuple,
4831      Iir_Kind_Waveform_Element,
4832      Iir_Kind_Conditional_Waveform,
4833      Iir_Kind_Conditional_Expression,
4834      Iir_Kind_Association_Element_By_Expression,
4835      Iir_Kind_Association_Element_By_Individual,
4836      Iir_Kind_Association_Element_Open,
4837      Iir_Kind_Association_Element_Package,
4838      Iir_Kind_Association_Element_Type,
4839      Iir_Kind_Association_Element_Subprogram,
4840      Iir_Kind_Association_Element_Terminal,
4841      Iir_Kind_Choice_By_Range,
4842      Iir_Kind_Choice_By_Expression,
4843      Iir_Kind_Choice_By_Others,
4844      Iir_Kind_Choice_By_None,
4845      Iir_Kind_Choice_By_Name,
4846      Iir_Kind_Entity_Aspect_Entity,
4847      Iir_Kind_Entity_Aspect_Configuration,
4848      Iir_Kind_Entity_Aspect_Open,
4849      Iir_Kind_Psl_Hierarchical_Name,
4850      Iir_Kind_Block_Configuration,
4851      Iir_Kind_Block_Header,
4852      Iir_Kind_Component_Configuration,
4853      Iir_Kind_Binding_Indication,
4854      Iir_Kind_Entity_Class,
4855      Iir_Kind_Attribute_Value,
4856      Iir_Kind_Signature,
4857      Iir_Kind_Aggregate_Info,
4858      Iir_Kind_Procedure_Call,
4859      Iir_Kind_Record_Element_Constraint,
4860      Iir_Kind_Array_Element_Resolution,
4861      Iir_Kind_Record_Resolution,
4862      Iir_Kind_Record_Element_Resolution,
4863      Iir_Kind_Break_Element,
4864
4865      Iir_Kind_Attribute_Specification,
4866      Iir_Kind_Disconnection_Specification,
4867      Iir_Kind_Step_Limit_Specification,
4868      Iir_Kind_Configuration_Specification,
4869
4870   -- Type definitions.
4871   -- iir_kinds_type_and_subtype_definition
4872   -- kinds: disc: discrete, st: subtype.
4873      Iir_Kind_Access_Type_Definition,
4874      Iir_Kind_Incomplete_Type_Definition,
4875      Iir_Kind_Interface_Type_Definition,
4876      Iir_Kind_File_Type_Definition,
4877      Iir_Kind_Protected_Type_Declaration,
4878      Iir_Kind_Record_Type_Definition,           -- composite
4879      Iir_Kind_Array_Type_Definition,            -- composite, array
4880      Iir_Kind_Array_Subtype_Definition,         -- composite, array, st
4881      Iir_Kind_Record_Subtype_Definition,        -- composite, st
4882      Iir_Kind_Access_Subtype_Definition,        -- st
4883      Iir_Kind_Physical_Subtype_Definition,      -- scalar, st, rng
4884      Iir_Kind_Floating_Subtype_Definition,      -- scalar, st, rng
4885      Iir_Kind_Integer_Subtype_Definition,       -- scalar, disc, st, rng
4886      Iir_Kind_Enumeration_Subtype_Definition,   -- scalar, disc, st, rng
4887      Iir_Kind_Enumeration_Type_Definition,      -- scalar, disc, rng
4888      Iir_Kind_Integer_Type_Definition,          -- scalar, disc
4889      Iir_Kind_Floating_Type_Definition,         -- scalar
4890      Iir_Kind_Physical_Type_Definition,         -- scalar
4891      Iir_Kind_Range_Expression,
4892      Iir_Kind_Protected_Type_Body,
4893      Iir_Kind_Wildcard_Type_Definition,
4894      Iir_Kind_Subtype_Definition,  -- temporary (must not appear after sem).
4895
4896   -- Nature definition
4897      Iir_Kind_Scalar_Nature_Definition,
4898      Iir_Kind_Record_Nature_Definition,
4899      Iir_Kind_Array_Nature_Definition,
4900      Iir_Kind_Array_Subnature_Definition,
4901
4902   -- Lists.
4903      Iir_Kind_Overload_List,  -- used internally by sem_expr.
4904
4905   -- Declarations.
4906      Iir_Kind_Entity_Declaration,
4907      Iir_Kind_Configuration_Declaration,
4908      Iir_Kind_Context_Declaration,
4909      Iir_Kind_Package_Declaration,
4910      Iir_Kind_Package_Instantiation_Declaration,
4911      Iir_Kind_Vmode_Declaration,
4912      Iir_Kind_Vprop_Declaration,
4913      Iir_Kind_Vunit_Declaration,
4914      Iir_Kind_Package_Body,
4915      Iir_Kind_Architecture_Body,
4916
4917      Iir_Kind_Type_Declaration,
4918      Iir_Kind_Anonymous_Type_Declaration,
4919      Iir_Kind_Subtype_Declaration,
4920      Iir_Kind_Nature_Declaration,
4921      Iir_Kind_Subnature_Declaration,
4922      Iir_Kind_Package_Header,
4923      Iir_Kind_Unit_Declaration,
4924      Iir_Kind_Library_Declaration,
4925      Iir_Kind_Component_Declaration,
4926      Iir_Kind_Attribute_Declaration,
4927      Iir_Kind_Group_Template_Declaration,
4928      Iir_Kind_Group_Declaration,
4929      Iir_Kind_Element_Declaration,
4930      Iir_Kind_Nature_Element_Declaration,
4931      Iir_Kind_Non_Object_Alias_Declaration,
4932
4933      Iir_Kind_Psl_Declaration,
4934      Iir_Kind_Psl_Endpoint_Declaration,
4935
4936      Iir_Kind_Enumeration_Literal,
4937      Iir_Kind_Function_Declaration,            --  Subprg, Func
4938      Iir_Kind_Procedure_Declaration,           --  Subprg, Proc
4939      Iir_Kind_Function_Body,
4940      Iir_Kind_Procedure_Body,
4941      Iir_Kind_Function_Instantiation_Declaration,
4942      Iir_Kind_Procedure_Instantiation_Declaration,
4943
4944      Iir_Kind_Terminal_Declaration,
4945
4946      Iir_Kind_Object_Alias_Declaration,       -- object
4947      Iir_Kind_Free_Quantity_Declaration,      -- object
4948      Iir_Kind_Spectrum_Quantity_Declaration,  -- object
4949      Iir_Kind_Noise_Quantity_Declaration,     -- object
4950      Iir_Kind_Across_Quantity_Declaration,    -- object
4951      Iir_Kind_Through_Quantity_Declaration,   -- object
4952      Iir_Kind_File_Declaration,               -- object
4953      Iir_Kind_Guard_Signal_Declaration,       -- object
4954      Iir_Kind_Signal_Declaration,             -- object
4955      Iir_Kind_Variable_Declaration,           -- object
4956      Iir_Kind_Constant_Declaration,           -- object
4957      Iir_Kind_Iterator_Declaration,           -- object
4958      Iir_Kind_Interface_Constant_Declaration, -- object, interface
4959      Iir_Kind_Interface_Variable_Declaration, -- object, interface
4960      Iir_Kind_Interface_Signal_Declaration,   -- object, interface
4961      Iir_Kind_Interface_File_Declaration,     -- object, interface
4962      Iir_Kind_Interface_Quantity_Declaration, -- object, interface
4963      Iir_Kind_Interface_Terminal_Declaration, --         interface
4964      Iir_Kind_Interface_Type_Declaration,     --         interface
4965      Iir_Kind_Interface_Package_Declaration,  --         interface
4966      Iir_Kind_Interface_Function_Declaration, --         interface
4967      Iir_Kind_Interface_Procedure_Declaration, --        interface
4968
4969      Iir_Kind_Anonymous_Signal_Declaration,
4970      Iir_Kind_Signal_Attribute_Declaration,
4971
4972   -- Expressions.
4973      Iir_Kind_Identity_Operator,
4974      Iir_Kind_Negation_Operator,
4975      Iir_Kind_Absolute_Operator,
4976      Iir_Kind_Not_Operator,
4977      Iir_Kind_Implicit_Condition_Operator,
4978      Iir_Kind_Condition_Operator,
4979      Iir_Kind_Reduction_And_Operator,
4980      Iir_Kind_Reduction_Or_Operator,
4981      Iir_Kind_Reduction_Nand_Operator,
4982      Iir_Kind_Reduction_Nor_Operator,
4983      Iir_Kind_Reduction_Xor_Operator,
4984      Iir_Kind_Reduction_Xnor_Operator,
4985      Iir_Kind_And_Operator,
4986      Iir_Kind_Or_Operator,
4987      Iir_Kind_Nand_Operator,
4988      Iir_Kind_Nor_Operator,
4989      Iir_Kind_Xor_Operator,
4990      Iir_Kind_Xnor_Operator,
4991      Iir_Kind_Equality_Operator,
4992      Iir_Kind_Inequality_Operator,
4993      Iir_Kind_Less_Than_Operator,
4994      Iir_Kind_Less_Than_Or_Equal_Operator,
4995      Iir_Kind_Greater_Than_Operator,
4996      Iir_Kind_Greater_Than_Or_Equal_Operator,
4997      Iir_Kind_Match_Equality_Operator,
4998      Iir_Kind_Match_Inequality_Operator,
4999      Iir_Kind_Match_Less_Than_Operator,
5000      Iir_Kind_Match_Less_Than_Or_Equal_Operator,
5001      Iir_Kind_Match_Greater_Than_Operator,
5002      Iir_Kind_Match_Greater_Than_Or_Equal_Operator,
5003      Iir_Kind_Sll_Operator,
5004      Iir_Kind_Sla_Operator,
5005      Iir_Kind_Srl_Operator,
5006      Iir_Kind_Sra_Operator,
5007      Iir_Kind_Rol_Operator,
5008      Iir_Kind_Ror_Operator,
5009      Iir_Kind_Addition_Operator,
5010      Iir_Kind_Substraction_Operator,
5011      Iir_Kind_Concatenation_Operator,
5012      Iir_Kind_Multiplication_Operator,
5013      Iir_Kind_Division_Operator,
5014      Iir_Kind_Modulus_Operator,
5015      Iir_Kind_Remainder_Operator,
5016      Iir_Kind_Exponentiation_Operator,
5017      Iir_Kind_Function_Call,
5018      Iir_Kind_Aggregate,
5019      Iir_Kind_Parenthesis_Expression,
5020      Iir_Kind_Qualified_Expression,
5021      Iir_Kind_Type_Conversion,
5022      Iir_Kind_Allocator_By_Expression,
5023      Iir_Kind_Allocator_By_Subtype,
5024      Iir_Kind_Selected_Element,
5025      Iir_Kind_Dereference,
5026      Iir_Kind_Implicit_Dereference,
5027      Iir_Kind_Slice_Name,
5028      Iir_Kind_Indexed_Name,
5029      Iir_Kind_Psl_Prev,
5030      Iir_Kind_Psl_Stable,
5031      Iir_Kind_Psl_Rose,
5032      Iir_Kind_Psl_Fell,
5033      Iir_Kind_Psl_Expression,
5034
5035   -- Concurrent statements.
5036      Iir_Kind_Sensitized_Process_Statement,
5037      Iir_Kind_Process_Statement,
5038      Iir_Kind_Concurrent_Simple_Signal_Assignment,
5039      Iir_Kind_Concurrent_Conditional_Signal_Assignment,
5040      Iir_Kind_Concurrent_Selected_Signal_Assignment,
5041      Iir_Kind_Concurrent_Assertion_Statement,
5042      Iir_Kind_Concurrent_Procedure_Call_Statement,
5043      Iir_Kind_Concurrent_Break_Statement,
5044      Iir_Kind_Psl_Assert_Directive,
5045      Iir_Kind_Psl_Assume_Directive,
5046      Iir_Kind_Psl_Cover_Directive,
5047      Iir_Kind_Psl_Restrict_Directive,
5048      Iir_Kind_Block_Statement,
5049      Iir_Kind_If_Generate_Statement,
5050      Iir_Kind_Case_Generate_Statement,
5051      Iir_Kind_For_Generate_Statement,
5052      Iir_Kind_Component_Instantiation_Statement,
5053
5054      Iir_Kind_Psl_Default_Clock,
5055
5056      Iir_Kind_Generate_Statement_Body,
5057      Iir_Kind_If_Generate_Else_Clause,
5058
5059   -- Simultaneous statements.
5060      Iir_Kind_Simple_Simultaneous_Statement,
5061      Iir_Kind_Simultaneous_Null_Statement,
5062      Iir_Kind_Simultaneous_Procedural_Statement,
5063      Iir_Kind_Simultaneous_Case_Statement,
5064      Iir_Kind_Simultaneous_If_Statement,
5065      Iir_Kind_Simultaneous_Elsif,
5066
5067   -- Sequential statement
5068      Iir_Kind_Simple_Signal_Assignment_Statement,
5069      Iir_Kind_Conditional_Signal_Assignment_Statement,
5070      Iir_Kind_Selected_Waveform_Assignment_Statement,
5071      Iir_Kind_Signal_Force_Assignment_Statement,
5072      Iir_Kind_Signal_Release_Assignment_Statement,
5073      Iir_Kind_Null_Statement,
5074      Iir_Kind_Assertion_Statement,
5075      Iir_Kind_Report_Statement,
5076      Iir_Kind_Wait_Statement,
5077      Iir_Kind_Variable_Assignment_Statement,
5078      Iir_Kind_Conditional_Variable_Assignment_Statement,
5079      Iir_Kind_Return_Statement,
5080      Iir_Kind_For_Loop_Statement,
5081      Iir_Kind_While_Loop_Statement,
5082      Iir_Kind_Next_Statement,
5083      Iir_Kind_Exit_Statement,
5084      Iir_Kind_Case_Statement,
5085      Iir_Kind_Procedure_Call_Statement,
5086      Iir_Kind_Break_Statement,
5087      Iir_Kind_If_Statement,
5088      Iir_Kind_Elsif,
5089
5090   -- Names
5091      Iir_Kind_Character_Literal,              --  denoting_name
5092      Iir_Kind_Simple_Name,                    --  denoting_name
5093      Iir_Kind_Selected_Name,                  --  denoting_name
5094      Iir_Kind_Operator_Symbol,                --  denoting_name
5095      Iir_Kind_Reference_Name,                 --  denoting_name
5096
5097      Iir_Kind_External_Constant_Name,
5098      Iir_Kind_External_Signal_Name,
5099      Iir_Kind_External_Variable_Name,
5100
5101      Iir_Kind_Selected_By_All_Name,
5102      Iir_Kind_Parenthesis_Name,
5103
5104      Iir_Kind_Package_Pathname,
5105      Iir_Kind_Absolute_Pathname,
5106      Iir_Kind_Relative_Pathname,
5107      Iir_Kind_Pathname_Element,
5108
5109   -- Attributes
5110      Iir_Kind_Base_Attribute,
5111      Iir_Kind_Subtype_Attribute,
5112      Iir_Kind_Element_Attribute,
5113      Iir_Kind_Across_Attribute,
5114      Iir_Kind_Through_Attribute,
5115      Iir_Kind_Nature_Reference_Attribute,
5116      Iir_Kind_Left_Type_Attribute,            --  type_attribute
5117      Iir_Kind_Right_Type_Attribute,           --  type_attribute
5118      Iir_Kind_High_Type_Attribute,            --  type_attribute
5119      Iir_Kind_Low_Type_Attribute,             --  type_attribute
5120      Iir_Kind_Ascending_Type_Attribute,       --  type_attribute
5121      Iir_Kind_Image_Attribute,
5122      Iir_Kind_Value_Attribute,
5123      Iir_Kind_Pos_Attribute,                  --  scalar_type_attribute
5124      Iir_Kind_Val_Attribute,                  --  scalar_type_attribute
5125      Iir_Kind_Succ_Attribute,                 --  scalar_type_attribute
5126      Iir_Kind_Pred_Attribute,                 --  scalar_type_attribute
5127      Iir_Kind_Leftof_Attribute,               --  scalar_type_attribute
5128      Iir_Kind_Rightof_Attribute,              --  scalar_type_attribute
5129      Iir_Kind_Signal_Slew_Attribute,
5130      Iir_Kind_Quantity_Slew_Attribute,
5131      Iir_Kind_Ramp_Attribute,
5132      Iir_Kind_Zoh_Attribute,
5133      Iir_Kind_Ltf_Attribute,
5134      Iir_Kind_Ztf_Attribute,
5135      Iir_Kind_Dot_Attribute,
5136      Iir_Kind_Integ_Attribute,
5137      Iir_Kind_Above_Attribute,
5138      Iir_Kind_Quantity_Delayed_Attribute,
5139      Iir_Kind_Delayed_Attribute,              --  signal_attribute
5140      Iir_Kind_Stable_Attribute,               --  signal_attribute
5141      Iir_Kind_Quiet_Attribute,                --  signal_attribute
5142      Iir_Kind_Transaction_Attribute,          --  signal_attribute
5143      Iir_Kind_Event_Attribute,                --  signal_value_attribute
5144      Iir_Kind_Active_Attribute,               --  signal_value_attribute
5145      Iir_Kind_Last_Event_Attribute,           --  signal_value_attribute
5146      Iir_Kind_Last_Active_Attribute,          --  signal_value_attribute
5147      Iir_Kind_Last_Value_Attribute,           --  signal_value_attribute
5148      Iir_Kind_Driving_Attribute,              --  signal_value_attribute
5149      Iir_Kind_Driving_Value_Attribute,        --  signal_value_attribute
5150      Iir_Kind_Behavior_Attribute,
5151      Iir_Kind_Structure_Attribute,
5152      Iir_Kind_Simple_Name_Attribute,
5153      Iir_Kind_Instance_Name_Attribute,
5154      Iir_Kind_Path_Name_Attribute,
5155      Iir_Kind_Left_Array_Attribute,           --  array_attribute
5156      Iir_Kind_Right_Array_Attribute,          --  array_attribute
5157      Iir_Kind_High_Array_Attribute,           --  array_attribute
5158      Iir_Kind_Low_Array_Attribute,            --  array_attribute
5159      Iir_Kind_Length_Array_Attribute,         --  array_attribute
5160      Iir_Kind_Ascending_Array_Attribute,      --  array_attribute
5161      Iir_Kind_Range_Array_Attribute,          --  array_attribute
5162      Iir_Kind_Reverse_Range_Array_Attribute,  --  array_attribute
5163
5164      Iir_Kind_Attribute_Name
5165     );
5166
5167   --  Return TRUE iif K is K1 or K is K2.
5168   function Kind_In (K : Iir_Kind; K1, K2 : Iir_Kind) return Boolean;
5169   pragma Inline (Kind_In);
5170
5171   type Iir_Signal_Kind is
5172     (
5173      Iir_Register_Kind,
5174      Iir_Bus_Kind
5175     );
5176
5177   --  If the order of elements in IIR_MODE is modified, also modify the
5178   --  order in GRT (types and rtis).
5179   type Iir_Mode is
5180     (
5181      Iir_Unknown_Mode,
5182      Iir_Linkage_Mode,
5183      Iir_Buffer_Mode,
5184      Iir_Out_Mode,
5185      Iir_Inout_Mode,
5186      Iir_In_Mode
5187     );
5188
5189   subtype Iir_In_Modes is Iir_Mode range Iir_Inout_Mode .. Iir_In_Mode;
5190   subtype Iir_Out_Modes is Iir_Mode range Iir_Out_Mode .. Iir_Inout_Mode;
5191   subtype Iir_Parameter_Modes is Iir_Mode range Iir_Out_Mode .. Iir_In_Mode;
5192
5193   type Iir_Delay_Mechanism is
5194     (
5195      Iir_Inertial_Delay,
5196      Iir_Transport_Delay
5197     );
5198
5199   type Iir_Force_Mode is
5200     (
5201      Iir_Force_In,
5202      Iir_Force_Out
5203     );
5204
5205   --  LRM93 2.7 (conformance rules).
5206   --  To keep this simple, the layout is stored as a bit-string.
5207   --  Fields are:
5208   --  Get_Has_type: set if the interface is the last of a list.
5209   --  Get_Has_Mode: set if mode is explicit
5210   --  has_class: set if class (constant, signal, variable or file) is explicit
5211   --
5212   --  Example:
5213   --  procedure P (         A, B:       integer;
5214   --               constant C:    in    bit;
5215   --                        D:    inout bit;
5216   --               variable E:          bit;
5217   --                        F, G: in    bit;
5218   --               constant H, I:       bit;
5219   --               constant J, K: in    bit);
5220   --  A:
5221   --  B:                      has_type
5222   --  C, has_class, has_mode, has_type
5223   --  D:            has_mode, has_type
5224   --  E, has_class,           has_type
5225   --  F:            has_mode
5226   --  G:            has_mode, has_type
5227   --  H: has_class
5228   --  I: has_class,           has_type
5229   --  J: has_class, has_mode
5230   --  K: has_class, has_mode, has_type
5231
5232   --  List of predefined operators and functions.
5233   type Iir_Predefined_Functions is
5234     (
5235      Iir_Predefined_Error,
5236
5237      --  Predefined operators for BOOLEAN type
5238
5239      --  LRM08 9.2.2 Logical Operators
5240      Iir_Predefined_Boolean_And,
5241      Iir_Predefined_Boolean_Or,
5242      Iir_Predefined_Boolean_Nand,
5243      Iir_Predefined_Boolean_Nor,
5244      Iir_Predefined_Boolean_Xor,
5245      Iir_Predefined_Boolean_Xnor,
5246      Iir_Predefined_Boolean_Not,
5247
5248      --  LRM08 5.2.6 Predefined operations on scalar types.
5249      Iir_Predefined_Boolean_Rising_Edge,
5250      Iir_Predefined_Boolean_Falling_Edge,
5251
5252      --  Predefined operators for any enumeration type.
5253
5254      --  LRM08 9.2.3 Relational Operators
5255      Iir_Predefined_Enum_Equality,
5256      Iir_Predefined_Enum_Inequality,
5257      Iir_Predefined_Enum_Less,
5258      Iir_Predefined_Enum_Less_Equal,
5259      Iir_Predefined_Enum_Greater,
5260      Iir_Predefined_Enum_Greater_Equal,
5261
5262      --  LRM08 5.2.6 Predefined operations on scalar types.
5263      Iir_Predefined_Enum_Minimum,
5264      Iir_Predefined_Enum_Maximum,
5265      Iir_Predefined_Enum_To_String,
5266
5267      --  Predefined operators for BIT type.
5268
5269      --  LRM08 9.2.2 Logical Operators
5270      Iir_Predefined_Bit_And,
5271      Iir_Predefined_Bit_Or,
5272      Iir_Predefined_Bit_Nand,
5273      Iir_Predefined_Bit_Nor,
5274      Iir_Predefined_Bit_Xor,
5275      Iir_Predefined_Bit_Xnor,
5276      Iir_Predefined_Bit_Not,
5277
5278      --  LRM08 9.2.3 Relational Operators
5279      Iir_Predefined_Bit_Match_Equality,
5280      Iir_Predefined_Bit_Match_Inequality,
5281      Iir_Predefined_Bit_Match_Less,
5282      Iir_Predefined_Bit_Match_Less_Equal,
5283      Iir_Predefined_Bit_Match_Greater,
5284      Iir_Predefined_Bit_Match_Greater_Equal,
5285
5286      --  LRM08 9.2.9 Condition operator
5287      Iir_Predefined_Bit_Condition,
5288
5289      --  LRM08 5.2.6 Predefined operations on scalar types.
5290      Iir_Predefined_Bit_Rising_Edge,
5291      Iir_Predefined_Bit_Falling_Edge,
5292
5293      --  Predefined operators for any integer type.
5294
5295      --  LRM08 9.2.3 Relational Operators
5296      Iir_Predefined_Integer_Equality,
5297      Iir_Predefined_Integer_Inequality,
5298      Iir_Predefined_Integer_Less,
5299      Iir_Predefined_Integer_Less_Equal,
5300      Iir_Predefined_Integer_Greater,
5301      Iir_Predefined_Integer_Greater_Equal,
5302
5303      --  LRM08 9.2.6 Sign operators
5304      Iir_Predefined_Integer_Identity,
5305      Iir_Predefined_Integer_Negation,
5306
5307      --  LRM08 9.2.8 Miscellaneous operators
5308      Iir_Predefined_Integer_Absolute,
5309
5310      --  LRM08 9.2.5 Adding operators
5311      Iir_Predefined_Integer_Plus,
5312      Iir_Predefined_Integer_Minus,
5313
5314      --  LRM08 9.2.7 Multiplying operators
5315      Iir_Predefined_Integer_Mul,
5316      Iir_Predefined_Integer_Div,
5317      Iir_Predefined_Integer_Mod,
5318      Iir_Predefined_Integer_Rem,
5319
5320      --  LRM08 9.2.8 Miscellaneous operators
5321      Iir_Predefined_Integer_Exp,
5322
5323      --  LRM08 5.2.6 Predefined operations on scalar types.
5324      Iir_Predefined_Integer_Minimum,
5325      Iir_Predefined_Integer_Maximum,
5326      Iir_Predefined_Integer_To_String,
5327
5328      --  Predefined operators for any floating type.
5329
5330      --  LRM08 9.2.3 Relational Operators
5331      Iir_Predefined_Floating_Equality,
5332      Iir_Predefined_Floating_Inequality,
5333      Iir_Predefined_Floating_Less,
5334      Iir_Predefined_Floating_Less_Equal,
5335      Iir_Predefined_Floating_Greater,
5336      Iir_Predefined_Floating_Greater_Equal,
5337
5338      --  LRM08 9.2.6 Sign operators
5339      Iir_Predefined_Floating_Identity,
5340      Iir_Predefined_Floating_Negation,
5341
5342      --  LRM08 9.2.8 Miscellaneous operators
5343      Iir_Predefined_Floating_Absolute,
5344
5345      --  LRM08 9.2.5 Adding operators
5346      Iir_Predefined_Floating_Plus,
5347      Iir_Predefined_Floating_Minus,
5348
5349      --  LRM08 9.2.7 Multiplying operators
5350      Iir_Predefined_Floating_Mul,
5351      Iir_Predefined_Floating_Div,
5352
5353      --  LRM08 9.2.8 Miscellaneous operators
5354      Iir_Predefined_Floating_Exp,
5355
5356      --  LRM08 5.2.6 Predefined operations on scalar types.
5357      Iir_Predefined_Floating_Minimum,
5358      Iir_Predefined_Floating_Maximum,
5359      Iir_Predefined_Floating_To_String,
5360      Iir_Predefined_Real_To_String_Digits,
5361      Iir_Predefined_Real_To_String_Format,
5362
5363      --  Predefined operator for universal types.
5364
5365      --  LRM08 9.2.7 Multiplying operators
5366      Iir_Predefined_Universal_R_I_Mul,
5367      Iir_Predefined_Universal_I_R_Mul,
5368      Iir_Predefined_Universal_R_I_Div,
5369
5370      --  Predefined operators for physical types.
5371
5372      --  LRM08 9.2.3 Relational Operators
5373      Iir_Predefined_Physical_Equality,
5374      Iir_Predefined_Physical_Inequality,
5375      Iir_Predefined_Physical_Less,
5376      Iir_Predefined_Physical_Less_Equal,
5377      Iir_Predefined_Physical_Greater,
5378      Iir_Predefined_Physical_Greater_Equal,
5379
5380      --  LRM08 9.2.6 Sign operators
5381      Iir_Predefined_Physical_Identity,
5382      Iir_Predefined_Physical_Negation,
5383
5384      --  LRM08 9.2.8 Miscellaneous operators
5385      Iir_Predefined_Physical_Absolute,
5386
5387      --  LRM08 9.2.5 Adding operators
5388      Iir_Predefined_Physical_Plus,
5389      Iir_Predefined_Physical_Minus,
5390
5391      --  LRM08 9.2.7 Multiplying operators
5392      Iir_Predefined_Physical_Integer_Mul,
5393      Iir_Predefined_Physical_Real_Mul,
5394      Iir_Predefined_Integer_Physical_Mul,
5395      Iir_Predefined_Real_Physical_Mul,
5396      Iir_Predefined_Physical_Integer_Div,
5397      Iir_Predefined_Physical_Real_Div,
5398      Iir_Predefined_Physical_Physical_Div,
5399
5400      --  LRM08 5.2.6 Predefined operations on scalar types.
5401      Iir_Predefined_Physical_Minimum,
5402      Iir_Predefined_Physical_Maximum,
5403      Iir_Predefined_Physical_To_String,
5404      Iir_Predefined_Time_To_String_Unit,
5405
5406      --  Predefined operators for access.
5407
5408      --  LRM08 9.2.3 Relational Operators
5409      Iir_Predefined_Access_Equality,
5410      Iir_Predefined_Access_Inequality,
5411
5412      --  Predefined operators for record.
5413
5414      --  LRM08 9.2.3 Relational Operators
5415      Iir_Predefined_Record_Equality,
5416      Iir_Predefined_Record_Inequality,
5417
5418      --  Predefined operators for array.
5419
5420      --  LRM08 9.2.3 Relational Operators
5421      Iir_Predefined_Array_Equality,
5422      Iir_Predefined_Array_Inequality,
5423      Iir_Predefined_Array_Less,
5424      Iir_Predefined_Array_Less_Equal,
5425      Iir_Predefined_Array_Greater,
5426      Iir_Predefined_Array_Greater_Equal,
5427
5428      --  LRM08 9.2.5 Adding operators
5429      Iir_Predefined_Array_Array_Concat,
5430      Iir_Predefined_Array_Element_Concat,
5431      Iir_Predefined_Element_Array_Concat,
5432      Iir_Predefined_Element_Element_Concat,
5433
5434      --  LRM08 5.3.2.4 Predefined operations on array types
5435      Iir_Predefined_Array_Minimum,
5436      Iir_Predefined_Array_Maximum,
5437      Iir_Predefined_Vector_Minimum,
5438      Iir_Predefined_Vector_Maximum,
5439
5440      --  LRM08 9.2.4 Shift operators
5441      Iir_Predefined_Array_Sll,
5442      Iir_Predefined_Array_Srl,
5443      Iir_Predefined_Array_Sla,
5444      Iir_Predefined_Array_Sra,
5445      Iir_Predefined_Array_Rol,
5446      Iir_Predefined_Array_Ror,
5447
5448      --  LRM08 9.2.2 Logical operators
5449      --  Predefined operators for one dimensional array.
5450      --  For bit and boolean type, the operations are the same.  To be
5451      --  neutral, we use TF (for True/False) instead of Bit, Boolean or
5452      --  Logic.
5453      Iir_Predefined_TF_Array_And,
5454      Iir_Predefined_TF_Array_Or,
5455      Iir_Predefined_TF_Array_Nand,
5456      Iir_Predefined_TF_Array_Nor,
5457      Iir_Predefined_TF_Array_Xor,
5458      Iir_Predefined_TF_Array_Xnor,
5459      Iir_Predefined_TF_Array_Not,
5460
5461      --  LRM08 9.2.2 Logical operators
5462      Iir_Predefined_TF_Reduction_And,
5463      Iir_Predefined_TF_Reduction_Or,
5464      Iir_Predefined_TF_Reduction_Nand,
5465      Iir_Predefined_TF_Reduction_Nor,
5466      Iir_Predefined_TF_Reduction_Xor,
5467      Iir_Predefined_TF_Reduction_Xnor,
5468      Iir_Predefined_TF_Reduction_Not,
5469
5470      --  LRM08 9.2.2 Logical operators
5471      Iir_Predefined_TF_Array_Element_And,
5472      Iir_Predefined_TF_Element_Array_And,
5473      Iir_Predefined_TF_Array_Element_Or,
5474      Iir_Predefined_TF_Element_Array_Or,
5475      Iir_Predefined_TF_Array_Element_Nand,
5476      Iir_Predefined_TF_Element_Array_Nand,
5477      Iir_Predefined_TF_Array_Element_Nor,
5478      Iir_Predefined_TF_Element_Array_Nor,
5479      Iir_Predefined_TF_Array_Element_Xor,
5480      Iir_Predefined_TF_Element_Array_Xor,
5481      Iir_Predefined_TF_Array_Element_Xnor,
5482      Iir_Predefined_TF_Element_Array_Xnor,
5483
5484      --  LRM08 9.2.3 Relational Operators
5485      Iir_Predefined_Bit_Array_Match_Equality,
5486      Iir_Predefined_Bit_Array_Match_Inequality,
5487
5488      --  LRM08 5.3.2.4 Predefined operations on array types
5489      Iir_Predefined_Array_Char_To_String,
5490      Iir_Predefined_Bit_Vector_To_Ostring,
5491      Iir_Predefined_Bit_Vector_To_Hstring,
5492
5493      --  LRM08 9.2.3 Relational Operators
5494      --  IEEE.Std_Logic_1164.Std_Ulogic
5495      Iir_Predefined_Std_Ulogic_Match_Equality,
5496      Iir_Predefined_Std_Ulogic_Match_Inequality,
5497      Iir_Predefined_Std_Ulogic_Match_Less,
5498      Iir_Predefined_Std_Ulogic_Match_Less_Equal,
5499      Iir_Predefined_Std_Ulogic_Match_Greater,
5500      Iir_Predefined_Std_Ulogic_Match_Greater_Equal,
5501
5502      --  LRM08 9.2.3 Relational Operators
5503      Iir_Predefined_Std_Ulogic_Array_Match_Equality,
5504      Iir_Predefined_Std_Ulogic_Array_Match_Inequality,
5505
5506      --  --  Predefined attribute functions.
5507      --  Iir_Predefined_Attribute_Image,
5508      --  Iir_Predefined_Attribute_Value,
5509      --  Iir_Predefined_Attribute_Pos,
5510      --  Iir_Predefined_Attribute_Val,
5511      --  Iir_Predefined_Attribute_Succ,
5512      --  Iir_Predefined_Attribute_Pred,
5513      --  Iir_Predefined_Attribute_Leftof,
5514      --  Iir_Predefined_Attribute_Rightof,
5515      --  Iir_Predefined_Attribute_Left,
5516      --  Iir_Predefined_Attribute_Right,
5517      --  Iir_Predefined_Attribute_Event,
5518      --  Iir_Predefined_Attribute_Active,
5519      --  Iir_Predefined_Attribute_Last_Event,
5520      --  Iir_Predefined_Attribute_Last_Active,
5521      --  Iir_Predefined_Attribute_Last_Value,
5522      --  Iir_Predefined_Attribute_Driving,
5523      --  Iir_Predefined_Attribute_Driving_Value,
5524
5525      --  Impure subprograms.
5526
5527      --  LRM08 5.4.3 Allocation and deallocation of objects
5528      Iir_Predefined_Deallocate,
5529
5530      --  LRM08 5.5.2 File operations
5531      Iir_Predefined_File_Open,
5532      Iir_Predefined_File_Open_Status,
5533      Iir_Predefined_File_Close,
5534      Iir_Predefined_Read,
5535      Iir_Predefined_Read_Length,
5536      Iir_Predefined_Flush,
5537      Iir_Predefined_Write,
5538      Iir_Predefined_Endfile,
5539
5540      --  Misc impure functions.
5541      Iir_Predefined_Now_Function,
5542      Iir_Predefined_Real_Now_Function,
5543      Iir_Predefined_Frequency_Function,
5544
5545      --  A not predefined and not known function.  User function.
5546      Iir_Predefined_None,
5547
5548      --  Intrinsic foreign subprograms.
5549      Iir_Predefined_Foreign_Untruncated_Text_Read,
5550      Iir_Predefined_Foreign_Textio_Read_Real,
5551      Iir_Predefined_Foreign_Textio_Write_Real,
5552
5553      --  Defined in package ieee.std_logic_1164
5554
5555      --  Std_Ulogic operations.
5556      Iir_Predefined_Ieee_1164_Scalar_And,
5557      Iir_Predefined_Ieee_1164_Scalar_Nand,
5558      Iir_Predefined_Ieee_1164_Scalar_Or,
5559      Iir_Predefined_Ieee_1164_Scalar_Nor,
5560      Iir_Predefined_Ieee_1164_Scalar_Xor,
5561      Iir_Predefined_Ieee_1164_Scalar_Xnor,
5562      Iir_Predefined_Ieee_1164_Scalar_Not,
5563
5564      --  Std_Logic_Vector or Std_Ulogic_Vector operations.
5565      --  Length of the result is the length of the left operand.
5566      Iir_Predefined_Ieee_1164_Vector_And,
5567      Iir_Predefined_Ieee_1164_Vector_Nand,
5568      Iir_Predefined_Ieee_1164_Vector_Or,
5569      Iir_Predefined_Ieee_1164_Vector_Nor,
5570      Iir_Predefined_Ieee_1164_Vector_Xor,
5571      Iir_Predefined_Ieee_1164_Vector_Xnor,
5572      Iir_Predefined_Ieee_1164_Vector_Not,
5573
5574      Iir_Predefined_Ieee_1164_To_Bit,
5575      Iir_Predefined_Ieee_1164_To_Bitvector,
5576      Iir_Predefined_Ieee_1164_To_Stdulogic,
5577      Iir_Predefined_Ieee_1164_To_Stdlogicvector_Bv,
5578      Iir_Predefined_Ieee_1164_To_Stdlogicvector_Suv,
5579      Iir_Predefined_Ieee_1164_To_Stdulogicvector_Bv,
5580      Iir_Predefined_Ieee_1164_To_Stdulogicvector_Slv,
5581
5582      Iir_Predefined_Ieee_1164_To_X01_Slv,
5583      Iir_Predefined_Ieee_1164_To_X01_Suv,
5584      Iir_Predefined_Ieee_1164_To_X01_Log,
5585      Iir_Predefined_Ieee_1164_To_X01_Bv_Slv,
5586      Iir_Predefined_Ieee_1164_To_X01_Bv_Suv,
5587      Iir_Predefined_Ieee_1164_To_X01_Bit_Log,
5588
5589      Iir_Predefined_Ieee_1164_To_X01Z_Slv,
5590      Iir_Predefined_Ieee_1164_To_X01Z_Suv,
5591      Iir_Predefined_Ieee_1164_To_X01Z_Log,
5592      Iir_Predefined_Ieee_1164_To_X01Z_Bv_Slv,
5593      Iir_Predefined_Ieee_1164_To_X01Z_Bv_Suv,
5594      Iir_Predefined_Ieee_1164_To_X01Z_Bit_Log,
5595
5596      Iir_Predefined_Ieee_1164_To_UX01_Slv,
5597      Iir_Predefined_Ieee_1164_To_UX01_Suv,
5598      Iir_Predefined_Ieee_1164_To_UX01_Log,
5599      Iir_Predefined_Ieee_1164_To_UX01_Bv_Slv,
5600      Iir_Predefined_Ieee_1164_To_UX01_Bv_Suv,
5601      Iir_Predefined_Ieee_1164_To_UX01_Bit_Log,
5602
5603      Iir_Predefined_Ieee_1164_Vector_Is_X,
5604      Iir_Predefined_Ieee_1164_Scalar_Is_X,
5605
5606      Iir_Predefined_Ieee_1164_Rising_Edge,
5607      Iir_Predefined_Ieee_1164_Falling_Edge,
5608
5609      -- VHDL-2008 vector/element logic operators
5610      Iir_Predefined_Ieee_1164_And_Suv_Log,
5611      Iir_Predefined_Ieee_1164_And_Log_Suv,
5612      Iir_Predefined_Ieee_1164_Nand_Suv_Log,
5613      Iir_Predefined_Ieee_1164_Nand_Log_Suv,
5614      Iir_Predefined_Ieee_1164_Or_Suv_Log,
5615      Iir_Predefined_Ieee_1164_Or_Log_Suv,
5616      Iir_Predefined_Ieee_1164_Nor_Suv_Log,
5617      Iir_Predefined_Ieee_1164_Nor_Log_Suv,
5618      Iir_Predefined_Ieee_1164_Xor_Suv_Log,
5619      Iir_Predefined_Ieee_1164_Xor_Log_Suv,
5620      Iir_Predefined_Ieee_1164_Xnor_Suv_Log,
5621      Iir_Predefined_Ieee_1164_Xnor_Log_Suv,
5622
5623      -- VHDL-2008 unary logic operators
5624      Iir_Predefined_Ieee_1164_And_Suv,
5625      Iir_Predefined_Ieee_1164_Nand_Suv,
5626      Iir_Predefined_Ieee_1164_Or_Suv,
5627      Iir_Predefined_Ieee_1164_Nor_Suv,
5628      Iir_Predefined_Ieee_1164_Xor_Suv,
5629      Iir_Predefined_Ieee_1164_Xnor_Suv,
5630
5631      Iir_Predefined_Ieee_1164_Vector_Sll,
5632      Iir_Predefined_Ieee_1164_Vector_Srl,
5633      Iir_Predefined_Ieee_1164_Vector_Rol,
5634      Iir_Predefined_Ieee_1164_Vector_Ror,
5635
5636      Iir_Predefined_Ieee_1164_Condition_Operator,
5637
5638      --  Numeric_Std.
5639      --  Abbreviations:
5640      --  Uns: Unsigned, Sgn: Signed, Nat: Natural, Int: Integer.
5641
5642      --  To_Integer, To_Unsigned, to_Signed
5643      Iir_Predefined_Ieee_Numeric_Std_Toint_Uns_Nat,
5644      Iir_Predefined_Ieee_Numeric_Std_Toint_Sgn_Int,
5645      Iir_Predefined_Ieee_Numeric_Std_Touns_Nat_Nat_Uns,
5646      Iir_Predefined_Ieee_Numeric_Std_Touns_Nat_Uns_Uns,
5647      Iir_Predefined_Ieee_Numeric_Std_Tosgn_Int_Nat_Sgn,
5648      Iir_Predefined_Ieee_Numeric_Std_Tosgn_Int_Sgn_Sgn,
5649
5650      Iir_Predefined_Ieee_Numeric_Std_Resize_Uns_Nat,
5651      Iir_Predefined_Ieee_Numeric_Std_Resize_Sgn_Nat,
5652      Iir_Predefined_Ieee_Numeric_Std_Resize_Uns_Uns,
5653      Iir_Predefined_Ieee_Numeric_Std_Resize_Sgn_Sgn,
5654
5655      --  Numeric_Std operators (Start)
5656      Iir_Predefined_Ieee_Numeric_Std_Add_Uns_Uns,
5657      Iir_Predefined_Ieee_Numeric_Std_Add_Uns_Nat,
5658      Iir_Predefined_Ieee_Numeric_Std_Add_Nat_Uns,
5659      Iir_Predefined_Ieee_Numeric_Std_Add_Uns_Log,
5660      Iir_Predefined_Ieee_Numeric_Std_Add_Log_Uns,
5661      Iir_Predefined_Ieee_Numeric_Std_Add_Sgn_Sgn,
5662      Iir_Predefined_Ieee_Numeric_Std_Add_Sgn_Int,
5663      Iir_Predefined_Ieee_Numeric_Std_Add_Int_Sgn,
5664      Iir_Predefined_Ieee_Numeric_Std_Add_Sgn_Log,
5665      Iir_Predefined_Ieee_Numeric_Std_Add_Log_Sgn,
5666
5667      Iir_Predefined_Ieee_Numeric_Std_Sub_Uns_Uns,
5668      Iir_Predefined_Ieee_Numeric_Std_Sub_Uns_Nat,
5669      Iir_Predefined_Ieee_Numeric_Std_Sub_Nat_Uns,
5670      Iir_Predefined_Ieee_Numeric_Std_Sub_Uns_Log,
5671      Iir_Predefined_Ieee_Numeric_Std_Sub_Log_Uns,
5672      Iir_Predefined_Ieee_Numeric_Std_Sub_Sgn_Sgn,
5673      Iir_Predefined_Ieee_Numeric_Std_Sub_Sgn_Int,
5674      Iir_Predefined_Ieee_Numeric_Std_Sub_Int_Sgn,
5675      Iir_Predefined_Ieee_Numeric_Std_Sub_Sgn_Log,
5676      Iir_Predefined_Ieee_Numeric_Std_Sub_Log_Sgn,
5677
5678      Iir_Predefined_Ieee_Numeric_Std_Mul_Uns_Uns,
5679      Iir_Predefined_Ieee_Numeric_Std_Mul_Uns_Nat,
5680      Iir_Predefined_Ieee_Numeric_Std_Mul_Nat_Uns,
5681      Iir_Predefined_Ieee_Numeric_Std_Mul_Sgn_Sgn,
5682      Iir_Predefined_Ieee_Numeric_Std_Mul_Sgn_Int,
5683      Iir_Predefined_Ieee_Numeric_Std_Mul_Int_Sgn,
5684
5685      Iir_Predefined_Ieee_Numeric_Std_Div_Uns_Uns,
5686      Iir_Predefined_Ieee_Numeric_Std_Div_Uns_Nat,
5687      Iir_Predefined_Ieee_Numeric_Std_Div_Nat_Uns,
5688      Iir_Predefined_Ieee_Numeric_Std_Div_Sgn_Sgn,
5689      Iir_Predefined_Ieee_Numeric_Std_Div_Sgn_Int,
5690      Iir_Predefined_Ieee_Numeric_Std_Div_Int_Sgn,
5691
5692      Iir_Predefined_Ieee_Numeric_Std_Rem_Uns_Uns,
5693      Iir_Predefined_Ieee_Numeric_Std_Rem_Uns_Nat,
5694      Iir_Predefined_Ieee_Numeric_Std_Rem_Nat_Uns,
5695      Iir_Predefined_Ieee_Numeric_Std_Rem_Sgn_Sgn,
5696      Iir_Predefined_Ieee_Numeric_Std_Rem_Sgn_Int,
5697      Iir_Predefined_Ieee_Numeric_Std_Rem_Int_Sgn,
5698
5699      Iir_Predefined_Ieee_Numeric_Std_Mod_Uns_Uns,
5700      Iir_Predefined_Ieee_Numeric_Std_Mod_Uns_Nat,
5701      Iir_Predefined_Ieee_Numeric_Std_Mod_Nat_Uns,
5702      Iir_Predefined_Ieee_Numeric_Std_Mod_Sgn_Sgn,
5703      Iir_Predefined_Ieee_Numeric_Std_Mod_Sgn_Int,
5704      Iir_Predefined_Ieee_Numeric_Std_Mod_Int_Sgn,
5705
5706      Iir_Predefined_Ieee_Numeric_Std_Gt_Uns_Uns,
5707      Iir_Predefined_Ieee_Numeric_Std_Gt_Uns_Nat,
5708      Iir_Predefined_Ieee_Numeric_Std_Gt_Nat_Uns,
5709      Iir_Predefined_Ieee_Numeric_Std_Gt_Sgn_Sgn,
5710      Iir_Predefined_Ieee_Numeric_Std_Gt_Sgn_Int,
5711      Iir_Predefined_Ieee_Numeric_Std_Gt_Int_Sgn,
5712
5713      Iir_Predefined_Ieee_Numeric_Std_Lt_Uns_Uns,
5714      Iir_Predefined_Ieee_Numeric_Std_Lt_Uns_Nat,
5715      Iir_Predefined_Ieee_Numeric_Std_Lt_Nat_Uns,
5716      Iir_Predefined_Ieee_Numeric_Std_Lt_Sgn_Sgn,
5717      Iir_Predefined_Ieee_Numeric_Std_Lt_Sgn_Int,
5718      Iir_Predefined_Ieee_Numeric_Std_Lt_Int_Sgn,
5719
5720      Iir_Predefined_Ieee_Numeric_Std_Le_Uns_Uns,
5721      Iir_Predefined_Ieee_Numeric_Std_Le_Uns_Nat,
5722      Iir_Predefined_Ieee_Numeric_Std_Le_Nat_Uns,
5723      Iir_Predefined_Ieee_Numeric_Std_Le_Sgn_Sgn,
5724      Iir_Predefined_Ieee_Numeric_Std_Le_Sgn_Int,
5725      Iir_Predefined_Ieee_Numeric_Std_Le_Int_Sgn,
5726
5727      Iir_Predefined_Ieee_Numeric_Std_Ge_Uns_Uns,
5728      Iir_Predefined_Ieee_Numeric_Std_Ge_Uns_Nat,
5729      Iir_Predefined_Ieee_Numeric_Std_Ge_Nat_Uns,
5730      Iir_Predefined_Ieee_Numeric_Std_Ge_Sgn_Sgn,
5731      Iir_Predefined_Ieee_Numeric_Std_Ge_Sgn_Int,
5732      Iir_Predefined_Ieee_Numeric_Std_Ge_Int_Sgn,
5733
5734      Iir_Predefined_Ieee_Numeric_Std_Eq_Uns_Uns,
5735      Iir_Predefined_Ieee_Numeric_Std_Eq_Uns_Nat,
5736      Iir_Predefined_Ieee_Numeric_Std_Eq_Nat_Uns,
5737      Iir_Predefined_Ieee_Numeric_Std_Eq_Sgn_Sgn,
5738      Iir_Predefined_Ieee_Numeric_Std_Eq_Sgn_Int,
5739      Iir_Predefined_Ieee_Numeric_Std_Eq_Int_Sgn,
5740
5741      Iir_Predefined_Ieee_Numeric_Std_Ne_Uns_Uns,
5742      Iir_Predefined_Ieee_Numeric_Std_Ne_Uns_Nat,
5743      Iir_Predefined_Ieee_Numeric_Std_Ne_Nat_Uns,
5744      Iir_Predefined_Ieee_Numeric_Std_Ne_Sgn_Sgn,
5745      Iir_Predefined_Ieee_Numeric_Std_Ne_Sgn_Int,
5746      Iir_Predefined_Ieee_Numeric_Std_Ne_Int_Sgn,
5747
5748      Iir_Predefined_Ieee_Numeric_Std_Match_Gt_Uns_Uns,
5749      Iir_Predefined_Ieee_Numeric_Std_Match_Gt_Uns_Nat,
5750      Iir_Predefined_Ieee_Numeric_Std_Match_Gt_Nat_Uns,
5751      Iir_Predefined_Ieee_Numeric_Std_Match_Gt_Sgn_Sgn,
5752      Iir_Predefined_Ieee_Numeric_Std_Match_Gt_Sgn_Int,
5753      Iir_Predefined_Ieee_Numeric_Std_Match_Gt_Int_Sgn,
5754
5755      Iir_Predefined_Ieee_Numeric_Std_Match_Lt_Uns_Uns,
5756      Iir_Predefined_Ieee_Numeric_Std_Match_Lt_Uns_Nat,
5757      Iir_Predefined_Ieee_Numeric_Std_Match_Lt_Nat_Uns,
5758      Iir_Predefined_Ieee_Numeric_Std_Match_Lt_Sgn_Sgn,
5759      Iir_Predefined_Ieee_Numeric_Std_Match_Lt_Sgn_Int,
5760      Iir_Predefined_Ieee_Numeric_Std_Match_Lt_Int_Sgn,
5761
5762      Iir_Predefined_Ieee_Numeric_Std_Match_Le_Uns_Uns,
5763      Iir_Predefined_Ieee_Numeric_Std_Match_Le_Uns_Nat,
5764      Iir_Predefined_Ieee_Numeric_Std_Match_Le_Nat_Uns,
5765      Iir_Predefined_Ieee_Numeric_Std_Match_Le_Sgn_Sgn,
5766      Iir_Predefined_Ieee_Numeric_Std_Match_Le_Sgn_Int,
5767      Iir_Predefined_Ieee_Numeric_Std_Match_Le_Int_Sgn,
5768
5769      Iir_Predefined_Ieee_Numeric_Std_Match_Ge_Uns_Uns,
5770      Iir_Predefined_Ieee_Numeric_Std_Match_Ge_Uns_Nat,
5771      Iir_Predefined_Ieee_Numeric_Std_Match_Ge_Nat_Uns,
5772      Iir_Predefined_Ieee_Numeric_Std_Match_Ge_Sgn_Sgn,
5773      Iir_Predefined_Ieee_Numeric_Std_Match_Ge_Sgn_Int,
5774      Iir_Predefined_Ieee_Numeric_Std_Match_Ge_Int_Sgn,
5775
5776      Iir_Predefined_Ieee_Numeric_Std_Match_Eq_Uns_Uns,
5777      Iir_Predefined_Ieee_Numeric_Std_Match_Eq_Uns_Nat,
5778      Iir_Predefined_Ieee_Numeric_Std_Match_Eq_Nat_Uns,
5779      Iir_Predefined_Ieee_Numeric_Std_Match_Eq_Sgn_Sgn,
5780      Iir_Predefined_Ieee_Numeric_Std_Match_Eq_Sgn_Int,
5781      Iir_Predefined_Ieee_Numeric_Std_Match_Eq_Int_Sgn,
5782
5783      Iir_Predefined_Ieee_Numeric_Std_Match_Ne_Uns_Uns,
5784      Iir_Predefined_Ieee_Numeric_Std_Match_Ne_Uns_Nat,
5785      Iir_Predefined_Ieee_Numeric_Std_Match_Ne_Nat_Uns,
5786      Iir_Predefined_Ieee_Numeric_Std_Match_Ne_Sgn_Sgn,
5787      Iir_Predefined_Ieee_Numeric_Std_Match_Ne_Sgn_Int,
5788      Iir_Predefined_Ieee_Numeric_Std_Match_Ne_Int_Sgn,
5789
5790      Iir_Predefined_Ieee_Numeric_Std_Sll_Uns_Int,
5791      Iir_Predefined_Ieee_Numeric_Std_Sll_Sgn_Int,
5792      Iir_Predefined_Ieee_Numeric_Std_Srl_Uns_Int,
5793      Iir_Predefined_Ieee_Numeric_Std_Srl_Sgn_Int,
5794      Iir_Predefined_Ieee_Numeric_Std_Sla_Uns_Int,
5795      Iir_Predefined_Ieee_Numeric_Std_Sla_Sgn_Int,
5796      Iir_Predefined_Ieee_Numeric_Std_Sra_Uns_Int,
5797      Iir_Predefined_Ieee_Numeric_Std_Sra_Sgn_Int,
5798
5799      Iir_Predefined_Ieee_Numeric_Std_And_Uns_Uns,
5800      Iir_Predefined_Ieee_Numeric_Std_And_Sgn_Sgn,
5801
5802      Iir_Predefined_Ieee_Numeric_Std_Or_Uns_Uns,
5803      Iir_Predefined_Ieee_Numeric_Std_Or_Sgn_Sgn,
5804
5805      Iir_Predefined_Ieee_Numeric_Std_Nand_Uns_Uns,
5806      Iir_Predefined_Ieee_Numeric_Std_Nand_Sgn_Sgn,
5807
5808      Iir_Predefined_Ieee_Numeric_Std_Nor_Uns_Uns,
5809      Iir_Predefined_Ieee_Numeric_Std_Nor_Sgn_Sgn,
5810
5811      Iir_Predefined_Ieee_Numeric_Std_Xor_Uns_Uns,
5812      Iir_Predefined_Ieee_Numeric_Std_Xor_Sgn_Sgn,
5813
5814      Iir_Predefined_Ieee_Numeric_Std_Xnor_Uns_Uns,
5815      Iir_Predefined_Ieee_Numeric_Std_Xnor_Sgn_Sgn,
5816      --  Numeric_Std binary operators (end)
5817
5818      --  Unary functions for numeric_std
5819      Iir_Predefined_Ieee_Numeric_Std_Not_Uns,
5820      Iir_Predefined_Ieee_Numeric_Std_Not_Sgn,
5821
5822      Iir_Predefined_Ieee_Numeric_Std_Abs_Sgn,
5823
5824      Iir_Predefined_Ieee_Numeric_Std_Neg_Uns,
5825      Iir_Predefined_Ieee_Numeric_Std_Neg_Sgn,
5826
5827      --  Min and Max.
5828      Iir_Predefined_Ieee_Numeric_Std_Min_Uns_Uns,
5829      Iir_Predefined_Ieee_Numeric_Std_Min_Uns_Nat,
5830      Iir_Predefined_Ieee_Numeric_Std_Min_Nat_Uns,
5831      Iir_Predefined_Ieee_Numeric_Std_Min_Sgn_Sgn,
5832      Iir_Predefined_Ieee_Numeric_Std_Min_Sgn_Int,
5833      Iir_Predefined_Ieee_Numeric_Std_Min_Int_Sgn,
5834
5835      Iir_Predefined_Ieee_Numeric_Std_Max_Uns_Uns,
5836      Iir_Predefined_Ieee_Numeric_Std_Max_Uns_Nat,
5837      Iir_Predefined_Ieee_Numeric_Std_Max_Nat_Uns,
5838      Iir_Predefined_Ieee_Numeric_Std_Max_Sgn_Sgn,
5839      Iir_Predefined_Ieee_Numeric_Std_Max_Sgn_Int,
5840      Iir_Predefined_Ieee_Numeric_Std_Max_Int_Sgn,
5841
5842      --  Shift and rotate functions.
5843      Iir_Predefined_Ieee_Numeric_Std_Shf_Left_Uns_Nat,
5844      Iir_Predefined_Ieee_Numeric_Std_Shf_Right_Uns_Nat,
5845      Iir_Predefined_Ieee_Numeric_Std_Shf_Left_Sgn_Nat,
5846      Iir_Predefined_Ieee_Numeric_Std_Shf_Right_Sgn_Nat,
5847
5848      Iir_Predefined_Ieee_Numeric_Std_Rot_Left_Uns_Nat,
5849      Iir_Predefined_Ieee_Numeric_Std_Rot_Right_Uns_Nat,
5850      Iir_Predefined_Ieee_Numeric_Std_Rot_Left_Sgn_Nat,
5851      Iir_Predefined_Ieee_Numeric_Std_Rot_Right_Sgn_Nat,
5852
5853      --  Reduction
5854      Iir_Predefined_Ieee_Numeric_Std_And_Sgn,
5855      Iir_Predefined_Ieee_Numeric_Std_Nand_Sgn,
5856      Iir_Predefined_Ieee_Numeric_Std_Or_Sgn,
5857      Iir_Predefined_Ieee_Numeric_Std_Nor_Sgn,
5858      Iir_Predefined_Ieee_Numeric_Std_Xor_Sgn,
5859      Iir_Predefined_Ieee_Numeric_Std_Xnor_Sgn,
5860      Iir_Predefined_Ieee_Numeric_Std_And_Uns,
5861      Iir_Predefined_Ieee_Numeric_Std_Nand_Uns,
5862      Iir_Predefined_Ieee_Numeric_Std_Or_Uns,
5863      Iir_Predefined_Ieee_Numeric_Std_Nor_Uns,
5864      Iir_Predefined_Ieee_Numeric_Std_Xor_Uns,
5865      Iir_Predefined_Ieee_Numeric_Std_Xnor_Uns,
5866
5867      --  Find.
5868      Iir_Predefined_Ieee_Numeric_Std_Find_Leftmost_Uns,
5869      Iir_Predefined_Ieee_Numeric_Std_Find_Rightmost_Uns,
5870      Iir_Predefined_Ieee_Numeric_Std_Find_Leftmost_Sgn,
5871      Iir_Predefined_Ieee_Numeric_Std_Find_Rightmost_Sgn,
5872
5873      --  Std_Match functions.
5874      Iir_Predefined_Ieee_Numeric_Std_Match_Log,
5875      Iir_Predefined_Ieee_Numeric_Std_Match_Uns,
5876      Iir_Predefined_Ieee_Numeric_Std_Match_Sgn,
5877      Iir_Predefined_Ieee_Numeric_Std_Match_Slv,
5878      Iir_Predefined_Ieee_Numeric_Std_Match_Suv,
5879
5880      Iir_Predefined_Ieee_Numeric_Std_To_01_Uns,
5881      Iir_Predefined_Ieee_Numeric_Std_To_01_Sgn,
5882
5883      --  Numeric_Std_Unsigned (ieee2008)
5884      Iir_Predefined_Ieee_Numeric_Std_Unsigned_To_Integer_Slv_Nat,
5885
5886      --  Math_Real
5887      Iir_Predefined_Ieee_Math_Real_Ceil,
5888      Iir_Predefined_Ieee_Math_Real_Floor,
5889      Iir_Predefined_Ieee_Math_Real_Round,
5890      Iir_Predefined_Ieee_Math_Real_Log2,
5891      Iir_Predefined_Ieee_Math_Real_Sin,
5892      Iir_Predefined_Ieee_Math_Real_Cos,
5893
5894      --  Std_Logic_Unsigned (synopsys extension).
5895      Iir_Predefined_Ieee_Std_Logic_Unsigned_Add_Slv_Slv,
5896      Iir_Predefined_Ieee_Std_Logic_Unsigned_Add_Slv_Int,
5897      Iir_Predefined_Ieee_Std_Logic_Unsigned_Add_Int_Slv,
5898      Iir_Predefined_Ieee_Std_Logic_Unsigned_Add_Slv_Log,
5899      Iir_Predefined_Ieee_Std_Logic_Unsigned_Add_Log_Slv,
5900
5901      Iir_Predefined_Ieee_Std_Logic_Unsigned_Sub_Slv_Slv,
5902      Iir_Predefined_Ieee_Std_Logic_Unsigned_Sub_Slv_Int,
5903      Iir_Predefined_Ieee_Std_Logic_Unsigned_Sub_Int_Slv,
5904      Iir_Predefined_Ieee_Std_Logic_Unsigned_Sub_Slv_Log,
5905      Iir_Predefined_Ieee_Std_Logic_Unsigned_Sub_Log_Slv,
5906
5907      Iir_Predefined_Ieee_Std_Logic_Unsigned_Id_Slv,
5908
5909      Iir_Predefined_Ieee_Std_Logic_Unsigned_Mul_Slv_Slv,
5910
5911      Iir_Predefined_Ieee_Std_Logic_Unsigned_Lt_Slv_Slv,
5912      Iir_Predefined_Ieee_Std_Logic_Unsigned_Lt_Slv_Int,
5913      Iir_Predefined_Ieee_Std_Logic_Unsigned_Lt_Int_Slv,
5914
5915      Iir_Predefined_Ieee_Std_Logic_Unsigned_Le_Slv_Slv,
5916      Iir_Predefined_Ieee_Std_Logic_Unsigned_Le_Slv_Int,
5917      Iir_Predefined_Ieee_Std_Logic_Unsigned_Le_Int_Slv,
5918
5919      Iir_Predefined_Ieee_Std_Logic_Unsigned_Gt_Slv_Slv,
5920      Iir_Predefined_Ieee_Std_Logic_Unsigned_Gt_Slv_Int,
5921      Iir_Predefined_Ieee_Std_Logic_Unsigned_Gt_Int_Slv,
5922
5923      Iir_Predefined_Ieee_Std_Logic_Unsigned_Ge_Slv_Slv,
5924      Iir_Predefined_Ieee_Std_Logic_Unsigned_Ge_Slv_Int,
5925      Iir_Predefined_Ieee_Std_Logic_Unsigned_Ge_Int_Slv,
5926
5927      Iir_Predefined_Ieee_Std_Logic_Unsigned_Eq_Slv_Slv,
5928      Iir_Predefined_Ieee_Std_Logic_Unsigned_Eq_Slv_Int,
5929      Iir_Predefined_Ieee_Std_Logic_Unsigned_Eq_Int_Slv,
5930
5931      Iir_Predefined_Ieee_Std_Logic_Unsigned_Ne_Slv_Slv,
5932      Iir_Predefined_Ieee_Std_Logic_Unsigned_Ne_Slv_Int,
5933      Iir_Predefined_Ieee_Std_Logic_Unsigned_Ne_Int_Slv,
5934
5935      Iir_Predefined_Ieee_Std_Logic_Unsigned_Conv_Integer,
5936
5937      Iir_Predefined_Ieee_Std_Logic_Unsigned_Shl,
5938      Iir_Predefined_Ieee_Std_Logic_Unsigned_Shr,
5939
5940      --  Std_Logic_Signed (synopsys extension).
5941      Iir_Predefined_Ieee_Std_Logic_Signed_Add_Slv_Slv,
5942      Iir_Predefined_Ieee_Std_Logic_Signed_Add_Slv_Int,
5943      Iir_Predefined_Ieee_Std_Logic_Signed_Add_Int_Slv,
5944      Iir_Predefined_Ieee_Std_Logic_Signed_Add_Slv_Log,
5945      Iir_Predefined_Ieee_Std_Logic_Signed_Add_Log_Slv,
5946
5947      Iir_Predefined_Ieee_Std_Logic_Signed_Sub_Slv_Slv,
5948      Iir_Predefined_Ieee_Std_Logic_Signed_Sub_Slv_Int,
5949      Iir_Predefined_Ieee_Std_Logic_Signed_Sub_Int_Slv,
5950      Iir_Predefined_Ieee_Std_Logic_Signed_Sub_Slv_Log,
5951      Iir_Predefined_Ieee_Std_Logic_Signed_Sub_Log_Slv,
5952
5953      Iir_Predefined_Ieee_Std_Logic_Signed_Id_Slv,
5954      Iir_Predefined_Ieee_Std_Logic_Signed_Neg_Slv,
5955      Iir_Predefined_Ieee_Std_Logic_Signed_Abs_Slv,
5956
5957      Iir_Predefined_Ieee_Std_Logic_Signed_Mul_Slv_Slv,
5958
5959      Iir_Predefined_Ieee_Std_Logic_Signed_Lt_Slv_Slv,
5960      Iir_Predefined_Ieee_Std_Logic_Signed_Lt_Slv_Int,
5961      Iir_Predefined_Ieee_Std_Logic_Signed_Lt_Int_Slv,
5962
5963      Iir_Predefined_Ieee_Std_Logic_Signed_Le_Slv_Slv,
5964      Iir_Predefined_Ieee_Std_Logic_Signed_Le_Slv_Int,
5965      Iir_Predefined_Ieee_Std_Logic_Signed_Le_Int_Slv,
5966
5967      Iir_Predefined_Ieee_Std_Logic_Signed_Gt_Slv_Slv,
5968      Iir_Predefined_Ieee_Std_Logic_Signed_Gt_Slv_Int,
5969      Iir_Predefined_Ieee_Std_Logic_Signed_Gt_Int_Slv,
5970
5971      Iir_Predefined_Ieee_Std_Logic_Signed_Ge_Slv_Slv,
5972      Iir_Predefined_Ieee_Std_Logic_Signed_Ge_Slv_Int,
5973      Iir_Predefined_Ieee_Std_Logic_Signed_Ge_Int_Slv,
5974
5975      Iir_Predefined_Ieee_Std_Logic_Signed_Eq_Slv_Slv,
5976      Iir_Predefined_Ieee_Std_Logic_Signed_Eq_Slv_Int,
5977      Iir_Predefined_Ieee_Std_Logic_Signed_Eq_Int_Slv,
5978
5979      Iir_Predefined_Ieee_Std_Logic_Signed_Ne_Slv_Slv,
5980      Iir_Predefined_Ieee_Std_Logic_Signed_Ne_Slv_Int,
5981      Iir_Predefined_Ieee_Std_Logic_Signed_Ne_Int_Slv,
5982
5983      Iir_Predefined_Ieee_Std_Logic_Signed_Conv_Integer,
5984
5985      Iir_Predefined_Ieee_Std_Logic_Signed_Shl,
5986      Iir_Predefined_Ieee_Std_Logic_Signed_Shr,
5987
5988      --  std_logic_arith (synopsys extension).
5989      Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Unsigned_Int,
5990      Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Unsigned_Uns,
5991      Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Unsigned_Sgn,
5992      Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Unsigned_Log,
5993
5994      Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Integer_Int,
5995      Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Integer_Uns,
5996      Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Integer_Sgn,
5997      Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Integer_Log,
5998
5999      Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Vector_Int,
6000      Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Vector_Uns,
6001      Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Vector_Sgn,
6002      Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Vector_Log,
6003
6004      Iir_Predefined_Ieee_Std_Logic_Arith_Ext,
6005      Iir_Predefined_Ieee_Std_Logic_Arith_Sxt,
6006
6007      Iir_Predefined_Ieee_Std_Logic_Arith_Id_Uns_Uns,
6008      Iir_Predefined_Ieee_Std_Logic_Arith_Id_Sgn_Sgn,
6009      Iir_Predefined_Ieee_Std_Logic_Arith_Neg_Sgn_Sgn,
6010      Iir_Predefined_Ieee_Std_Logic_Arith_Abs_Sgn_Sgn,
6011
6012      Iir_Predefined_Ieee_Std_Logic_Arith_Shl_Uns,
6013      Iir_Predefined_Ieee_Std_Logic_Arith_Shl_Sgn,
6014      Iir_Predefined_Ieee_Std_Logic_Arith_Shr_Uns,
6015      Iir_Predefined_Ieee_Std_Logic_Arith_Shr_Sgn,
6016
6017      Iir_Predefined_Ieee_Std_Logic_Arith_Id_Uns_Slv,
6018      Iir_Predefined_Ieee_Std_Logic_Arith_Id_Sgn_Slv,
6019      Iir_Predefined_Ieee_Std_Logic_Arith_Neg_Sgn_Slv,
6020      Iir_Predefined_Ieee_Std_Logic_Arith_Abs_Sgn_Slv,
6021
6022      Iir_Predefined_Ieee_Std_Logic_Arith_Mul_Uns_Uns_Uns,
6023      Iir_Predefined_Ieee_Std_Logic_Arith_Mul_Sgn_Sgn_Sgn,
6024      Iir_Predefined_Ieee_Std_Logic_Arith_Mul_Sgn_Uns_Sgn,
6025      Iir_Predefined_Ieee_Std_Logic_Arith_Mul_Uns_Sgn_Sgn,
6026
6027      Iir_Predefined_Ieee_Std_Logic_Arith_Mul_Uns_Uns_Slv,
6028      Iir_Predefined_Ieee_Std_Logic_Arith_Mul_Sgn_Sgn_Slv,
6029      Iir_Predefined_Ieee_Std_Logic_Arith_Mul_Sgn_Uns_Slv,
6030      Iir_Predefined_Ieee_Std_Logic_Arith_Mul_Uns_Sgn_Slv,
6031
6032      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Uns_Uns_Uns,
6033      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Sgn_Sgn_Sgn,
6034      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Uns_Sgn_Sgn,
6035      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Sgn_Uns_Sgn,
6036      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Uns_Int_Uns,
6037      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Int_Uns_Uns,
6038      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Sgn_Int_Sgn,
6039      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Int_Sgn_Sgn,
6040      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Uns_Log_Uns,
6041      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Log_Uns_Uns,
6042      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Sgn_Log_Sgn,
6043      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Log_Sgn_Sgn,
6044
6045      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Uns_Uns_Slv,
6046      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Sgn_Sgn_Slv,
6047      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Uns_Sgn_Slv,
6048      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Sgn_Uns_Slv,
6049      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Uns_Int_Slv,
6050      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Int_Uns_Slv,
6051      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Sgn_Int_Slv,
6052      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Int_Sgn_Slv,
6053      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Uns_Log_Slv,
6054      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Log_Uns_Slv,
6055      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Sgn_Log_Slv,
6056      Iir_Predefined_Ieee_Std_Logic_Arith_Add_Log_Sgn_Slv,
6057
6058      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Uns_Uns_Uns,
6059      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Sgn_Sgn_Sgn,
6060      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Uns_Sgn_Sgn,
6061      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Sgn_Uns_Sgn,
6062      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Uns_Int_Uns,
6063      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Int_Uns_Uns,
6064      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Sgn_Int_Sgn,
6065      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Int_Sgn_Sgn,
6066      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Uns_Log_Uns,
6067      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Log_Uns_Uns,
6068      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Sgn_Log_Sgn,
6069      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Log_Sgn_Sgn,
6070
6071      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Uns_Uns_Slv,
6072      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Sgn_Sgn_Slv,
6073      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Uns_Sgn_Slv,
6074      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Sgn_Uns_Slv,
6075      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Uns_Int_Slv,
6076      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Int_Uns_Slv,
6077      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Sgn_Int_Slv,
6078      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Int_Sgn_Slv,
6079      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Uns_Log_Slv,
6080      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Log_Uns_Slv,
6081      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Sgn_Log_Slv,
6082      Iir_Predefined_Ieee_Std_Logic_Arith_Sub_Log_Sgn_Slv,
6083
6084      Iir_Predefined_Ieee_Std_Logic_Arith_Lt_Uns_Uns,
6085      Iir_Predefined_Ieee_Std_Logic_Arith_Lt_Sgn_Sgn,
6086      Iir_Predefined_Ieee_Std_Logic_Arith_Lt_Uns_Sgn,
6087      Iir_Predefined_Ieee_Std_Logic_Arith_Lt_Sgn_Uns,
6088      Iir_Predefined_Ieee_Std_Logic_Arith_Lt_Uns_Int,
6089      Iir_Predefined_Ieee_Std_Logic_Arith_Lt_Int_Uns,
6090      Iir_Predefined_Ieee_Std_Logic_Arith_Lt_Sgn_Int,
6091      Iir_Predefined_Ieee_Std_Logic_Arith_Lt_Int_Sgn,
6092
6093      Iir_Predefined_Ieee_Std_Logic_Arith_Le_Uns_Uns,
6094      Iir_Predefined_Ieee_Std_Logic_Arith_Le_Sgn_Sgn,
6095      Iir_Predefined_Ieee_Std_Logic_Arith_Le_Uns_Sgn,
6096      Iir_Predefined_Ieee_Std_Logic_Arith_Le_Sgn_Uns,
6097      Iir_Predefined_Ieee_Std_Logic_Arith_Le_Uns_Int,
6098      Iir_Predefined_Ieee_Std_Logic_Arith_Le_Int_Uns,
6099      Iir_Predefined_Ieee_Std_Logic_Arith_Le_Sgn_Int,
6100      Iir_Predefined_Ieee_Std_Logic_Arith_Le_Int_Sgn,
6101
6102      Iir_Predefined_Ieee_Std_Logic_Arith_Gt_Uns_Uns,
6103      Iir_Predefined_Ieee_Std_Logic_Arith_Gt_Sgn_Sgn,
6104      Iir_Predefined_Ieee_Std_Logic_Arith_Gt_Uns_Sgn,
6105      Iir_Predefined_Ieee_Std_Logic_Arith_Gt_Sgn_Uns,
6106      Iir_Predefined_Ieee_Std_Logic_Arith_Gt_Uns_Int,
6107      Iir_Predefined_Ieee_Std_Logic_Arith_Gt_Int_Uns,
6108      Iir_Predefined_Ieee_Std_Logic_Arith_Gt_Sgn_Int,
6109      Iir_Predefined_Ieee_Std_Logic_Arith_Gt_Int_Sgn,
6110
6111      Iir_Predefined_Ieee_Std_Logic_Arith_Ge_Uns_Uns,
6112      Iir_Predefined_Ieee_Std_Logic_Arith_Ge_Sgn_Sgn,
6113      Iir_Predefined_Ieee_Std_Logic_Arith_Ge_Uns_Sgn,
6114      Iir_Predefined_Ieee_Std_Logic_Arith_Ge_Sgn_Uns,
6115      Iir_Predefined_Ieee_Std_Logic_Arith_Ge_Uns_Int,
6116      Iir_Predefined_Ieee_Std_Logic_Arith_Ge_Int_Uns,
6117      Iir_Predefined_Ieee_Std_Logic_Arith_Ge_Sgn_Int,
6118      Iir_Predefined_Ieee_Std_Logic_Arith_Ge_Int_Sgn,
6119
6120      Iir_Predefined_Ieee_Std_Logic_Arith_Eq_Uns_Uns,
6121      Iir_Predefined_Ieee_Std_Logic_Arith_Eq_Sgn_Sgn,
6122      Iir_Predefined_Ieee_Std_Logic_Arith_Eq_Uns_Sgn,
6123      Iir_Predefined_Ieee_Std_Logic_Arith_Eq_Sgn_Uns,
6124      Iir_Predefined_Ieee_Std_Logic_Arith_Eq_Uns_Int,
6125      Iir_Predefined_Ieee_Std_Logic_Arith_Eq_Int_Uns,
6126      Iir_Predefined_Ieee_Std_Logic_Arith_Eq_Sgn_Int,
6127      Iir_Predefined_Ieee_Std_Logic_Arith_Eq_Int_Sgn,
6128
6129      Iir_Predefined_Ieee_Std_Logic_Arith_Ne_Uns_Uns,
6130      Iir_Predefined_Ieee_Std_Logic_Arith_Ne_Sgn_Sgn,
6131      Iir_Predefined_Ieee_Std_Logic_Arith_Ne_Uns_Sgn,
6132      Iir_Predefined_Ieee_Std_Logic_Arith_Ne_Sgn_Uns,
6133      Iir_Predefined_Ieee_Std_Logic_Arith_Ne_Uns_Int,
6134      Iir_Predefined_Ieee_Std_Logic_Arith_Ne_Int_Uns,
6135      Iir_Predefined_Ieee_Std_Logic_Arith_Ne_Sgn_Int,
6136      Iir_Predefined_Ieee_Std_Logic_Arith_Ne_Int_Sgn,
6137
6138      --  std_logic_misc (synopsys extension)
6139      Iir_Predefined_Ieee_Std_Logic_Misc_And_Reduce_Slv,
6140      Iir_Predefined_Ieee_Std_Logic_Misc_And_Reduce_Suv,
6141      Iir_Predefined_Ieee_Std_Logic_Misc_Nand_Reduce_Slv,
6142      Iir_Predefined_Ieee_Std_Logic_Misc_Nand_Reduce_Suv,
6143      Iir_Predefined_Ieee_Std_Logic_Misc_Or_Reduce_Slv,
6144      Iir_Predefined_Ieee_Std_Logic_Misc_Or_Reduce_Suv,
6145      Iir_Predefined_Ieee_Std_Logic_Misc_Nor_Reduce_Slv,
6146      Iir_Predefined_Ieee_Std_Logic_Misc_Nor_Reduce_Suv,
6147      Iir_Predefined_Ieee_Std_Logic_Misc_Xor_Reduce_Slv,
6148      Iir_Predefined_Ieee_Std_Logic_Misc_Xor_Reduce_Suv,
6149      Iir_Predefined_Ieee_Std_Logic_Misc_Xnor_Reduce_Slv,
6150      Iir_Predefined_Ieee_Std_Logic_Misc_Xnor_Reduce_Suv
6151     );
6152
6153   --  Return TRUE iff FUNC is a short-cut predefined function.
6154   function Iir_Predefined_Shortcut_P (Func : Iir_Predefined_Functions)
6155     return Boolean;
6156
6157   --  Pure and impure functions form a partition of implicit functions.
6158   subtype Iir_Predefined_Pure_Functions is Iir_Predefined_Functions range
6159     Iir_Predefined_Boolean_And ..
6160     Iir_Predefined_Functions'Pred (Iir_Predefined_Deallocate);
6161   subtype Iir_Predefined_Impure_Functions is Iir_Predefined_Functions range
6162     Iir_Predefined_Deallocate ..
6163     Iir_Predefined_Functions'Pred (Iir_Predefined_None);
6164
6165   subtype Iir_Predefined_TF_Array_Functions
6166      is Iir_Predefined_Functions range
6167     Iir_Predefined_TF_Array_And ..
6168   --Iir_Predefined_TF_Array_Or
6169   --Iir_Predefined_TF_Array_Nand
6170   --Iir_Predefined_TF_Array_Nor
6171   --Iir_Predefined_TF_Array_Xor
6172   --Iir_Predefined_TF_Array_Xnor
6173     Iir_Predefined_TF_Array_Not;
6174
6175   subtype Iir_Predefined_Dyadic_TF_Array_Functions
6176   is Iir_Predefined_Functions range
6177     Iir_Predefined_TF_Array_And ..
6178   --Iir_Predefined_TF_Array_Or
6179   --Iir_Predefined_TF_Array_Nand
6180   --Iir_Predefined_TF_Array_Nor
6181   --Iir_Predefined_TF_Array_Xor
6182     Iir_Predefined_TF_Array_Xnor;
6183
6184   subtype Iir_Predefined_Shift_Functions is Iir_Predefined_Functions range
6185     Iir_Predefined_Array_Sll ..
6186   --Iir_Predefined_Array_Srl
6187   --Iir_Predefined_Array_Sla
6188   --Iir_Predefined_Array_Sra
6189   --Iir_Predefined_Array_Rol
6190     Iir_Predefined_Array_Ror;
6191
6192   subtype Iir_Predefined_Concat_Functions is Iir_Predefined_Functions range
6193     Iir_Predefined_Array_Array_Concat ..
6194   --Iir_Predefined_Array_Element_Concat
6195   --Iir_Predefined_Element_Array_Concat
6196     Iir_Predefined_Element_Element_Concat;
6197
6198   subtype Iir_Predefined_Std_Ulogic_Match_Ordering_Functions is
6199     Iir_Predefined_Functions range
6200     Iir_Predefined_Std_Ulogic_Match_Less ..
6201   --Iir_Predefined_Std_Ulogic_Match_Less_Equal
6202   --Iir_Predefined_Std_Ulogic_Match_Greater
6203     Iir_Predefined_Std_Ulogic_Match_Greater_Equal;
6204
6205   --  Subtype for implicit subprograms.  These have no corresponding bodies.
6206   --  Implicit and explicit subprograms are partitions: they are disjoint
6207   --  and cover all the cases.
6208   subtype Iir_Predefined_Implicit is Iir_Predefined_Functions range
6209     Iir_Predefined_Error ..
6210     Iir_Predefined_Functions'Pred (Iir_Predefined_None);
6211
6212   --  Subtype for explicit subprograms.  These require a corresponding body.
6213   subtype Iir_Predefined_Explicit is Iir_Predefined_Functions range
6214     Iir_Predefined_None ..
6215     Iir_Predefined_Functions'Last;
6216
6217   --  Explicit known subprograms (from ieee)
6218   subtype Iir_Predefined_IEEE_Explicit is Iir_Predefined_Functions range
6219     Iir_Predefined_Functions'Succ (Iir_Predefined_None) ..
6220     Iir_Predefined_Functions'Last;
6221
6222   subtype Iir_Predefined_Ieee_Numeric_Std_Binary_Operators
6223     is Iir_Predefined_Functions range
6224       Iir_Predefined_Ieee_Numeric_Std_Add_Uns_Uns ..
6225       Iir_Predefined_Ieee_Numeric_Std_Xnor_Sgn_Sgn;
6226
6227   --  Size of scalar types.
6228   --  Their size is determined during analysis (using the range), so that
6229   --  all backends have the same view.
6230   type Scalar_Size is
6231     (
6232      Scalar_8,
6233      Scalar_16,
6234      Scalar_32,
6235      Scalar_64
6236     );
6237
6238   --  Staticness as defined by LRM93 6.1 and 7.4
6239   type Iir_Staticness is
6240     (
6241      Unknown,
6242      None,
6243      Globally,
6244      Locally
6245     );
6246
6247   -- Staticness as defined by LRM93 6.1 and 7.4
6248   function Min (L, R : Iir_Staticness) return Iir_Staticness renames
6249     Iir_Staticness'Min;
6250
6251   --  Purity state of a procedure.
6252   --  PURE means the procedure is pure.
6253   --  IMPURE means the procedure is impure: it references a file object or
6254   --    a signal or a variable declared outside a subprogram, or it calls an
6255   --    impure subprogram.
6256   --  MAYBE_IMPURE means the procedure references a signal or a variable
6257   --    declared in a subprogram.  The relative position of a parent has to
6258   --    be considered.  The list of callees must not be checked.
6259   --  UNKNOWN is like MAYBE_IMPURE, but the subprogram has a list of callees
6260   --    whose purity is not yet known.  As a consequence, a direct or
6261   --    indirect call to such a procedure cannot be proved to be allowed
6262   --    in a pure function.
6263   --  Note: UNKNOWN is the default state.  At any impure call, the state is
6264   --    set to IMPURE.  Only at the end of body analysis and only if the
6265   --    callee list is empty, the state can be set either to MAYBE_IMPURE or
6266   --    PURE.
6267   type Iir_Pure_State is (Unknown, Pure, Maybe_Impure, Impure);
6268
6269   --  State of subprograms for validity of use in all-sensitized process.
6270   --  INVALID_SIGNAL means that the subprogram is in a package and
6271   --    reads a signal or that the subprogram calls (indirectly) such
6272   --    a subprogram.  In this case, the subprogram cannot be called from
6273   --    an all-sensitized process.
6274   --  READ_SIGNAL means that the subprogram reads a signal and is defined
6275   --    in an entity or an architecture or that the subprogram calls
6276   --    (indirectly) such a subprogram.  In this case, the subprogram can
6277   --    be called from an all-sensitized process and the reference will be
6278   --    part of the sensitivity list.
6279   --  NO_SIGNAL means that the subprogram doesn't read any signal and don't
6280   --    call such a subprogram.  The subprogram can be called from an
6281   --    all-sensitized process but there is no need to track this call.
6282   --  UNKNOWN means that the state is not yet defined.
6283   type Iir_All_Sensitized is
6284     (Unknown, No_Signal, Read_Signal, Invalid_Signal);
6285
6286   --  Constraint state of a type.
6287   --  See LRM08 5.1 for definition.
6288   type Iir_Constraint is
6289     (
6290      Unconstrained,
6291      Partially_Constrained,
6292      Fully_Constrained
6293     );
6294
6295   --  The kind of an interface list.
6296   type Interface_Kind_Type is
6297     (
6298      Generic_Interface_List,
6299      Port_Interface_List,
6300      Procedure_Parameter_Interface_List,
6301      Function_Parameter_Interface_List
6302     );
6303   subtype Parameter_Interface_List is Interface_Kind_Type range
6304     Procedure_Parameter_Interface_List ..
6305     Function_Parameter_Interface_List;
6306
6307   -- iir_int32 is aimed at containing integer literal values.
6308   type Iir_Int32 is new Int32;
6309
6310   --  iir_index32 is aimed at containing an array index.
6311   type Iir_Index32 is new Nat32;
6312
6313   ---------------
6314   -- subranges --
6315   ---------------
6316   -- These subtypes are used for ranges, for `case' statements or for the `in'
6317   -- operator.
6318
6319   -- In order to be correctly parsed by check_iir, the declaration must
6320   -- follow these rules:
6321   -- * the first line must be "subtype Iir_Kinds_NAME is Iir_Kind_range"
6322   -- * the second line must be the lowest bound of the range, followed by "..
6323   -- * comments line
6324   -- * the last line must be the highest bound of the range, followed by ";"
6325
6326   subtype Iir_Kinds_Library_Unit is Iir_Kind range
6327     Iir_Kind_Entity_Declaration ..
6328   --Iir_Kind_Configuration_Declaration
6329   --Iir_Kind_Context_Declaration
6330   --Iir_Kind_Package_Declaration
6331   --Iir_Kind_Package_Instantiation_Declaration
6332   --Iir_Kind_Vmode_Declaration
6333   --Iir_Kind_Vprop_Declaration
6334   --Iir_Kind_Vunit_Declaration
6335   --Iir_Kind_Package_Body
6336     Iir_Kind_Architecture_Body;
6337
6338   subtype Iir_Kinds_Primary_Unit is Iir_Kind range
6339     Iir_Kind_Entity_Declaration ..
6340   --Iir_Kind_Configuration_Declaration
6341   --Iir_Kind_Context_Declaration
6342   --Iir_Kind_Package_Declaration
6343   --Iir_Kind_Package_Instantiation_Declaration
6344   --Iir_Kind_Vmode_Declaration
6345   --Iir_Kind_Vprop_Declaration
6346     Iir_Kind_Vunit_Declaration;
6347
6348   subtype Iir_Kinds_Secondary_Unit is Iir_Kind range
6349     Iir_Kind_Package_Body ..
6350     Iir_Kind_Architecture_Body;
6351
6352   subtype Iir_Kinds_Package_Declaration is Iir_Kind range
6353     Iir_Kind_Package_Declaration ..
6354     Iir_Kind_Package_Instantiation_Declaration;
6355
6356   subtype Iir_Kinds_Verification_Unit is Iir_Kind range
6357     Iir_Kind_Vmode_Declaration ..
6358   --Iir_Kind_Vprop_Declaration
6359     Iir_Kind_Vunit_Declaration;
6360
6361   --  Note: does not include iir_kind_enumeration_literal since it is
6362   --  considered as a declaration.
6363   subtype Iir_Kinds_Literal is Iir_Kind range
6364     Iir_Kind_Integer_Literal ..
6365   --Iir_Kind_Floating_Point_Literal
6366   --Iir_Kind_Null_Literal
6367   --Iir_Kind_String_Literal8
6368   --Iir_Kind_Physical_Int_Literal
6369     Iir_Kind_Physical_Fp_Literal;
6370
6371   subtype Iir_Kinds_Physical_Literal is Iir_Kind range
6372     Iir_Kind_Physical_Int_Literal ..
6373     Iir_Kind_Physical_Fp_Literal;
6374
6375   subtype Iir_Kinds_Array_Type_Definition is Iir_Kind range
6376     Iir_Kind_Array_Type_Definition ..
6377     Iir_Kind_Array_Subtype_Definition;
6378
6379   subtype Iir_Kinds_Type_And_Subtype_Definition is Iir_Kind range
6380     Iir_Kind_Access_Type_Definition ..
6381   --Iir_Kind_Incomplete_Type_Definition
6382   --Iir_Kind_Interface_Type_Definition
6383   --Iir_Kind_File_Type_Definition
6384   --Iir_Kind_Protected_Type_Declaration
6385   --Iir_Kind_Record_Type_Definition
6386   --Iir_Kind_Array_Type_Definition
6387   --Iir_Kind_Array_Subtype_Definition
6388   --Iir_Kind_Record_Subtype_Definition
6389   --Iir_Kind_Access_Subtype_Definition
6390   --Iir_Kind_Physical_Subtype_Definition
6391   --Iir_Kind_Floating_Subtype_Definition
6392   --Iir_Kind_Integer_Subtype_Definition
6393   --Iir_Kind_Enumeration_Subtype_Definition
6394   --Iir_Kind_Enumeration_Type_Definition
6395   --Iir_Kind_Integer_Type_Definition
6396   --Iir_Kind_Floating_Type_Definition
6397     Iir_Kind_Physical_Type_Definition;
6398
6399   subtype Iir_Kinds_Subtype_Definition is Iir_Kind range
6400     Iir_Kind_Array_Subtype_Definition ..
6401   --Iir_Kind_Record_Subtype_Definition
6402   --Iir_Kind_Access_Subtype_Definition
6403   --Iir_Kind_Physical_Subtype_Definition
6404   --Iir_Kind_Floating_Subtype_Definition
6405   --Iir_Kind_Integer_Subtype_Definition
6406     Iir_Kind_Enumeration_Subtype_Definition;
6407
6408   subtype Iir_Kinds_Scalar_Subtype_Definition is Iir_Kind range
6409     Iir_Kind_Physical_Subtype_Definition ..
6410   --Iir_Kind_Floating_Subtype_Definition
6411   --Iir_Kind_Integer_Subtype_Definition
6412     Iir_Kind_Enumeration_Subtype_Definition;
6413
6414   subtype Iir_Kinds_Scalar_Type_And_Subtype_Definition is Iir_Kind range
6415     Iir_Kind_Physical_Subtype_Definition ..
6416   --Iir_Kind_Floating_Subtype_Definition
6417   --Iir_Kind_Integer_Subtype_Definition
6418   --Iir_Kind_Enumeration_Subtype_Definition
6419   --Iir_Kind_Enumeration_Type_Definition
6420   --Iir_Kind_Integer_Type_Definition
6421   --Iir_Kind_Floating_Type_Definition
6422     Iir_Kind_Physical_Type_Definition;
6423
6424   subtype Iir_Kinds_Range_Type_Definition is Iir_Kind range
6425     Iir_Kind_Physical_Subtype_Definition ..
6426   --Iir_Kind_Floating_Subtype_Definition
6427   --Iir_Kind_Integer_Subtype_Definition
6428   --Iir_Kind_Enumeration_Subtype_Definition
6429     Iir_Kind_Enumeration_Type_Definition;
6430
6431   subtype Iir_Kinds_Discrete_Type_Definition is Iir_Kind range
6432     Iir_Kind_Integer_Subtype_Definition ..
6433   --Iir_Kind_Enumeration_Subtype_Definition
6434   --Iir_Kind_Enumeration_Type_Definition
6435     Iir_Kind_Integer_Type_Definition;
6436
6437--     subtype Iir_Kinds_Discrete_Subtype_Definition is Iir_Kind range
6438--       Iir_Kind_Integer_Subtype_Definition ..
6439--       Iir_Kind_Enumeration_Subtype_Definition;
6440
6441   subtype Iir_Kinds_Composite_Type_Definition is Iir_Kind range
6442     Iir_Kind_Record_Type_Definition ..
6443   --Iir_Kind_Array_Type_Definition
6444   --Iir_Kind_Array_Subtype_Definition
6445     Iir_Kind_Record_Subtype_Definition;
6446
6447   subtype Iir_Kinds_Composite_Subtype_Definition is Iir_Kind range
6448     Iir_Kind_Array_Subtype_Definition ..
6449     Iir_Kind_Record_Subtype_Definition;
6450
6451   subtype Iir_Kinds_Type_Declaration is Iir_Kind range
6452     Iir_Kind_Type_Declaration ..
6453   --Iir_Kind_Anonymous_Type_Declaration
6454     Iir_Kind_Subtype_Declaration;
6455
6456   subtype Iir_Kinds_Nature_Definition is Iir_Kind range
6457     Iir_Kind_Scalar_Nature_Definition ..
6458   --Iir_Kind_Record_Nature_Definition
6459     Iir_Kind_Array_Nature_Definition;
6460
6461   subtype Iir_Kinds_Subnature_Definition is Iir_Kind range
6462     Iir_Kind_Array_Subnature_Definition ..
6463     Iir_Kind_Array_Subnature_Definition;
6464
6465   subtype Iir_Kinds_Nature_Indication is Iir_Kind range
6466     Iir_Kind_Scalar_Nature_Definition ..
6467   --Iir_Kind_Record_Nature_Definition
6468   --Iir_Kind_Array_Nature_Definition
6469     Iir_Kind_Array_Subnature_Definition;
6470
6471   subtype Iir_Kinds_Nonoverloadable_Declaration is Iir_Kind range
6472     Iir_Kind_Type_Declaration ..
6473   --Iir_Kind_Anonymous_Type_Declaration
6474   --Iir_Kind_Subtype_Declaration
6475   --Iir_Kind_Nature_Declaration
6476   --Iir_Kind_Subnature_Declaration
6477   --Iir_Kind_Package_Header
6478   --Iir_Kind_Unit_Declaration
6479   --Iir_Kind_Library_Declaration
6480   --Iir_Kind_Component_Declaration
6481   --Iir_Kind_Attribute_Declaration
6482   --Iir_Kind_Group_Template_Declaration
6483   --Iir_Kind_Group_Declaration
6484   --Iir_Kind_Element_Declaration
6485     Iir_Kind_Nature_Element_Declaration;
6486
6487   subtype Iir_Kinds_Monadic_Operator is Iir_Kind range
6488     Iir_Kind_Identity_Operator ..
6489   --Iir_Kind_Negation_Operator
6490   --Iir_Kind_Absolute_Operator
6491   --Iir_Kind_Not_Operator
6492   --Iir_Kind_Implicit_Condition_Operator
6493   --Iir_Kind_Condition_Operator
6494   --Iir_Kind_Reduction_And_Operator
6495   --Iir_Kind_Reduction_Or_Operator
6496   --Iir_Kind_Reduction_Nand_Operator
6497   --Iir_Kind_Reduction_Nor_Operator
6498   --Iir_Kind_Reduction_Xor_Operator
6499     Iir_Kind_Reduction_Xnor_Operator;
6500
6501   subtype Iir_Kinds_Dyadic_Operator is Iir_Kind range
6502     Iir_Kind_And_Operator ..
6503   --Iir_Kind_Or_Operator
6504   --Iir_Kind_Nand_Operator
6505   --Iir_Kind_Nor_Operator
6506   --Iir_Kind_Xor_Operator
6507   --Iir_Kind_Xnor_Operator
6508   --Iir_Kind_Equality_Operator
6509   --Iir_Kind_Inequality_Operator
6510   --Iir_Kind_Less_Than_Operator
6511   --Iir_Kind_Less_Than_Or_Equal_Operator
6512   --Iir_Kind_Greater_Than_Operator
6513   --Iir_Kind_Greater_Than_Or_Equal_Operator
6514   --Iir_Kind_Match_Equality_Operator
6515   --Iir_Kind_Match_Inequality_Operator
6516   --Iir_Kind_Match_Less_Than_Operator
6517   --Iir_Kind_Match_Less_Than_Or_Equal_Operator
6518   --Iir_Kind_Match_Greater_Than_Operator
6519   --Iir_Kind_Match_Greater_Than_Or_Equal_Operator
6520   --Iir_Kind_Sll_Operator
6521   --Iir_Kind_Sla_Operator
6522   --Iir_Kind_Srl_Operator
6523   --Iir_Kind_Sra_Operator
6524   --Iir_Kind_Rol_Operator
6525   --Iir_Kind_Ror_Operator
6526   --Iir_Kind_Addition_Operator
6527   --Iir_Kind_Substraction_Operator
6528   --Iir_Kind_Concatenation_Operator
6529   --Iir_Kind_Multiplication_Operator
6530   --Iir_Kind_Division_Operator
6531   --Iir_Kind_Modulus_Operator
6532   --Iir_Kind_Remainder_Operator
6533     Iir_Kind_Exponentiation_Operator;
6534
6535   subtype Iir_Kinds_Psl_Builtin is Iir_Kind range
6536     Iir_Kind_Psl_Prev ..
6537   --Iir_Kind_Psl_Stable
6538   --Iir_Kind_Psl_Rose
6539     Iir_Kind_Psl_Fell;
6540
6541   subtype Iir_Kinds_Functions_And_Literals is Iir_Kind range
6542     Iir_Kind_Enumeration_Literal ..
6543     Iir_Kind_Function_Declaration;
6544
6545   subtype Iir_Kinds_Subprogram_Declaration is Iir_Kind range
6546     Iir_Kind_Function_Declaration ..
6547     Iir_Kind_Procedure_Declaration;
6548
6549   subtype Iir_Kinds_Subprogram_Body is Iir_Kind range
6550     Iir_Kind_Function_Body ..
6551     Iir_Kind_Procedure_Body;
6552
6553   subtype Iir_Kinds_Process_Statement is Iir_Kind range
6554     Iir_Kind_Sensitized_Process_Statement ..
6555     Iir_Kind_Process_Statement;
6556
6557   subtype Iir_Kinds_Interface_Object_Declaration is Iir_Kind range
6558     Iir_Kind_Interface_Constant_Declaration ..
6559   --Iir_Kind_Interface_Variable_Declaration
6560   --Iir_Kind_Interface_Signal_Declaration
6561   --Iir_Kind_Interface_File_Declaration
6562     Iir_Kind_Interface_Quantity_Declaration;
6563
6564   subtype Iir_Kinds_Interface_Subprogram_Declaration is Iir_Kind range
6565     Iir_Kind_Interface_Function_Declaration ..
6566     Iir_Kind_Interface_Procedure_Declaration;
6567
6568   subtype Iir_Kinds_Interface_Declaration is Iir_Kind range
6569     Iir_Kind_Interface_Constant_Declaration ..
6570   --Iir_Kind_Interface_Variable_Declaration
6571   --Iir_Kind_Interface_Signal_Declaration
6572   --Iir_Kind_Interface_File_Declaration
6573   --Iir_Kind_Interface_Quantity_Declaration
6574   --Iir_Kind_Interface_Terminal_Declaration
6575   --Iir_Kind_Interface_Type_Declaration
6576   --Iir_Kind_Interface_Package_Declaration
6577   --Iir_Kind_Interface_Function_Declaration
6578     Iir_Kind_Interface_Procedure_Declaration;
6579
6580   --  LRM-AMS17 6.4 Objects
6581   --  An object is a named entity that is a terminal or that contains (has)
6582   --  a value of a type.
6583   --
6584   --  Note: Object_Declaration does not include terminals.
6585
6586   subtype Iir_Kinds_Object_Declaration is Iir_Kind range
6587     Iir_Kind_Object_Alias_Declaration ..
6588   --Iir_Kind_Free_Quantity_Declaration
6589   --Iir_Kind_Spectrum_Quantity_Declaration
6590   --Iir_Kind_Noise_Quantity_Declaration
6591   --Iir_Kind_Across_Quantity_Declaration
6592   --Iir_Kind_Through_Quantity_Declaration
6593   --Iir_Kind_File_Declaration
6594   --Iir_Kind_Guard_Signal_Declaration
6595   --Iir_Kind_Signal_Declaration
6596   --Iir_Kind_Variable_Declaration
6597   --Iir_Kind_Constant_Declaration
6598   --Iir_Kind_Iterator_Declaration
6599   --Iir_Kind_Interface_Constant_Declaration
6600   --Iir_Kind_Interface_Variable_Declaration
6601   --Iir_Kind_Interface_Signal_Declaration
6602   --Iir_Kind_Interface_File_Declaration
6603     Iir_Kind_Interface_Quantity_Declaration;
6604
6605   subtype Iir_Kinds_Branch_Quantity_Declaration is Iir_Kind range
6606     Iir_Kind_Across_Quantity_Declaration ..
6607     Iir_Kind_Through_Quantity_Declaration;
6608
6609   subtype Iir_Kinds_Source_Quantity_Declaration is Iir_Kind range
6610     Iir_Kind_Spectrum_Quantity_Declaration ..
6611     Iir_Kind_Noise_Quantity_Declaration;
6612
6613   subtype Iir_Kinds_Quantity_Declaration is Iir_Kind range
6614     Iir_Kind_Free_Quantity_Declaration ..
6615   --Iir_Kind_Spectrum_Quantity_Declaration
6616   --Iir_Kind_Noise_Quantity_Declaration
6617   --Iir_Kind_Across_Quantity_Declaration
6618     Iir_Kind_Through_Quantity_Declaration;
6619
6620   subtype Iir_Kinds_Non_Alias_Object_Declaration is Iir_Kind range
6621     Iir_Kind_File_Declaration ..
6622   --Iir_Kind_Guard_Signal_Declaration
6623   --Iir_Kind_Signal_Declaration
6624   --Iir_Kind_Variable_Declaration
6625   --Iir_Kind_Constant_Declaration
6626   --Iir_Kind_Iterator_Declaration
6627   --Iir_Kind_Interface_Constant_Declaration
6628   --Iir_Kind_Interface_Variable_Declaration
6629   --Iir_Kind_Interface_Signal_Declaration
6630     Iir_Kind_Interface_File_Declaration;
6631
6632   --  Association elements for parameters.
6633   subtype Iir_Kinds_Association_Element_Parameters is Iir_Kind range
6634     Iir_Kind_Association_Element_By_Expression ..
6635   --Iir_Kind_Association_Element_By_Individual
6636     Iir_Kind_Association_Element_Open;
6637
6638   subtype Iir_Kinds_Association_Element is Iir_Kind range
6639     Iir_Kind_Association_Element_By_Expression ..
6640   --Iir_Kind_Association_Element_By_Individual
6641   --Iir_Kind_Association_Element_Open
6642   --Iir_Kind_Association_Element_Package
6643   --Iir_Kind_Association_Element_Type
6644   --Iir_Kind_Association_Element_Subprogram
6645     Iir_Kind_Association_Element_Terminal;
6646
6647   subtype Iir_Kinds_Choice is Iir_Kind range
6648     Iir_Kind_Choice_By_Range ..
6649   --Iir_Kind_Choice_By_Expression
6650   --Iir_Kind_Choice_By_Others
6651   --Iir_Kind_Choice_By_None
6652     Iir_Kind_Choice_By_Name;
6653
6654   --  Choices in a case statement.
6655   subtype Iir_Kinds_Case_Choice is Iir_Kind range
6656     Iir_Kind_Choice_By_Range ..
6657   --Iir_Kind_Choice_By_Expression
6658     Iir_Kind_Choice_By_Others;
6659
6660   --  Choices in array aggregate.
6661   subtype Iir_Kinds_Array_Choice is Iir_Kind range
6662     Iir_Kind_Choice_By_Range ..
6663   --Iir_Kind_Choice_By_Expression
6664   --Iir_Kind_Choice_By_Others
6665     Iir_Kind_Choice_By_None;
6666
6667   --  Choices in record aggregate.
6668   subtype Iir_Kinds_Record_Choice is Iir_Kind range
6669     Iir_Kind_Choice_By_Others ..
6670   --Iir_Kind_Choice_By_None
6671     Iir_Kind_Choice_By_Name;
6672
6673   subtype Iir_Kinds_Entity_Aspect is Iir_Kind range
6674     Iir_Kind_Entity_Aspect_Entity ..
6675   --Iir_Kind_Entity_Aspect_Configuration
6676     Iir_Kind_Entity_Aspect_Open;
6677
6678   subtype Iir_Kinds_Denoting_Name is Iir_Kind range
6679     Iir_Kind_Character_Literal ..
6680   --Iir_Kind_Simple_Name
6681   --Iir_Kind_Selected_Name
6682   --Iir_Kind_Operator_Symbol
6683     Iir_Kind_Reference_Name;
6684
6685   subtype Iir_Kinds_Denoting_And_External_Name is Iir_Kind range
6686     Iir_Kind_Character_Literal ..
6687   --Iir_Kind_Simple_Name
6688   --Iir_Kind_Selected_Name
6689   --Iir_Kind_Operator_Symbol
6690   --Iir_Kind_Reference_Name
6691   --Iir_Kind_External_Constant_Name
6692   --Iir_Kind_External_Signal_Name
6693     Iir_Kind_External_Variable_Name;
6694
6695   subtype Iir_Kinds_Name is Iir_Kind range
6696     Iir_Kind_Character_Literal ..
6697   --Iir_Kind_Simple_Name
6698   --Iir_Kind_Selected_Name
6699   --Iir_Kind_Operator_Symbol
6700   --Iir_Kind_Reference_Name
6701   --Iir_Kind_External_Constant_Name
6702   --Iir_Kind_External_Signal_Name
6703   --Iir_Kind_External_Variable_Name
6704   --Iir_Kind_Selected_By_All_Name
6705     Iir_Kind_Parenthesis_Name;
6706
6707   subtype Iir_Kinds_Dereference is Iir_Kind range
6708     Iir_Kind_Dereference ..
6709     Iir_Kind_Implicit_Dereference;
6710
6711   subtype Iir_Kinds_External_Name is Iir_Kind range
6712     Iir_Kind_External_Constant_Name ..
6713   --Iir_Kind_External_Signal_Name
6714     Iir_Kind_External_Variable_Name;
6715
6716   --  Any attribute that is an expression.
6717   subtype Iir_Kinds_Expression_Attribute is Iir_Kind range
6718     Iir_Kind_Left_Type_Attribute ..
6719   --Iir_Kind_Right_Type_Attribute
6720   --Iir_Kind_High_Type_Attribute
6721   --Iir_Kind_Low_Type_Attribute
6722   --Iir_Kind_Ascending_Type_Attribute
6723   --Iir_Kind_Image_Attribute
6724   --Iir_Kind_Value_Attribute
6725   --Iir_Kind_Pos_Attribute
6726   --Iir_Kind_Val_Attribute
6727   --Iir_Kind_Succ_Attribute
6728   --Iir_Kind_Pred_Attribute
6729   --Iir_Kind_Leftof_Attribute
6730   --Iir_Kind_Rightof_Attribute
6731   --Iir_Kind_Signal_Slew_Attribute
6732   --Iir_Kind_Quantity_Slew_Attribute
6733   --Iir_Kind_Ramp_Attribute
6734   --Iir_Kind_Zoh_Attribute
6735   --Iir_Kind_Ltf_Attribute
6736   --Iir_Kind_Ztf_Attribute
6737   --Iir_Kind_Dot_Attribute
6738   --Iir_Kind_Integ_Attribute
6739   --Iir_Kind_Above_Attribute
6740   --Iir_Kind_Quantity_Delayed_Attribute
6741   --Iir_Kind_Delayed_Attribute
6742   --Iir_Kind_Stable_Attribute
6743   --Iir_Kind_Quiet_Attribute
6744   --Iir_Kind_Transaction_Attribute
6745   --Iir_Kind_Event_Attribute
6746   --Iir_Kind_Active_Attribute
6747   --Iir_Kind_Last_Event_Attribute
6748   --Iir_Kind_Last_Active_Attribute
6749   --Iir_Kind_Last_Value_Attribute
6750   --Iir_Kind_Driving_Attribute
6751   --Iir_Kind_Driving_Value_Attribute
6752   --Iir_Kind_Behavior_Attribute
6753   --Iir_Kind_Structure_Attribute
6754   --Iir_Kind_Simple_Name_Attribute
6755   --Iir_Kind_Instance_Name_Attribute
6756   --Iir_Kind_Path_Name_Attribute
6757   --Iir_Kind_Left_Array_Attribute
6758   --Iir_Kind_Right_Array_Attribute
6759   --Iir_Kind_High_Array_Attribute
6760   --Iir_Kind_Low_Array_Attribute
6761   --Iir_Kind_Length_Array_Attribute
6762     Iir_Kind_Ascending_Array_Attribute;
6763
6764   --  All the attributes.
6765   subtype Iir_Kinds_Attribute is Iir_Kind range
6766     Iir_Kind_Base_Attribute ..
6767     Iir_Kind_Reverse_Range_Array_Attribute;
6768
6769   --  Attributes of scalar types.
6770   subtype Iir_Kinds_Type_Attribute is Iir_Kind range
6771     Iir_Kind_Left_Type_Attribute ..
6772   --Iir_Kind_Right_Type_Attribute
6773   --Iir_Kind_High_Type_Attribute
6774   --Iir_Kind_Low_Type_Attribute
6775     Iir_Kind_Ascending_Type_Attribute;
6776
6777   --  Attributes whose result is a type.
6778   subtype Iir_Kinds_Subtype_Attribute is Iir_Kind range
6779     Iir_Kind_Base_Attribute ..
6780   --Iir_Kind_Subtype_Attribute
6781     Iir_Kind_Element_Attribute;
6782
6783   subtype Iir_Kinds_Scalar_Type_Attribute is Iir_Kind range
6784     Iir_Kind_Pos_Attribute ..
6785   --Iir_Kind_Val_Attribute
6786   --Iir_Kind_Succ_Attribute
6787   --Iir_Kind_Pred_Attribute
6788   --Iir_Kind_Leftof_Attribute
6789     Iir_Kind_Rightof_Attribute;
6790
6791   subtype Iir_Kinds_Array_Attribute is Iir_Kind range
6792     Iir_Kind_Left_Array_Attribute ..
6793   --Iir_Kind_Right_Array_Attribute
6794   --Iir_Kind_High_Array_Attribute
6795   --Iir_Kind_Low_Array_Attribute
6796   --Iir_Kind_Length_Array_Attribute
6797   --Iir_Kind_Ascending_Array_Attribute
6798   --Iir_Kind_Range_Array_Attribute
6799     Iir_Kind_Reverse_Range_Array_Attribute;
6800
6801   subtype Iir_Kinds_Range_Attribute is Iir_Kind range
6802     Iir_Kind_Range_Array_Attribute ..
6803     Iir_Kind_Reverse_Range_Array_Attribute;
6804
6805   subtype Iir_Kinds_Signal_Attribute is Iir_Kind range
6806     Iir_Kind_Delayed_Attribute ..
6807   --Iir_Kind_Stable_Attribute
6808   --Iir_Kind_Quiet_Attribute
6809     Iir_Kind_Transaction_Attribute;
6810
6811   subtype Iir_Kinds_Signal_Value_Attribute is Iir_Kind range
6812     Iir_Kind_Event_Attribute ..
6813   --Iir_Kind_Active_Attribute
6814   --Iir_Kind_Last_Event_Attribute
6815   --Iir_Kind_Last_Active_Attribute
6816   --Iir_Kind_Last_Value_Attribute
6817   --Iir_Kind_Driving_Attribute
6818     Iir_Kind_Driving_Value_Attribute;
6819
6820   subtype Iir_Kinds_Name_Attribute is Iir_Kind range
6821     Iir_Kind_Simple_Name_Attribute ..
6822   --Iir_Kind_Instance_Name_Attribute
6823     Iir_Kind_Path_Name_Attribute;
6824
6825   subtype Iir_Kinds_Concurrent_Statement is Iir_Kind range
6826     Iir_Kind_Sensitized_Process_Statement ..
6827   --Iir_Kind_Process_Statement
6828   --Iir_Kind_Concurrent_Simple_Signal_Assignment
6829   --Iir_Kind_Concurrent_Conditional_Signal_Assignment
6830   --Iir_Kind_Concurrent_Selected_Signal_Assignment
6831   --Iir_Kind_Concurrent_Assertion_Statement
6832   --Iir_Kind_Concurrent_Procedure_Call_Statement
6833   --Iir_Kind_Concurrent_Break_Statement
6834   --Iir_Kind_Psl_Assert_Directive
6835   --Iir_Kind_Psl_Assume_Directive
6836   --Iir_Kind_Psl_Cover_Directive
6837   --Iir_Kind_Psl_Restrict_Directive
6838   --Iir_Kind_Block_Statement
6839   --Iir_Kind_If_Generate_Statement
6840   --Iir_Kind_Case_Generate_Statement
6841   --Iir_Kind_For_Generate_Statement
6842   --Iir_Kind_Component_Instantiation_Statement
6843     Iir_Kind_Psl_Default_Clock;
6844
6845   subtype Iir_Kinds_Simple_Concurrent_Statement is Iir_Kind range
6846     Iir_Kind_Sensitized_Process_Statement ..
6847   --Iir_Kind_Process_Statement
6848   --Iir_Kind_Concurrent_Simple_Signal_Assignment
6849   --Iir_Kind_Concurrent_Conditional_Signal_Assignment
6850   --Iir_Kind_Concurrent_Selected_Signal_Assignment
6851   --Iir_Kind_Concurrent_Assertion_Statement
6852   --Iir_Kind_Concurrent_Procedure_Call_Statement
6853   --Iir_Kind_Concurrent_Break_Statement
6854   --Iir_Kind_Psl_Assert_Directive
6855   --Iir_Kind_Psl_Assume_Directive
6856   --Iir_Kind_Psl_Cover_Directive
6857     Iir_Kind_Psl_Restrict_Directive;
6858
6859   subtype Iir_Kinds_Generate_Statement is Iir_Kind range
6860     Iir_Kind_If_Generate_Statement ..
6861   --Iir_Kind_Case_Generate_Statement
6862     Iir_Kind_For_Generate_Statement;
6863
6864   subtype Iir_Kinds_Concurrent_Signal_Assignment is Iir_Kind range
6865     Iir_Kind_Concurrent_Simple_Signal_Assignment ..
6866   --Iir_Kind_Concurrent_Conditional_Signal_Assignment
6867     Iir_Kind_Concurrent_Selected_Signal_Assignment;
6868
6869   subtype Iir_Kinds_If_Case_Generate_Statement is Iir_Kind range
6870     Iir_Kind_If_Generate_Statement ..
6871     Iir_Kind_Case_Generate_Statement;
6872
6873   subtype Iir_Kinds_Simultaneous_Statement is Iir_Kind range
6874     Iir_Kind_Simple_Simultaneous_Statement ..
6875   --Iir_Kind_Simultaneous_Null_Statement
6876   --Iir_Kind_Simultaneous_Procedural_Statement
6877   --Iir_Kind_Simultaneous_Case_Statement
6878     Iir_Kind_Simultaneous_If_Statement;
6879
6880   subtype Iir_Kinds_Sequential_Statement is Iir_Kind range
6881     Iir_Kind_Simple_Signal_Assignment_Statement ..
6882   --Iir_Kind_Conditional_Signal_Assignment_Statement
6883   --Iir_Kind_Selected_Waveform_Assignment_Statement
6884   --Iir_Kind_Signal_Force_Assignment_Statement
6885   --Iir_Kind_Signal_Release_Assignment_Statement
6886   --Iir_Kind_Null_Statement
6887   --Iir_Kind_Assertion_Statement
6888   --Iir_Kind_Report_Statement
6889   --Iir_Kind_Wait_Statement
6890   --Iir_Kind_Variable_Assignment_Statement
6891   --Iir_Kind_Conditional_Variable_Assignment_Statement
6892   --Iir_Kind_Return_Statement
6893   --Iir_Kind_For_Loop_Statement
6894   --Iir_Kind_While_Loop_Statement
6895   --Iir_Kind_Next_Statement
6896   --Iir_Kind_Exit_Statement
6897   --Iir_Kind_Case_Statement
6898   --Iir_Kind_Procedure_Call_Statement
6899   --Iir_Kind_Break_Statement
6900     Iir_Kind_If_Statement;
6901
6902   subtype Iir_Kinds_Next_Exit_Statement is Iir_Kind range
6903     Iir_Kind_Next_Statement ..
6904     Iir_Kind_Exit_Statement;
6905
6906   subtype Iir_Kinds_Variable_Assignment_Statement is Iir_Kind range
6907     Iir_Kind_Variable_Assignment_Statement ..
6908     Iir_Kind_Conditional_Variable_Assignment_Statement;
6909
6910   subtype Iir_Kinds_Allocator is Iir_Kind range
6911     Iir_Kind_Allocator_By_Expression ..
6912     Iir_Kind_Allocator_By_Subtype;
6913
6914   subtype Iir_Kinds_Clause is Iir_Kind range
6915     Iir_Kind_Library_Clause ..
6916   --Iir_Kind_Use_Clause
6917     Iir_Kind_Context_Reference;
6918
6919   subtype Iir_Kinds_Specification is Iir_Kind range
6920     Iir_Kind_Attribute_Specification ..
6921   --Iir_Kind_Disconnection_Specification
6922   --Iir_Kind_Step_Limit_Specification
6923     Iir_Kind_Configuration_Specification;
6924
6925   --  Nodes and lists.
6926
6927   subtype Iir is Vhdl.Nodes_Priv.Node_Type;
6928   subtype Node is Vhdl.Nodes_Priv.Node_Type;
6929
6930   Null_Iir : constant Iir := Vhdl.Nodes_Priv.Null_Node;
6931   Null_Node : constant Node := Vhdl.Nodes_Priv.Null_Node;
6932
6933   --  Return True iff Node is null / not set.
6934   function Is_Null (Node : Iir) return Boolean;
6935   pragma Inline (Is_Null);
6936
6937   --  Return True iff Node is not null / set.
6938   function Is_Valid (Node : Iir) return Boolean;
6939   pragma Inline (Is_Valid);
6940
6941   function "=" (L, R : Iir) return Boolean renames Vhdl.Nodes_Priv."=";
6942
6943   --  Get the last node allocated.
6944   function Get_Last_Node return Iir;
6945   pragma Inline (Get_Last_Node);
6946
6947   subtype Iir_List is Lists.List_Type;
6948   subtype Node_List is Lists.List_Type;
6949   Null_Iir_List : constant Iir_List := Lists.Null_List;
6950   Iir_List_All : constant Iir_List := Lists.List_All;
6951
6952   subtype List_Iterator is Lists.Iterator;
6953   function Is_Null_List (Node : Iir_List) return Boolean;
6954   pragma Inline (Is_Null_List);
6955
6956   function Create_Iir_List return Iir_List
6957     renames Lists.Create_List;
6958   procedure Append_Element (L : Iir_List; E : Iir)
6959     renames Lists.Append_Element;
6960   procedure Add_Element (L : Iir_List; E : Iir)
6961     renames Lists.Add_Element;
6962   procedure Destroy_Iir_List (L : in out Iir_List)
6963     renames Lists.Destroy_List;
6964   function Get_Nbr_Elements (L : Iir_List) return Natural
6965     renames Lists.Get_Nbr_Elements;
6966   function Get_First_Element (L : Iir_List) return Iir
6967     renames Lists.Get_First_Element;
6968   function Is_Empty (L : Iir_List) return Boolean
6969     renames Lists.Is_Empty;
6970
6971   function List_Iterate (List : Iir_List) return List_Iterator
6972     renames Lists.Iterate;
6973   function List_Iterate_Safe (List : Iir_List) return List_Iterator
6974     renames Lists.Iterate_Safe;
6975   function Is_Valid (It : List_Iterator) return Boolean
6976     renames Lists.Is_Valid;
6977   procedure Next (It : in out List_Iterator)
6978     renames Lists.Next;
6979   function Get_Element (It : List_Iterator) return Iir
6980     renames Lists.Get_Element;
6981   procedure Set_Element (It : List_Iterator; El : Iir)
6982     renames Lists.Set_Element;
6983
6984   function "=" (L, R : Iir_List) return Boolean renames Lists."=";
6985
6986   subtype Iir_Flist is Flists.Flist_Type;
6987   subtype Node_Flist is Flists.Flist_Type;
6988   Null_Iir_Flist   : constant Iir_Flist := Flists.Null_Flist;
6989   Iir_Flist_Others : constant Iir_Flist := Flists.Flist_Others;
6990   Iir_Flist_All    : constant Iir_Flist := Flists.Flist_All;
6991
6992   subtype Iir_Flists_All_Others is Iir_Flist
6993     range Iir_Flist_Others .. Iir_Flist_All;
6994
6995   Flist_First : constant Natural := Flists.Ffirst;
6996   function Flist_Last (Flist : Iir_Flist) return Natural
6997     renames Flists.Flast;
6998   function Create_Iir_Flist (Len : Natural) return Iir_Flist
6999     renames Flists.Create_Flist;
7000   function Get_Nth_Element (Flist : Iir_Flist; N : Natural) return Iir
7001     renames Flists.Get_Nth_Element;
7002   procedure Set_Nth_Element (Flist : Iir_Flist; N : Natural; El : Iir)
7003     renames Flists.Set_Nth_Element;
7004   function Get_Nbr_Elements (Flist : Iir_Flist) return Natural
7005     renames Flists.Length;
7006   procedure Destroy_Iir_Flist (Flist : in out Iir_Flist)
7007     renames Flists.Destroy_Flist;
7008   function "=" (L, R : Iir_Flist) return Boolean renames Flists."=";
7009
7010   -- This is used only for lists.
7011   type Iir_Array is array (Natural range <>) of Iir;
7012   type Iir_Array_Acc is access Iir_Array;
7013   procedure Free is new Ada.Unchecked_Deallocation
7014     (Object => Iir_Array, Name => Iir_Array_Acc);
7015
7016   --  Date State.
7017   --  This indicates the origin of the data information.
7018   --  This also indicates the state of the unit (loaded or not).
7019   type Date_State_Type is
7020     (
7021      --  The unit is not yet in the library.
7022      Date_Extern,
7023
7024      --  The unit is not loaded (still on the disk).
7025      --  All the information come from the library file.
7026      Date_Disk,
7027
7028      --  The unit has been parsed, but not analyzed.
7029      --  Only the date information come from the library.
7030      Date_Parse,
7031
7032      --  The unit has been analyzed.
7033      Date_Analyze
7034     );
7035
7036   --  A date is used for analysis order.  All design units from a library
7037   --  are ordered according to the date.
7038   type Date_Type is new Nat32;
7039
7040   --  The unit is obsoleted (ie replaced) by a more recently analyzed design
7041   --  unit.
7042   --  If another design unit depends (directly or not) on an obsoleted design
7043   --  unit, it is also obsolete, and cannot be defined.
7044   Date_Obsolete      : constant Date_Type := 0;
7045   --  A unit with the same name (could also be the same unit) is being
7046   --  analyzed.  Used to detect circular dependencies.
7047   Date_Replacing     : constant Date_Type := 1;
7048   --  The unit was not analyzed.
7049   Date_Parsed        : constant Date_Type := 4;
7050   --  The unit is being analyzed.
7051   Date_Analyzing     : constant Date_Type := 5;
7052   --  This unit has just been analyzed and should be marked at the last
7053   --  analyzed unit.
7054   Date_Analyzed      : constant Date_Type := 6;
7055   --  Used only for default configuration.
7056   --  Such units are always up-to-date.
7057   Date_Uptodate      : constant Date_Type := 7;
7058   subtype Date_Valid is Date_Type range 10 .. Date_Type'Last;
7059
7060   --  Predefined depth values.
7061   --  Depth of a subprogram not declared in another subprogram.
7062   Iir_Depth_Top : constant Iir_Int32 := 0;
7063   --  Purity depth of a pure subprogram.
7064   Iir_Depth_Pure : constant Iir_Int32 := Iir_Int32'Last;
7065   --  Purity depth of an impure subprogram.
7066   Iir_Depth_Impure : constant Iir_Int32 := -1;
7067
7068   type Number_Base_Type is (Base_None, Base_2, Base_8, Base_10, Base_16);
7069
7070   -- design file
7071   subtype Iir_Design_File is Iir;
7072
7073   subtype Iir_Design_Unit is Iir;
7074
7075   subtype Iir_Library_Clause is Iir;
7076
7077   -- Literals.
7078   --subtype Iir_Text_Literal is Iir;
7079
7080   subtype Iir_Character_Literal is Iir;
7081
7082   subtype Iir_Integer_Literal is Iir;
7083
7084   subtype Iir_Floating_Point_Literal is Iir;
7085
7086   subtype Iir_Null_Literal is Iir;
7087
7088   subtype Iir_Physical_Int_Literal is Iir;
7089
7090   subtype Iir_Physical_Fp_Literal is Iir;
7091
7092   subtype Iir_Enumeration_Literal is Iir;
7093
7094   subtype Iir_Simple_Aggregate is Iir;
7095
7096   subtype Iir_Enumeration_Type_Definition is Iir;
7097
7098   subtype Iir_Enumeration_Subtype_Definition is Iir;
7099
7100   subtype Iir_Range_Expression is Iir;
7101
7102   subtype Iir_Integer_Subtype_Definition is Iir;
7103
7104   subtype Iir_Integer_Type_Definition is Iir;
7105
7106   subtype Iir_Floating_Subtype_Definition is Iir;
7107
7108   subtype Iir_Floating_Type_Definition is Iir;
7109
7110   subtype Iir_Array_Type_Definition is Iir;
7111
7112   subtype Iir_Record_Type_Definition is Iir;
7113
7114   subtype Iir_Protected_Type_Declaration is Iir;
7115
7116   subtype Iir_Protected_Type_Body is Iir;
7117
7118   subtype Iir_Subtype_Definition is Iir;
7119
7120   subtype Iir_Array_Subtype_Definition is Iir;
7121
7122   subtype Iir_Physical_Type_Definition is Iir;
7123
7124   subtype Iir_Physical_Subtype_Definition is Iir;
7125
7126   subtype Iir_Access_Type_Definition is Iir;
7127
7128   subtype Iir_Access_Subtype_Definition is Iir;
7129
7130   subtype Iir_File_Type_Definition is Iir;
7131
7132   subtype Iir_Waveform_Element is Iir;
7133
7134   subtype Iir_Conditional_Waveform is Iir;
7135
7136   subtype Iir_Association_Element_By_Expression is Iir;
7137
7138   subtype Iir_Association_Element_By_Individual is Iir;
7139
7140   subtype Iir_Association_Element_Open is Iir;
7141
7142   subtype Iir_Signature is Iir;
7143
7144   subtype Iir_Unit_Declaration is Iir;
7145
7146   subtype Iir_Entity_Aspect_Entity is Iir;
7147
7148   subtype Iir_Entity_Aspect_Configuration is Iir;
7149
7150   subtype Iir_Entity_Aspect_Open is Iir;
7151
7152   subtype Iir_Block_Configuration is Iir;
7153
7154   subtype Iir_Block_Header is Iir;
7155
7156   subtype Iir_Component_Configuration is Iir;
7157
7158   subtype Iir_Binding_Indication is Iir;
7159
7160   subtype Iir_Entity_Class is Iir;
7161
7162   subtype Iir_Attribute_Specification is Iir;
7163
7164   subtype Iir_Attribute_Value is Iir;
7165
7166   subtype Iir_Selected_Element is Iir;
7167
7168   subtype Iir_Implicit_Dereference is Iir;
7169
7170   subtype Iir_Aggregate_Info is Iir;
7171
7172   subtype Iir_Procedure_Call is Iir;
7173
7174   subtype Iir_Disconnection_Specification is Iir;
7175
7176   -- Lists.
7177
7178   subtype Iir_Design_Unit_List is Iir_List;
7179
7180   subtype Iir_Attribute_Value_Chain is Iir_List;
7181
7182   subtype Iir_Overload_List is Iir;
7183
7184   subtype Iir_Callees_List is Iir_List;
7185
7186   -- Declaration and children.
7187   subtype Iir_Entity_Declaration is Iir;
7188
7189   subtype Iir_Architecture_Body is Iir;
7190
7191   subtype Iir_Interface_Signal_Declaration is Iir;
7192
7193   subtype Iir_Configuration_Declaration is Iir;
7194
7195   subtype Iir_Type_Declaration is Iir;
7196
7197   subtype Iir_Anonymous_Type_Declaration is Iir;
7198
7199   subtype Iir_Subtype_Declaration is Iir;
7200
7201   subtype Iir_Package_Declaration is Iir;
7202   subtype Iir_Package_Body is Iir;
7203
7204   subtype Iir_Library_Declaration is Iir;
7205
7206   subtype Iir_Function_Declaration is Iir;
7207
7208   subtype Iir_Function_Body is Iir;
7209
7210   subtype Iir_Procedure_Declaration is Iir;
7211
7212   subtype Iir_Procedure_Body is Iir;
7213
7214   subtype Iir_Use_Clause is Iir;
7215
7216   subtype Iir_Constant_Declaration is Iir;
7217
7218   subtype Iir_Iterator_Declaration is Iir;
7219
7220   subtype Iir_Interface_Constant_Declaration is Iir;
7221
7222   subtype Iir_Interface_Variable_Declaration is Iir;
7223
7224   subtype Iir_Interface_File_Declaration is Iir;
7225
7226   subtype Iir_Guard_Signal_Declaration is Iir;
7227
7228   subtype Iir_Signal_Declaration is Iir;
7229
7230   subtype Iir_Variable_Declaration is Iir;
7231
7232   subtype Iir_Component_Declaration is Iir;
7233
7234   subtype Iir_Element_Declaration is Iir;
7235
7236   subtype Iir_Object_Alias_Declaration is Iir;
7237
7238   subtype Iir_Non_Object_Alias_Declaration is Iir;
7239
7240   subtype Iir_Interface_Declaration is Iir;
7241
7242   subtype Iir_Configuration_Specification is Iir;
7243
7244   subtype Iir_File_Declaration is Iir;
7245
7246   subtype Iir_Attribute_Declaration is Iir;
7247
7248   subtype Iir_Group_Template_Declaration is Iir;
7249
7250   subtype Iir_Group_Declaration is Iir;
7251
7252   -- concurrent_statement and children.
7253   subtype Iir_Concurrent_Statement is Iir;
7254
7255   subtype Iir_Concurrent_Conditional_Signal_Assignment is Iir;
7256
7257   subtype Iir_Sensitized_Process_Statement is Iir;
7258
7259   subtype Iir_Process_Statement is Iir;
7260
7261   subtype Iir_Component_Instantiation_Statement is Iir;
7262
7263   subtype Iir_Block_Statement is Iir;
7264
7265   subtype Iir_Generate_Statement is Iir;
7266
7267   -- sequential statements.
7268   subtype Iir_If_Statement is Iir;
7269
7270   subtype Iir_Elsif is Iir;
7271
7272   subtype Iir_For_Loop_Statement is Iir;
7273
7274   subtype Iir_While_Loop_Statement is Iir;
7275
7276   subtype Iir_Exit_Statement is Iir;
7277   subtype Iir_Next_Statement is Iir;
7278
7279   subtype Iir_Variable_Assignment_Statement is Iir;
7280
7281   subtype Iir_Signal_Assignment_Statement is Iir;
7282
7283   subtype Iir_Assertion_Statement is Iir;
7284
7285   subtype Iir_Report_Statement is Iir;
7286
7287   subtype Iir_Wait_Statement is Iir;
7288
7289   subtype Iir_Return_Statement is Iir;
7290
7291   subtype Iir_Case_Statement is Iir;
7292
7293   subtype Iir_Procedure_Call_Statement is Iir;
7294
7295   -- expression and children.
7296   subtype Iir_Expression is Iir;
7297
7298   subtype Iir_Function_Call is Iir;
7299
7300   subtype Iir_Aggregate is Iir;
7301
7302   subtype Iir_Qualified_Expression is Iir;
7303
7304   subtype Iir_Type_Conversion is Iir;
7305
7306   subtype Iir_Allocator_By_Expression is Iir;
7307
7308   subtype Iir_Allocator_By_Subtype is Iir;
7309
7310   -- names.
7311   subtype Iir_Simple_Name is Iir;
7312
7313   subtype Iir_Slice_Name is Iir;
7314
7315   subtype Iir_Selected_Name is Iir;
7316
7317   subtype Iir_Selected_By_All_Name is Iir;
7318
7319   subtype Iir_Indexed_Name is Iir;
7320
7321   subtype Iir_Parenthesis_Name is Iir;
7322
7323   -- attributes.
7324   subtype Iir_Attribute_Name is Iir;
7325
7326   -- General methods.
7327
7328   -- Get the kind of the iir.
7329   function Get_Kind (N : Iir) return Iir_Kind;
7330   pragma Inline (Get_Kind);
7331
7332   function Next_Node (N : Iir) return Iir;
7333
7334   --  Create a new IIR of kind NEW_KIND, and copy fields from SRC to this
7335   --  iir.  Src fields are cleaned.
7336   --function Clone_Iir (Src: Iir; New_Kind : Iir_Kind) return Iir;
7337
7338   procedure Set_Location (N : Iir; Location : Location_Type);
7339   function Get_Location (N : Iir) return Location_Type;
7340
7341   procedure Location_Copy (Target : Iir; Src : Iir);
7342
7343   function Create_Iir (Kind : Iir_Kind) return Iir;
7344   function Create_Iir_Error return Iir;
7345   procedure Free_Iir (Target : Iir);
7346
7347   --  Hooks called when a node is free.
7348   type Free_Iir_Hook is access procedure (N : Iir);
7349   procedure Register_Free_Hook (Hook : Free_Iir_Hook);
7350
7351   --  Initialize.
7352   procedure Initialize;
7353
7354   --  Free all the memory.
7355   procedure Finalize;
7356
7357   --  Disp statistics about node usage.
7358   procedure Disp_Stats;
7359
7360   --  Design units contained in a design file.
7361   --  Field: Field5 Chain
7362   function Get_First_Design_Unit (Design : Iir) return Iir;
7363   procedure Set_First_Design_Unit (Design : Iir; Chain : Iir);
7364
7365   --  Field: Field6 Ref
7366   function Get_Last_Design_Unit (Design : Iir) return Iir;
7367   procedure Set_Last_Design_Unit (Design : Iir; Chain : Iir);
7368
7369   --  Library declaration of a library clause.  This is Forward_Ref as the
7370   --  dependency of the unit on the library is not tracked.
7371   --  Field: Field1 Forward_Ref
7372   function Get_Library_Declaration (Design : Iir) return Iir;
7373   procedure Set_Library_Declaration (Design : Iir; Library : Iir);
7374
7375   -- File time stamp is the system time of the file last modification.
7376   --  Field: Field4 (uc)
7377   function Get_File_Checksum (Design : Iir) return File_Checksum_Id;
7378   procedure Set_File_Checksum (Design : Iir; Checksum : File_Checksum_Id);
7379
7380   -- Time stamp of the last analysis system time.
7381   --  Field: Field3 (uc)
7382   function Get_Analysis_Time_Stamp (Design : Iir) return Time_Stamp_Id;
7383   procedure Set_Analysis_Time_Stamp (Design : Iir; Stamp : Time_Stamp_Id);
7384
7385   --  Field: Field7 (uc)
7386   function Get_Design_File_Source (Design : Iir) return Source_File_Entry;
7387   procedure Set_Design_File_Source (Design : Iir; Sfe : Source_File_Entry);
7388
7389   --  The library which FILE belongs to.
7390   --  Field: Field0 Ref
7391   function Get_Library (File : Iir_Design_File) return Iir;
7392   procedure Set_Library (File : Iir_Design_File; Lib : Iir);
7393
7394   --  List of files which this design file depends on.
7395   --  Field: Field1 (uc)
7396   function Get_File_Dependence_List (File : Iir_Design_File) return Iir_List;
7397   procedure Set_File_Dependence_List (File : Iir_Design_File; Lst : Iir_List);
7398
7399   --  Identifier for the design file file name.
7400   --  Field: Field12 (pos)
7401   function Get_Design_File_Filename (File : Iir_Design_File) return Name_Id;
7402   procedure Set_Design_File_Filename (File : Iir_Design_File; Name : Name_Id);
7403
7404   --  Directory of a design file.
7405   --  Field: Field11 (pos)
7406   function Get_Design_File_Directory (File : Iir_Design_File) return Name_Id;
7407   procedure Set_Design_File_Directory (File : Iir_Design_File; Dir : Name_Id);
7408
7409   --  The parent of a design unit is a design file.
7410   --  Field: Field0 Ref
7411   function Get_Design_File (Unit : Iir_Design_Unit) return Iir;
7412   procedure Set_Design_File (Unit : Iir_Design_Unit; File : Iir);
7413
7414   --  Design files of a library.
7415   --  Field: Field1 Chain
7416   function Get_Design_File_Chain (Library : Iir) return Iir;
7417   procedure Set_Design_File_Chain (Library : Iir; Chain : Iir);
7418
7419   --  System directory where the library is stored.
7420   --  Field: Field5 (pos)
7421   function Get_Library_Directory (Library : Iir) return Name_Id;
7422   procedure Set_Library_Directory (Library : Iir; Dir : Name_Id);
7423
7424   -- Symbolic date, used to order design units in a library.
7425   --  Field: Field4 (pos)
7426   function Get_Date (Target : Iir) return Date_Type;
7427   procedure Set_Date (Target : Iir; Date : Date_Type);
7428
7429   --  Chain of context clauses.
7430   --  Field: Field1 Chain
7431   function Get_Context_Items (Design_Unit : Iir) return Iir;
7432   procedure Set_Context_Items (Design_Unit : Iir; Items_Chain : Iir);
7433
7434   --  List of design units on which the design unit depends. There is an
7435   --  exception: the architecture of an entity aspect (of a component
7436   --  instantiation) may not have been analyzed.  The Entity_Aspect_Entity
7437   --  is added to this list (instead of the non-existing design unit).
7438   --  Field: Field8 Of_Ref (uc)
7439   function Get_Dependence_List (Unit : Iir) return Iir_List;
7440   procedure Set_Dependence_List (Unit : Iir; List : Iir_List);
7441
7442   --  List of functions or sensitized processes whose analysis checks are not
7443   --  complete.
7444   --  These elements have direct or indirect calls to procedure whose body is
7445   --  not yet analyzed.  Therefore, purity or wait checks are not complete.
7446   --  Field: Field9 Of_Ref (uc)
7447   function Get_Analysis_Checks_List (Unit : Iir) return Iir_List;
7448   procedure Set_Analysis_Checks_List (Unit : Iir; List : Iir_List);
7449
7450   --  Whether the unit is on disk, parsed or analyzed.
7451   --  Field: State1 (pos)
7452   function Get_Date_State (Unit : Iir_Design_Unit) return Date_State_Type;
7453   procedure Set_Date_State (Unit : Iir_Design_Unit; State : Date_State_Type);
7454
7455   --  If TRUE, the target of the signal assignment is guarded.
7456   --  If FALSE, the target is not guarded.
7457   --  This is determined during sem by examining the declaration(s) of the
7458   --  target (there may be several declarations in the case of a aggregate
7459   --  target).
7460   --  If UNKNOWN, this is not determined at compile time but at run-time.
7461   --  This is the case for formal signal interfaces of subprograms.
7462   --  Field: State1 (pos)
7463   function Get_Guarded_Target_State (Stmt : Iir) return Tri_State_Type;
7464   procedure Set_Guarded_Target_State (Stmt : Iir; State : Tri_State_Type);
7465
7466   --  Library unit of a design unit.
7467   --  Field: Field5
7468   function Get_Library_Unit (Design_Unit : Iir_Design_Unit) return Iir;
7469   procedure Set_Library_Unit (Design_Unit : Iir_Design_Unit; Lib_Unit : Iir);
7470   pragma Inline (Get_Library_Unit);
7471
7472   --  Every design unit is put in an hash table to find quickly found by its
7473   --  name.  This field is a single chain for collisions.
7474   --  Field: Field7 Forward_Ref
7475   function Get_Hash_Chain (Design_Unit : Iir_Design_Unit) return Iir;
7476   procedure Set_Hash_Chain (Design_Unit : Iir_Design_Unit; Chain : Iir);
7477
7478   -- Set the line and the offset in the line, only for the library manager.
7479   -- This is valid until the file is really loaded in memory.  On loading,
7480   -- location will contain all this information.
7481   --  Field: Field10 (uc)
7482   function Get_Design_Unit_Source_Pos (Design_Unit : Iir) return Source_Ptr;
7483   procedure Set_Design_Unit_Source_Pos (Design_Unit : Iir; Pos : Source_Ptr);
7484
7485   --  Field: Field11 (uc)
7486   function Get_Design_Unit_Source_Line (Design_Unit : Iir) return Int32;
7487   procedure Set_Design_Unit_Source_Line (Design_Unit : Iir; Line : Int32);
7488
7489   --  Field: Field12 (uc)
7490   function Get_Design_Unit_Source_Col (Design_Unit : Iir) return Int32;
7491   procedure Set_Design_Unit_Source_Col (Design_Unit : Iir; Line : Int32);
7492
7493   --  literals.
7494
7495   --  Value of an integer/physical literal.
7496   --  Field: Field4,Field5 (grp)
7497   function Get_Value (Lit : Iir) return Int64;
7498   procedure Set_Value (Lit : Iir; Val : Int64);
7499
7500   --  Position (same as lit_type'pos) of an enumeration literal.
7501   --  Field: Field5 (pos)
7502   function Get_Enum_Pos (Lit : Iir) return Iir_Int32;
7503   procedure Set_Enum_Pos (Lit : Iir; Val : Iir_Int32);
7504
7505   --  Field: Field4
7506   function Get_Physical_Literal (Unit : Iir) return Iir;
7507   procedure Set_Physical_Literal (Unit : Iir; Lit : Iir);
7508
7509   --  Value of a floating point literal.
7510   --  Field: Field4,Field5 (grp)
7511   function Get_Fp_Value (Lit : Iir) return Fp64;
7512   procedure Set_Fp_Value (Lit : Iir; Val : Fp64);
7513
7514   --  List of elements of a simple aggregate.
7515   --  Field: Field4 Ref (uc)
7516   function Get_Simple_Aggregate_List (Target : Iir) return Iir_Flist;
7517   procedure Set_Simple_Aggregate_List (Target : Iir; List : Iir_Flist);
7518
7519   --  For a string literal: the string identifier.
7520   --  Field: Field5 (uc)
7521   function Get_String8_Id (Lit : Iir) return String8_Id;
7522   procedure Set_String8_Id (Lit : Iir; Id : String8_Id);
7523
7524   --  For a string literal: the string length.
7525   --  Field: Field4 (uc)
7526   function Get_String_Length (Lit : Iir) return Int32;
7527   procedure Set_String_Length (Lit : Iir; Len : Int32);
7528
7529   --  Base of a bit string.  Base_None for a string literal.
7530   --  Field: Flag12,Flag13,Flag14 (grp)
7531   function Get_Bit_String_Base (Lit : Iir) return Number_Base_Type;
7532   procedure Set_Bit_String_Base (Lit : Iir; Base : Number_Base_Type);
7533
7534   --  Bit string is signed.
7535   --  Field: Flag1
7536   function Get_Has_Signed (Lit : Iir) return Boolean;
7537   procedure Set_Has_Signed (Lit : Iir; Flag : Boolean);
7538
7539   --  Bit string sign is explicit
7540   --  Field: Flag2
7541   function Get_Has_Sign (Lit : Iir) return Boolean;
7542   procedure Set_Has_Sign (Lit : Iir; Flag : Boolean);
7543
7544   --  Bit string length is explicit
7545   --  Field: Flag3
7546   function Get_Has_Length (Lit : Iir) return Boolean;
7547   procedure Set_Has_Length (Lit : Iir; Flag : Boolean);
7548
7549   --  Length of the literal in characters.  Used for pretty print.  Set to 0
7550   --  when doesn't come from the sources.
7551   --  Field: Field0 (uc)
7552   function Get_Literal_Length (Lit : Iir) return Int32;
7553   procedure Set_Literal_Length (Lit : Iir; Len : Int32);
7554
7555   --  The origin of a literal can be null_iir for a literal generated by the
7556   --  parser, or a node which was statically evaluated to this literal.
7557   --  Such nodes are created by eval_expr.
7558   --  Field: Field2
7559   function Get_Literal_Origin (Lit : Iir) return Iir;
7560   procedure Set_Literal_Origin (Lit : Iir; Orig : Iir);
7561
7562   --  Field: Field0
7563   function Get_Range_Origin (Lit : Iir) return Iir;
7564   procedure Set_Range_Origin (Lit : Iir; Orig : Iir);
7565
7566   --  Same as Type, but not marked as Ref.  This is when a literal has a
7567   --  subtype (such as string or bit_string) created specially for the
7568   --  literal.
7569   --  Field: Field3
7570   function Get_Literal_Subtype (Lit : Iir) return Iir;
7571   procedure Set_Literal_Subtype (Lit : Iir; Atype : Iir);
7572
7573   --  Field: Field3 Ref
7574   function Get_Allocator_Subtype (Lit : Iir) return Iir;
7575   procedure Set_Allocator_Subtype (Lit : Iir; Atype : Iir);
7576
7577   --  Field: Field3 (uc)
7578   function Get_Entity_Class (Target : Iir) return Token_Type;
7579   procedure Set_Entity_Class (Target : Iir; Kind : Token_Type);
7580
7581   --  Field: Field8 (uc)
7582   function Get_Entity_Name_List (Target : Iir) return Iir_Flist;
7583   procedure Set_Entity_Name_List (Target : Iir; Names : Iir_Flist);
7584
7585   --  Field: Field6
7586   function Get_Attribute_Designator (Target : Iir) return Iir;
7587   procedure Set_Attribute_Designator (Target : Iir; Designator : Iir);
7588
7589   --  Chain of attribute specifications.  This is used only during sem, to
7590   --  check that no named entity of a given class appear after an attr. spec.
7591   --  with the entity name list OTHERS or ALL.
7592   --  Field: Field7 Ref
7593   function Get_Attribute_Specification_Chain (Target : Iir) return Iir;
7594   procedure Set_Attribute_Specification_Chain (Target : Iir; Chain : Iir);
7595
7596   --  Field: Field4 Ref
7597   function Get_Attribute_Specification (Val : Iir) return Iir;
7598   procedure Set_Attribute_Specification (Val : Iir; Attr : Iir);
7599
7600   --  True for attributes on entity, configuration and architecture.  They
7601   --  are expected to be read from anywhere so the value is expected to be
7602   --  locally static, but this is not followed by many users and
7603   --  implementations.
7604   --  Field: Flag2
7605   function Get_Static_Attribute_Flag (Attr : Iir) return Boolean;
7606   procedure Set_Static_Attribute_Flag (Attr : Iir; Flag : Boolean);
7607
7608   --  Field: Field3 Of_Maybe_Ref (uc)
7609   function Get_Signal_List (Target : Iir) return Iir_Flist;
7610   procedure Set_Signal_List (Target : Iir; List : Iir_Flist);
7611
7612   --  Field: Field3 Of_Maybe_Ref (uc)
7613   function Get_Quantity_List (Target : Iir) return Iir_Flist;
7614   procedure Set_Quantity_List (Target : Iir; List : Iir_Flist);
7615
7616   --  Field: Field3 Forward_Ref
7617   function Get_Designated_Entity (Val : Iir_Attribute_Value) return Iir;
7618   procedure Set_Designated_Entity (Val : Iir_Attribute_Value; Entity : Iir);
7619
7620   --  Field: Field1
7621   function Get_Formal (Target : Iir) return Iir;
7622   procedure Set_Formal (Target : Iir; Formal : Iir);
7623
7624   --  Field: Field3
7625   function Get_Actual (Target : Iir) return Iir;
7626   procedure Set_Actual (Target : Iir; Actual : Iir);
7627
7628   --  Field: Field4
7629   function Get_Actual_Conversion (Target : Iir) return Iir;
7630   procedure Set_Actual_Conversion (Target : Iir; Conv : Iir);
7631
7632   --  Field: Field5
7633   function Get_Formal_Conversion (Target : Iir) return Iir;
7634   procedure Set_Formal_Conversion (Target : Iir; Conv : Iir);
7635
7636   --  This flag is set when the formal is associated in whole (ie, not
7637   --  individually).
7638   --  Field: Flag1
7639   function Get_Whole_Association_Flag (Target : Iir) return Boolean;
7640   procedure Set_Whole_Association_Flag (Target : Iir; Flag : Boolean);
7641
7642   --  This flag is set when the formal signal can be the actual signal.  In
7643   --  this case, the formal signal is not created, and the actual is shared.
7644   --  This is the signal collapsing optimisation.
7645   --  Field: Flag2
7646   function Get_Collapse_Signal_Flag (Target : Iir) return Boolean;
7647   procedure Set_Collapse_Signal_Flag (Target : Iir; Flag : Boolean);
7648
7649   --  Set when the node was artificially created, eg by canon.
7650   --  Currently used only by association_element_open.
7651   --  Field: Flag3
7652   function Get_Artificial_Flag (Target : Iir) return Boolean;
7653   procedure Set_Artificial_Flag (Target : Iir; Flag : Boolean);
7654
7655   --  This flag is set for a very short time during the check that no in
7656   --  port is unconnected.
7657   --  Field: Flag7
7658   function Get_Open_Flag (Target : Iir) return Boolean;
7659   procedure Set_Open_Flag (Target : Iir; Flag : Boolean);
7660
7661   --  This flag is set by trans_analyze if there is a projected waveform
7662   --  assignment in the process.
7663   --  Field: Flag5
7664   function Get_After_Drivers_Flag (Target : Iir) return Boolean;
7665   procedure Set_After_Drivers_Flag (Target : Iir; Flag : Boolean);
7666
7667   --  Field: Field1
7668   function Get_We_Value (We : Iir_Waveform_Element) return Iir;
7669   procedure Set_We_Value (We : Iir_Waveform_Element; An_Iir : Iir);
7670
7671   --  Field: Field3
7672   function Get_Time (We : Iir_Waveform_Element) return Iir;
7673   procedure Set_Time (We : Iir_Waveform_Element; An_Iir : Iir);
7674
7675   --  Node associated with a choice.
7676   --  Field: Field3
7677   function Get_Associated_Expr (Target : Iir) return Iir;
7678   procedure Set_Associated_Expr (Target : Iir; Associated : Iir);
7679
7680   --  Node associated with a choice.
7681   --  Field: Field3
7682   function Get_Associated_Block (Target : Iir) return Iir;
7683   procedure Set_Associated_Block (Target : Iir; Associated : Iir);
7684
7685   --  Chain associated with a choice.
7686   --  Field: Field4 Chain
7687   function Get_Associated_Chain (Target : Iir) return Iir;
7688   procedure Set_Associated_Chain (Target : Iir; Associated : Iir);
7689
7690   --  Field: Field5
7691   function Get_Choice_Name (Choice : Iir) return Iir;
7692   procedure Set_Choice_Name (Choice : Iir; Name : Iir);
7693
7694   --  Field: Field5
7695   function Get_Choice_Expression (Choice : Iir) return Iir;
7696   procedure Set_Choice_Expression (Choice : Iir; Name : Iir);
7697
7698   --  Field: Field5
7699   function Get_Choice_Range (Choice : Iir) return Iir;
7700   procedure Set_Choice_Range (Choice : Iir; Name : Iir);
7701
7702   --  Set when a choice belongs to the same alternative as the previous one.
7703   --  Field: Flag1
7704   function Get_Same_Alternative_Flag (Target : Iir) return Boolean;
7705   procedure Set_Same_Alternative_Flag (Target : Iir; Val : Boolean);
7706
7707   --  For one-dimensional aggregates: the value associated of the type of the
7708   --  element (vs of the type of the aggregate).  Always true before vhdl-08.
7709   --  Field: Flag2
7710   function Get_Element_Type_Flag (Target : Iir) return Boolean;
7711   procedure Set_Element_Type_Flag (Target : Iir; Val : Boolean);
7712
7713   --  Field: Field3
7714   function Get_Architecture (Target : Iir_Entity_Aspect_Entity) return Iir;
7715   procedure Set_Architecture (Target : Iir_Entity_Aspect_Entity; Arch : Iir);
7716
7717   --  Field: Field5
7718   function Get_Block_Specification (Target : Iir) return Iir;
7719   procedure Set_Block_Specification (Target : Iir; Block : Iir);
7720
7721   --  Return the link of the previous block_configuration of a
7722   --  block_configuration.
7723   --  This single linked list is used to list all the block_configuration that
7724   --  configuration the same block (which can only be an iterative generate
7725   --  statement).
7726   --  All elements of this list must belong to the same block configuration.
7727   --  The order is not important.
7728   --  Field: Field4 Ref
7729   function Get_Prev_Block_Configuration (Target : Iir) return Iir;
7730   procedure Set_Prev_Block_Configuration (Target : Iir; Block : Iir);
7731
7732   --  Field: Field3 Chain
7733   function Get_Configuration_Item_Chain (Target : Iir) return Iir;
7734   procedure Set_Configuration_Item_Chain (Target : Iir; Chain : Iir);
7735
7736   --  Chain of attribute values for declared items.
7737   --  To be used with Get/Set_Value_Chain.
7738   --  There is no order, therefore, a new attribute value may be always
7739   --  prepended.
7740   --  Field: Field5 Ref
7741   function Get_Attribute_Value_Chain (Target : Iir) return Iir;
7742   procedure Set_Attribute_Value_Chain (Target : Iir; Chain : Iir);
7743
7744   --  Next attribute value in the attribute specification chain (of attribute
7745   --  value).
7746   --  FIXME: should be a Chain.
7747   --  Field: Field2
7748   function Get_Spec_Chain (Target : Iir) return Iir;
7749   procedure Set_Spec_Chain (Target : Iir; Chain : Iir);
7750
7751   --  Next attribute value in the parent chain (of attribute value).
7752   --  Field: Field0 Ref
7753   function Get_Value_Chain (Target : Iir) return Iir;
7754   procedure Set_Value_Chain (Target : Iir; Chain : Iir);
7755
7756   --  Chain of attribute values for attribute specification.
7757   --  To be used with Get/Set_Spec_Chain.
7758   --  Field: Field4
7759   function Get_Attribute_Value_Spec_Chain (Target : Iir) return Iir;
7760   procedure Set_Attribute_Value_Spec_Chain (Target : Iir; Chain : Iir);
7761
7762   --  The entity name for an architecture or a configuration.
7763   --  Field: Field2
7764   function Get_Entity_Name (Arch : Iir) return Iir;
7765   procedure Set_Entity_Name (Arch : Iir; Entity : Iir);
7766
7767   --  The package declaration corresponding to the body.
7768   --  Field: Field4 Ref
7769   function Get_Package (Package_Body : Iir) return Iir;
7770   procedure Set_Package (Package_Body : Iir; Decl : Iir);
7771
7772   --  The package body corresponding to the package declaration.
7773   --  Field: Field4 Forward_Ref
7774   function Get_Package_Body (Pkg : Iir) return Iir;
7775   procedure Set_Package_Body (Pkg : Iir; Decl : Iir);
7776
7777   --  The package body corresponding to the package declaration.
7778   --  Field: Field4
7779   function Get_Instance_Package_Body (Pkg : Iir) return Iir;
7780   procedure Set_Instance_Package_Body (Pkg : Iir; Decl : Iir);
7781
7782   --  Field: Flag1
7783   function Get_Need_Body (Decl : Iir_Package_Declaration) return Boolean;
7784   procedure Set_Need_Body (Decl : Iir_Package_Declaration; Flag : Boolean);
7785
7786   --  Field: Flag2
7787   function Get_Macro_Expanded_Flag (Decl : Iir) return Boolean;
7788   procedure Set_Macro_Expanded_Flag (Decl : Iir; Flag : Boolean);
7789
7790   --  Field: Flag3
7791   function Get_Need_Instance_Bodies (Decl : Iir) return Boolean;
7792   procedure Set_Need_Instance_Bodies (Decl : Iir; Flag : Boolean);
7793
7794   --  Field: Field1
7795   function Get_Hierarchical_Name (Vunit : Iir) return Iir;
7796   procedure Set_Hierarchical_Name (Vunit : Iir; Name : Iir);
7797
7798   --  Field: Field2 Chain
7799   function Get_Inherit_Spec_Chain (Vunit : Iir) return Iir;
7800   procedure Set_Inherit_Spec_Chain (Vunit : Iir; Chain : Iir);
7801
7802   --  Field: Field6 Chain
7803   function Get_Vunit_Item_Chain (Vunit : Iir) return Iir;
7804   procedure Set_Vunit_Item_Chain (Vunit : Iir; Chain : Iir);
7805
7806   --  Chain of vunit declarations bound to an entity or an architecture.
7807   --  Field: Field8 Chain
7808   function Get_Bound_Vunit_Chain (Unit : Iir) return Iir;
7809   procedure Set_Bound_Vunit_Chain (Unit : Iir; Vunit : Iir);
7810
7811   --  Field: Field4
7812   function Get_Verification_Block_Configuration (Vunit : Iir) return Iir;
7813   procedure Set_Verification_Block_Configuration (Vunit : Iir; Conf : Iir);
7814
7815   --  Field: Field4
7816   function Get_Block_Configuration (Target : Iir) return Iir;
7817   procedure Set_Block_Configuration (Target : Iir; Block : Iir);
7818
7819   --  Field: Field4 Chain
7820   function Get_Concurrent_Statement_Chain (Target : Iir) return Iir;
7821   procedure Set_Concurrent_Statement_Chain (Target : Iir; First : Iir);
7822
7823   --  Field: Field2 Chain_Next
7824   function Get_Chain (Target : Iir) return Iir;
7825   procedure Set_Chain (Target : Iir; Chain : Iir);
7826   pragma Inline (Get_Chain);
7827
7828   --  Field: Field7 Chain
7829   function Get_Port_Chain (Target : Iir) return Iir;
7830   procedure Set_Port_Chain (Target : Iir; Chain : Iir);
7831
7832   --  Field: Field6 Chain
7833   function Get_Generic_Chain (Target : Iir) return Iir;
7834   procedure Set_Generic_Chain (Target : Iir; Generics : Iir);
7835
7836   --  Field: Field1 Ref
7837   function Get_Type (Target : Iir) return Iir;
7838   procedure Set_Type (Target : Iir; Atype : Iir);
7839   pragma Inline (Get_Type);
7840
7841   --  The subtype indication of a declaration.  If several declarations share
7842   --  the same subtype_indication like in:
7843   --    variable a, b : integer := 5;
7844   --  then only the first declaration is the owner of the subtype_indication.
7845   --  Field: Field5 Maybe_Ref
7846   function Get_Subtype_Indication (Target : Iir) return Iir;
7847   procedure Set_Subtype_Indication (Target : Iir; Atype : Iir);
7848
7849   --  Discrete range of an iterator.  During analysis, a subtype indication
7850   --  is created from this range.
7851   --  Field: Field4
7852   function Get_Discrete_Range (Target : Iir) return Iir;
7853   procedure Set_Discrete_Range (Target : Iir; Rng : Iir);
7854
7855   --  Field: Field1
7856   function Get_Type_Definition (Decl : Iir) return Iir;
7857   procedure Set_Type_Definition (Decl : Iir; Atype : Iir);
7858
7859   --  The subtype definition associated with the type declaration (if any).
7860   --  Field: Field4 Forward_Ref
7861   function Get_Subtype_Definition (Target : Iir) return Iir;
7862   procedure Set_Subtype_Definition (Target : Iir; Def : Iir);
7863
7864   --  Set if the type declaration completes an incomplete type declaration
7865   --  Field: Field5 Ref
7866   function Get_Incomplete_Type_Declaration (N : Iir) return Iir;
7867   procedure Set_Incomplete_Type_Declaration (N : Iir; Decl : Iir);
7868
7869   --  Implicit operations of an interface type declaration.
7870   --  Field: Field4 Chain
7871   function Get_Interface_Type_Subprograms (Target : Iir) return Iir;
7872   procedure Set_Interface_Type_Subprograms (Target : Iir; Subprg : Iir);
7873
7874   --  Field: Field1
7875   function Get_Nature_Definition (Target : Iir) return Iir;
7876   procedure Set_Nature_Definition (Target : Iir; Def : Iir);
7877
7878   --  Field: Field1 Ref
7879   function Get_Nature (Target : Iir) return Iir;
7880   procedure Set_Nature (Target : Iir; Nature : Iir);
7881
7882   --  Field: Field5
7883   function Get_Subnature_Indication (Decl : Iir) return Iir;
7884   procedure Set_Subnature_Indication (Decl : Iir; Sub_Nature : Iir);
7885
7886   --  Mode of interfaces or file (v87).
7887   --  Field: Flag13,Flag14,Flag15 (grp)
7888   function Get_Mode (Target : Iir) return Iir_Mode;
7889   procedure Set_Mode (Target : Iir; Mode : Iir_Mode);
7890
7891   --  True if the signal is guarded (has a signal kind).
7892   --  Field: Flag8
7893   function Get_Guarded_Signal_Flag (Target : Iir) return Boolean;
7894   procedure Set_Guarded_Signal_Flag (Target : Iir; Guarded : Boolean);
7895
7896   --  Field: Flag9 (uc)
7897   function Get_Signal_Kind (Target : Iir) return Iir_Signal_Kind;
7898   procedure Set_Signal_Kind (Target : Iir; Signal_Kind : Iir_Signal_Kind);
7899
7900   --  The base name of a name is the node at the origin of the name.
7901   --  The base name is a declaration (signal, object, constant or interface),
7902   --  a selected_by_all name, an implicit_dereference name.
7903   --  Field: Field5 Ref
7904   function Get_Base_Name (Target : Iir) return Iir;
7905   procedure Set_Base_Name (Target : Iir; Name : Iir);
7906   pragma Inline (Get_Base_Name);
7907
7908   --  Field: Field5 Chain
7909   function Get_Interface_Declaration_Chain (Target : Iir) return Iir;
7910   procedure Set_Interface_Declaration_Chain (Target : Iir; Chain : Iir);
7911   pragma Inline (Get_Interface_Declaration_Chain);
7912
7913   --  Field: Field6 Ref
7914   function Get_Subprogram_Specification (Target : Iir) return Iir;
7915   procedure Set_Subprogram_Specification (Target : Iir; Spec : Iir);
7916
7917   --  Field: Field4 Chain
7918   function Get_Sequential_Statement_Chain (Target : Iir) return Iir;
7919   procedure Set_Sequential_Statement_Chain (Target : Iir; Chain : Iir);
7920
7921   --  Field: Field4 Chain
7922   function Get_Simultaneous_Statement_Chain (Target : Iir) return Iir;
7923   procedure Set_Simultaneous_Statement_Chain (Target : Iir; Chain : Iir);
7924
7925   --  The body of a subprogram (from the subprogram specification).
7926   --  Note that this field is only set when the body has been analyzed (ok,
7927   --  that's obvious).  For subprogram specifications in instantiated package,
7928   --  this field is in general not set because the package specification may
7929   --  be instantiated before the package body is analyzed and there is no
7930   --  tracking of all instantiated packages.  So when the package body is
7931   --  analyzed, there is no way to set this field for the subprograms in all
7932   --  instantiated specifications.
7933   --  You could use Get_Subprogram_Body_Origin to extract the body.  It uses
7934   --  the Origin link to find the original specification which has this field
7935   --  set.
7936   --  Field: Field9 Forward_Ref
7937   function Get_Subprogram_Body (Target : Iir) return Iir;
7938   procedure Set_Subprogram_Body (Target : Iir; A_Body : Iir);
7939
7940   --  Several subprograms in a declarative region may have the same
7941   --  identifier.  If the overload number is not 0, it is the rank of the
7942   --  subprogram.  If the overload number is 0, then the identifier is not
7943   --  overloaded in the declarative region.
7944   --  Field: Field12 (pos)
7945   function Get_Overload_Number (Target : Iir) return Iir_Int32;
7946   procedure Set_Overload_Number (Target : Iir; Val : Iir_Int32);
7947
7948   --  Depth of a subprogram.
7949   --  For a subprogram declared immediately within an entity, architecture,
7950   --  package, process, block, generate, the depth is 0.
7951   --  For a subprogram declared immediately within a subprogram of level N,
7952   --  the depth is N + 1.
7953   --  Depth is used with depth of impure objects to check purity rules.
7954   --  Field: Field10 (pos)
7955   function Get_Subprogram_Depth (Target : Iir) return Iir_Int32;
7956   procedure Set_Subprogram_Depth (Target : Iir; Depth : Iir_Int32);
7957
7958   --  Hash of a subprogram profile.
7959   --  This is used to speed up subprogram profile comparison, which is very
7960   --  often used by overload.
7961   --  Field: Field4 (pos)
7962   function Get_Subprogram_Hash (Target : Iir) return Iir_Int32;
7963   procedure Set_Subprogram_Hash (Target : Iir; Val : Iir_Int32);
7964   pragma Inline (Get_Subprogram_Hash);
7965
7966   --  Depth of the deepest impure object.
7967   --  Field: Field3 (uc)
7968   function Get_Impure_Depth (Target : Iir) return Iir_Int32;
7969   procedure Set_Impure_Depth (Target : Iir; Depth : Iir_Int32);
7970
7971   --  Field: Field1 Ref
7972   function Get_Return_Type (Target : Iir) return Iir;
7973   procedure Set_Return_Type (Target : Iir; Decl : Iir);
7974   pragma Inline (Get_Return_Type);
7975
7976   --  Code of an implicit subprogram definition.
7977   --  Field: Field7 (pos)
7978   function Get_Implicit_Definition (D : Iir) return Iir_Predefined_Functions;
7979   procedure Set_Implicit_Definition (D : Iir; Def : Iir_Predefined_Functions);
7980
7981   --  Field: Field7
7982   function Get_Uninstantiated_Subprogram_Name (N : Iir) return Iir;
7983   procedure Set_Uninstantiated_Subprogram_Name (N : Iir; Name : Iir);
7984
7985   --  Get the default value of an object declaration.
7986   --  Null_iir if no default value.
7987   --  Note that this node can be shared between declarations if they are
7988   --  separated by comma, such as in:
7989   --    variable a, b : integer := 5;
7990   --    procedure p (a, b : natural := 7);
7991   --  Field: Field4 Maybe_Ref
7992   function Get_Default_Value (Target : Iir) return Iir;
7993   procedure Set_Default_Value (Target : Iir; Value : Iir);
7994
7995   --  The deferred_declaration field points to the deferred constant
7996   --  declaration for a full constant declaration, or is null_iir for a
7997   --  usual or deferred constant declaration.
7998   --  Set only during sem.
7999   --  Field: Field6 Forward_Ref
8000   function Get_Deferred_Declaration (Target : Iir) return Iir;
8001   procedure Set_Deferred_Declaration (Target : Iir; Decl : Iir);
8002
8003   --  The deferred_declaration_flag must be set if the constant declaration is
8004   --  a deferred_constant declaration.
8005   --  Set only during sem.
8006   --  Field: Flag1
8007   function Get_Deferred_Declaration_Flag (Target : Iir) return Boolean;
8008   procedure Set_Deferred_Declaration_Flag (Target : Iir; Flag : Boolean);
8009
8010   --  If true, the variable is declared shared.
8011   --  Field: Flag2
8012   function Get_Shared_Flag (Target : Iir) return Boolean;
8013   procedure Set_Shared_Flag (Target : Iir; Shared : Boolean);
8014
8015   --  Get the design unit in which the target is declared.
8016   --  For a library unit, this is to get the design unit node.
8017   --  Field: Field0
8018   function Get_Design_Unit (Target : Iir) return Iir;
8019   procedure Set_Design_Unit (Target : Iir; Unit : Iir);
8020
8021   --  Corresponding block statement for an implicit guard signal.
8022   --  Field: Field5 Ref
8023   function Get_Block_Statement (Target : Iir) return Iir;
8024   procedure Set_Block_Statement (Target : Iir; Block : Iir);
8025
8026   --  For a non-resolved signal: null_iir if the signal has no driver, or
8027   --  a process/concurrent_statement for which the signal should have a
8028   --  driver.  This is used to catch at analyse time unresolved signals with
8029   --  several drivers.
8030   --  Field: Field7
8031   function Get_Signal_Driver (Target : Iir_Signal_Declaration) return Iir;
8032   procedure Set_Signal_Driver (Target : Iir_Signal_Declaration; Driver : Iir);
8033
8034   --  Field: Field1 Chain
8035   function Get_Declaration_Chain (Target : Iir) return Iir;
8036   procedure Set_Declaration_Chain (Target : Iir; Decls : Iir);
8037
8038   --  Field: Field6
8039   function Get_File_Logical_Name (Target : Iir_File_Declaration) return Iir;
8040   procedure Set_File_Logical_Name (Target : Iir_File_Declaration; Name : Iir);
8041
8042   --  Field: Field7
8043   function Get_File_Open_Kind (Target : Iir_File_Declaration) return Iir;
8044   procedure Set_File_Open_Kind (Target : Iir_File_Declaration; Kind : Iir);
8045
8046   --  Field: Field4 (pos)
8047   function Get_Element_Position (Target : Iir) return Iir_Index32;
8048   procedure Set_Element_Position (Target : Iir; Pos : Iir_Index32);
8049
8050   --  Selected names of an use_clause are chained.
8051   --  Field: Field3
8052   function Get_Use_Clause_Chain (Target : Iir) return Iir;
8053   procedure Set_Use_Clause_Chain (Target : Iir; Chain : Iir);
8054
8055   --  Selected names of a context_reference are chained.
8056   --  Field: Field3
8057   function Get_Context_Reference_Chain (Target : Iir) return Iir;
8058   procedure Set_Context_Reference_Chain (Target : Iir; Chain : Iir);
8059
8060   --  Selected name of an use_clause or context_reference
8061   --  Field: Field1
8062   function Get_Selected_Name (Target : Iir) return Iir;
8063   procedure Set_Selected_Name (Target : Iir; Name : Iir);
8064
8065   --  The type declarator which declares the type definition DEF.  Can also
8066   --  be a nature declarator for composite nature definition.
8067   --  Field: Field3 Ref
8068   function Get_Type_Declarator (Def : Iir) return Iir;
8069   procedure Set_Type_Declarator (Def : Iir; Decl : Iir);
8070
8071   --  Field: Field5 Forward_Ref
8072   function Get_Complete_Type_Definition (N : Iir) return Iir;
8073   procedure Set_Complete_Type_Definition (N : Iir; Def : Iir);
8074
8075   --  Field: Field0 Forward_Ref
8076   function Get_Incomplete_Type_Ref_Chain (N : Iir) return Iir;
8077   procedure Set_Incomplete_Type_Ref_Chain (N : Iir; Def : Iir);
8078
8079   --  Field: Field5 Ref
8080   function Get_Associated_Type (Def : Iir) return Iir;
8081   procedure Set_Associated_Type (Def : Iir; Atype : Iir);
8082
8083   --  Field: Field2 (uc)
8084   function Get_Enumeration_Literal_List (Target : Iir) return Iir_Flist;
8085   procedure Set_Enumeration_Literal_List (Target : Iir; List : Iir_Flist);
8086
8087   --  Field: Field1 Chain
8088   function Get_Entity_Class_Entry_Chain (Target : Iir) return Iir;
8089   procedure Set_Entity_Class_Entry_Chain (Target : Iir; Chain : Iir);
8090
8091   --  Field: Field1 (uc)
8092   function Get_Group_Constituent_List (Group : Iir) return Iir_Flist;
8093   procedure Set_Group_Constituent_List (Group : Iir; List : Iir_Flist);
8094
8095   --  Chain of physical type units.
8096   --  The first unit is the primary unit.  If you really need the primary
8097   --  unit (and not the chain), you'd better to use Get_Primary_Unit.
8098   --  Field: Field2 Chain
8099   function Get_Unit_Chain (Target : Iir) return Iir;
8100   procedure Set_Unit_Chain (Target : Iir; Chain : Iir);
8101
8102   --  Alias of Get_Unit_Chain.
8103   --  Return the primary unit of a physical type.
8104   --  Field: Field2 Ref
8105   function Get_Primary_Unit (Target : Iir) return Iir;
8106   procedure Set_Primary_Unit (Target : Iir; Unit : Iir);
8107
8108   --  Get/Set the identifier of a declaration.
8109   --  Can also be used instead of get/set_label.
8110   --  Field: Field3 (uc)
8111   function Get_Identifier (Target : Iir) return Name_Id;
8112   procedure Set_Identifier (Target : Iir; Identifier : Name_Id);
8113   pragma Inline (Get_Identifier);
8114
8115   --  Field: Field3 (uc)
8116   function Get_Label (Target : Iir) return Name_Id;
8117   procedure Set_Label (Target : Iir; Label : Name_Id);
8118
8119   --  Get/Set the visible flag of a declaration.
8120   --  The visible flag is true to make invalid the use of the identifier
8121   --  during its declaration.  It is set to false when the identifier is added
8122   --  to the name table, and set to true when the declaration is finished.
8123   --  Field: Flag4
8124   function Get_Visible_Flag (Target : Iir) return Boolean;
8125   procedure Set_Visible_Flag (Target : Iir; Flag : Boolean);
8126
8127   --  Field: Field1 Maybe_Ref
8128   function Get_Range_Constraint (Target : Iir) return Iir;
8129   procedure Set_Range_Constraint (Target : Iir; Constraint : Iir);
8130
8131   --  Field: Flag1 (uc)
8132   function Get_Direction (Decl : Iir) return Direction_Type;
8133   procedure Set_Direction (Decl : Iir; Dir : Direction_Type);
8134
8135   --  Field: Field4 Ref
8136   function Get_Left_Limit (Decl : Iir_Range_Expression) return Iir;
8137   procedure Set_Left_Limit (Decl : Iir_Range_Expression; Limit : Iir);
8138
8139   --  Field: Field5 Ref
8140   function Get_Right_Limit (Decl : Iir_Range_Expression) return Iir;
8141   procedure Set_Right_Limit (Decl : Iir_Range_Expression; Limit : Iir);
8142
8143   --  Field: Field2
8144   function Get_Left_Limit_Expr (Decl : Iir_Range_Expression) return Iir;
8145   procedure Set_Left_Limit_Expr (Decl : Iir_Range_Expression; Limit : Iir);
8146
8147   --  Field: Field3
8148   function Get_Right_Limit_Expr (Decl : Iir_Range_Expression) return Iir;
8149   procedure Set_Right_Limit_Expr (Decl : Iir_Range_Expression; Limit : Iir);
8150
8151   --  Field: Field4 Ref
8152   function Get_Parent_Type (Decl : Iir) return Iir;
8153   procedure Set_Parent_Type (Decl : Iir; Base_Type : Iir);
8154   pragma Inline (Get_Parent_Type);
8155
8156   --  Only for composite base nature: the simple nature.
8157   --  Field: Field7 Ref
8158   function Get_Simple_Nature (Def : Iir) return Iir;
8159   procedure Set_Simple_Nature (Def : Iir; Nature : Iir);
8160
8161   --  Field: Field4 Ref
8162   function Get_Base_Nature (Decl : Iir) return Iir;
8163   procedure Set_Base_Nature (Decl : Iir; Base_Nature : Iir);
8164
8165   --  Either a resolution function name, an array_element_resolution or a
8166   --  record_resolution
8167   --  Field: Field5
8168   function Get_Resolution_Indication (Decl : Iir) return Iir;
8169   procedure Set_Resolution_Indication (Decl : Iir; Ind : Iir);
8170
8171   --  Field: Field1 Chain
8172   function Get_Record_Element_Resolution_Chain (Res : Iir) return Iir;
8173   procedure Set_Record_Element_Resolution_Chain (Res : Iir; Chain : Iir);
8174
8175   --  Field: Field7
8176   function Get_Tolerance (Def : Iir) return Iir;
8177   procedure Set_Tolerance (Def : Iir; Tol : Iir);
8178
8179   --  Field: Field8
8180   function Get_Plus_Terminal_Name (Def : Iir) return Iir;
8181   procedure Set_Plus_Terminal_Name (Def : Iir; Name : Iir);
8182
8183   --  Field: Field9
8184   function Get_Minus_Terminal_Name (Def : Iir) return Iir;
8185   procedure Set_Minus_Terminal_Name (Def : Iir; Name : Iir);
8186
8187   --  Field: Field10 Ref
8188   function Get_Plus_Terminal (Def : Iir) return Iir;
8189   procedure Set_Plus_Terminal (Def : Iir; Terminal : Iir);
8190
8191   --  Field: Field11 Ref
8192   function Get_Minus_Terminal (Def : Iir) return Iir;
8193   procedure Set_Minus_Terminal (Def : Iir; Terminal : Iir);
8194
8195   --  Field: Field6
8196   function Get_Magnitude_Expression (Decl : Iir) return Iir;
8197   procedure Set_Magnitude_Expression (Decl : Iir; Expr : Iir);
8198
8199   --  Field: Field7
8200   function Get_Phase_Expression (Decl : Iir) return Iir;
8201   procedure Set_Phase_Expression (Decl : Iir; Expr : Iir);
8202
8203   --  Field: Field4
8204   function Get_Power_Expression (Decl : Iir) return Iir;
8205   procedure Set_Power_Expression (Decl : Iir; Expr : Iir);
8206
8207   --  Field: Field5
8208   function Get_Simultaneous_Left (Def : Iir) return Iir;
8209   procedure Set_Simultaneous_Left (Def : Iir; Expr : Iir);
8210
8211   --  Field: Field6
8212   function Get_Simultaneous_Right (Def : Iir) return Iir;
8213   procedure Set_Simultaneous_Right (Def : Iir; Expr : Iir);
8214
8215   --  True if ATYPE defines std.textio.text file type.
8216   --  Field: Flag4
8217   function Get_Text_File_Flag (Atype : Iir) return Boolean;
8218   procedure Set_Text_File_Flag (Atype : Iir; Flag : Boolean);
8219
8220   --  True if enumeration type ATYPE has only character literals.
8221   --  Field: Flag4
8222   function Get_Only_Characters_Flag (Atype : Iir) return Boolean;
8223   procedure Set_Only_Characters_Flag (Atype : Iir; Flag : Boolean);
8224
8225   --  True if enumeration type ATYPE is a character type.
8226   --  Field: Flag5
8227   function Get_Is_Character_Type (Atype : Iir) return Boolean;
8228   procedure Set_Is_Character_Type (Atype : Iir; Flag : Boolean);
8229
8230   --  Field: State1 (pos)
8231   function Get_Nature_Staticness (Anat : Iir) return Iir_Staticness;
8232   procedure Set_Nature_Staticness (Anat : Iir; Static : Iir_Staticness);
8233
8234   --  Field: State1 (pos)
8235   function Get_Type_Staticness (Atype : Iir) return Iir_Staticness;
8236   procedure Set_Type_Staticness (Atype : Iir; Static : Iir_Staticness);
8237
8238   --  Field: State2 (pos)
8239   function Get_Constraint_State (Atype : Iir) return Iir_Constraint;
8240   procedure Set_Constraint_State (Atype : Iir; State : Iir_Constraint);
8241
8242   --  Reference either index_subtype_definition_list of array_type_definition
8243   --  or index_constraint_list of array_subtype_definition.  Set only when
8244   --  the index_sutype is constrained (to differentiate with unconstrained
8245   --  index type).
8246   --  Field: Field9 Ref (uc)
8247   function Get_Index_Subtype_List (Decl : Iir) return Iir_Flist;
8248   procedure Set_Index_Subtype_List (Decl : Iir; List : Iir_Flist);
8249
8250   --  List of type marks for indexes type of array types.
8251   --  Field: Field6 (uc)
8252   function Get_Index_Subtype_Definition_List (Def : Iir) return Iir_Flist;
8253   procedure Set_Index_Subtype_Definition_List (Def : Iir; Idx : Iir_Flist);
8254
8255   --  The subtype_indication as it appears in a array type declaration.
8256   --  Field: Field2
8257   function Get_Element_Subtype_Indication (Decl : Iir) return Iir;
8258   procedure Set_Element_Subtype_Indication (Decl : Iir; Sub_Type : Iir);
8259
8260   --  Field: Field1 Ref
8261   function Get_Element_Subtype (Decl : Iir) return Iir;
8262   procedure Set_Element_Subtype (Decl : Iir; Sub_Type : Iir);
8263
8264   --  Field: Field2
8265   function Get_Element_Subnature_Indication (Decl : Iir) return Iir;
8266   procedure Set_Element_Subnature_Indication (Decl : Iir; Sub_Nature : Iir);
8267
8268   --  Field: Field1 Ref
8269   function Get_Element_Subnature (Decl : Iir) return Iir;
8270   procedure Set_Element_Subnature (Decl : Iir; Sub_Nature : Iir);
8271
8272   --  Field: Field6 (uc)
8273   function Get_Index_Constraint_List (Def : Iir) return Iir_Flist;
8274   procedure Set_Index_Constraint_List (Def : Iir; List : Iir_Flist);
8275
8276   --  Field: Field8
8277   function Get_Array_Element_Constraint (Def : Iir) return Iir;
8278   procedure Set_Array_Element_Constraint (Def : Iir; El : Iir);
8279
8280   --  Field: Flag5
8281   function Get_Has_Array_Constraint_Flag (Def : Iir) return Boolean;
8282   procedure Set_Has_Array_Constraint_Flag (Def : Iir; Flag : Boolean);
8283
8284   --  Field: Flag6
8285   function Get_Has_Element_Constraint_Flag (Def : Iir) return Boolean;
8286   procedure Set_Has_Element_Constraint_Flag (Def : Iir; Flag : Boolean);
8287
8288   --  List of elements of a record.
8289   --  For a record_type_definition: Is_Ref is false, as the elements
8290   --   declaration are owned by the type definition.
8291   --  For a record_subtype_definition: Is_Ref is false, as new constrained
8292   --   elements are owned through the Owned_Elements_Chain list.
8293   --  Field: Field1 Of_Maybe_Ref (uc)
8294   function Get_Elements_Declaration_List (Decl : Iir) return Iir_Flist;
8295   procedure Set_Elements_Declaration_List (Decl : Iir; List : Iir_Flist);
8296
8297   --  Field: Field6 Chain
8298   function Get_Owned_Elements_Chain (Atype : Iir) return Iir;
8299   procedure Set_Owned_Elements_Chain (Atype : Iir; Chain : Iir);
8300
8301   --  Field: Field1 Forward_Ref
8302   function Get_Designated_Type (Target : Iir) return Iir;
8303   procedure Set_Designated_Type (Target : Iir; Dtype : Iir);
8304
8305   --  Field: Field5
8306   function Get_Designated_Subtype_Indication (Target : Iir) return Iir;
8307   procedure Set_Designated_Subtype_Indication (Target : Iir; Dtype : Iir);
8308
8309   --  List of indexes for indexed name.
8310   --  Field: Field2 (uc)
8311   function Get_Index_List (Decl : Iir) return Iir_Flist;
8312   procedure Set_Index_List (Decl : Iir; List : Iir_Flist);
8313
8314   --  The terminal declaration for the reference (ground) of a nature
8315   --  Field: Field2 Forward_Ref
8316   function Get_Reference (Def : Iir) return Iir;
8317   procedure Set_Reference (Def : Iir; Ref : Iir);
8318
8319   --  Field: Field3 Ref
8320   function Get_Nature_Declarator (Def : Iir) return Iir;
8321   procedure Set_Nature_Declarator (Def : Iir; Decl : Iir);
8322
8323   --  Field: Field9
8324   function Get_Across_Type_Mark (Def : Iir) return Iir;
8325   procedure Set_Across_Type_Mark (Def : Iir; Name : Iir);
8326
8327   --  Field: Field10
8328   function Get_Through_Type_Mark (Def : Iir) return Iir;
8329   procedure Set_Through_Type_Mark (Def : Iir; Atype : Iir);
8330
8331   --  For array and record nature: the owner of the across type.
8332   --  Field: Field10
8333   function Get_Across_Type_Definition (Def : Iir) return Iir;
8334   procedure Set_Across_Type_Definition (Def : Iir; Atype : Iir);
8335
8336   --  For array and record nature: the owner of the through type.
8337   --  Field: Field5
8338   function Get_Through_Type_Definition (Def : Iir) return Iir;
8339   procedure Set_Through_Type_Definition (Def : Iir; Atype : Iir);
8340
8341   --  Field: Field11 Ref
8342   function Get_Across_Type (Def : Iir) return Iir;
8343   procedure Set_Across_Type (Def : Iir; Atype : Iir);
8344
8345   --  Field: Field12 Ref
8346   function Get_Through_Type (Def : Iir) return Iir;
8347   procedure Set_Through_Type (Def : Iir; Atype : Iir);
8348
8349   --  Field: Field1 Maybe_Ref
8350   function Get_Target (Target : Iir) return Iir;
8351   procedure Set_Target (Target : Iir; Atarget : Iir);
8352
8353   --  Field: Field5 Chain
8354   function Get_Waveform_Chain (Target : Iir) return Iir;
8355   procedure Set_Waveform_Chain (Target : Iir; Chain : Iir);
8356
8357   --  Field: Field8 Ref
8358   function Get_Guard (Target : Iir) return Iir;
8359   procedure Set_Guard (Target : Iir; Guard : Iir);
8360
8361   --  Field: Flag1 (uc)
8362   function Get_Delay_Mechanism (Target : Iir) return Iir_Delay_Mechanism;
8363   procedure Set_Delay_Mechanism (Target : Iir; Kind : Iir_Delay_Mechanism);
8364
8365   --  Field: Field4
8366   function Get_Reject_Time_Expression (Target : Iir) return Iir;
8367   procedure Set_Reject_Time_Expression (Target : Iir; Expr : Iir);
8368
8369   --  Field: Flag1 (uc)
8370   function Get_Force_Mode (Stmt : Iir) return Iir_Force_Mode;
8371   procedure Set_Force_Mode (Stmt : Iir; Mode : Iir_Force_Mode);
8372
8373   --  Field: Flag2
8374   function Get_Has_Force_Mode (Stmt : Iir) return Boolean;
8375   procedure Set_Has_Force_Mode (Stmt : Iir; Flag : Boolean);
8376
8377   --  The Is_Ref flag is set for extracted sensitivity lists.
8378   --  Field: Field6 Of_Maybe_Ref (uc)
8379   function Get_Sensitivity_List (Wait : Iir) return Iir_List;
8380   procedure Set_Sensitivity_List (Wait : Iir; List : Iir_List);
8381
8382   --  Field: Field8
8383   function Get_Process_Origin (Proc : Iir) return Iir;
8384   procedure Set_Process_Origin (Proc : Iir; Orig : Iir);
8385
8386   --  Field: Field7
8387   function Get_Package_Origin (Pkg : Iir) return Iir;
8388   procedure Set_Package_Origin (Pkg : Iir; Orig : Iir);
8389
8390   --  Field: Field5
8391   function Get_Condition_Clause (Wait : Iir_Wait_Statement) return Iir;
8392   procedure Set_Condition_Clause (Wait : Iir_Wait_Statement; Cond : Iir);
8393
8394   --  Field: Field4 Chain
8395   function Get_Break_Element (Stmt : Iir) return Iir;
8396   procedure Set_Break_Element (Stmt : Iir; El : Iir);
8397
8398   --  Field: Field3
8399   function Get_Selector_Quantity (Stmt : Iir) return Iir;
8400   procedure Set_Selector_Quantity (Stmt : Iir; Sel : Iir);
8401
8402   --  Field: Field4
8403   function Get_Break_Quantity (Stmt : Iir) return Iir;
8404   procedure Set_Break_Quantity (Stmt : Iir; Sel : Iir);
8405
8406   --  Field: Field1
8407   function Get_Timeout_Clause (Wait : Iir_Wait_Statement) return Iir;
8408   procedure Set_Timeout_Clause (Wait : Iir_Wait_Statement; Timeout : Iir);
8409
8410   --  If set, the concurrent statement is postponed.
8411   --  Field: Flag3
8412   function Get_Postponed_Flag (Target : Iir) return Boolean;
8413   procedure Set_Postponed_Flag (Target : Iir; Value : Boolean);
8414
8415   --  Returns the list of subprogram called in this subprogram or process.
8416   --  Note: implicit function (such as implicit operators) are omitted
8417   --  from this list, since the purpose of this list is to correctly set
8418   --  flags for side effects (purity_state, wait_state).
8419   --  Can return null_iir if there is no subprogram called.
8420   --  Field: Field7 Of_Ref (uc)
8421   function Get_Callees_List (Proc : Iir) return Iir_List;
8422   procedure Set_Callees_List (Proc : Iir; List : Iir_List);
8423
8424   --  Get/Set the passive flag of a process.
8425   --   TRUE if the process must be passive.
8426   --   FALSE if the process may be not passive.
8427   --  For a procedure declaration, set if it is passive.
8428   --  Field: Flag2
8429   function Get_Passive_Flag (Proc : Iir) return Boolean;
8430   procedure Set_Passive_Flag (Proc : Iir; Flag : Boolean);
8431
8432   --  True if the function is used as a resolution function.
8433   --  Field: Flag13
8434   function Get_Resolution_Function_Flag (Func : Iir) return Boolean;
8435   procedure Set_Resolution_Function_Flag (Func : Iir; Flag : Boolean);
8436
8437   --  Get/Set the wait state of the current subprogram or process.
8438   --  TRUE if it contains a wait statement, either directly or
8439   --   indirectly.
8440   --  FALSE if it doesn't contain a wait statement.
8441   --  UNKNOWN if the wait status is not yet known.
8442   --  Field: State1 (pos)
8443   function Get_Wait_State (Proc : Iir) return Tri_State_Type;
8444   procedure Set_Wait_State (Proc : Iir; State : Tri_State_Type);
8445
8446   --  Get/Set whether the subprogram may be called by a sensitized process
8447   --  whose sensitivity list is ALL.
8448   --  FALSE if declared in a package unit and reads a signal that is not
8449   --    one of its interface, or if it calls such a subprogram.
8450   --  TRUE if it doesn't call a subprogram whose state is False and
8451   --    either doesn't read a signal or declared within an entity or
8452   --    architecture.
8453   --  UNKNOWN if the status is not yet known.
8454   --  Field: State3 (pos)
8455   function Get_All_Sensitized_State (Proc : Iir) return Iir_All_Sensitized;
8456   procedure Set_All_Sensitized_State (Proc : Iir; State : Iir_All_Sensitized);
8457
8458   --  Get/Set the seen flag.
8459   --  Used when the graph of callees is walked, to avoid infinite loops, since
8460   --  the graph is not a DAG (there may be cycles).
8461   --  Field: Flag1
8462   function Get_Seen_Flag (Proc : Iir) return Boolean;
8463   procedure Set_Seen_Flag (Proc : Iir; Flag : Boolean);
8464
8465   --  Get/Set the pure flag of a function.
8466   --  TRUE if the function is declared pure.
8467   --  FALSE if the function is declared impure.
8468   --  Field: Flag2
8469   function Get_Pure_Flag (Func : Iir) return Boolean;
8470   procedure Set_Pure_Flag (Func : Iir; Flag : Boolean);
8471
8472   --  Get/Set the foreign flag of a declaration.
8473   --  TRUE if the declaration was decorated with the std.foreign attribute.
8474   --  Field: Flag3
8475   function Get_Foreign_Flag (Decl : Iir) return Boolean;
8476   procedure Set_Foreign_Flag (Decl : Iir; Flag : Boolean);
8477
8478   --  Get/Set the resolved flag of a subtype definition.
8479   --  A subtype definition may be resolved either because a
8480   --  resolution_indication is present in the subtype_indication, or
8481   --  because all elements type are resolved.
8482   --  Field: Flag1
8483   function Get_Resolved_Flag (Atype : Iir) return Boolean;
8484   procedure Set_Resolved_Flag (Atype : Iir; Flag : Boolean);
8485
8486   --  Get/Set the signal_type flag of a type/subtype definition.
8487   --  This flags indicates whether the type can be used as a signal type.
8488   --  Access types, file types and composite types whose a sub-element is
8489   --  an access type cannot be used as a signal type.
8490   --  Field: Flag2
8491   function Get_Signal_Type_Flag (Atype : Iir) return Boolean;
8492   procedure Set_Signal_Type_Flag (Atype : Iir; Flag : Boolean);
8493
8494   --  True if ATYPE is used to declare a signal or to handle a signal
8495   --   (such as slice or aliases).
8496   --  Field: Flag3
8497   function Get_Has_Signal_Flag (Atype : Iir) return Boolean;
8498   procedure Set_Has_Signal_Flag (Atype : Iir; Flag : Boolean);
8499
8500   --  Get/Set the purity status of a subprogram.
8501   --  Field: State2 (pos)
8502   function Get_Purity_State (Proc : Iir) return Iir_Pure_State;
8503   procedure Set_Purity_State (Proc : Iir; State : Iir_Pure_State);
8504
8505   --  Set during binding when DESIGN is added in a list of file to bind.
8506   --  Field: Flag3
8507   function Get_Elab_Flag (Design : Iir) return Boolean;
8508   procedure Set_Elab_Flag (Design : Iir; Flag : Boolean);
8509
8510   --  Field: Flag1
8511   function Get_Vendor_Library_Flag (Lib : Iir) return Boolean;
8512   procedure Set_Vendor_Library_Flag (Lib : Iir; Flag : Boolean);
8513
8514   --  Used only by configuration to mark a design unit as already inserted in
8515   --  the list of units.  Used to avoid double insertion.
8516   --  Field: Flag4
8517   function Get_Configuration_Mark_Flag (Design : Iir) return Boolean;
8518   procedure Set_Configuration_Mark_Flag (Design : Iir; Flag : Boolean);
8519
8520   --  Used only by configuration to flag units completely handled.  Used to
8521   --  detect recursion.
8522   --  Field: Flag5
8523   function Get_Configuration_Done_Flag (Design : Iir) return Boolean;
8524   procedure Set_Configuration_Done_Flag (Design : Iir; Flag : Boolean);
8525
8526   --  Set on an array_subtype if there is an index constraint.
8527   --  If not set, the subtype is unconstrained.
8528   --  Field: Flag4
8529   function Get_Index_Constraint_Flag (Atype : Iir) return Boolean;
8530   procedure Set_Index_Constraint_Flag (Atype : Iir; Flag : Boolean);
8531
8532   --  Field: Flag12
8533   function Get_Hide_Implicit_Flag (Subprg : Iir) return Boolean;
8534   procedure Set_Hide_Implicit_Flag (Subprg : Iir; Flag : Boolean);
8535
8536   --  Condition of an assertion.
8537   --  Field: Field1
8538   function Get_Assertion_Condition (Target : Iir) return Iir;
8539   procedure Set_Assertion_Condition (Target : Iir; Cond : Iir);
8540
8541   --  Report expression of an assertion or report statement.
8542   --  Field: Field5
8543   function Get_Report_Expression (Target : Iir) return Iir;
8544   procedure Set_Report_Expression (Target : Iir; Expr : Iir);
8545
8546   --  Severity expression of an assertion or report statement.
8547   --  Field: Field4
8548   function Get_Severity_Expression (Target : Iir) return Iir;
8549   procedure Set_Severity_Expression (Target : Iir; Expr : Iir);
8550
8551   --  Instantiated unit of a component instantiation statement.
8552   --  Field: Field1
8553   function Get_Instantiated_Unit (Target : Iir) return Iir;
8554   procedure Set_Instantiated_Unit (Target : Iir; Unit : Iir);
8555
8556   --  Generic map aspect list.
8557   --  Field: Field8 Chain
8558   function Get_Generic_Map_Aspect_Chain (Target : Iir) return Iir;
8559   procedure Set_Generic_Map_Aspect_Chain (Target : Iir; Generics : Iir);
8560
8561   --  Port map aspect list.
8562   --  Field: Field9 Chain
8563   function Get_Port_Map_Aspect_Chain (Target : Iir) return Iir;
8564   procedure Set_Port_Map_Aspect_Chain (Target : Iir; Port : Iir);
8565
8566   --  Configuration of an entity_aspect_configuration.
8567   --  Field: Field1
8568   function Get_Configuration_Name (Target : Iir) return Iir;
8569   procedure Set_Configuration_Name (Target : Iir; Conf : Iir);
8570
8571   --  Component configuration for a component_instantiation_statement.
8572   --  Field: Field6 Forward_Ref
8573   function Get_Component_Configuration (Target : Iir) return Iir;
8574   procedure Set_Component_Configuration (Target : Iir; Conf : Iir);
8575
8576   --  Configuration specification for a component_instantiation_statement.
8577   --  Field: Field7 Ref
8578   function Get_Configuration_Specification (Target : Iir) return Iir;
8579   procedure Set_Configuration_Specification (Target : Iir; Conf : Iir);
8580
8581   --  Set/Get the default binding indication of a configuration specification
8582   --  or a component configuration.
8583   --  Field: Field5
8584   function Get_Default_Binding_Indication (Target : Iir) return Iir;
8585   procedure Set_Default_Binding_Indication (Target : Iir; Conf : Iir);
8586
8587   --  Set/Get the default configuration of an architecture.
8588   --  Field: Field6
8589   function Get_Default_Configuration_Declaration (Target : Iir) return Iir;
8590   procedure Set_Default_Configuration_Declaration (Target : Iir; Conf : Iir);
8591
8592   --  Expression for an various nodes.
8593   --  Field: Field5
8594   function Get_Expression (Target : Iir) return Iir;
8595   procedure Set_Expression (Target : Iir; Expr : Iir);
8596
8597   --  A conditional expression.
8598   --  Node kind is a Iir_Kind_Conditional_Expression.
8599   --  Field: Field5 Chain
8600   function Get_Conditional_Expression_Chain (Target : Iir) return Iir;
8601   procedure Set_Conditional_Expression_Chain (Target : Iir; Chain : Iir);
8602
8603   --  Set to the designated type (either the type of the expression or the
8604   --  subtype) when the expression is analyzed.
8605   --  Field: Field2 Ref
8606   function Get_Allocator_Designated_Type (Target : Iir) return Iir;
8607   procedure Set_Allocator_Designated_Type (Target : Iir; A_Type : Iir);
8608
8609   --  Field: Field7 Chain
8610   function Get_Selected_Waveform_Chain (Target : Iir) return Iir;
8611   procedure Set_Selected_Waveform_Chain (Target : Iir; Chain : Iir);
8612
8613   --  Field: Field5 Chain
8614   function Get_Conditional_Waveform_Chain (Target : Iir) return Iir;
8615   procedure Set_Conditional_Waveform_Chain (Target : Iir; Chain : Iir);
8616
8617   --  Expression defining the value of the implicit guard signal.
8618   --  Field: Field2
8619   function Get_Guard_Expression (Target : Iir) return Iir;
8620   procedure Set_Guard_Expression (Target : Iir; Expr : Iir);
8621
8622   --  The declaration (if any) of the implicit guard signal of a block
8623   --  statement.
8624   --  Field: Field8
8625   function Get_Guard_Decl (Target : Iir_Block_Statement) return Iir;
8626   procedure Set_Guard_Decl (Target : Iir_Block_Statement; Decl : Iir);
8627
8628   --  Sensitivity list for the implicit guard signal.
8629   --  Field: Field4 Of_Ref (uc)
8630   function Get_Guard_Sensitivity_List (Guard : Iir) return Iir_List;
8631   procedure Set_Guard_Sensitivity_List (Guard : Iir; List : Iir_List);
8632
8633   --  Field: Field3 Forward_Ref
8634   function Get_Signal_Attribute_Chain (Decl : Iir) return Iir;
8635   procedure Set_Signal_Attribute_Chain (Decl : Iir; Chain : Iir);
8636
8637   --  Block_Configuration that applies to this block statement.
8638   --  Field: Field6 Forward_Ref
8639   function Get_Block_Block_Configuration (Block : Iir) return Iir;
8640   procedure Set_Block_Block_Configuration (Block : Iir; Conf : Iir);
8641
8642   --  Field: Field6
8643   function Get_Package_Header (Pkg : Iir) return Iir;
8644   procedure Set_Package_Header (Pkg : Iir; Header : Iir);
8645
8646   --  Field: Field7
8647   function Get_Block_Header (Target : Iir) return Iir;
8648   procedure Set_Block_Header (Target : Iir; Header : Iir);
8649
8650   --  Field: Field7
8651   function Get_Uninstantiated_Package_Name (Inst : Iir) return Iir;
8652   procedure Set_Uninstantiated_Package_Name (Inst : Iir; Name : Iir);
8653
8654   --  Field: Field9 Ref
8655   function Get_Uninstantiated_Package_Decl (Inst : Iir) return Iir;
8656   procedure Set_Uninstantiated_Package_Decl (Inst : Iir; Pkg : Iir);
8657
8658   --  The created pseudo-file for relocating the instantiated nodes
8659   --  (generics and declarations).
8660   --  Field: Field10 (uc)
8661   function Get_Instance_Source_File (Inst : Iir) return Source_File_Entry;
8662   procedure Set_Instance_Source_File (Inst : Iir; File : Source_File_Entry);
8663
8664   --  Get/Set the block_configuration (there may be several
8665   --  block_configuration through the use of prev_configuration singly linked
8666   --  list) that apply to this generate statement.
8667   --  Field: Field2 Forward_Ref
8668   function Get_Generate_Block_Configuration (Target : Iir) return Iir;
8669   procedure Set_Generate_Block_Configuration (Target : Iir; Conf : Iir);
8670
8671   --  Field: Field4
8672   function Get_Generate_Statement_Body (Target : Iir) return Iir;
8673   procedure Set_Generate_Statement_Body (Target : Iir; Bod : Iir);
8674
8675   --  Field: Field3 (uc)
8676   function Get_Alternative_Label (Target : Iir) return Name_Id;
8677   procedure Set_Alternative_Label (Target : Iir; Label : Name_Id);
8678
8679   --  Field: Field5
8680   function Get_Generate_Else_Clause (Target : Iir) return Iir;
8681   procedure Set_Generate_Else_Clause (Target : Iir; Clause : Iir);
8682
8683   --  Condition of a conditional_waveform, if_statement, elsif,
8684   --  while_loop_statement, next_statement or exit_statement.
8685   --  Field: Field1 Maybe_Ref
8686   function Get_Condition (Target : Iir) return Iir;
8687   procedure Set_Condition (Target : Iir; Condition : Iir);
8688
8689   --  Field: Field5
8690   function Get_Else_Clause (Target : Iir) return Iir;
8691   procedure Set_Else_Clause (Target : Iir; Clause : Iir);
8692
8693   --  Iterator of a for_loop_statement.
8694   --  Field: Field1
8695   function Get_Parameter_Specification (Target : Iir) return Iir;
8696   procedure Set_Parameter_Specification (Target : Iir; Param : Iir);
8697
8698   --  Get/Set the statement in which TARGET appears.  This is used to check
8699   --  if next/exit is in a loop.
8700   --  Field: Field0 Ref
8701   function Get_Parent (Target : Iir) return Iir;
8702   procedure Set_Parent (Target : Iir; Parent : Iir);
8703
8704   --  Loop label for an exit_statement or next_statement.
8705   --  Field: Field5
8706   function Get_Loop_Label (Target : Iir) return Iir;
8707   procedure Set_Loop_Label (Target : Iir; Stmt : Iir);
8708
8709   --  True if there is an exit statement targeting this loop statement.
8710   --  Field: Flag1
8711   function Get_Exit_Flag (Stmt : Iir) return Boolean;
8712   procedure Set_Exit_Flag (Stmt : Iir; Flag : Boolean);
8713
8714   --  True if there is a next statement targeting this loop statement.
8715   --  Field: Flag2
8716   function Get_Next_Flag (Stmt : Iir) return Boolean;
8717   procedure Set_Next_Flag (Stmt : Iir; Flag : Boolean);
8718
8719   --  Component name for a component_configuration or
8720   --  a configuration_specification.
8721   --  Field: Field5
8722   function Get_Component_Name (Target : Iir) return Iir;
8723   procedure Set_Component_Name (Target : Iir; Name : Iir);
8724
8725   --  Field: Field1 (uc)
8726   function Get_Instantiation_List (Target : Iir) return Iir_Flist;
8727   procedure Set_Instantiation_List (Target : Iir; List : Iir_Flist);
8728
8729   --  Field: Field3
8730   function Get_Entity_Aspect (Target : Iir_Binding_Indication) return Iir;
8731   procedure Set_Entity_Aspect (Target : Iir_Binding_Indication; Entity : Iir);
8732
8733   --  Field: Field1
8734   function Get_Default_Entity_Aspect (Target : Iir) return Iir;
8735   procedure Set_Default_Entity_Aspect (Target : Iir; Aspect : Iir);
8736
8737   --  Field: Field3 Maybe_Ref
8738   function Get_Binding_Indication (Target : Iir) return Iir;
8739   procedure Set_Binding_Indication (Target : Iir; Binding : Iir);
8740
8741   --  The named entity designated by a name.
8742   --  Field: Field4 Maybe_Forward_Ref
8743   function Get_Named_Entity (Name : Iir) return Iir;
8744   procedure Set_Named_Entity (Name : Iir; Val : Iir);
8745
8746   --  If a name designate a non-object alias, the designated alias.
8747   --  Named_Entity will designate the aliased entity.
8748   --  Field: Field2 Ref
8749   function Get_Alias_Declaration (Name : Iir) return Iir;
8750   procedure Set_Alias_Declaration (Name : Iir; Val : Iir);
8751
8752   --  Field: Field2 Ref
8753   function Get_Referenced_Name (N : Iir) return Iir;
8754   procedure Set_Referenced_Name (N : Iir; Name : Iir);
8755
8756   --  Expression staticness, defined by rules of LRM 7.4
8757   --  Field: State1 (pos)
8758   function Get_Expr_Staticness (Target : Iir) return Iir_Staticness;
8759   procedure Set_Expr_Staticness (Target : Iir; Static : Iir_Staticness);
8760
8761   --  Field: Flag6,Flag7 (grp)
8762   function Get_Scalar_Size (N : Iir) return Scalar_Size;
8763   procedure Set_Scalar_Size (N : Iir; Sz : Scalar_Size);
8764
8765   --  Node which couldn't be correctly analyzed.
8766   --  Field: Field2
8767   function Get_Error_Origin (Target : Iir) return Iir;
8768   procedure Set_Error_Origin (Target : Iir; Origin : Iir);
8769
8770   --  Operand of a monadic operator.
8771   --  Field: Field2
8772   function Get_Operand (Target : Iir) return Iir;
8773   procedure Set_Operand (Target : Iir; An_Iir : Iir);
8774
8775   --  Left operand of a dyadic operator.
8776   --  Field: Field2
8777   function Get_Left (Target : Iir) return Iir;
8778   procedure Set_Left (Target : Iir; An_Iir : Iir);
8779
8780   --  Right operand of a dyadic operator.
8781   --  Field: Field4
8782   function Get_Right (Target : Iir) return Iir;
8783   procedure Set_Right (Target : Iir; An_Iir : Iir);
8784
8785   --  Field: Field3
8786   function Get_Unit_Name (Target : Iir) return Iir;
8787   procedure Set_Unit_Name (Target : Iir; Name : Iir);
8788
8789   --  Field: Field4
8790   function Get_Name (Target : Iir) return Iir;
8791   procedure Set_Name (Target : Iir; Name : Iir);
8792
8793   --  Field: Field5
8794   function Get_Group_Template_Name (Target : Iir) return Iir;
8795   procedure Set_Group_Template_Name (Target : Iir; Name : Iir);
8796
8797   --  Staticness of a name, according to rules of LRM 6.1
8798   --  Field: State2 (pos)
8799   function Get_Name_Staticness (Target : Iir) return Iir_Staticness;
8800   procedure Set_Name_Staticness (Target : Iir; Static : Iir_Staticness);
8801
8802   --  Prefix of a name.
8803   --  Field: Field0
8804   function Get_Prefix (Target : Iir) return Iir;
8805   procedure Set_Prefix (Target : Iir; Prefix : Iir);
8806
8807   --  Prefix of a name signature
8808   --  Field: Field1
8809   function Get_Signature_Prefix (Sign : Iir) return Iir;
8810   procedure Set_Signature_Prefix (Sign : Iir; Prefix : Iir);
8811
8812   --  External pathname for an external name.
8813   --  Field: Field3
8814   function Get_External_Pathname (Name : Iir) return Iir;
8815   procedure Set_External_Pathname (Name : Iir; Path : Iir);
8816
8817   --  Field: Field2
8818   function Get_Pathname_Suffix (Path : Iir) return Iir;
8819   procedure Set_Pathname_Suffix (Path : Iir; Suffix : Iir);
8820
8821   --  Field: Field5
8822   function Get_Pathname_Expression (Path : Iir) return Iir;
8823   procedure Set_Pathname_Expression (Path : Iir; Expr : Iir);
8824
8825   --  True if the name appears in a formal_part.  In that case, some
8826   --  checks must be disabled (eg: the expression of a type conversion can
8827   --  be a write-only interface).
8828   --  Field: Flag4
8829   function Get_In_Formal_Flag (Name : Iir) return Boolean;
8830   procedure Set_In_Formal_Flag (Name : Iir; Flag : Boolean);
8831
8832   --  The subtype of a slice.  Contrary to the Type field, this is not a
8833   --  reference.
8834   --  Field: Field3
8835   function Get_Slice_Subtype (Slice : Iir) return Iir;
8836   procedure Set_Slice_Subtype (Slice : Iir; Atype : Iir);
8837
8838   --  Suffix of a slice or attribute.
8839   --  Field: Field2
8840   function Get_Suffix (Target : Iir) return Iir;
8841   procedure Set_Suffix (Target : Iir; Suffix : Iir);
8842
8843   --  Set the designated index subtype of an array attribute.
8844   --  Field: Field2 Ref
8845   function Get_Index_Subtype (Attr : Iir) return Iir;
8846   procedure Set_Index_Subtype (Attr : Iir; St : Iir);
8847
8848   --  Parameter of an attribute.
8849   --  Field: Field4
8850   function Get_Parameter (Target : Iir) return Iir;
8851   procedure Set_Parameter (Target : Iir; Param : Iir);
8852
8853   --  Second parameter of an attribute (for AMS VHDL).
8854   --  Field: Field6
8855   function Get_Parameter_2 (Target : Iir) return Iir;
8856   procedure Set_Parameter_2 (Target : Iir; Param : Iir);
8857
8858   --  Third parameter of an attribute (for AMS VHDL).
8859   --  Field: Field7
8860   function Get_Parameter_3 (Target : Iir) return Iir;
8861   procedure Set_Parameter_3 (Target : Iir; Param : Iir);
8862
8863   --  Fourth parameter of an attribute (for AMS VHDL).
8864   --  Field: Field8
8865   function Get_Parameter_4 (Target : Iir) return Iir;
8866   procedure Set_Parameter_4 (Target : Iir; Param : Iir);
8867
8868   --  Field: Field2 Forward_Ref
8869   function Get_Attr_Chain (Attr : Iir) return Iir;
8870   procedure Set_Attr_Chain (Attr : Iir; Chain : Iir);
8871
8872   --  Field: Field3 Forward_Ref
8873   function Get_Signal_Attribute_Declaration (Attr : Iir) return Iir;
8874   procedure Set_Signal_Attribute_Declaration (Attr : Iir; Decl : Iir);
8875
8876   --  Type of the actual for an association by individual.
8877   --    Unless the formal is an unconstrained array type, this is the same as
8878   --    the formal type.
8879   --  Subtype indication for a type association.
8880   --  Field: Field5 Ref
8881   function Get_Actual_Type (Target : Iir) return Iir;
8882   procedure Set_Actual_Type (Target : Iir; Atype : Iir);
8883
8884   --  Field: Field3
8885   function Get_Actual_Type_Definition (Target : Iir) return Iir;
8886   procedure Set_Actual_Type_Definition (Target : Iir; Atype : Iir);
8887
8888   --  List of individual associations for association_element_by_individual.
8889   --  Associations for parenthesis_name.
8890   --  Field: Field2 Chain
8891   function Get_Association_Chain (Target : Iir) return Iir;
8892   procedure Set_Association_Chain (Target : Iir; Chain : Iir);
8893
8894   --  List of choices for association_element_by_individual.
8895   --  Field: Field4 Chain
8896   function Get_Individual_Association_Chain (Target : Iir) return Iir;
8897   procedure Set_Individual_Association_Chain (Target : Iir; Chain : Iir);
8898
8899   --  Chain of implicit subprogram associations for a type association.
8900   --  Field: Field4 Chain
8901   function Get_Subprogram_Association_Chain (Target : Iir) return Iir;
8902   procedure Set_Subprogram_Association_Chain (Target : Iir; Chain : Iir);
8903
8904   --  Get/Set info for the aggregate.
8905   --  There is one aggregate_info for for each dimension.
8906   --  Field: Field5
8907   function Get_Aggregate_Info (Target : Iir) return Iir;
8908   procedure Set_Aggregate_Info (Target : Iir; Info : Iir);
8909
8910   --  Get/Set the info node for the next dimension.
8911   --  Field: Field1
8912   function Get_Sub_Aggregate_Info (Target : Iir) return Iir;
8913   procedure Set_Sub_Aggregate_Info (Target : Iir; Info : Iir);
8914
8915   --  TRUE when the length of the aggregate is not locally static.
8916   --  Field: Flag3
8917   function Get_Aggr_Dynamic_Flag (Target : Iir) return Boolean;
8918   procedure Set_Aggr_Dynamic_Flag (Target : Iir; Val : Boolean);
8919
8920   --  Get/Set the minimum number of elements for the lowest dimension of
8921   --  the aggregate or for the current dimension of a sub-aggregate.
8922   --  The real number of elements may be greater than this number if there
8923   --  is an 'other' choice.
8924   --  Field: Field4 (uc)
8925   function Get_Aggr_Min_Length (Info : Iir_Aggregate_Info) return Iir_Int32;
8926   procedure Set_Aggr_Min_Length (Info : Iir_Aggregate_Info; Nbr : Iir_Int32);
8927
8928   --  Highest index choice, if any.
8929   --  Field: Field2 Ref
8930   function Get_Aggr_Low_Limit (Target : Iir_Aggregate_Info) return Iir;
8931   procedure Set_Aggr_Low_Limit (Target : Iir_Aggregate_Info; Limit : Iir);
8932
8933   --  Highest index choice, if any.
8934   --  Field: Field3 Ref
8935   function Get_Aggr_High_Limit (Target : Iir_Aggregate_Info) return Iir;
8936   procedure Set_Aggr_High_Limit (Target : Iir_Aggregate_Info; Limit : Iir);
8937
8938   --  True if the aggregate has an 'others' choice.
8939   --  Field: Flag2
8940   function Get_Aggr_Others_Flag (Target : Iir_Aggregate_Info) return Boolean;
8941   procedure Set_Aggr_Others_Flag (Target : Iir_Aggregate_Info; Val : Boolean);
8942
8943   --  True if the aggregate have named associations.
8944   --  Field: Flag4
8945   function Get_Aggr_Named_Flag (Target : Iir_Aggregate_Info) return Boolean;
8946   procedure Set_Aggr_Named_Flag (Target : Iir_Aggregate_Info; Val : Boolean);
8947
8948   --  True if the aggregate can be statically built.
8949   --  Field: Flag1
8950   function Get_Aggregate_Expand_Flag (Aggr : Iir) return Boolean;
8951   procedure Set_Aggregate_Expand_Flag (Aggr : Iir; Flag : Boolean);
8952
8953   --  Chain of choices.
8954   --  Field: Field4 Chain
8955   function Get_Association_Choices_Chain (Target : Iir) return Iir;
8956   procedure Set_Association_Choices_Chain (Target : Iir; Chain : Iir);
8957
8958   --  Chain of choices.
8959   --  Field: Field1 Chain
8960   function Get_Case_Statement_Alternative_Chain (Target : Iir) return Iir;
8961   procedure Set_Case_Statement_Alternative_Chain (Target : Iir; Chain : Iir);
8962
8963   --  Staticness of the choice.
8964   --  Field: State1 (pos)
8965   function Get_Choice_Staticness (Target : Iir) return Iir_Staticness;
8966   procedure Set_Choice_Staticness (Target : Iir; Staticness : Iir_Staticness);
8967
8968   --  Field: Field1
8969   function Get_Procedure_Call (Stmt : Iir) return Iir;
8970   procedure Set_Procedure_Call (Stmt : Iir; Call : Iir);
8971
8972   --  Subprogram to be called by a procedure, function call or operator.  This
8973   --  is the declaration of the subprogram (or a list of during analysis).
8974   --  Field: Field3 Ref
8975   function Get_Implementation (Target : Iir) return Iir;
8976   procedure Set_Implementation (Target : Iir; Decl : Iir);
8977
8978   --  Parameter associations for procedure and function call.
8979   --  Field: Field2 Chain
8980   function Get_Parameter_Association_Chain (Target : Iir) return Iir;
8981   procedure Set_Parameter_Association_Chain (Target : Iir; Chain : Iir);
8982
8983   --  Object of a method call.  NULL_IIR if the subprogram is not a method.
8984   --  Field: Field4 Ref
8985   function Get_Method_Object (Target : Iir) return Iir;
8986   procedure Set_Method_Object (Target : Iir; Object : Iir);
8987
8988   --  The type_mark that appeared in the subtype indication.  This is a name.
8989   --  May be null_iir if there is no type mark (as in an iterator).
8990   --  Field: Field2
8991   function Get_Subtype_Type_Mark (Target : Iir) return Iir;
8992   procedure Set_Subtype_Type_Mark (Target : Iir; Mark : Iir);
8993
8994   --  Field: Field2
8995   function Get_Subnature_Nature_Mark (Target : Iir) return Iir;
8996   procedure Set_Subnature_Nature_Mark (Target : Iir; Mark : Iir);
8997
8998   --  Field: Field3
8999   function Get_Type_Conversion_Subtype (Target : Iir) return Iir;
9000   procedure Set_Type_Conversion_Subtype (Target : Iir; Atype : Iir);
9001
9002   --  The type_mark that appeared in qualified expressions or type
9003   --  conversions.
9004   --  Field: Field4
9005   function Get_Type_Mark (Target : Iir) return Iir;
9006   procedure Set_Type_Mark (Target : Iir; Mark : Iir);
9007
9008   --  The type of values for a type file.
9009   --  Field: Field2
9010   function Get_File_Type_Mark (Target : Iir) return Iir;
9011   procedure Set_File_Type_Mark (Target : Iir; Mark : Iir);
9012
9013   --  Field: Field8
9014   function Get_Return_Type_Mark (Target : Iir) return Iir;
9015   procedure Set_Return_Type_Mark (Target : Iir; Mark : Iir);
9016
9017   --  This flag is set on a signal_declaration, when a disconnection
9018   --  specification applies to the signal (or a subelement of it).
9019   --  This is used to check 'others' and 'all' designators.
9020   --  Field: Flag1
9021   function Get_Has_Disconnect_Flag (Target : Iir) return Boolean;
9022   procedure Set_Has_Disconnect_Flag (Target : Iir; Val : Boolean);
9023
9024   --  This flag is set on a signal when its activity is read by the user.
9025   --  Some signals handling can be optimized when this flag is set.
9026   --  Field: Flag2
9027   function Get_Has_Active_Flag (Target : Iir) return Boolean;
9028   procedure Set_Has_Active_Flag (Target : Iir; Val : Boolean);
9029
9030   --  This flag is set is code being analyzed is textually within TARGET.
9031   --  This is used for selected by name rule.
9032   --  Field: Flag5
9033   function Get_Is_Within_Flag (Target : Iir) return Boolean;
9034   procedure Set_Is_Within_Flag (Target : Iir; Val : Boolean);
9035
9036   --  List of type_mark for an Iir_Kind_Signature
9037   --  Field: Field2 (uc)
9038   function Get_Type_Marks_List (Target : Iir) return Iir_Flist;
9039   procedure Set_Type_Marks_List (Target : Iir; List : Iir_Flist);
9040
9041   --  Field: Flag1
9042   function Get_Implicit_Alias_Flag (Decl : Iir) return Boolean;
9043   procedure Set_Implicit_Alias_Flag (Decl : Iir; Flag : Boolean);
9044
9045   --  Field: Field5
9046   function Get_Alias_Signature (Alias : Iir) return Iir;
9047   procedure Set_Alias_Signature (Alias : Iir; Signature : Iir);
9048
9049   --  Field: Field2
9050   function Get_Attribute_Signature (Attr : Iir) return Iir;
9051   procedure Set_Attribute_Signature (Attr : Iir; Signature : Iir);
9052
9053   --  Field: Field1 Of_Ref (uc)
9054   function Get_Overload_List (Target : Iir) return Iir_List;
9055   procedure Set_Overload_List (Target : Iir; List : Iir_List);
9056
9057   --  Identifier of the simple_name attribute.
9058   --  Field: Field3 (uc)
9059   function Get_Simple_Name_Identifier (Target : Iir) return Name_Id;
9060   procedure Set_Simple_Name_Identifier (Target : Iir; Ident : Name_Id);
9061
9062   --  Subtype for Simple_Name attribute.
9063   --  Field: Field4
9064   function Get_Simple_Name_Subtype (Target : Iir) return Iir;
9065   procedure Set_Simple_Name_Subtype (Target : Iir; Atype : Iir);
9066
9067   --  Body of a protected type declaration.
9068   --  Field: Field2 Forward_Ref
9069   function Get_Protected_Type_Body (Target : Iir) return Iir;
9070   procedure Set_Protected_Type_Body (Target : Iir; Bod : Iir);
9071
9072   --  Corresponding protected type declaration of a protected type body.
9073   --  Field: Field4 Ref
9074   function Get_Protected_Type_Declaration (Target : Iir) return Iir;
9075   procedure Set_Protected_Type_Declaration (Target : Iir; Decl : Iir);
9076
9077   --  For a declaration: true if the declaration is used somewhere.
9078   --  Field: Flag6
9079   function Get_Use_Flag (Decl : Iir) return Boolean;
9080   procedure Set_Use_Flag (Decl : Iir; Val : Boolean);
9081
9082   --  Layout flag: true if 'end' is followed by the reserved identifier.
9083   --  Field: Flag8
9084   function Get_End_Has_Reserved_Id (Decl : Iir) return Boolean;
9085   procedure Set_End_Has_Reserved_Id (Decl : Iir; Flag : Boolean);
9086
9087   --  Layout flag: true if 'end' is followed by the identifier.
9088   --  Field: Flag9
9089   function Get_End_Has_Identifier (Decl : Iir) return Boolean;
9090   procedure Set_End_Has_Identifier (Decl : Iir; Flag : Boolean);
9091
9092   --  Layout flag: true if 'end' is followed by 'postponed'.
9093   --  Field: Flag10
9094   function Get_End_Has_Postponed (Decl : Iir) return Boolean;
9095   procedure Set_End_Has_Postponed (Decl : Iir; Flag : Boolean);
9096
9097   --  Layout flag: true if a label is present.
9098   --  Field: Flag6
9099   function Get_Has_Label (Decl : Iir) return Boolean;
9100   procedure Set_Has_Label (Decl : Iir; Flag : Boolean);
9101
9102   --  Layout flag: true if 'begin' is present.
9103   --  Field: Flag10
9104   function Get_Has_Begin (Decl : Iir) return Boolean;
9105   procedure Set_Has_Begin (Decl : Iir; Flag : Boolean);
9106
9107   --  Layout flag: true if 'end' is present (only for generate body).
9108   --  Field: Flag11
9109   function Get_Has_End (Decl : Iir) return Boolean;
9110   procedure Set_Has_End (Decl : Iir; Flag : Boolean);
9111
9112   --  Layout flag: true if 'is' is present.
9113   --  Field: Flag7
9114   function Get_Has_Is (Decl : Iir) return Boolean;
9115   procedure Set_Has_Is (Decl : Iir; Flag : Boolean);
9116
9117   --  Layout flag: true if 'pure' or 'impure' is present.
9118   --  Field: Flag8
9119   function Get_Has_Pure (Decl : Iir) return Boolean;
9120   procedure Set_Has_Pure (Decl : Iir; Flag : Boolean);
9121
9122   --  Layout flag: true if body appears just after the specification.
9123   --  Field: Flag9
9124   function Get_Has_Body (Decl : Iir) return Boolean;
9125   procedure Set_Has_Body (Decl : Iir; Flag : Boolean);
9126
9127   --  Layout flag: true if 'parameter' reserved identifier is present.
9128   --  Field: Flag10
9129   function Get_Has_Parameter (Decl : Iir) return Boolean;
9130   procedure Set_Has_Parameter (Decl : Iir; Flag : Boolean);
9131
9132   --  Layout flag: true if 'component' reserved identifier is present.
9133   --  Field: Flag5
9134   function Get_Has_Component (Decl : Iir) return Boolean;
9135   procedure Set_Has_Component (Decl : Iir; Flag : Boolean);
9136
9137   --  Layout flag for object declaration.  If True, the identifier of this
9138   --  declaration is followed by an identifier (and separated by a comma).
9139   --  This flag is set on all but the last declarations.
9140   --  Eg: on 'signal A, B, C : Bit', the flag is set on A and B (but not C).
9141   --  Field: Flag3
9142   function Get_Has_Identifier_List (Decl : Iir) return Boolean;
9143   procedure Set_Has_Identifier_List (Decl : Iir; Flag : Boolean);
9144
9145   --  Layout flag for object declaration.  If True, the mode is present.
9146   --  Field: Flag10
9147   function Get_Has_Mode (Decl : Iir) return Boolean;
9148   procedure Set_Has_Mode (Decl : Iir; Flag : Boolean);
9149
9150   --  Layout flag for object declaration.  If True, the object class is
9151   --  present.
9152   --  Field: Flag11
9153   function Get_Has_Class (Decl : Iir) return Boolean;
9154   procedure Set_Has_Class (Decl : Iir; Flag : Boolean);
9155
9156   --  Layout flag for signal assignment.  If True, the delay mechanism is
9157   --  present.  This is obviously true for transport or inertial with reject,
9158   --  but the simple 'inertial' is optional.
9159   --  Field: Flag2
9160   function Get_Has_Delay_Mechanism (Stmt : Iir) return Boolean;
9161   procedure Set_Has_Delay_Mechanism (Stmt : Iir; Flag : Boolean);
9162
9163   --  Set on wait, procedure call and composite statements when there is a
9164   --  sub-statement that can suspend a procedure or a process.  Also set
9165   --  on procedure declaration.  Note that the flag is conservative: it must
9166   --  be true if the node contains directly or indirectly a wait statement,
9167   --  but need not to be false otherwise.
9168   --  Field: Flag11
9169   function Get_Suspend_Flag (Stmt : Iir) return Boolean;
9170   procedure Set_Suspend_Flag (Stmt : Iir; Flag : Boolean);
9171
9172   --  Set to True if Maybe_Ref fields are references.  This cannot be shared
9173   --  with Has_Identifier_List as: Is_Ref is set to True on all items but
9174   --  the first, while Has_Identifier_List is set to True on all items but
9175   --  the last.  Furthermore Is_Ref appears in nodes where Has_Identifier_List
9176   --  is not present.
9177   --  Field: Flag12
9178   function Get_Is_Ref (N : Iir) return Boolean;
9179   procedure Set_Is_Ref (N : Iir; Ref : Boolean);
9180
9181   --  Field: Flag1
9182   function Get_Is_Forward_Ref (N : Iir) return Boolean;
9183   procedure Set_Is_Forward_Ref (N : Iir; Ref : Boolean);
9184
9185   --  Field: Field1 (uc)
9186   function Get_Psl_Property (Decl : Iir) return PSL_Node;
9187   procedure Set_Psl_Property (Decl : Iir; Prop : PSL_Node);
9188
9189   --  Field: Field1 (uc)
9190   function Get_Psl_Sequence (Decl : Iir) return PSL_Node;
9191   procedure Set_Psl_Sequence (Decl : Iir; Prop : PSL_Node);
9192
9193   --  Field: Field6 (uc)
9194   function Get_Psl_Declaration (Decl : Iir) return PSL_Node;
9195   procedure Set_Psl_Declaration (Decl : Iir; Prop : PSL_Node);
9196
9197   --  Field: Field3 (uc)
9198   function Get_Psl_Expression (Decl : Iir) return PSL_Node;
9199   procedure Set_Psl_Expression (Decl : Iir; Prop : PSL_Node);
9200
9201   --  Field: Field1 (uc)
9202   function Get_Psl_Boolean (N : Iir) return PSL_Node;
9203   procedure Set_Psl_Boolean (N : Iir; Bool : PSL_Node);
9204
9205   --  Field: Field7 (uc)
9206   function Get_PSL_Clock (N : Iir) return PSL_Node;
9207   procedure Set_PSL_Clock (N : Iir; Clock : PSL_Node);
9208
9209   --  Field: Field8 (uc)
9210   function Get_PSL_NFA (N : Iir) return PSL_NFA;
9211   procedure Set_PSL_NFA (N : Iir; Fa : PSL_NFA);
9212
9213   --  Field: Field9 (uc)
9214   function Get_PSL_Nbr_States (N : Iir) return Int32;
9215   procedure Set_PSL_Nbr_States (N : Iir; Nbr : Int32);
9216
9217   --  Field: Field10 (uc)
9218   function Get_PSL_Clock_Sensitivity (N : Iir) return Iir_List;
9219   procedure Set_PSL_Clock_Sensitivity (N : Iir; List : Iir_List);
9220
9221   --  Field: Flag1
9222   function Get_PSL_EOS_Flag (N : Iir) return Boolean;
9223   procedure Set_PSL_EOS_Flag (N : Iir; Flag : Boolean);
9224
9225   --  Field: Field2
9226   function Get_Count_Expression (N : Iir) return Iir;
9227   procedure Set_Count_Expression (N : Iir; Count : Iir);
9228
9229   --  Field: Field4
9230   function Get_Clock_Expression (N : Iir) return Iir;
9231   procedure Set_Clock_Expression (N : Iir; Clk : Iir);
9232
9233   --  Reference to the default_clock node.
9234   --  Field: Field3 Ref
9235   function Get_Default_Clock (N : Iir) return Iir;
9236   procedure Set_Default_Clock (N : Iir; Clk : Iir);
9237end Vhdl.Nodes;
9238