!comment This file contains Corrigendum conflicts for Amendment 3 (Ada 202x). !comment Conflicts occur when multiple issues change the same !comment paragraph of the standard. !comment This file (and the reading of it in the program) would need to !comment be changed for a new Corrigendum or Amendment. !comment The paragraphs must be in sorted order!! !corrigendum 1.1.3(17/3) !AI-0179-1 !AI-0265-1 @dinsa An implementation conforming to this International Standard may provide additional aspects, attributes, library units, and pragmas. However, it shall not provide any aspect, attribute, library unit, or pragma having the same name as an aspect, attribute, library unit, or pragma (respectively) specified in a Specialized Needs Annex unless the provided construct is either as specified in the Specialized Needs Annex or is more limited in capability than that required by the Annex. A program that attempts to use an unsupported capability of an Annex shall either be identified by the implementation before run time or shall raise an exception at run time. @dinst For an implementation that conforms to this Standard, the implementation of a language-defined unit shall abide by all postconditions, type invariants, and default initial conditions specified for the unit by this International Standard (see 11.4.2). !corrigendum 1.2(3/2) !AI-0058-1 !AI-0224-1 @drepl ISO/IEC 1539-1:2004, @i. @dby ISO/IEC 1539-1:2018, @i. !corrigendum 2.1(4.1/3) !AI-0004-1 !AI-0263-1 @drepl The semantics of an Ada program whose text is not in Normalization Form KC (as defined by Clause 21 of ISO/IEC 10646:2011) is implementation defined. @dby The semantics of an Ada program whose text is not in Normalization Form C (as defined by Clause 21 of ISO/IEC 10646:2017) is implementation defined. !corrigendum 2.2(9) !AI-0125-3 !AI-0212-1 @drepl & @ @ ' @ @ ( @ @ ) @ @ * @ @ + @ @ , @ @ @endash @ @ . @ @ / @ @ : @ @ ; @ @ < @ @ = @ @ @> @ @ | @dby & @ @ ' @ @ ( @ @ ) @ @ * @ @ + @ @ , @ @ @endash @ @ . @ @ / @ @ : @ @ ; @ @ < @ @ = @ @ @> @ @ @@ @ @ [ @ @ ] @ @ | !corrigendum 2.3(4/3) !AI-0004-1 !AI-0263-1 @dinsa An @fa shall not contain two consecutive characters in category @fa, or end with a character in that category. @dinst @s8<@i> An identifier shall only contain characters that may be present in Normalization Form KC (as defined by Clause 21 of ISO/IEC 10646:2017). !corrigendum 3.1(6/3) !AI-0061-1 !AI-0308-1 @drepl Each of the following is defined to be a declaration: any @fa; an @fa; a @fa; a @fa; a @fa; an @fa; a @fa; a @fa; an @fa; an @fa; an @fa; a @fa; a @fa. @dby Each of the following is defined to be a declaration: any @fa; an @fa; a @fa; a @fa; a @fa of an @fa; a @fa; a @fa of a @fa; an @fa; a @fa of an @fa; a @fa; a @fa; an @fa; an @fa; an @fa; a @fa; a @fa. !corrigendum 3.2.4(31/4) !AI-0301-1 !AI-0333-1 @drepl @xindent or @b parameter that is passed by reference, a check is performed that the value of the parameter satisfies the predicates of the subtype of the actual. For an object created by an @fa with no explicit initialization @fa, or by an uninitialized @fa, if any subcomponents have @fas, a check is performed that the value of the created object satisfies the predicates of the nominal subtype.> @dby @xindent (see 4.6). In addition, after normal completion and leaving of a subprogram, for each @b or @b parameter that is passed by reference, a check is performed that the value of the parameter satisfies the predicates of the subtype of the actual. For an object created by an @fa with no explicit initialization @fa, or by an uninitialized @fa, if the types of any parts have specified Default_Value or Default_Component_Value aspects, or any subcomponents have @fas, a check is performed that the value of the created object satisfies the predicates of the nominal subtype.> !corrigendum 3.3(6) !AI-0061-1 !AI-0308-1 @dinsa @xbullet @dinst @xbullet;> @xbullet;> !corrigendum 3.3(18.1/3) !AI-0061-1 !AI-0308-1 @dinsa @xbullet @dinst @xbullet;> @xbullet;> !corrigendum 3.3(23/3) !AI-0191-1 !AI-0294-1 @drepl At the place where a view of an object is defined, a @i is associated with the view. The object's @i (that is, its subtype) can be more restrictive than the nominal subtype of the view; it always is if the nominal subtype is an @i. A subtype is an indefinite subtype if it is an unconstrained array subtype, or if it has unknown discriminants or unconstrained discriminants without defaults (see 3.7); otherwise, the subtype is a @i subtype (all elementary subtypes are definite subtypes). A class-wide subtype is defined to have unknown discriminants, and is therefore an indefinite subtype. An indefinite subtype does not by itself provide enough information to create an object; an additional @fa or explicit initialization @fa is necessary (see 3.3.1). A component cannot have an indefinite nominal subtype. @dby At the place where a view of an object is defined, a @i is associated with the view. The @i of a view is the type of the nominal subtype of the view. The object's @i (that is, its subtype) can be more restrictive than the nominal subtype of the view; it always is more restrictive if the nominal subtype is an @i. A subtype is an indefinite subtype if it is an unconstrained array subtype, or if it has unknown discriminants or unconstrained discriminants without defaults (see 3.7); otherwise, the subtype is a @i subtype (all elementary subtypes are definite subtypes). A class-wide subtype is defined to have unknown discriminants, and is therefore an indefinite subtype. An indefinite subtype does not by itself provide enough information to create an object; an additional @fa or explicit initialization @fa is necessary (see 3.3.1). A component cannot have an indefinite nominal subtype. !corrigendum 3.3(23.7/3) !AI-0226-1 !AI-0228-1 @dinsa @xbullet or @fa; or> @dinst @xbullet where the operand denotes a view of a composite object that is known to be constrained; or> !corrigendum 3.3.1(23/3) !AI-0061-1 !AI-0308-1 @drepl @xindent<@s9<8 As indicated above, a stand-alone object is an object declared by an @fa. Similar definitions apply to "stand-alone constant" and "stand-alone variable." A subcomponent of an object is not a stand-alone object, nor is an object that is created by an @fa. An object declared by a @fa, @fa, @fa, @fa, @fa, @fa, or a @fa of mode @b is not considered a stand-alone object.>> @dby @xindent<@s9<8 As indicated above, a stand-alone object is an object declared by an @fa. Similar definitions apply to "stand-alone constant" and "stand-alone variable." A subcomponent of an object is not a stand-alone object, nor is an object that is created by an @fa. An object declared by a @fa, @fa, @fa, @fa, @fa, @fa, @fa, @fa, or a @fa of mode @b is not considered a stand-alone object.>> !corrigendum 3.5(55.1/4) !AI-0020-1 !AI-0225-1 @ddel For a @fa X that denotes an object of a scalar type (after any implicit dereference), the following attributes are defined: !corrigendum 3.9(6/2) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Tags @b @b Preelaborate(Tags); @b Tag @b; @b Preelaborable_Initialization(Tag);> @dby @xcode<@b Ada.Tags @b Preelaborate, Nonblocking, Global =@> @b @b @b Tag @b; @b Preelaborable_Initialization(Tag);> !corrigendum 3.9(18.2/3) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b @b T (<@>) @b; @b Parameters (<@>) @b; @b Constructor (Params : @b Parameters) @b T @b; @b Ada.Tags.Generic_Dispatching_Constructor (The_Tag : Tag; Params : @b Parameters) @b T'Class @b Convention =@> Intrinsic; @b Preelaborate(Generic_Dispatching_Constructor);> @dby @xcode<@b @b T (<@>) @b; @b Parameters (<@>) @b; @b Constructor (Params : @b Parameters) @b T @b; @b Ada.Tags.Generic_Dispatching_Constructor (The_Tag : Tag; Params : @b Parameters) @b T'Class @b Preelaborate, Convention =@> Intrinsic, Nonblocking, Global =@> @b;> !corrigendum 3.10(9/3) !AI-0228-1 !AI-0324-1 @drepl A view of an object is defined to be @i if it is defined by an @fa, @fa, @fa, or @fa with the reserved word @b, or by a renaming of an aliased view. In addition, the dereference of an access-to-object value denotes an aliased view, as does a view conversion (see 4.6) of an aliased view. The current instance of an immutably limited type (see 7.5) is defined to be aliased. Finally, a formal parameter or generic formal object of a tagged type is defined to be aliased. Aliased views are the ones that can be designated by an access value. @dby A view of an object is defined to be @i if it is defined by an @fa, @fa, @fa, or @fa with the reserved word @b, or by a renaming of an aliased view. In addition, the dereference of an access-to-object value denotes an aliased view, as does a view conversion (see 4.6) of an aliased view. A @fa denotes an aliased view when the operand denotes an aliased view. The current instance of an immutably limited type (see 7.5) is defined to be aliased. Finally, a formal parameter or generic formal object of a tagged type is defined to be aliased. Aliased views are the ones that can be designated by an access value. !corrigendum 3.10.2(9.1/3) !AI-0236-1 !AI-0292-1 @drepl @xbullet is the accessibility level of the evaluated @i@fa.> @dby @xbullet (see 4.5.7) is the accessibility level of the evaluated @i@fa.> @xbullet (see 4.5.9) is the accessibility level of the @i@fa.> !corrigendum 3.10.2(10.3/3) !AI-0278-1 !AI-0390-1 @drepl @xinbull @dby @xinbull !corrigendum 3.10.2(10.5/3) !AI-0345-1 !AI-0372-1 @drepl If the call itself defines the result of a function to which one of the above rules applies, these rules are applied recursively; @dby If the call itself defines the result of a function @i, or has an accessibility level that is tied to the result of such a function @i, then the master of the call is that of the master of the call invoking @i; !corrigendum 3.10.2(16.1/3) !AI-0236-1 !AI-0317-1 @drepl In the above rules, the operand of a view conversion, parenthesized expression or @fa is considered to be used in a context if the view conversion, parenthesized expression or @fa itself is used in that context. Similarly, a @i@fa of a @fa is considered to be used in a context if the @fa itself is used in that context. @dby In the above rules, the operative constituents of a @fa or @fa (see 4.4) are considered to be used in a given context if the enclosing @fa or @fa is used in that context. !corrigendum 3.10.2(19.2/4) !AI-0277-1 !AI-0324-1 !AI-0345-1 @ddel @xbullet, or the return expression of an expression function @i, when determining whether the accessibility level of an explicitly aliased parameter of @i is statically deeper than the level of the return object of @i, the level of the return object is considered to be the same as that of the level of the explicitly aliased parameter; for statically comparing with the level of other entities, an explicitly aliased parameter of @i is considered to have the accessibility level of the body of @i.> !corrigendum 4.1.4(6) !AI-0242-1 !AI-0262-1 @drepl In an @fa, if the @fa is for an attribute defined for (at least some) objects of an access type, then the @fa is never interpreted as an @fa; otherwise (and for all @fas), if the type of the @fa within the @fa is of an access type, the @fa is interpreted as an @fa. Similarly, if the @fa is for an attribute defined for (at least some) functions, then the @fa is never interpreted as a parameterless @fa; otherwise (and for all @fas), if the @fa consists of a @fa that denotes a function, it is interpreted as a parameterless @fa. @dby In an @fa that is not a @fa, if the @fa is for an attribute defined for (at least some) objects of an access type, then the @fa is never interpreted as an @fa; otherwise (and for all @fas and @fas), if there is a @fa and the type of the @fa within the @fa is of an access type, the @fa is interpreted as an @fa. Similarly, if the @fa is for an attribute defined for (at least some) functions, then the @fa is never interpreted as a parameterless @fa; otherwise (and for all @fas and @fas), if there is a @fa and the @fa consists of a @fa that denotes a function, it is interpreted as a parameterless @fa. !corrigendum 4.2(4) !AI-0325-1 !AI-0373-1 @drepl The expected type for a @fa that is a @fa shall be a single string type. @dby The expected type for a @fa that is a @fa shall be a single string type or a type with a specified String_Literal aspect (see 4.2.1). In either case, the @fa is interpreted to be of its expected type. If the expected type of an integer literal is a type with a specified Integer_Literal aspect (see 4.2.1), the literal is interpreted to be of its expected type; otherwise it is interpreted to be of type @i. If the expected type of a real literal is a type with a specified Real_Literal aspect (see 4.2.1), it is interpreted to be of its expected type; otherwise, it is interpreted to be of type @i. !corrigendum 4.2(6) !AI-0295-1 !AI-0325-1 @drepl For each character of a @fa with a given expected string type, there shall be a corresponding @fa of the component type of the expected string type. @dby If the expected type for a string_literal is a string type, then for each character of the @fa there shall be a corresponding @fa of the component type of the expected string type. !corrigendum 4.2(10) !AI-0295-1 !AI-0325-1 @drepl The evaluation of a @fa that is a @fa yields an array value containing the value of each character of the sequence of characters of the @fa, as defined in 2.6. The bounds of this array value are determined according to the rules for @fas (see 4.3.3), except that for a null string literal, the upper bound is the predecessor of the lower bound. @dby The evaluation of a @fa that is a @fa and has an expected type that is a string type, yields an array value containing the value of each character of the sequence of characters of the @fa, as defined in 2.6. The bounds of this array value are determined according to the rules for @fas (see 4.3.3), except that for a null string literal, the upper bound is the predecessor of the lower bound. In other cases, the effect of evaluating a @fa is determined by the String_Literal aspect that applies (see 4.2.1). !corrigendum 4.2(11) !AI-0295-1 !AI-0325-1 @drepl For the evaluation of a @fa of type @i, a check is made that the value of each character of the @fa belongs to the component subtype of @i. For the evaluation of a null string literal, a check is made that its lower bound is greater than the lower bound of the base range of the index type. The exception Constraint_Error is raised if either of these checks fails. @dby For the evaluation of a @fa of a string type @i, a check is made that the value of each character of the @fa belongs to the component subtype of @i. For the evaluation of a null string literal of a string type, a check is made that its lower bound is greater than the lower bound of the base range of the index type. The exception Constraint_Error is raised if either of these checks fails. !corrigendum 4.2.1(0) !AI-0249-1 !AI-0295-1 !AI-0312-1 !AI-0325-1 !AI-0342-1 !AI-0373-1 !AI-0394-1 !AI-0403-1 @dinsc Using one or more of the aspects defined below, a type may be specified to allow the use of one or more kinds of literals as values of the type. @s8<@i> The following type-related operational aspects (collectively known as @i) may be specified for any type @i: @xhang<@xterm This aspect is specified by a @i@fa that statically denotes a function with a result type of @i and one @b parameter that is of type String and is not explictly aliased.> @xhang<@xterm This aspect is specified by a @i@fa that statically denotes a function with a result type of @i and one @b parameter that is of type String and is not explictly aliased, and optionally a second function with a result type of @i and two @b parameters of type String that are not explicitly aliased.> @xhang<@xterm This aspect is specified by a @i@fa that statically denotes a function with a result type of @i and one @b parameter that is of type Wide_Wide_String and is not explictly aliased.> User-defined literal aspects are inherited according to the rules given in 13.1. When a numeric literal is interpreted as a value of a non-numeric type @i or a @fa is interpreted a value of a type @i that is not a string type (see 4.2), it is equivalent to a call to the subprogram denoted by the corresponding aspect of @i: the Integer_Literal aspect for an integer literal, the Real_Literal aspect for a real literal, and the String_Literal aspect for a @fa. The actual parameter of this notional call is a @fa having the textual representation of the original (numeric or string) literal. Such a literal is said to be a @i. When a named number that denotes a value of type @i is interpreted as a value of a non-numeric type @i, it is equivalent to a call to the function denoted by the Integer_Literal aspect of @i. The actual parameter of this notional call is a String having a textual representation of a decimal integer literal optionally preceded by a minus sign, representing the same value as the named number. When a named number that denotes a value of type @i is interpreted as a value of a non-numeric type @i, it is equivalent to a call to the two-parameter function denoted by the Real_Literal aspect of @i, if any. The actual parameters of this notional call are each a String with the textual representation of a decimal integer literal, with the first optionally preceded by a minus sign, where the first String represents the same value as the numerator, and the second the same value as the denominator, of the named number when represented as a rational number in lowest terms, with a positive denominator. @s8<@i> The Integer_Literal or Real_Literal aspect shall not be specified for a type @i if the full view of @i is a numeric type. The String_Literal aspect shall not be specified for a type @i if the full view of @i is a string type. For a nonabstract type, the function directly specified for a user-defined literal aspect shall not be abstract. For a tagged type with a partial view, a user-defined literal aspect shall not be directly specified on the full type. If a nonabstract tagged type inherits any user-defined literal aspect, then each inherited aspect shall be directly specified as a nonabstract function for the type unless the inherited aspect denotes a nonabstract function, or functions, and the type is a null extension. If a named number that denotes a value of type @i is interpreted as a value of a non-numeric type @i, @i shall have an Integer_Literal aspect. If a named number that denotes a value of type @i is interpreted as a value of a non-numeric type @i, @i shall have a Real_Literal aspect, and the aspect shall denote a function that has two @b parameters, both of type String, with result of type @i. In addition to the places where Legality Rules normally apply (see 12.3), these rules also apply in the private part of an instance of a generic unit. @s8<@i> It is a bounded error if the evaluation of a literal or named number that has an expected type with a specified user-defined literal aspect propagates an exception. Either Program_Error or the exception propagated by the evaluation is raised at the point of use of the value of the literal or named number. If it is recognized prior to run time that evaluation of such a literal or named number will inevitably (if executed) result in such a bounded error, then this may be reported as an error prior to run time. @s8<@i> @xcode<@b Roman_Character @b Wide_Wide_Character @b Static_Predicate =@> Roman_Character @b 'I' | 'V' | 'X' | 'L' | 'C' | 'D' | 'M';> @xcode := 3_999; --@ft<@i< MMMCMXCIX>>> @xcode<@b Roman_Number @b 1 .. Max_Roman_Number @b String_Literal =@> To_Roman_Number;> @xcode<@b To_Roman_Number (S : Wide_Wide_String) @b Roman_Number @b Pre =@> S'Length @> 0 @b (@b Char @b S =@> Char @b Roman_Character);> @xcode<@b To_Roman_Number (S : Wide_Wide_String) @b Roman_Number @b (@b R : @b (Integer @b <@>) @b Roman_Number := (@b D @b S'Range =@> Roman_Digit'Enum_Rep (Roman_Digit'Wide_Wide_Value (''' & S(D) & '''))); --@ft<@i< See 3.5.2 and 13.4>> @b [@b I @b R'Range =@> (@b I < R'Last @b R(I) < R(I + 1) @b -1 @b 1) * R(I)] 'Reduce("+", 0) );> @xcode>> !corrigendum 4.3(2) !AI-0127-1 !AI-0212-1 @drepl @xindent<@fa@fa<@ ::=@ >@fa@ |@ @fa@ |@ @fa> @dby @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @fa@ |@ @fa@ |@ @fa@hr @ @ |@ @fa@ |@ @fa> !corrigendum 4.3(3/2) !AI-0127-1 !AI-0212-1 !AI-0307-1 @drepl The expected type for an @fa shall be a single array type, record type, or record extension. @dby The expected type for an @fa shall be a single array type, a single type with the Aggregate aspect specified, or a single descendant of a record type or of a record extension. !corrigendum 4.3.1(17/3) !AI-0086-1 !AI-0127-1 @drepl The value of a discriminant that governs a @fa @i

shall be given by a static expression, unless @i

is nested within a @fa @i that is not selected by the discriminant value governing the @fa enclosing @i. @dby For a @fa or @fa, if a @fa @i

is nested within a @fa @i that is not selected by the discriminant value governing the @fa enclosing @i, then there is no restriction on the discriminant governing @i

. Otherwise, the value of the discriminant that governs @i

shall be given by a static expression, or by a nonstatic expression having a constrained static nominal subtype. In this latter case of a nonstatic expression, there shall be exactly one @fa of @i

that covers each value that belongs to the nominal subtype and satisfies the predicates of the subtype, and there shall be at least one such value. !corrigendum 4.3.2(5.4/3) !AI-0236-1 !AI-0317-1 @ddel @xbullet having at least one @i@fa that would violate this rule.> !corrigendum 4.3.3(3/2) !AI-0212-1 !AI-0306-1 @drepl @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ (@fa,@ @fa@ {,@ @fa})@hr @ @ |@ (@fa@ {,@ @fa},@ @b@ =@>@ @fa)@hr @ @ |@ (@fa@ {,@ @fa},@ @b@ =@>@ <@>> @dby @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ (@fa,@ @fa@ {,@ @fa})@hr @ @ |@ (@fa@ {,@ @fa},@ @b@ =@>@ @fa)@hr @ @ |@ (@fa@ {,@ @fa},@ @b@ =@>@ <@>)@hr @ @ |@ '['@ @fa@ {,@ @fa}[,@ @b@ =@>@ @fa]@ ']'@hr @ @ |@ '['@ @fa@ {,@ @fa},@ @b@ =@>@ <@>@ ']'> @xindent<@fa@fa<@ ::=@ >'['@ ']'> !corrigendum 4.3.3(4) !AI-0127-1 !AI-0212-1 @drepl @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ (@fa@ {,@ @fa})> @dby @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ (@fa)@hr @ @ |@ '['@ @fa@ ']'> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @fa@ {,@ @fa}> !corrigendum 4.3.3(5/2) !AI-0127-1 !AI-0212-1 @drepl @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @fa@ =@>@ @fa@hr @ @ |@ @fa@ =@>@ <@>> @dby @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @fa@ =@>@ @fa@hr @ @ |@ @fa =@> <@>@hr @ @ |@ @fa> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @b @fa@ @b@ @fa@ =@>@ @fa@hr @ @ |@ @b @fa@ =@>@ @fa> !corrigendum 4.3.3(9) !AI-0212-1 !AI-0306-1 @drepl An @fa of an n-dimensional array type shall be written as an n-dimensional @fa. @dby An @fa of an n-dimensional array type shall be written as an n-dimensional @fa, or as a @fa. !corrigendum 4.3.3(17/3) !AI-0061-1 !AI-0127-1 !AI-0212-1 @drepl The @fa of an @fa is allowed to have a @fa that is a nonstatic @fa or that is a @fa or @fa that defines a nonstatic or null range, only if it is the single @fa of its @fa, and there is only one @fa in the @fa. @dby The @fa of an @fa (including an @fa) is allowed to have a @fa that is a nonstatic @fa or that is a @fa or @fa that defines a nonstatic or null range, only if it is the single @fa of its @fa, and either there is only one @fa in the enclosing @fa or the enclosing @fa is an @fa, not an @fa. Either all or none of the @fas of an @fa shall be @fas with an @fa. !corrigendum 4.3.3(21) !AI-0212-1 !AI-0250-1 !AI-0327-1 @drepl The evaluation of an @fa of a given array type proceeds in two steps: @dby For an @fa that contains only @fas that are @fas with @fas, evaluation proceeds in two steps: @xhang<@xterms<1.>Each @fa is elaborated (in an arbitrary order) and an iteration is performed solely to determine a maximum count for the number of values produced by the iteration; all of these counts are combined to determine the overall length of the array, and ultimately the limits on the bounds of the array (defined below);> @xhang<@xterms<2.>A second iteration is performed for each of the @fas, in the order given in the @fa, and for each value conditionally produced by the iteration (see 5.5 and 5.5.2), the associated @fa is evaluated, its value is converted to the component subtype of the array type, and used to define the value of the next component of the array starting at the low bound and proceeding sequentially toward the high bound. A check is made that the second iteration results in an array length no greater than the maximum determined by the first iteration; Constraint_Error is raised if this check fails.> The evaluation of any other @fa of a given array type proceeds in two steps: !corrigendum 4.3.3(23.1/4) !AI-0061-1 !AI-0212-1 @dinsa Each @fa in an @fa defines the value for the associated component(s). For an @fa with <@>, the associated component(s) are initialized to the Default_Component_Value of the array type if this aspect has been specified for the array type; otherwise, they are initialized by default as for a stand-alone object of the component subtype (see 3.3.1). @dinst During an evaluation of the @fa of an @fa with a @fa, the value of the corresponding index parameter is that of the corresponding index of the corresponding array component. During an evaluation of the @fa of an @fa with an @fa, the value of the loop parameter of the @fa is the value produced by the iteration (as described in 5.5.2). !corrigendum 4.3.3(26) !AI-0212-1 !AI-0250-1 !AI-0306-1 @dinsa @xbullet (or equivalent @fa) without an @b choice, the lower bound is that of the corresponding index range in the applicable index constraint, if defined, or that of the corresponding index subtype, if not; in either case, the upper bound is determined from the lower bound and the number of @fas (or the length of the @fa);> @dinss @xbullet, bounds for each dimension are determined as for a @fa without an @b choice that has no expressions for each dimension;> @xbullet containing only @fas with an @fa, the lower bound is determined as for a @fa without an @b choice, and the upper bound is determined from the lower bound and the total number of values produced by the second set of iterations;> !corrigendum 4.3.3(31) !AI-0212-1 !AI-0250-1 @dinsa The exception Constraint_Error is raised if any of the above checks fail. @dinst @s8<@i> When evaluating @fas for an @fa that contains only @fas with @fas, the first step of evaluating an @fa can be omitted if the implementation can determine the maximum number of values by some other means. !corrigendum 4.3.3(32/3) !AI-0061-1 !AI-0306-1 @drepl @xindent<@s9, positional notation may only be used with two or more @fas; a single @fa in parentheses is interpreted as a parenthesized expression. A @fa, such as (1 =@> X), may be used to specify an array with a single component.>> @dby @xindent<@s9 delimited by parentheses, positional notation may only be used with two or more @fas; a single @fa in parentheses is interpreted as a parenthesized expression. An @fa delimited by square brackets may be used to specify an array with a single component.>> @xindent<@s9<12 An index parameter is a constant object (see 3.3).>> !corrigendum 4.3.3(43) !AI-0061-1 !AI-0312-1 @dinsa @xcode True); --@ft<@i< see 3.6>> E : Bit_Vector(M .. N) := (@b =@> True); F : String(1 .. 1) := (1 =@> 'F'); --@ft<@i< a one component aggregate: same as "F">>> @dinst @xcode Matrix := (@b I @b 1 .. 4 =@> (@b J @b 1 .. 4 =@> (@b I=J @b 1.0 @b 0.0))); --@ft<@i< Identity matrix>>> @xcode Matrix := []; --@ft<@i< A matrix without elements>>> !corrigendum 4.3.4(0) !AI-0127-1 !AI-0212-1 !AI-0324-1 !AI-0379-1 !AI-0381-1 !AI-0386-1 @dinsc Evaluating a (record or array) delta aggregate yields a composite value that starts with a copy of another value of the same type and then assigns to some (but typically not all) components of the copy. @s8<@i> @xindent<@fa@fa<@ ::=@ >@fa@ |@ @fa> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ (@i@fa@ @b@ @fa)> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ (@i@fa@ @b@ @fa)@hr @ @ |@ '['@ @i@fa@ @b@ @fa@ ']'> @s8<@i> The expected type for a @fa shall be a single descendant of a record type or record extension. The expected type for an @fa shall be a single array type. The expected type for the @i@fa of any @fa is the type of the enclosing @fa. The Name Resolution Rules and Legality Rules for each @fa of a @fa are as defined in 4.3.1. For an @fa, the expected type for each @fa in an @fa is the index type of the type of the @fa. The expected type of the @fa in an @fa is defined as for an @fa occurring within an @fa of the type of the @fa. @s8<@i> For an @fa, the @fa shall not use the box symbol <@>, and the @fa shall not be @b. For an @fa, the dimensionality of the type of the @fa shall be 1. For an @fa, the @i@fa and each @fa in every @fa shall be of a nonlimited type. @s8<@i> The evaluation of a @fa begins with the evaluation of the @i@fa of the @fa; then that value is used to create and initialize the anonymous object of the @fa. The bounds of the anonymous object of an @fa and the discriminants (if any) of the anonymous object of a @fa are those of the @i@fa. If a @fa is of a specific tagged type, its tag is that of the specific type; if it is of a class-wide type, its tag is that of the @i@fa. For a @fa, for each component associated with each @fa (in an unspecified order): @xbullet, a check is made that the values of the discriminants are such that the anonymous object has this component. The exception Constraint_Error is raised if this check fails.> @xbullet of the @fa is evaluated, converted to the nominal subtype of the associated component, and assigned to the component of the anonymous object.> For an @fa, for each @fa of each @fa (in the order given in the enclosing @fa and @fa, respectively) the @fa is evaluated; for each represented index value (in ascending order, if the @fa represents a range): @xbullet @xbullet; Constraint_Error is raised if this check fails.> @xbullet is evaluated, converted to the array component subtype, and assigned to the component of the anonymous object identified by the index value.> @s8<@i> Simple use in a postcondition: @xcode<@b Twelfth (D : @b Date) --@ft<@i< see 3.8 for type Date>> @b Post =@> D = (D'Old @b Day =@> 12);> @xcode<@b The_Answer (V : @b Vector; A, B : @b Integer) --@ft<@i< see 3.6 for type Vector>> @b Post =@> V = (V'Old @b A .. B =@> 42.0, V'First =@> 0.0);> The base expression can be nontrivial: @xcode Value =@> 42); --@ft<@i< see 3.10.1 for Cell and Head; 6.1 for Min_Cell>>> @xcode 1.0, 1 =@> 2.0, 2 =@> 3.0) @b Integer(Random * 2.0) =@> 14.2); --@ft<@i< see 3.6 for declaration of type Vector>> --@ft<@i< see 6.1 for declaration of Random>>> @xcode Day =@> 12) @b Month =@> April); --@ft<@i< see 3.8>>> The base expression may also be class-wide: @xcode<@b Translate (P : Point'Class; X, Y : Real) @b Point'Class @b (P @b X =@> P.X + X, Y =@> P.Y + Y); --@ft<@i< see 3.9 for declaration of type Point>>> !corrigendum 4.3.5(0) !AI-0212-1 !AI-0250-1 !AI-0312-1 !AI-0327-1 !AI-0388-1 !AI-0403-1 @dinsc In a @fa, values are specified for elements of a container; for a @fa, the elements are given sequentially; for a @fa, the elements are specified by a sequence of key/value pairs, or using an iterator. The Aggregate aspect of the type of the @fa determines how the elements are combined to form the container. For a type other than an array type, the following type-related operational aspect may be specified: @xhang<@xtermThis aspect is an @fa of the form:> @xindent<@ @ @ (Empty =@> @fa[,@hr @ @ @ @ Add_Named =@> @i@fa][,@hr @ @ @ @ Add_Unnamed =@> @i@fa][,@hr @ @ @ @ New_Indexed =@> @i@fa,@hr @ @ @ @ Assign_Indexed =@> @i@fa])> @xindent of the Aggregate aspect. A @i@fa shall be specified for at least one of Add_Named, Add_Unnamed, or Assign_Indexed. If Add_Named is specified, neither Add_Unnamed nor Assign_Indexed shall be specified. Either both or neither of New_Indexed and Assign_Indexed shall be specified.> @s8<@i> The @fa specified for Empty for an Aggregate aspect shall denote a constant of the container type, or denote a function with a result type of the container type that has no parameters, or that has one @b parameter of type Integer. The @i@fa specified for Add_Unnamed for an Aggregate aspect shall denote a procedure that has two parameters, the first an @b parameter of the container type, and the second an @b parameter of some nonlimited type, called the @i of the container type. The @i@fa specified for New_Indexed for an Aggregate aspect shall denote a function with a result type of the container type, and two parameters of the same discrete type, with that type being the @i of the container type. The @i@fa specified for Add_Named or Assign_Indexed for an Aggregate aspect shall denote a procedure that has three parameters, the first an @b parameter of the container type, the second an @b parameter of a nonlimited type (the @i of the container type), and the third, an @b parameter of a nonlimited type that is called the @i of the container type. @s8<@i> If the container type of an Aggregate aspect is a private type, the full type of the container type shall not be an array type. If the container type is limited, the name specified for Empty shall denote a function rather than a constant object. For an Aggregate aspect, the key type of Assign_Indexed shall be the same type as that of the parameters of New_Indexed. Additionally, if both Add_Unnamed and Assign_Indexed are specified, the final parameters shall be of the same type @emdash the element type of the container type. @s8<@i> The Aggregate aspect is nonoverridable (see 13.1.1). @s8<@i> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @fa@hr @ @ |@ @fa@hr @ @ |@ @fa> @xindent<@fa@fa<@ ::=@ >'['@ ']'> @xindent<@fa@fa<@ ::=@ >'['@ @fa{,@ @fa}@ ']'> @xindent<@fa@fa<@ ::=@ >'['@ @fa@ ']'> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @fa@ {,@ @fa}> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @fa =@> @fa@hr @ @ |@ @fa =@> <@>@hr @ @ |@ @fa> @xindent<@fa@fa<@ ::=@ >@fa@ {'|'@ @fa}> @xindent<@fa@fa<@ ::=@ >@i@fa@ |@ @fa> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @b@ @fa[@ @b@ @i@fa]@ =@>@ @fa@hr @ @ |@ @b@ @fa[@ @b@ @i@fa]@ =@>@ @fa> @s8<@i> The expected type for a @fa shall be a type for which the Aggregate aspect has been specified. The expected type for each @fa of a @fa is the element type of the expected type. The expected type for a @i@fa, or a @fa of a @fa, is the key type of the expected type of the @fa. @s8<@i> The expected type for a @fa shall have an Aggregate aspect that includes a specification for an Add_Unnamed procedure or an Assign_Indexed procedure. The expected type for a @fa that contains one or more @fas with a @i@fa shall have an Aggregate aspect that includes a specification for the Add_Named procedure. The expected type for a @fa that contains one or more @fas shall have an Aggregate aspect that includes a specification for the Add_Named or Assign_Indexed procedure. A @fa can be of any type with an Aggregate aspect. A non-null container aggregate is called an @i if the expected type @i of the aggregate specifies an Assign_Indexed procedure in its Aggregate aspect, and either there is no Add_Unnamed procedure specified for the type, or the aggregate is a @fa with a @fa that contains a @fa or a @fa. The key type of an indexed aggregate is also called the @i of the aggregate. A @fa with a <@> rather than an @fa, or with a @fa that is a @fa, is permitted only in an indexed aggregate. For an @fa without a @i@fa, if the @fa is an indexed aggregate or the expected type of the @fa specifies an Add_Named procedure in its Aggregate aspect, then the type of the loop parameter of the @fa shall be the same as the key type of the @fa. For a @fa that is an indexed aggregate, all @fas shall contain either a @fa, or a @fa without a @i@fa or @fa. Furthermore, for such an aggregate, either: @xbullets shall be static expressions or static ranges, and every @fa shall have a @fa that defines a non-null static range, and the set of values of the index type covered by the @fas and the @fas shall form a contiguous range of values with no duplications; or> @xbullet, and if it has a @fa, the list shall have exactly one @fa.> @s8<@i> The evaluation of a @fa starts by creating an anonymous object @i of the expected type @i initialized as follows: @xbullet is an indexed aggregate, from the result of a call on the New_Indexed function; the actual parameters in this call represent the lower and upper bound of the @fa, and are determined as follows:> @xinbull is a @fa, the lower bound is the low bound of the subtype of the key parameter of the Add_Indexed procedure, and the upper bound has a position number that is the sum of the position number of the lower bound and one less than the number of @fas in the @fa;> @xinbull is a @fa, the lower bound is the lowest value covered by a @fa or is the low bound of a range defined by a @fa of a @fa; the upper bound is the highest value covered by a @fa or is the high bound of a range defined by a @fa of a @fa.> @xbullet is not an indexed aggregate, by assignment from the Empty constant, or from a call on the Empty function specified in the Aggregate aspect. In the case of an Empty function with a formal parameter, the actual parameter has the following value:> @xinbull, the value zero;> @xinbull, the number of @fas;> @xinbull without an @fa, the number of @i@fas;> @xinbull where every @fa contains a @fa, the total number of elements specified by all of the @fas;> @xinbull The evaluation then proceeds as follows: @xbullet, the anonymous object @i is the result;> @xbullet of a type with a specified Add_Unnamed procedure, each @fa is evaluated in an arbitrary order, and the Add_Unnamed procedure is invoked in sequence with the anonymous object @i as the first parameter and the result of evaluating each @fa as the second parameter, in the order of the @fas;> @xbullet that is an indexed aggregate, each @fa is evaluated in an arbitrary order, and the Assign_Indexed procedure is invoked in sequence with the anonymous object @i as the first parameter, the key value as the second parameter, computed by starting with the low bound of the subtype of the key formal parameter of the Assign_Indexed procedure and taking the successor of this value for each successive @fa, and the result of evaluating each @fa as the third parameter;> @xbullet for a type with an Add_Named procedure in its Aggregate aspect, the @fas are evaluated in an arbitrary order:> @xinbull with a @fa, for each @fa of the list in an arbitrary order, the @fa is evaluated as is the @fa of the @fa (in an arbitrary order), and the Add_Named procedure is invoked once for each value covered by the @fa, with the anonymous object @i as the first parameter, the value from the @fa as the second parameter, and the result of evaluating the @fa as the third parameter;> @xinbull with an @fa, first the @fa is elaborated, then an iteration is performed, and for each value conditionally produced by the iteration (see 5.5 and 5.5.2) the Add_Named procedure is invoked with the anonymous object @i as the first parameter, the result of evaluating the @fa as the third parameter, and:> @xI2bull@fa, the result of evaluating the @i@fa as the second parameter;> @XI2Bull @xbullet that is an indexed aggregate, the evaluation proceeds as above for the case of Add_Named, but with the Assign_Indexed procedure being invoked in its stead; in the case of a @fa with a <@> rather than an @fa, the corresponding call on Assign_Indexed is not performed, leaving the component as it was upon return from the New_Indexed function;> @xbullet, the @fas (which are necessarily @fas) are evaluated in the order given; each such evaluation comprises two steps:> @xhang<@xterms<1.>the @fa is elaborated;> @xhang<@xterms<2.>an iteration is performed, and for each value conditionally produced by the iteration (see 5.5 and 5.5.2) the Add_Unnamed procedure is invoked, with the anonymous object @i as the first parameter and the result of evaluating the @fa as the second parameter.> @s8<@i> Declarations of Set_Type, Map_Type, and Vector_Type: @xcode< -- @ft<@i> @b Set_Type @b @b Aggregate =@> (Empty =@> Empty_Set, Add_Unnamed =@> Include); @b Empty_Set @b Set_Type;> @xcode< @b Small_Natural @b Natural @b 0..1000;> @xcode< @b Include (S : @b Set_Type; N : @b Small_Natural);> @xcode< -- @ft<@i> @b Map_Type @b @b Aggregate =@> (Empty =@> Empty_Map, Add_Named =@> Add_To_Map);> @xcode< @b Add_To_Map (M : @b Map_Type; Key : @b Integer; Value : @b String);> @xcode< Empty_Map : @b Map_Type;> @xcode< -- @ft<@i> @b Vector_Type @b @b Aggregate =@> (Empty =@> Empty_Vector, Add_Unnamed =@> Append_One, New_Indexed =@> New_Vector, Assign_Indexed =@> Assign_Element);> @xcode< @b Empty_Vector (Capacity : Count_Type := 0) @b Vector_Type;> @xcode< @b Append_One (V : @b Vector_Type; New_Item : @b String);> @xcode< @b Assign_Element (V : @b Vector_Type; Index : @b Positive; Item : @b String);> @xcode< @b New_Vector (First, Last : Positive) @b Vector_Type @b Pre =@> First = Positive'First; -- @ft<@i> -- @ft<@i>> @xcode<-- @ft<@i>> Examples of container aggregates for Set_Type, Map_Type, and Vector_Type: @xcode<-- @ft<@i> S : Set_Type;> @xcode<-- @ft<@i> S := [];> @xcode<-- @ft<@i> S := Empty_Set;> @xcode<-- @ft<@i> S := [1, 2];> @xcode<-- @ft<@i> S := Empty_Set; Include (S, 1); Include (S, 2);> @xcode<-- @ft<@i>@fa@ft<@i<:>> S := [@b Item @b 1 .. 5 =@> Item * 2];> @xcode<-- @ft<@i> S := Empty_Set; @b Item @b 1 .. 5 @b Include (S, Item * 2); @b;> @xcode<-- @ft<@i>@fa@ft<@i> S := [@b Item @b 1 .. 5 =@> Item, @b Item @b 1 .. 5 =@> -Item];> @xcode<-- @ft<@i> S := Empty_Set; @b Item @b -5 .. 5 @b @b Item /= 0 @b Include (S, Item); @b; @b;> @xcode<-- @ft<@i> M : Map_Type;> @xcode<-- @ft<@i> M := [12 =@> "house", 14 =@> "beige"];> @xcode<-- @ft<@i> M := Empty_Map; Add_To_Map (M, 12, "house"); Add_To_Map (M, 14, "beige");> @xcode<-- @ft<@i> @b Pair @b Key : Integer; Value : @b String; @b;> @xcode(Positive @b <@>) @b Pair := [(Key =@> 33, Value =@> @b String'("a nice string")), (Key =@> 44, Value =@> @b String'("an even better string"))];> @xcode<-- @ft<@i>@fa -- @ft<@i>@fa@ft<@i<, built from from a table of key/value pairs:>> M := [@b P @b Table @b P.Key =@> P.Value.@b];> @xcode<-- @ft<@i> M := Empty_Map; @b P @b Table @b Add_To_Map (M, P.Key, P.Value.@b); @b;> @xcode<-- @ft<@i> Keys : @b(Positive @b <@>) @b Integer := [2, 3, 5, 7, 11];> @xcode<-- @ft<@i> -- @fa@ft<@i< are of the same type as the key>> -- @ft<@i<(eliminating the need for a separate key_>>@fa@ft<@i<):>> M := [@b Key @b Keys =@> Integer'Image (Key)];> @xcode<-- @ft<@i> M := Empty_Map; @b Key @b Keys @b Add_To_Map (M, Key, Integer'Image (Key)); @b;> @xcode<-- @ft<@i> V : Vector_Type;> @xcode<-- @ft<@i> V := ["abc", "def"];> @xcode<-- @ft<@i> V := Empty_Vector (2); Append_One (V, "abc"); Append_One (V, "def");> @xcode<-- @ft<@i> V := [1 =@> "this", 2 =@> "is", 3 =@> "a", 4 =@> "test"];> @xcode<-- @ft<@i> V := New_Vector (1, 4); Assign_Element (V, 1, "this"); Assign_Element (V, 2, "is"); Assign_Element (V, 3, "a"); Assign_Element (V, 4, "test");> @xcode<-- @ft<@i> V := [@b Elem @b M =@> Elem];> @xcode<-- @ft<@i> V := Empty_Vector (); @b Elem @b M @b Append_One (V, Elem); @b;> !corrigendum 4.5.9(0) !AI-0236-1 !AI-0317-1 @dinsc Declare expressions provide a way to declare local constants and object renamings in an expression context. @s8<@i> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @b {@fa}@hr @ @ @ @ @b @i@fa> @xindent<@fa@fa<@ ::=@ >@fa@ |@ @fa> Wherever the Syntax Rules allow an @fa, a @fa may be used in place of the @fa, so long as it is immediately surrounded by parentheses. @s8<@i> A @fa that is an @fa shall declare a constant of a nonlimited type. A @fa that is an @fa (see 8.5.1) shall not rename an object of a limited type if any operative constituent of the @i@fa is a value conversion or is newly constructed (see 4.4). The following are not allowed within a @fa: a declaration containing the reserved word @b; the @fa Access or Unchecked_Access; or an anonymous access type. @s8<@i> If a @fa is expected to be of a type @i, then the @i@fa is expected to be of type @i. Similarly, if a @fa is expected to be of some class of types, then the @i@fa is subject to the same expectation. If a @fa shall resolve to be of a type @i, then the @i@fa shall resolve to be of type @i. The type of a @fa is the type of the @i@fa. @s8<@i> For the evaluation of a @fa, the @fas are elaborated in order, and then the @i@fa is evaluated. The value of the @fa is that of the @i@fa. @s8<@i> The postcondition for Ada.Containers.Vectors."&" (see A.18.2) could have been written: @xcode<@b Post =@> (@b Result @b Vectors."&"'Result; Length : @b Count_Type := Left.Length + Right.Length; @b Result.Length = Length @b @b Tampering_With_Elements_Prohibited (Result) @b @b Tampering_With_Cursors_Prohibited (Result) @b Result.Capacity @>= Length)> !corrigendum 4.5.10(0) !AI-0242-1 !AI-0250-1 !AI-0262-1 !AI-0327-1 !AI-0348-1 !AI-0355-2 !AI-0379-1 @dinsc Reduction expressions provide a way to map or transform a collection of values into a new set of values, and then summarize the values produced by applying an operation to reduce the set to a single value result. A reduction expression is represented as an @fa of the reduction attributes Reduce or Parallel_Reduce. @s8<@i> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @fa'@fa@hr @ @ |@ @fa'@fa> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ '['@ [@b[(@fa)]@ [@fa]]@hr @ @ @ @ @ @ @ @ @fa@ ']'> @xindent<@fa@fa<@ ::=@ >@i@fa(@fa)> @xindent<@fa@fa<@ ::=@ >@i@fa,@ @i@fa> The @fa of a @fa shall not have a @i@fa, nor shall it have a @fa that has the reserved word @b. The @fa, if any, of a @fa shall be an @i@fa. @s8<@i> The expected type for a @fa shall be a single nonlimited type. In the remainder of this subclause, we will refer to nonlimited subtypes @i and @i of a @fa. These subtypes and interpretations of the @fas and @fas of a @fa are determined by the following rules: @xbullet<@i is a subtype of the expected type of the @fa.> @xbullet is either subtype conformant with the following specification:> @xcode< @b Reducer(Accumulator : @i; Value : @i) @b @i;> @xindent @xcode< @b Reducer(Accumulator : @b @i; Value : @b @i);> @xbullet@fa of a @fa denotes a reducer subprogram.> @xbullet@fa of a @fa is that of subtype @i.> @xbullet of the @fa of a @fa is that of subtype @i.> @s8<@i> If the @fa has a @fa with the reserved word @b, the subtypes @i and @i shall statically match. If the @fa of a @fa is Parallel_Reduce, the subtypes @i and @i shall statically match. @s8<@i> A @fa denotes a value, with nominal subtype being the subtype of the first parameter of the subprogram denoted by the @i@fa. @s8<@i> For the evaluation of a @fa, the @fa, the @fa, and the @fa, if any, are elaborated in an arbitrary order. Next an iteration is performed, and for each value conditionally produced by the iteration (see 5.5 and 5.5.2), the associated @fa is evaluated with the loop parameter having this value, which produces a result that is converted to Value_Type and is used to define the next value in the sequence. If the @fa does not have the reserved word @b, it is produced as a single sequence of values by a single logical thread of control. If the reserved word @b is present in the @fa, the enclosing @fa is a parallel construct, and the sequence of values is generated by a parallel iteration (as defined in 5.5, 5.5.1, and 5.5.2), as a set of non-empty, non-overlapping contiguous chunks (@i) with one logical thread of control (see clause 9) associated with each subsequence. If there is a @fa, it determines the maximum number of chunks, as defined in 5.5; otherwise the maximum number of chunks is implementation defined. For a @fa V, the following attribute is defined: @xhang<@xterm This attribute represents a @i, and is in the form of a @fa.> @xindent (the @i@fa Reducer and the @i@fa Initial_Value), in an arbitrary order. It then initializes the @i of the reduction expression to the value of the @i@fa (the @i). The @fa V is then evaluated.> @xindent does not have the reserved word @b, each value of the @fa is passed, in order, as the second (Value) parameter to a call on Reducer, with the first (Accumulator) parameter being the prior value of the accumulator, saving the result as the new value of the accumulator. The reduction expression yields the final value of the accumulator.> @xindent is present in a @fa, then the (parallel) reduction expression is a parallel construct and the sequence has been partitioned into one or more subsequences (see above) each with its own separate logical thread of control.> @xindent @xindent @xindent yields an empty sequence of values, the reduction expression yields the initial value.> @xindent For a @fa X of an array type (after any implicit dereference), or that denotes an iterable container object (see 5.5.1), the following attributes are defined: @xhang<@xtermX'Reduce is a reduction expression that yields a result equivalent to replacing the @fa of the attribute with the @fa:> @xcode< [@b Item @b X =@> Item]> @xhang<@xtermX'Parallel_Reduce is a reduction expression that yields a result equivalent to replacing the attribute @fa with Reduce and the @fa of the attribute with the @fa:> @xcode< [@b Item @b X =@> Item]> @s8<@i> For a parallel reduction expression, it is a bounded error if the reducer subprogram is not associative. That is, for any arbitrary values of subtype @i @i, @i, @i and a reducer function @i, the result of @i (@i, @i (@i, @i)) should produce a result equal to @i (@i (@i, @i), @i)). The possible consequences are Program_Error, or a result that does not match the equivalent sequential reduction expression due to the order of calls on the reducer subprogram being unspecified in the overall reduction. Analogous rules apply in the case of a reduction procedure. @s8<@i> An expression function that returns its result as a Reduction Expression: @xcode<@b Factorial(N : Natural) @b Natural @b ([@b J @b 1..N =@> J]'Reduce("*", 1));> An expression function that computes the Sine of X using a Taylor expansion: @xcode<@b Sine (X : Float; Num_Terms : Positive := 5) @b Float @b ([@b I @b 1..Num_Terms =@> (-1.0)**(I-1) * X**(2*I-1)/Float(Factorial(2*I-1))]'Reduce("+", 0.0));> A reduction expression that outputs the sum of squares: @xcode I @b 1 .. 10 =@> I**2]'Reduce("+", 0)));> An expression function to compute the value of Pi: @xcode<-- @ft<@i> @b Pi (Number_Of_Steps : Natural := 10_000) @b Real @b (1.0 / Real (Number_Of_Steps) * [@b I @b 1 .. Number_Of_Steps =@> (4.0 / (1.0 + ((Real (I) - 0.5) * (1.0 / Real (Number_Of_Steps)))**2))] 'Reduce("+", 0.0));> Calculate the sum of elements of an array of integers: @xcode>> Determine if all elements in a two-dimensional array of booleans are set to true: @xcode>> Calculate the minimum value of an array of integers in parallel: @xcode A parallel reduction expression used to calculate the mean of the elements of a two-dimensional array of subtype Matrix (see 3.6) that are greater than 100.0: @xcode<@b Accumulator @b Sum : Real; --@ft<@i< See 3.5.7.>> Count : Integer; @b;> @xcode<@b Accumulate (L, R : Accumulator) @b Accumulator @b (Sum =@> L.Sum + R.Sum, Count =@> L.Count + R.Count);> @xcode<@b Average_of_Values_Greater_Than_100 (M : Matrix) @b Real @b (@b Acc : @b Accumulator := [@b Val @b M @b Val @> 100.0 =@> (Val, 1)] 'Reduce(Accumulate, (Sum =@> 0, Count =@> 0)); @b Acc.Sum / Real(Acc.Count));> !corrigendum 4.6(24.21/4) !AI-0064-2 !AI-0380-1 @dinsa @xinbull @dinst @xinbull @xinbull or Unspecified, then each mode of the Global aspect of the operand type shall identify a subset of the variables identified by the corresponding mode of the target type Global aspect, or by the @b mode of the target type Global aspect.> !corrigendum 4.9(8) !AI-0064-2 !AI-0368-1 @drepl @xbullet whose @fa statically denotes a statically constrained array object or array subtype, and whose @fa is First, Last, or Length, with an optional dimension;> @dby @xbullet whose @fa statically names a statically constrained array object or array subtype, and whose @fa is First, Last, or Length, with an optional dimension;> @xbullet whose @fa denotes a non-generic entity that is not declared in a generic unit, and whose @fa is Nonblocking;> !corrigendum 4.9(17) !AI-0368-1 !AI-0373-1 @dinsa @xbullet with a @fa that statically denotes the renamed entity.> @dinss A @fa @i an object if it: @xbullet @xbullet whose prefix statically names an object, there is no implicit dereference of the prefix, and the @fa does not denote a @fa occurring within a @fa; or> @xbullet whose prefix statically names an object, there is no implicit dereference of the prefix, the object is statically constrained, and the index expressions of the object are static and have values that are within the range of the index constraint.> For an entity other than an object, a @fa statically names an entity if the @fa statically denotes the entity. !corrigendum 4.9(20) !AI-0201-1 !AI-0385-1 @drepl @xbullet @dby @xbullet @xbullet !corrigendum 4.9(24) !AI-0201-1 !AI-0393-1 @drepl A @i is a constant view declared by a full constant declaration or an @fa with a static nominal subtype, having a value defined by a static scalar expression or by a static string expression whose value has a length not exceeding the maximum length of a @fa in the implementation. @dby A @i is a constant view declared by a full constant declaration or an @fa with a static nominal subtype, having a value defined by a static scalar expression or by a static string expression, and which satisfies any constraint or predicate that applies to the nominal subtype. !corrigendum 4.9.1(2/3) !AI-0059-1 !AI-0374-2 @drepl A subtype @i another subtype of the same type if they have statically matching constraints, all predicate specifications that apply to them come from the same declarations, and, for access subtypes, either both or neither exclude null. Two anonymous access-to-object subtypes statically match if their designated subtypes statically match, and either both or neither exclude null, and either both or neither are access-to-constant. Two anonymous access-to-subprogram subtypes statically match if their designated profiles are subtype conformant, and either both or neither exclude null. @dby The Global or Global'Class aspects (see 6.1.2) of two entities @i if both consist of a single @fa where each is the reserved word @b, or each is of the form "@fa @fa" with the same sequence of reserved words. A subtype @i another subtype of the same type if they have statically matching constraints, all predicate specifications that apply to them come from the same declarations, Nonblocking aspects have the same value, global aspects statically match, Object_Size (see 13.3) has been specified to have a nonconfirming value for either both or neither, and the nonconfirming values, if any, are the same, and, for access subtypes, either both or neither exclude null. Two anonymous access-to-object subtypes statically match if their designated subtypes statically match, and either both or neither exclude null, and either both or neither are access-to-constant. Two anonymous access-to-subprogram subtypes statically match if their designated profiles are subtype conformant, and either both or neither exclude null. !corrigendum 4.10(0) !AI-0020-1 !AI-0250-1 !AI-0315-1 !AI-0340-1 @dinsc An @i of a value is a string representing the value in display form. The attributes Image, Wide_Image, and Wide_Wide_Image are available to produce the image of a value as a String, Wide_String, or Wide_Wide_String (respectively). User-defined images for a given type can be implemented by overriding the default implementation of the attribute Put_Image. @s8<@i> For every subtype S of a type T other than @i or @i, the following type-related operational attribute is defined: @xhang<@xterm S'Put_Image denotes a procedure with the following specification:> @xcode< @b S'Put_Image (@ft<@i> : @b Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; @ft<@i> : @b T);> @xindent of the value of @i.> @xindent or via an @fa specifying the Put_Image aspect of the type.> The behavior of the default implementation of S'Put_Image depends on the class of T. For an elementary type, the implementation is equivalent to: @xcode<@b Scalar_Type'Put_Image (Buffer : @b Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; Arg : @b Scalar_Type) @b @b Buffer.Wide_Wide_Put (@i<>); @b Scalar_Type'Put_Image;> where the Wide_Wide_String value written out to the stream is defined as follows: For an integer type, the image written out is the corresponding decimal literal, without underlines, leading zeros, exponent, or trailing spaces, but with a single leading character that is either a minus sign or a space. For an enumeration type, the image written out is either the corresponding identifier in upper case or the corresponding character literal (including the two apostrophes); neither leading nor trailing spaces are included. For a @i (a value of a character type that has no enumeration literal associated with it), the value is a corresponding language-defined name in upper case (for example, the image of the nongraphic character identified as @i is @fc<"NUL"> @emdash the quotes are not part of the image). For a floating point type, the image written out is a decimal real literal best approximating the value (rounded away from zero if halfway between) with a single leading character that is either a minus sign or a space, a single digit (that is nonzero unless the value is zero), a decimal point, S'Digits-1 (see 3.5.8) digits after the decimal point (but one if S'Digits is one), an upper case E, the sign of the exponent (either + or -), and two or more digits (with leading zeros if necessary) representing the exponent. If S'Signed_Zeros is True, then the leading character is a minus sign for a negatively signed zero. For a fixed point type, the image written out is a decimal real literal best approximating the value (rounded away from zero if halfway between) with a single leading character that is either a minus sign or a space, one or more digits before the decimal point (with no redundant leading zeros), a decimal point, and S'Aft (see 3.5.10) digits after the decimal point. For an access type (named or anonymous), the image written out depends on whether the value is @b. If it is @b, then the image is @fc<"NULL">. Otherwise the image is a left parenthesis followed by @fc<"ACCESS">, a space, and a sequence of graphic characters, other than space or right parenthesis, representing the location of the designated object, followed by a right parenthesis, as in @fc<"(ACCESS FF0012AC)">. For an array type T, the default implementation of T'Put_Image generates an image based on (named, not positional) array aggregate syntax (with '[' and ']' as the delimiters) using calls to the Put_Image procedures of the index type(s) and the element type to generate images for values of those types. The case of a null array is handled specially, using ranges for index bounds and @fc<"<@>"> as a syntactic component-value placeholder. The order in which components are written for a composite type is the same canonical order in which components of a composite type T are written out by the default implementation of T'Write. This is also the order that is used in determining the meaning of a positional aggregate of type T. For a class-wide type, the default implementation of T'Put_Image generates an image based on qualified expression syntax. Wide_Wide_String'Write is called with Wide_Wide_Expanded_Name of @i'Tag. Then S'Put_Image is called, where S is the specific type identified by @i'Tag. For a type extension, the default implementation of T'Put_Image depends on whether there exists a noninterface ancestor of T (other than T itself) for which the Put_Image aspect has been explicitly specified. If so, then T'Put_Image will generate an image based on extension aggregate syntax where the ancestor type of the extension aggregate is the nearest ancestor type whose Put_Image aspect has been specified. If no such ancestor exists, then the default implementation of T'Put_Image is the same as described below for an untagged record type. For an untagged record type, a specific tagged record type other than a type extension which meets the criteria described in the previous paragraph, or a protected type, the default implementation of T'Put_Image generates an image based on (named, not positional) record aggregate syntax (except that for a protected type, the initial left parenthesis is followed by @fc<"PROTECTED with ">). Component names are displayed in upper case, following the rules for the image of an enumeration value. Component values are displayed via calls to the component type's Put_Image procedure. The image written out for a record having no components (including any interface type) is @fc<"(NULL RECORD)">. The image written out for a componentless protected type is @fc<"(PROTECTED NULL RECORD)">. In the case of a protected type T, a call to the default implementation of T'Put_Image begins only one protected (read-only) action. For an undiscriminated task type, the default implementation of T'Put_Image generates an image of the form @fc<"(TASK )"> where is the result obtained by calling Task_Identification.Image with the id of the given task and then passing that String to Characters.Conversions.To_Wide_Wide_String. For a discriminated task type, the default implementation of T'Put_Image also includes discriminant values, as in: @xcode<"(TASK with D1 =@> 123, D2 =@> 456)"> For every subtype S of a type T, the following attributes are defined: @xhang<@xterm S'Wide_Wide_Image denotes a function with the following specification:> @xcode< @b S'Wide_Wide_Image(@ft<@i> : S'Base) @b Wide_Wide_String> @xindent (which will typically store a sequence of character values in a text buffer) and then returns the result of retrieving the contents of that buffer with Wide_Wide_Get. The lower bound of the result is one.> @xhang<@xterm S'Wide_Image denotes a function with the following specification:> @xcode< @b S'Wide_Image(@ft<@i> : S'Base) @b Wide_String> @xindent (which will typically store a sequence of character values in a text buffer) and then returns the result of retrieving the contents of that buffer with Wide_Get. The lower bound of the result is one.> @xhang<@xterm S'Image denotes a function with the following specification:> @xcode< @b S'Image(@ft<@i> : S'Base) @b String> @xindent (which will typically store a sequence of character values in a text buffer) and then returns the result of retrieving the contents of that buffer with Get. The lower bound of the result is one.> For a @fa X of a type T other than @i or @i, the following attributes are defined: @xhang<@xterm X'Wide_Wide_Image denotes the result of calling function S'Wide_Wide_Image with @i being X, where S is the nominal subtype of X.> @xhang<@xterm X'Wide_Image denotes the result of calling function S'Wide_Image with @i being X, where S is the nominal subtype of X.> @xhang<@xterm X'Image denotes the result of calling function S'Image with @i being X, where S is the nominal subtype of X.> @s8<@i> An implementation may transform the image generated by the default implementation of S'Put_Image for a composite subtype S in the following ways: @xbullet @xbullet @xbullet syntax where some @fa identifies more than one index value by identifying a sequence of one or more ranges and values separated by vertical bars, then this image may be generated instead; this may involve the reordering of component values.> @xbullet @xbullet For each language-defined nonscalar type T, T'Put_Image may be specified. @s8<@i> For each language-defined container type T (that is, each of the Vector, List, Map, Set, Tree, and Holder types defined in the various children of Ada.Containers), T'Put_Image shall be specified so that T'Image produces a result consistent with array aggregate syntax (using '[' and ']' as delimiters) as follows: @xbullet @xbullet Value1, Key2 =@> Value2]>.> @xbullet.> @xbullet.> For each language-defined nonscalar type T that has a primitive language-defined Image function whose profile is type conformant with that of T'Image (for example, Ada.Numerics.Float_Random.State has such an Image function), T'Put_Image shall be specified so that T'Image yields the same result as that Image function. @s8<@i> For each language-defined private type T, T'Image should generate an image that would be meaningful based only on the relevant public interfaces, as opposed to requiring knowledge of the implementation of the private type. !corrigendum 5.2.1(0) !AI-0125-3 !AI-0322-1 !AI-0379-1 @dinsc @@, known as the @i of an assignment statement, provides an abbreviation to avoid repetition of potentially long names in assignment statements. @s8<@i> @xindent<@fa@fa<@ ::=@ >@@> @s8<@i> If a @fa occurs in an @fa @i, the @i@fa @i of @i is a complete context. The target name is a constant view of @i, having the nominal subtype of @i. @s8<@i> A @fa shall appear only in the @fa of an @fa. @s8<@i> For the execution of an @fa with one or more @fas appearing in its @fa, the @i@fa @i of the @fa is evaluated first to determine the object denoted by @i, and then the @fa of the @fa is evaluated with the evaluation of each @fa yielding a constant view of the the target whose properties are otherwise identical to those of the view provided by @i. The remainder of the execution of the @fa is as given in subclause 5.2. @s8<@i> @xcode> -- @ft<@i<(Board is declared in 3.6.1).>>> @xcode (1 .. Max) @b Complex; -- @ft<@i> ... -- @ft<@i> My_Complex_Array (Count) := (Re =@> @@.Re**2 - @@.Im**2, Im =@> 2.0 * @@.Re * @@.Im); -- @ft<@i>> !corrigendum 5.5(3/3) !AI-0119-1 !AI-0189-1 !AI-0251-1 !AI-0266-1 !AI-0326-2 !AI-0355-2 @drepl @xindent<@fa@fa<@ ::=@ >@b@ @fa@hr @ @ |@ @b@ @fa@hr @ @ |@ @b@ @fa> @dby @xindent<@fa@fa<@ ::=@ >@b@ @fa@hr @ @ |@ @b@ @fa@hr @ @ |@ @b@ @fa@hr @ @ |@ [@b@ [@fa]]@hr @ @ @ @ @b@ @fa@hr @ @ |@ @b@ [(@fa)]@ [@fa]@hr @ @ @ @ @b@ @fa@hr @ @ |@ @b@ [(@fa)]@ [@fa]@hr @ @ @ @ @b@ @fa> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @i@fa@hr @ @ |@ @fa@ @b@ @fa> !corrigendum 5.5(5) !AI-0119-1 !AI-0251-1 @dinsa If a @fa has a @i@fa, then the @fa shall be repeated after the @b; otherwise, there shall not be an @fa after the @fa. @dinst An @fa that begins with the reserved word @b shall not have the reserved word @b in its @fa. @s8<@i> In a @fa that is an @i@fa, the @i@fa is expected to be of any integer type. !corrigendum 5.5(6) !AI-0061-1 !AI-0251-1 @drepl A @fa declares a @i, which is an object whose subtype is that defined by the @fa. @dby A @fa declares a @i, which is an object whose subtype (and nominal subtype) is that defined by the @fa. In a @fa that has a @fa, the @fa declares a @i object whose subtype (and nominal subtype) is that defined by the @fa. !corrigendum 5.5(7) !AI-0119-1 !AI-0250-1 !AI-0327-1 @drepl For the execution of a @fa, the @fa is executed repeatedly, zero or more times, until the @fa is complete. The @fa is complete when a transfer of control occurs that transfers control out of the loop, or, in the case of an @fa, as specified below. @dby The @i of an @i (a @fa, @fa, or @fa) is defined to be @i when there is no @fa for the iterator construct, or when the @fa of the @fa evaluates to True for a given iteration of the iterator construct. If a @fa of a @fa with an iterator construct is said to be @i, then the @fas are executed only when the filter of the iterator construct is satisfied. The loop iterators @fa and @fa can also be used in contexts other than @fas (for example, see 4.3.5 and 4.5.8). In such a context, the iterator @i values in the order specified for the associated construct below or in 5.5.2. The values produced are the values given to the loop parameter when the filter of the iterator construct is satisfied for that value. No value is produced when the @fa of an @fa evaluates to False. For the execution of a @fa, the @fa is executed zero or more times, until the @fa is complete. The @fa is complete when a transfer of control occurs that transfers control out of the loop, or, in the case of an @fa, as specified below. !corrigendum 5.5(8) !AI-0266-1 !AI-0294-1 @dinsa For the execution of a @fa with a @b @fa, the @fa is evaluated before each execution of the @fa; if the value of the @fa is True, the @fa is executed; if False, the execution of the @fa is complete. @dinst If the reserved word @b is present in the @fa of a @fa (a @i), the iterations are partitioned into one or more @i, each with its own separate logical thread of control (see clause 9). If a @fa is present in a parallel loop, it is elaborated first, and the result of the elaboration determines the maximum number of chunks used for the parallel loop. If the @fa is an @i@fa, the elaboration evaluates the expression, and the value of the expression determines the maximum number of chunks. If a @fa is present, the elaboration elaborates the @fa, which defines the subtype of the chunk parameter, and the number of values in this subtype determines the maximum number of chunks. After elaborating the @fa, a check is made that the determined maximum number of chunks is greater than zero. If this check fails, Program_Error is raised. !corrigendum 5.5(9/4) !AI-0119-1 !AI-0250-1 !AI-0251-1 !AI-0266-1 !AI-0294-1 !AI-0355-2 @drepl For the execution of a @fa with the @fa being @b @fa, the @fa is first elaborated. This elaboration creates the loop parameter and elaborates the @fa. If the @fa defines a subtype with a null range, the execution of the @fa is complete. Otherwise, the @fa is executed once for each value of the discrete subtype defined by the @fa that satisfies the predicates of the subtype (or until the loop is left as a consequence of a transfer of control). Prior to each such iteration, the corresponding value of the discrete subtype is assigned to the loop parameter. These values are assigned in increasing order unless the reserved word @b is present, in which case the values are assigned in decreasing order. @dby For the execution of a @fa that has an @fa including a @fa, after elaborating the @fa and @fa, if any, the @fa is elaborated. This elaborates the @fa, which defines the subtype of the loop parameter. If the @fa defines a subtype with a null range, the execution of the @fa is complete. Otherwise, the @fa is conditionally executed once for each value of the discrete subtype defined by the @fa that satisfies the predicates of the subtype (or until the loop is left as a consequence of a transfer of control). Prior to each such iteration, the corresponding value of the discrete subtype is assigned to the loop parameter associated with the given iteration. If the loop is a parallel loop, each chunk has its own logical thread of control with its own copy of the loop parameter; otherwise (a @i), a single logical thread of control performs the loop, and there is a single copy of the loop parameter. Each logical thread of control handles a distinct subrange of the values of the subtype of the loop parameter such that all values are covered with no overlaps. Within each logical thread of control, the values are assigned to the loop parameter in increasing order unless the reserved word @b is present, in which case the values are assigned in decreasing order. If a @fa with a @fa is present, then the logical thread of control associated with a given chunk has its own copy of the chunk parameter initialized with a distinct value from the discrete subtype defined by the @fa. The values of the chunk parameters are assigned such that they increase with increasing values of the ranges covered by the corresponding loop parameters. Whether or not a @fa is present in a parallel loop, the total number of iterations of the loop represents an upper bound on the number of logical threads of control devoted to the loop. !corrigendum 5.5(9.1/4) !AI-0250-1 !AI-0266-1 @drepl For details about the execution of a @fa with the @fa being @b @fa, see 5.5.2. @dby For details about the execution of a @fa with the @fa including an @fa, see 5.5.2. For details relating to a @fa, see 5.5.3. !corrigendum 5.5(21) !AI-0119-1 !AI-0312-1 !AI-0386-1 @dinsa @xcode Next /= Head @b -- @ft<@i> Sum := Sum + Next.Value; Next := Next.Succ; @b Summation;> @dinss @i @xcode<-- @ft<@i> @b @b I @b Grid'Range(1) @b Grid(I, 1) := (@b J @b Grid'Range(2) =@> Grid(I,J) = True); @b;> @i @xcode<@b @b Chunk_Number @b Natural @b 1 .. 8;> @xcode< Partial_Sum, Partial_Max : @b (Chunk_Number) @b Natural := (@b =@> 0); Partial_Min : @b (Chunk_Number) @b Natural := (@b =@> Natural'Last);> @xcode<@b @b (Chunk @b Chunk_Number) @b I @b Grid'Range(1) @b @b True_Count : @b Natural := [@b J @b Grid'Range(2) =@> (@b Grid (I, J) @b 1 @b 0)]'Reduce("+",0); @b Partial_Sum (Chunk) := @@ + True_Count; Partial_Min (Chunk) := Natural'Min(@@, True_Count); Partial_Max (Chunk) := Natural'Max(@@, True_Count); @b; @b;> @xcode< Put_Line ("Total=" & Partial_Sum'Reduce("+", 0)'Image & ", Min=" & Partial_Min'Reduce(Natural'Min, Natural'Last)'Image & ", Max=" & Partial_Max'Reduce(Natural'Max, 0)'Image); @b;> @i @fa@i<, see 4.5.8.> !corrigendum 5.5.2(2/3) !AI-0156-1 !AI-0250-1 !AI-0266-1 @drepl @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @fa@ @b@ [@b]@ @i@fa@hr @ @ |@ @fa@ [:@ @fa]@ @b@ [@b]@ @i@fa> @dby @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @fa@ [:@ @fa]@ @b@ [@b]@ @i@fa@hr @ @ @ @ @ @ [@fa]@hr @ @ |@ @fa@ [:@ @fa]@ @b [@b]@ @i@fa@hr @ @ @ @ @ @ [@fa]> @xindent<@fa@fa<@ ::=@ >@fa@ |@ @fa> @xindent is for a parallel construct, the reserved word @b shall not appear in the @fa.> !corrigendum 5.5.2(5/4) !AI-0156-1 !AI-0183-1 @drepl The subtype defined by the @fa, if any, of an array component iterator shall statically match the component subtype of the type of the @i@fa. The subtype defined by the @fa, if any, of a container element iterator shall statically match the default element subtype for the type of the @i@fa. @dby The subtype defined by the @fa, if any, of a generalized iterator shall statically match the iteration cursor subtype. The subtype defined by the @fa, if any, of an array component iterator shall statically match the component subtype of the type of the @i@fa. The subtype defined by the @fa, if any, of a container element iterator shall statically match the default element subtype for the type of the @i@fa. !corrigendum 5.5.2(10/3) !AI-0250-1 !AI-0266-1 @drepl For a generalized iterator, the loop parameter is created, the @i@fa is evaluated, and the denoted iterator object becomes the @i. In a forward generalized iterator, the operation First of the iterator type is called on the loop iterator, to produce the initial value for the loop parameter. If the result of calling Has_Element on the initial value is False, then the execution of the @fa is complete. Otherwise, the @fa is executed and then the Next operation of the iterator type is called with the loop iterator and the current value of the loop parameter to produce the next value to be assigned to the loop parameter. This repeats until the result of calling Has_Element on the loop parameter is False, or the loop is left as a consequence of a transfer of control. For a reverse generalized iterator, the operations Last and Previous are called rather than First and Next. @dby For a sequential generalized iterator, the loop parameter is created, the @i@fa is evaluated, and the denoted iterator object becomes the @i. In a forward generalized iterator, the operation First of the iterator type is called on the loop iterator, to produce the initial value for the loop parameter. If the result of calling Has_Element on the initial value is False, then the execution of the @fa is complete. Otherwise, the @fa is conditionally executed and then the Next operation of the iterator type is called with the loop iterator and the current value of the loop parameter to produce the next value to be assigned to the loop parameter. This repeats until the result of calling Has_Element on the loop parameter is False, or the loop is left as a consequence of a transfer of control. For a reverse generalized iterator, the operations Last and Previous are called rather than First and Next. For a parallel generalized iterator, the @fa, if any, of the associated parallel construct, is first elaborated, to determine the maximum number of chunks (see 5.5), and then the operation Split_Into_Chunks of the iterator type is called, with the determined maximum passed as the Max_Chunks parameter, specifying the upper bound for the number of loop parameter objects (and the number of logical threads of control) to be associated with the iterator. In the absence of a @fa, the maximum number of chunks is determined in an implementation-defined manner. Upon return from Split_Into_Chunks, the actual number of chunks for the loop is determined by calling the Chunk_Count operation of the iterator, at which point one logical thread of control is initiated for each chunk, with an associated chunk index in the range from one to the actual number of chunks. Within each logical thread of control, a loop parameter is created. If a @fa with a @fa is present in the associated parallel construct, then a chunk parameter is created, and initialized with a value from the discrete subtype defined by the @fa, so that the order of the chosen chunk parameter values correspond to the order of the chunk indices associated with the logical threads of control. The operation First of the iterator type having a Chunk parameter is called on the loop iterator, with Chunk initialized from the corresponding chunk index, to produce the initial value for the loop parameter. If the result of calling Has_Element on this initial value is False, then the execution of the logical thread of control is complete. Otherwise, the @fa is conditionally executed and then the Next operation of the iterator type having a Chunk parameter is called, with the loop iterator, the current value of the loop parameter, and the corresponding chunk index, to produce the next value to be assigned to the loop parameter. This repeats until the result of calling Has_Element on the loop parameter is False, or the associated parallel construct is left as a consequence of a transfer of control. In the absence of a transfer of control, the associated parallel construct of a parallel generalized iterator is complete when all of its logical threads of control are complete. !corrigendum 5.5.2(11/3) !AI-0250-1 !AI-0266-1 @drepl For an array component iterator, the @i@fa is evaluated and the denoted array object becomes the @i. If the array for the loop is a null array, then the execution of the @fa is complete. Otherwise, the @fa is executed with the loop parameter denoting each component of the array for the loop, using a @i order of components, which is last dimension varying fastest (unless the array has convention Fortran, in which case it is first dimension varying fastest). For a forward array component iterator, the iteration starts with the component whose index values are each the first in their index range, and continues in the canonical order. For a reverse array component iterator, the iteration starts with the component whose index values are each the last in their index range, and continues in the reverse of the canonical order. The loop iteration proceeds until the @fa has been executed for each component of the array for the loop, or until the loop is left as a consequence of a transfer of control. @dby For an array component iterator, the @fa of the associated parallel construct, if any, is first elaborated to determine the maximum number of chunks (see 5.5), and then the @i@fa is evaluated and the denoted array object becomes the @i. If the array for the loop is a null array, then the execution of the @fa is complete. Otherwise, the @fa is conditionally executed with the loop parameter denoting each component of the array for the loop, using a @i order of components, which is last dimension varying fastest (unless the array has convention Fortran, in which case it is first dimension varying fastest). For a forward array component iterator, the iteration starts with the component whose index values are each the first in their index range, and continues in the canonical order. For a reverse array component iterator, the iteration starts with the component whose index values are each the last in their index range, and continues in the reverse of the canonical order. For a parallel array component iterator, the iteration is broken up into contiguous chunks of the canonical order, such that all components are covered with no overlaps; each chunk has its own logical thread of control with its own loop parameter and iteration within each chunk is in the canonical order. The number of chunks is implementation defined, but is limited in the presence of a @fa to the determined maximum. The loop iteration proceeds until the @fa has been conditionally executed for each component of the array for the loop, or until the loop is left as a consequence of a transfer of control. If a @fa with a @fa is present in the associated parallel construct, then the logical thread of control associated with a given chunk has a chunk parameter initialized with a distinct value from the discrete subtype defined by the @fa. The values of the chunk parameters are assigned such that they increase in the canonical order of the starting array components for the chunks. !corrigendum 5.5.2(12/3) !AI-0111-1 !AI-0266-1 @drepl For a container element iterator, the @i@fa is evaluated and the denoted iterable container object becomes the @i. The default iterator function for the type of the iterable container object for the loop is called on the iterable container object and the result is the @i. An object of the default cursor subtype is created (the @i). @dby For a container element iterator, the @fa of the associated parallel construct, if any, is first elaborated to determine the maximum number of chunks (see 5.5), and then the @i@fa is evaluated. If the container type has Iterator_View specified, an object of the Iterator_View type is created with the discriminant referencing the iterable container object denoted by the @i@fa. This is the @i. Otherwise, the iterable container object denoted by the @i@fa becomes the iterable container object for the loop. The default iterator function for the type of the iterable container object for the loop is called on the iterable container object and the result is the @i. For a sequential container element iterator, an object of the default cursor subtype is created (the @i). For a parallel container element iterator, each chunk of iterations will have its own loop cursor, again of the default cursor subtype. !corrigendum 5.5.3(0) !AI-0189-1 !AI-0250-1 !AI-0292-1 !AI-0294-1 !AI-0308-1 !AI-0320-1 !AI-0326-2 !AI-0344-1 !AI-0355-2 !AI-0374-1 @dinsc A @fa invokes a user-defined procedure, passing in the body of the enclosing @fa as a parameter of an anonymous access-to-procedure type, to allow the loop body to be executed repeatedly as part of the invocation of the user-defined procedure. @s8<@i> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @fa@ @b@ @fa@hr @ @ @ @ @ @ [@fa]> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @fa@hr @ @ |@ (@fa{,@ @fa})> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @i@fa@hr @ @ |@ @i@fa@ @fa> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ (@fa@ {,@ @fa})> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @fa@hr @ @ |@ @fa> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ [@ @i@fa@ =@>@ ]@ <@>> At most one @fa within an @fa shall be a @fa. @s8<@i> The @fa or @fa given in an @fa shall resolve to denote a callable entity @i (the @i) that is a procedure, or an entry renamed as (viewed as) a procedure. When there is an @fa, the @fa can be an @fa of an access-to-subprogram value. An @fa without a @fa is equivalent to one with an @fa with an additional @fa at the end, with the @i@fa identifying the last formal parameter of the callable entity denoted by the @fa or @fa. An @fa shall contain at most one @fa for each formal parameter of the callable entity @i. Each formal parameter without an @fa shall have a @fa (in the profile of the view of @i denoted by the @fa or @fa). The formal parameter of the callable entity @i associated with the @fa shall be of an anonymous access-to-procedure type @i. @s8<@i> The anonymous access-to-procedure type @i shall have at least one formal parameter in its parameter profile. If the @fa is a @fa, then this @fa shall be mode conformant with that of @i. If the @fa is a list of @fas, the number of formal parameters of @i shall be the same as the length of this list. If the @fa or @fa given in an @fa denotes an abstract subprogram, the subprogram shall be a dispatching subprogram. @s8<@i> A @fa with an @fa that has a @fa is equivalent to a local declaration of a procedure P followed by a @fa that is formed from the @fa by replacing the <@> of the @fa with P'Access. The @fa of the locally declared procedure P is formed from the @fa of the anonymous access-to-procedure type @i, by replacing the @fa of each formal parameter of this @fa with the @fa of the corresponding formal parameter or element of the list of @fas given in the @fa. The body of @i

consists of the conditionally executed @fa. The procedure P is called the @i. In a procedural iterator, the Parallel_Calls aspect (see 9.10.1) of the loop body procedure is True if the reserved word @b occurs in the corresponding loop statement, and False otherwise. The following aspects may be specified for a callable entity @i that has exactly one formal parameter of an anonymous access-to-subprogram type: @xhang<@xterm The Allows_Exit aspect is of type Boolean. The specified value shall be static. The Allows_Exit aspect of an inherited primitive subprogram is True if Allows_Exit is True either for the corresponding subprogram of the progenitor type or for any other inherited subprogram that it overrides. If not specified or inherited as True, the Allows_Exit aspect of a callable entity is False. For an entry, only a confirming specification of False is permitted for the Allows_Exit aspect.> @xindent, meaning that it is prepared to be completed by arbitrary transfers of control from the loop body procedure, including propagation of exceptions. A subprogram for which Allows_Exit is True should use finalization as appropriate rather than exception handling to recover resources and make any necessary final updates to data structures.> @xhang<@xterm The Parallel_Iterator aspect is of type Boolean. The specified value shall be static. The Parallel_Iterator aspect of an inherited primitive subprogram is True if Parallel_Iterator is True either for the corresponding subprogram of the progenitor type or for any other inherited subprogram that it overrides. If not specified or inherited as True, the Parallel_Iterator aspect of a callable entity is False.> @xindent @s8<@i> If a callable entity overrides an inherited dispatching subprogram that allows exit, the overriding callable entity also shall allow exit. If a callable entity overrides an inherited dispatching subprogram that has a True Parallel_Iterator aspect, the overriding callable entity also shall have a True Parallel_Iterator aspect. A @fa with a @fa as its @fa shall begin with the reserved word @b if and only if the callable entity identified in the @fa has a Parallel_iterator aspect of True. If the actual parameter of an anonymous access-to-subprogram type, passed in an explicit call of a subprogram for which the Parallel_Iterator aspect is True, is of the form @i

'Access, the designated subprogram @i

shall have a Parallel_Calls aspect True (see 9.10.1). The @fa of a @fa with a @fa as its @fa shall contain an @fa, return statement, @fa, or @fa that leaves the loop only if the callable entity associated with the @fa allows exit. The @fa of a @fa with a @fa as its @fa shall not contain an @fa whose @fa occurs outside the @fa. @s8<@i> For the execution of a @fa with an @fa that has a @fa, the procedure denoted by the @fa or @fa of the @fa (the @i) is invoked, passing an access value designating the loop body procedure as a parameter. The iterating procedure then calls the loop body procedure zero or more times and returns, whereupon the @fa is complete. If the @b reserved word is present, the iterating procedure might invoke the loop body procedure from multiple distinct logical threads of control. The @fa, if any, is elaborated prior to the invocation of the iterating procedure. @s8<@i> If the callable entity identified in the @fa allows exit, then it is a bounded error for a call of the loop body procedure to be performed from within an abort-deferred operation (see 9.8), unless the entire @fa was within the same abort-deferred operation. If detected, Program_Error is raised at the point of the call; otherwise, a transfer of control from the @fa of the @fa might not terminate the @fa, and the loop body procedure might be called again. If a @fa with the @fa as its @fa (see 5.5) does not begin with the reserved word @b, it is a bounded error if the loop body procedure is invoked from a different logical thread of control than the one that initiates the @fa. If detected, Program_Error is raised; otherwise, conflicts associated with concurrent executions of the loop body procedure can occur without being detected by the applicable conflict check policy (see 9.10.1). Furthermore, propagating an exception or making an attempt to exit in the presence of multiple threads of control might not terminate the @fa, deadlock might occur, or the loop body procedure might be called again. @s8<@i> Example of iterating over a map from My_Key_Type to My_Element_Type (see A.18.4): @xcode<@b (C : Cursor) @b My_Map.Iterate @b Put_Line (My_Key_Type'Image (Key (C)) & " =@> " & My_Element_Type'Image (Element (C))); @b;> @xcode<--@ft<@i< The above is equivalent to:>>> @xcode<@b @b P (C : Cursor) @b @b Put_Line (My_Key_Type'Image (Key (c)) & " =@> " & My_Element_Type'Image (Element (C))); @b P; @b My_Map.Iterate (P'Access); @b;> Example of iterating over the environment variables (see A.17): @xcode<@b (Name, Val) @b Ada.Environment_Variables.Iterate(<@>) @b --@ft<@i< "(<@>)" is optional because it is the last parameter>> Put_Line (Name & " =@> " & Val); @b;> @xcode<--@ft<@i< The above is equivalent to:>>> @xcode<@b @b P (Name : String; Val : String) @b @b Put_Line (Name & " =@> " & Val); @b P; @b Ada.Environment_Variables.Iterate (P'Access); @b;> !corrigendum 6.1.1(1/4) !AI-0220-1 !AI-0272-1 @drepl For a noninstance subprogram, a generic subprogram, or an entry, the following language-defined aspects may be specified with an @fa (see 13.1.1): @dby For a noninstance subprogram (including a generic formal subprogram), a generic subprogram, an entry, or an access-to-subprogram type, the following language-defined aspects may be specified with an @fa (see 13.1.1): !corrigendum 6.1.1(22.1/4) !AI-0198-1 !AI-0280-2 @drepl @xbullet of a @fa;> @dby @xbullet @xbullet parameter of an elementary type;> @xbullet;> @xbullet @xbullet @b where all of the actual parameters are known on entry;> @xbullet of a known-on-entry @fa;> @xbullet of a known-on-entry @fa where all index @fas are known on entry;> @xbullet;> @xbullet or @fa whose operand is a known-on-entry expression;> @xbullet where all of the @fas, @i@fas, and @i@fas are known on entry.> A subexpression of a postcondition expression is @i, conditionally evaluated, or @i. The following subexpressions are repeatedly evaluated: @xbullet;> @xbullet;> @xbullet.> If a subexpression is not repeatedly evaluated, and not evaluated unconditionally, then it is @i, and there is a set of @i that determine whether the subexpression is actually evaluated at run time. Such subexpressions and their determining expressions are as follows: @xbullet that is not repeatedly evaluated, a subexpression of any part other than the first condition is conditionally evaluated, and its determining expressions include all @fas of the @fa that precede the subexpression textually;> @xbullet that is not repeatedly evaluated, a subexpression of any @i@fa is conditionally evaluated, and its determining expressions include the @i@fa of the @fa;> !corrigendum 6.1.1(24/3) !AI-0217-1 !AI-0280-2 !AI-0368-2 @drepl @xbullet other than the first of a membership operation.> @dby @xbullet other than the first is conditionally evaluated, and its determining expressions include the @i@fa and the preceding @fas of the membership test.> A conditionally evaluated subexpression is @i at run time if its set of determining expressions are all known on entry, and when evaluated on entry their values are such that the given subexpression is not evaluated. !corrigendum 6.1.1(26.10/4) !AI-0185-1 !AI-0388-1 @drepl @xindent @dby @xindent !corrigendum 6.1.1(27/3) !AI-0217-1 !AI-0280-2 @drepl @xindent of an Old @fa shall not contain a Result @fa, nor an Old @fa, nor a use of an entity declared within the postcondition expression but not within @fa itself (for example, the loop parameter of an enclosing @fa). The @fa of an Old @fa that is potentially unevaluated shall statically denote an entity.> @dby @xindent of an Old @fa shall not contain a Result @fa, nor an Old @fa, nor a use of an entity declared within the postcondition expression but not within @fa itself (for example, the loop parameter of an enclosing @fa). The @fa of an Old @fa shall statically name (see 4.9) an entity, unless the @fa is unconditionally evaluated, or is conditionally evaluated where all of the determining expressions are known on entry.> !corrigendum 6.1.1(29/4) !AI-0185-1 !AI-0220-1 !AI-0388-1 @drepl @xhang<@xtermWithin a postcondition expression for function F, denotes the result object of the function. The type of this attribute is that of the function result except within a Post'Class postcondition expression for a function with a controlling result or with a controlling access result. For a controlling result, the type of the attribute is @i'Class, where @i is the function result type. For a controlling access result, the type of the attribute is an anonymous access type whose designated type is @i'Class, where @i is the designated type of the function result type.> @dby @xhang<@xtermWithin a postcondition expression for F, denotes the return object of the function call for which the postcondition expression is evaluated. The type of this attribute is that of the result subtype of the function or access-to-function type except within a Post'Class postcondition expression for a function with a controlling result or with a controlling access result; in those cases the type of the attribute is described above as part of the Name Resolution Rules for Post'Class.> !corrigendum 6.1.1(39/3) !AI-0220-1 !AI-0272-1 !AI-0280-2 !AI-0373-1 @drepl For a call via an access-to-subprogram value, all precondition and postcondition checks performed are determined by the subprogram or entry denoted by the prefix of the Access attribute reference that produced the value. @dby For a call via an access-to-subprogram value, precondition and postcondition checks performed are as determined by the subprogram or entry denoted by the prefix of the Access attribute reference that produced the value. In addition, a precondition check of any precondition expression associated with the access-to-subprogram type is performed. Similarly, a postcondition check of any postcondition expression associated with the access-to-subprogram type is performed. For a call on a generic formal subprogram, precondition and postcondition checks performed are as determined by the subprogram or entry denoted by the actual subprogram, along with any specific precondition and specific postcondition of the formal subprogram itself. @s8<@i> An implementation may evaluate a known-on-entry subexpression of a postcondition expression of an entity at the place where X'Old constants are created for the entity, with the normal evaluation of the postcondition expression, or both. !corrigendum 6.1.2(0) !AI-0079-3 !AI-0375-1 !AI-0380-1 @dinsc For a subprogram, an entry, a named access-to-subprogram type, a task unit, a protected unit, or a library package or generic library package, the following language-defined aspect may be specified with an @fa (see 13.1.1): @xhang<@xtermThe syntax for the @fa used to define a Global aspect is as follows:> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @b@hr @ @ |@ Unspecified@hr @ @ |@ @fa @fa@hr @ @ |@ (@fa{; @fa})> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @fa @fa@hr @ @ |@ @fa @b@hr @ @ |@ @fa @b> @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @fa@hr @ @ |@ @fa> @xindent<@fa@fa<@ ::=@ >@b | @b | @b> @xindent<@fa@fa<@ ::=@ >@fa {, @fa}> @xindent<@fa@fa<@ ::=@ >@b | @b | @fa> @xindent<@fa@fa<@ ::=@ >@i@fa | @i@fa> @xindent @xindent @b> for a library unit that is declared Pure, and to @fc Unspecified> otherwise.> For a dispatching subprogram, the following language-defined aspect may be specified with an @fa (see 13.1.1): @xhang<@xtermThe syntax for the @fa used to define a Global'Class aspect is the same as that defined above for @fa. This aspect identifies an upper bound on the set of variables global to a dispatching operation that can be read or updated as a result of a dispatching call on the operation. If not specified, the aspect defaults to the Global aspect for the dispatching subprogram.> Together, we refer to the Global and Global'Class aspects as @i aspects. @s8<@i> A @fa shall resolve to statically denote an object or a package (including a limited view of a package). @s8<@i> A @fa defines the Global or Global'Class aspect of some entity. The Global aspect identifies the sets of global variables that can be read, written, or modified as a side effect of executing the operation(s) associated with the entity. The Global'Class aspect associated with a dispatching operation of type @i represents a restriction on the Global aspect on a corresponding operation of any descendant of type @i. The Global aspect for a callable entity defines the global variables that might be referenced as part of a call on the entity, including any assertion expressions that might be evaluated as part of the call, including preconditions, postconditions, predicates, and type invariants. The Global aspect for an access-to-subprogram object (or subtype) identifies the global variables that might be referenced when calling via the object (or any object of that subtype) including assertion expressions that apply. For a predefined operator of an elementary type, or the function representing an enumeration literal, the Global aspect is @b. For a predefined operator of a composite type, the Global aspect of the operator defaults to that of the enclosing library unit (unless a Global aspect is specified for the type @emdash see H.7). The following is defined in terms of operations that are performed by or on behalf of an entity. The rules on operations apply to the entity(s) associated with those operations. The global variables associated with any @fa can be read as a side effect of an operation. The @b and @b @fas together identify the set of global variables that can be updated as a side effect of an operation. Creating an access-to-variable value that designates an object is considered an update of the designated object, and creating an access-to-constant value that designates an object is considered a read of the designated object. The overall set of objects associated with each @fa includes all objects identified for the mode in the @fa. A @fa identifies a @i as follows: @xbullet<@b identifies the set of all global variables;> @xbullet<@b identifies the set of all synchronized variables (see 9.10), as well as variables of a composite type all of whose non-discriminant subcomponents are synchronized;> @xbullet<@fa{, @fa} identifies the union of the sets of variables identified by the @fas in the list, for the following forms of @fa:> @xinbull<@i@fa identifies the specified global variable (or constant);> @xinbull<@i@fa identifies the set of all variables declared in the private part or body of the package, or anywhere within a private descendant of the package.> @s8<@i> Within a @fa, a given @fa shall be specified at most once. Similarly, within a @fa, a given entity shall be named at most once by a @fa. If an entity (other than a library package or generic library package) has a Global aspect other than Unspecified or @b, then the associated operation(s) shall read only those variables global to the entity that are within the global variable set associated with the @b, @b, or @b @fas, and the operation(s) shall update only those variables global to the entity that are within the global variable set associated with either the @b or @b @fas. In the absence of the No_Hidden_Indirect_Globals restriction (see H.4), this ignores objects reached via a dereference of an access value. The above rule includes any possible Global effects of calls occurring during the execution of the operation, except for the following excluded calls: @xbullet @xbullet @xbullet @xbullet @xbullet The possible Global effects of these excluded calls (other than those that are Unspecified) are taken into account by the caller of the original operation, by presuming they occur at least once during its execution. For calls that are not excluded, the possible Global effects of the call are those permitted by the Global aspect of the associated entity, or by its Global'Class aspect if a dispatching call. If a Global aspect other than Unspecified or @b applies to an access-to-subprogram type, then the @fa of an Access @fa producing a value of such a type shall denote a subprogram whose Global aspect is not Unspecified and is @i by that of the result type, where a global aspect @i is @i by a global aspect @i if the set of variables that @i identifies as readable or updatable is a subset of the corresponding set for @i. Similarly on a conversion to such a type, the operand shall be of a named access-to-subprogram type whose Global aspect is covered by that of the target type. For a subprogram that is a dispatching operation of a tagged type @i, each mode of its Global aspect shall identify a subset of the variables identified by the corresponding mode, or by the @b mode, of the Global'Class aspect of a corresponding dispatching subprogram of any ancestor of @i, unless the aspect of that ancestor is Unspecified. @s8<@i> Implementations need not require that references to a constant object that are considered variables in the above rules, be accounted for by the Global or Global'Class aspect, if the implementation can determine that the constant object is immutable. Implementations may perform additional checks on calls to operations with an Unspecified Global aspect to ensure that they do not violate any limitations associated with the point of call. Implementations may extend the syntax or semantics of the Global aspect in an implementation-defined manner; for example, supporting additional @fas. @s9 !corrigendum 6.2(10/4) !AI-0236-1 !AI-0317-1 @drepl A parameter of a by-reference type is passed by reference, as is an explicitly aliased parameter of any type. Each value of a by-reference type has an associated object. For a parenthesized expression, @fa, or view conversion, this object is the one associated with the operand. For a value conversion, the associated object is the anonymous result object if such an object is created (see 4.6); otherwise it is the associated object of the operand. For a @fa, this object is the one associated with the evaluated @i@fa. @dby A parameter of a by-reference type is passed by reference, as is an explicitly aliased parameter of any type. Each value of a by-reference type has an associated object. For a value conversion, the associated object is the anonymous result object if such an object is created (see 4.6); otherwise it is the associated object of the operand. In other cases, the object associated with the evaluated operative constituent of the @fa or @fa (see 4.4) determines its associated object. !corrigendum 6.4.1(6.17/3) !AI-0216-1 !AI-0324-1 @drepl @xbullet @i that is passed as a parameter of mode @b or @b to the call @i, there is no other @fa among the other parameters of mode @b or @b to @i that is known to denote the same object.> @dby @xbullet @i denoting an object of an elementary type that is passed as a parameter of mode @b or @b to the call @i, there is no other @fa among the other parameters of mode @b or @b to @i that is known to denote the same object.> !corrigendum 6.8(5/4) !AI-0075-1 !AI-0191-1 @dinsa If the result subtype has one or more unconstrained access discriminants, the accessibility level of the anonymous access type of each access discriminant, as determined by the @fa or @fa of the @fa, shall not be statically deeper than that of the master that elaborated the @fa. @dinss Aspect Static shall be specified to have the value True only if the associated @fa: @xbullet @xbullet that is a potentially static expression;> @xbullet @xbullet and is of a static subtype;> @xbullet @xbullet @xbullet, if the function is a boundary entity for type @i (see 7.3.2), no type invariant applies to type @i; if @i has a component type @i, a similar rule applies to @i.> !corrigendum 7.3.2(8/3) !AI-0075-1 !AI-0191-1 !AI-0199-1 @drepl If the Type_Invariant'Class aspect is specified for a tagged type @i, then the invariant expression applies to all descendants of @i. @dby If the Type_Invariant'Class aspect is specified for a tagged type @i, then a @i also applies to each nonabstract descendant @i of @i (including @i itself if it is nonabstract). The corresponding expression is constructed from the associated expression as follows: @xbullet (or to @i itself) are replaced with references to the corresponding components of @i (or to @i as a whole).> @xbullet are replaced with references to the corresponding discriminant of @i, or to the specified value for the discriminant, if the discriminant is specified by the @fa for some type that is an ancestor of @i and a descendant of @i (see 3.7).> For a nonabstract type @i, a callable entity is said to be a @i for @i if it is declared within the immediate scope of @i (or by an instance of a generic unit, and the generic is declared within the immediate scope of type @i), or is the Read or Input stream-oriented attribute of type @i, and either: @xbullet<@i is a private type or a private extension and the callable entity is visible outside the immediate scope of type T or overrides an inherited operation that is visible outside the immediate scope of @i; or> @xbullet<@i is a record extension, and the callable entity is a primitive operation visible outside the immediate scope of type @i or overrides an inherited operation that is visible outside the immediate scope of @i.> !corrigendum 7.3.2(15/4) !AI-0075-1 !AI-0191-1 !AI-0193-1 @drepl @xbullet, the check is performed on the object initialized by the stream attribute;> @dby @xbullet, an invariant check is performed on each object which is subject to an invariant check for @i. In the case of a call to a protected operation, the check is performed before the end of the protected action. In the case of a call to a task entry, the check is performed before the end of the rendezvous. The following objects of a callable entity are subject to an invariant check for @i:> @xinbull;> !corrigendum 7.3.2(17/4) !AI-0075-1 !AI-0191-1 @drepl @xinbull (or by an instance of a generic unit, and the generic is declared within the immediate scope of type @i),> @dby @xinbull or @i parameter whose nominal type has a part of type @i;> @xinbull; or> !corrigendum 7.3.2(19/3) !AI-0075-1 !AI-0191-1 @drepl @xinbull, or one or more parameters with a part of type @i, or an access to variable parameter whose designated type has a part of type @i.> @dby @xinbull parameter whose nominal type has a part of type @i.> !corrigendum 7.3.2(20/3) !AI-0075-1 !AI-0193-1 !AI-0338-1 @drepl The check is performed on each such part of type @i. @dby If the nominal type of a formal parameter (or the designated nominal type of an access-to-object parameter or result) is incomplete at the point of the declaration of the callable entity, and if the completion of that incomplete type does not occur in the same declaration list as the incomplete declaration, then for purposes of the preceding rules the nominal type is considered to have no parts of type @i. !corrigendum 7.3.3(0) !AI-0265-1 !AI-0272-1 !AI-0324-1 !AI-0332-1 !AI-0397-1 @dinsc For a private type or private extension (including a generic formal type), the following language-defined aspect may be specified with an @fa (see 13.1.1): @xhang<@xtermThis aspect shall be specified by an @fa, called a @i. Default_Initial_Condition may be specified on a @fa, a @fa, a @fa, or a @fa.> @s8<@i> The expected type for a default initial condition expression is any boolean type. Within a default initial condition expression associated with a declaration for a type T, a name that denotes the declaration is interpreted as a current instance of a notional (nonabstract) formal derived type NT with ancestor T, that has directly visible primitive operations. @s8<@i> The Default_Initial_Condition aspect shall not be specified for a type whose partial view has unknown discriminants, whether explicitly declared or inherited. @s8<@i> If the Default_Initial_Condition aspect is specified for a type T, then the default initial condition expression applies to T and to all descendants of T. @s8<@i> If one or more default initial condition expressions apply to a (nonabstract) type T, then a default initial condition check is performed after successful initialization of an object of type T by default (see 3.3.1). In the case of a controlled type, the check is performed after the call to the type's Initialize procedure (see 7.6). If performing checks is required by the Default_Initial_Condition assertion policy (see 11.4.2) in effect at the point of the corresponding @fa applicable to a given type, then the respective default initial condition expression is considered enabled. The default initial condition check consists of the evaluation of each enabled default initial condition expression that applies to T. Any operations within such an expression that were resolved as primitive operations of the (notional) formal derived type NT, are in the evaluation of the expression resolved as for a formal derived type in an instance with T as the actual type for NT (see 12.5.1). These evaluations, if there are more than one, are performed in an arbitrary order. If any of these evaluate to False, Assertions.Assertion_Error is raised at the point of the object initialization. For a generic formal type T, default initial condition checks performed are as determined by the actual type, along with any default initial condition of the formal type itself. @s8<@i> Implementations may extend the syntax or semantics of the Default_Initial_Condition aspect in an implementation-defined manner. @s9 !corrigendum 7.3.4(0) !AI-0187-1 !AI-0272-1 !AI-0285-1 !AI-0324-1 !AI-0388-1 @dinsc Certain characteristics of an object of a given type are unchanged by most of the primitive operations of the type. Such characteristics are called @i of the type. @s8<@i> A @i of type @i is a function with a single parameter of type @i or of a class-wide type that covers @i. A @i is a list of @fas written in the syntax of a @fa. A @i is a list of @fas, each optionally preceded by reserved word @b, also written in the syntax of a @fa. For a nonformal private type, nonformal private extension, or full type that does not have a partial view, the following language-defined aspects may be specified with an @fa (see 13.1.1): @xhang<@xtermThis aspect shall be specified by a type property aspect definition; each @fa shall statically denote a single property function of the type. This aspect defines the @i of the associated type.> @xhang<@xtermThis aspect shall be specified by a type property aspect definition; each @fa shall statically denote a single property function of the type. This aspect defines the @i of the associated type. Unlike most class-wide aspects, Stable_Properties'Class is not inherited by descendant types and subprograms, but the enhanced class-wide postconditions are inherited in the normal manner.> For a primitive subprogram, the following language-defined aspects may be specified with an @fa (see 13.1.1): @xhang<@xtermThis aspect shall be specified by a subprogram property aspect definition; each @fa shall statically denote a single property function of a type for which the associated subprogram is primitive.> @xhang<@xtermThis aspect shall be specified by a subprogram property aspect definition; each @fa shall statically denote a single property function of a tagged type for which the associated subprogram is primitive. Unlike most class-wide aspects, Stable_Properties'Class is not inherited by descendant subprograms, but the enhanced class-wide postconditions are inherited in the normal manner.> @s8<@i> A stable property function of a type @i (including a class-wide stable property function) shall have a nonlimited return type and shall be: @xbullet of type @i; or> @xbullet is declared and has a single parameter of mode @b of a class-wide type that covers @i.> In a subprogram property aspect definition for a subprogram @i: @xbullet;> @xbullet shall be a stable property function of a type for which @i is primitive.> @s8<@i> For a primitive subprogram @i of a type @i, the stable property functions of @i for type @i are: @xbullet has an aspect Stable_Properties specified that does not include @b, those functions denoted in the aspect Stable_Properties for @i that have a parameter of @i or @i'Class;> @xbullet has an aspect Stable_Properties specified that includes @b, those functions denoted in the aspect Stable_Properties for @i, excluding those denoted in the aspect Stable_Properties for @i;> @xbullet does not have an aspect Stable_Properties, those functions denoted in the aspect Stable_Properties for @i, if any.> A similar definition applies for class-wide stable property functions by replacing aspect Stable_Properties with aspect Stable_Properties'Class in the above definition. The @i specific postcondition expression for a subprogram @i is the @fa directly specified for @i with the Post aspect. Similarly, the @i class-wide postcondition expression for a subprogram @i is the @fa directly specified for @i with the Post'Class aspect. For every primitive subprogram @i of a type @i that is not a stable property function of @i, the specific postcondition expression of @i is modified to include expressions of the form @fc<@i(@i

) = @i(@i

)'Old>, all @bed with each other and any explicit specific postcondition expression, with one such equality included for each stable property function @i of @i for type @i that does not occur in the explicit specific postcondition expression of @i, and @i

is each parameter of @i that has type @i. The resulting specific postcondition expression of @i is used in place of the explicit specific postcondition expression of @i when interpreting the meaning of the postcondition as defined in 6.1.1. For every primitive subprogram @i of a type @i that is not a stable property function of @i, the class-wide postcondition expression of @i is modified to include expressions of the form @fc<@i(@i

) = @i(@i

)'Old>, all @bed with each other and any explicit class-wide postcondition expression, with one such equality included for each class-wide stable property function @i of @i for type @i that does not occur in any class-wide postcondition expression that applies to @i, and @i

is each parameter of @i that has type @i. The resulting class-wide postcondition expression of @i is used in place of the explicit class-wide postcondition expression of @i when interpreting the meaning of the postcondition as defined in 6.1.1. @xindent<@s9> !corrigendum 7.5(2.1/3) !AI-0172-1 !AI-0236-1 !AI-0317-1 @drepl In the following contexts, an @fa of a limited type is not permitted unless it is an @fa, a @fa, a parenthesized @fa or @fa whose operand is permitted by this rule, or a @fa all of whose @i@fas are permitted by this rule: @dby In the following contexts, an @fa of a limited type is permitted only if each of its operative constituents is newly constructed (see 4.4): !corrigendum 8.1(2.1/4) !AI-0061-1 !AI-0236-1 !AI-0308-1 @dinsa @xbullet;> @dinss @xbullet;> @xbullet;> @xbullet;> @xbullet;> !corrigendum 8.5.1(4.6/2) !AI-0287-1 !AI-0401-1 @drepl @xbullet@fa shall exclude null. In addition to the places where Legality Rules normally apply (see 12.3), this rule applies also in the private part of an instance of a generic unit.> @dby @xbullet@fa statically denotes a call of a generic formal function of @i, then the declaration of the result of that function shall have a @fa.> In addition to the places where Legality Rules normally apply (see 12.3), this rule applies also in the private part of an instance of a generic unit. In the case where the @i@fa is a @fa whose @fa is a @fa that denotes a variable, the nominal subtype of the (constant) view denoted by the @fa shall statically match the nominal subtype of that variable, or statically match either the base subtype of its type if scalar, or the first subtype of its type otherwise. !corrigendum 9(1/3) !AI-0119-1 !AI-0330-1 @drepl The execution of an Ada program consists of the execution of one or more @i. Each task represents a separate thread of control that proceeds independently and concurrently between the points where it @i with other tasks. The various forms of task interaction are described in this clause, and include: @dby The execution of an Ada program consists of the execution of one or more @i. Each task represents a separable activity that proceeds independently and concurrently between the points where it @i with other tasks. A single task, when within the context of a parallel construct, can represent multiple @i which can proceed in parallel; in other contexts, each task represents one logical thread of control. !corrigendum 9.5(17/3) !AI-0064-2 !AI-0247-1 !AI-0267-1 !AI-0319-1 !AI-0374-2 @dinsa In addition to the places where Legality Rules normally apply (see 12.3), these rules also apply in the private part of an instance of a generic unit. @dinss @s8<@i> For a program unit, task entry, formal package, formal subprogram, formal object of an anonymous access-to-subprogram type, enumeration literal, and for a subtype (including a formal subtype), the following language-defined operational aspect is defined: @xhang<@xterm This aspect specifies the blocking restriction for the entity; it shall be specified by a static Boolean expression. The @fa can be omitted from the specification of this aspect; in that case the nonblocking expression for the entity is the enumeration literal True.> @xindent @xindent. If the aspect is True for an entity, the entity is said to be @i.> @xindented with the Nonblocking aspects of the actual generic parameters @i by the entity. If the aspect is directly specified for an instance, the specified expression shall have the same value as the Nonblocking aspect of the instance (after @bing with the aspects of the used actual parameters). In the absence of a Use_Formal aspect, all actual generic parameters are presumed to be @i by an entity (see H.7.1).> @xindent @xindent @xindent @xindent @xindent @xindent @xindent @xindent @xindent, the Nonblocking aspect is that of the subtype identified in the subtype_indication defining @i; unless directly specified for the first subtype of a derived type, the Nonblocking aspect is that of the ancestor subtype.> @xindent @xindent The following are defined to be @i operations: @xbullet;> @xbullet;> @xbullet, or a call on a procedure that renames or is implemented by an entry;> @xbullet;> @xbullet;> @xbullet @xbullet If a language-defined subprogram allows blocking, then a call on the subprogram is a potentially blocking operation. @s8<@i> A portion of program text is called a @i if it is anywhere within a parallel construct, or if the innermost enclosing program unit is nonblocking. A nonblocking region shall not contain any of the following: @xbullet;> @xbullet;> @xbullet;> @xbullet;> @xbullet Futhermore, a parallel construct shall neither contain a call on a callable entity for which the Nonblocking aspect is False, nor shall it contain a call on a callable entity declared within a generic unit that uses a generic formal parameter with Nonblocking aspect False (see Use_Formal aspect in H.7.1). Finally, a nonblocking region that is outside of a parallel construct shall not contain a call on a callable entity for which the Nonblocking aspect is False, unless the region is within a generic unit and the callable entity is associated with a generic formal parameter of the generic unit, or the call is within the @fa of an assertion aspect for an entity that allows blocking. For the purposes of the above rules, an @fa is considered nonblocking if the immediately enclosing protected unit is nonblocking. For a subtype for which aspect Nonblocking is True, any predicate expression that applies to the subtype shall only contain constructs that are allowed immediately within a nonblocking program unit. A subprogram shall be nonblocking if it overrides a nonblocking dispatching operation. An entry shall not implement a nonblocking procedure. If an inherited dispatching subprogram allows blocking, then the corresponding subprogram of each ancestor shall allow blocking. It is illegal to specify aspect Nonblocking for the first subtype of the full view of a type that has a partial or incomplete view. Aspect Nonblocking shall be directly specified for the first subtype of a derived type only if it has the same value as the Nonblocking aspect of the ancestor subtype or if it is specified True. Aspect Nonblocking shall be directly specified for a nonfirst subtype @i only if it has the same value as the Nonblocking aspect of the subtype identified in the @fa defining @i or if it is specified True. For a composite type that is nonblocking: @xbullet @xbullet of a component (including discriminants) shall call an operation that is nonblocking;> @xbullet The predefined equality operator for a composite type, unless it is for a record type or record extension and the operator is overridden by a primitive equality operator, is illegal if it is nonblocking and: @xbullet @xbullet Boolean; @b "<" (L, R : Valid_Big_Integer) @b Boolean; @b "<=" (L, R : Valid_Big_Integer) @b Boolean; @b "@>" (L, R : Valid_Big_Integer) @b Boolean; @b "@>=" (L, R : Valid_Big_Integer) @b Boolean;> @xcode< @b To_Big_Integer (Arg : Integer) @b Valid_Big_Integer;> @xcode< @b Big_Positive @b Big_Integer @b Dynamic_Predicate =@> (@b Is_Valid (Big_Positive) @b Big_Positive @> 0), Predicate_Failure =@> (@b Constraint_Error);> @xcode< @b Big_Natural @b Big_Integer @b Dynamic_Predicate =@> (@b Is_Valid (Big_Natural) @b Big_Natural @>= 0), Predicate_Failure =@> (@b Constraint_Error);> @xcode< @b In_Range (Arg, Low, High : Valid_Big_Integer) @b Boolean @b (Low <= Arg @b Arg <= High);> @xcode< @b To_Integer (Arg : Valid_Big_Integer) @b Integer @b Pre =@> In_Range (Arg, Low =@> To_Big_Integer (Integer'First), High =@> To_Big_Integer (Integer'Last)) @b @b Constraint_Error;> @xcode< @b @b Int @b <@>; @b Signed_Conversions @b @b To_Big_Integer (Arg : Int) @b Valid_Big_Integer; @b From_Big_Integer (Arg : Valid_Big_Integer) @b Int @b Pre =@> In_Range (Arg, Low =@> To_Big_Integer (Int'First), High =@> To_Big_Integer (Int'Last)) @b @b Constraint_Error; @b Signed_Conversions;> @xcode< @b @b Int @b <@>; @b Unsigned_Conversions @b @b To_Big_Integer (Arg : Int) @b Valid_Big_Integer; @b From_Big_Integer (Arg : Valid_Big_Integer) @b Int @b Pre =@> In_Range (Arg, Low =@> To_Big_Integer (Int'First), High =@> To_Big_Integer (Int'Last)) @b @b Constraint_Error; @b Unsigned_Conversions;> @xcode< @b To_String (Arg : Valid_Big_Integer; Width : Field := 0; Base : Number_Base := 10) @b String @b Post =@> To_String'Result'First = 1;> @xcode< @b From_String (Arg : String) @b Valid_Big_Integer;> @xcode< @b Put_Image (Buffer : @b Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; Arg : @b Valid_Big_Integer);> @xcode< @b "+" (L : Valid_Big_Integer) @b Valid_Big_Integer; @b "-" (L : Valid_Big_Integer) @b Valid_Big_Integer; @b "abs" (L : Valid_Big_Integer) @b Valid_Big_Integer; @b "+" (L, R : Valid_Big_Integer) @b Valid_Big_Integer; @b "-" (L, R : Valid_Big_Integer) @b Valid_Big_Integer; @b "*" (L, R : Valid_Big_Integer) @b Valid_Big_Integer; @b "/" (L, R : Valid_Big_Integer) @b Valid_Big_Integer; @b "mod" (L, R : Valid_Big_Integer) @b Valid_Big_Integer; @b "rem" (L, R : Valid_Big_Integer) @b Valid_Big_Integer; @b "**" (L : Valid_Big_Integer; R : Natural) @b Valid_Big_Integer; @b Min (L, R : Valid_Big_Integer) @b Valid_Big_Integer; @b Max (L, R : Valid_Big_Integer) @b Valid_Big_Integer;> @xcode< @b Greatest_Common_Divisor (L, R : Valid_Big_Integer) @b Big_Positive @b Pre =@> (L /= 0 @b R /= 0) @b @b Constraint_Error;> @xcode<@b ... -- @ft<@i> @b Ada.Numerics.Big_Numbers.Big_Integers;> To_String and From_String behave analogously to the Put and Get procedures defined in Text_IO.Integer_IO (in particular, with respect to the interpretation of the Width and Base parameters) except that Constraint_Error, not Data_Error, is propagated in error cases and the result of a call To_String with a Width parameter of 0 and a nonnegative Arg parameter does not include a leading blank. Put_Image calls To_String (passing in the default values for the Width and Base parameters), prepends a leading blank if the argument is nonnegative, and writes the resulting value to the buffer using Text_Buffers.Put. The other functions have their usual mathematical meanings. The type Big_Integer needs finalization (see 7.6). @s8<@i> For purposes of determining whether predicate checks are performed as part of default initialization, the type Big_Integer is considered to have a subcomponent that has a @fa. @s8<@i> No storage associated with a Big_Integer object shall be lost upon assignment or scope exit. !corrigendum A.5.7(0) !AI-0208-1 !AI-0302-1 !AI-0366-1 @dinsc @s8<@i> The library package Numerics.Big_Numbers.Big_Reals has the following declaration: @xcode<@b Ada.Numerics.Big_Numbers.Big_Integers; @b Big_Integers.Big_Integer; @b Ada.Strings.Text_Buffers; @b Ada.Numerics.Big_Numbers.Big_Reals @b Preelaborate, Nonblocking, Global =@> @b @b> @xcode< @b Big_Real @b @b Real_Literal =@> From_String, Put_Image =@> Put_Image;> @xcode< @b Is_Valid (Arg : Big_Real) @b Boolean @b Convention =@> Intrinsic;> @xcode< @b Valid_Big_Real @b Big_Real @b Dynamic_Predicate =@> Is_Valid (Valid_Big_Real), Predicate_Failure =@> @b Program_Error;> @xcode< @b "/" (Num, Den : Big_Integers.Valid_Big_Integer) @b Valid_Big_Real @b Pre =@> Den /= 0 @b Constraint_Error;> @xcode< @b Numerator (Arg : Valid_Big_Real) @b Big_Integers.Valid_Big_Integer @b Post =@> (@b Arg = 0.0 @b Numerator'Result = 0);> @xcode< @b Denominator (Arg : Valid_Big_Real) @b Big_Integers.Big_Positive @b Post =@> (@b Arg = 0.0 @b Denominator'Result = 1 @b Big_Integers.Greatest_Common_Divisor (Numerator (Arg), Denominator'Result) = 1);> @xcode< @b To_Big_Real (Arg : Big_Integers.Valid_Big_Integer) @b Valid_Big_Real @b (Arg / 1);> @xcode< @b To_Real (Arg : Integer) @b Valid_Big_Real @b (Big_Integers.To_Big_Integer (Arg) / 1);> @xcode< @b "=" (L, R : Valid_Big_Real) @b Boolean; @b "<" (L, R : Valid_Big_Real) @b Boolean; @b "<=" (L, R : Valid_Big_Real) @b Boolean; @b "@>" (L, R : Valid_Big_Real) @b Boolean; @b "@>=" (L, R : Valid_Big_Real) @b Boolean;> @xcode< @b In_Range (Arg, Low, High : Valid_Big_Real) @b Boolean @b (Low <= Arg @b Arg <= High);> @xcode< @b @b Num @b <@>; @b Float_Conversions @b @b To_Big_Real (Arg : Num) @b Valid_Big_Real; @b From_Big_Real (Arg : Valid_Big_Real) @b Num @b Pre =@> In_Range (Arg, Low =@> To_Big_Real (Num'First), High =@> To_Big_Real (Num'Last)) @b (@b Constraint_Error); @b Float_Conversions;> @xcode< @b @b Num @b <@>; @b Fixed_Conversions @b @b To_Big_Real (Arg : Num) @b Valid_Big_Real; @b From_Big_Real (Arg : Valid_Big_Real) @b Num @b Pre =@> In_Range (Arg, Low =@> To_Big_Real (Num'First), High =@> To_Big_Real (Num'Last)) @b (@b Constraint_Error); @b Fixed_Conversions;> @xcode< @b To_String (Arg : Valid_Big_Real; Fore : Field := 2; Aft : Field := 3; Exp : Field := 0) @b String @b Post =@> To_String'Result'First = 1;> @xcode< @b From_String (Arg : String) @b Valid_Big_Real;> @xcode< @b To_Quotient_String (Arg : Valid_Big_Real) @b String @b (To_String (Numerator (Arg)) & " / " & To_String (Denominator (Arg))); @b From_Quotient_String (Arg : String) @b Valid_Big_Real;> @xcode< @b Put_Image (Buffer : @b Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; Arg : @b Valid_Big_Real);> @xcode< @b "+" (L : Valid_Big_Real) @b Valid_Big_Real; @b "-" (L : Valid_Big_Real) @b Valid_Big_Real; @b "abs" (L : Valid_Big_Real) @b Valid_Big_Real; @b "+" (L, R : Valid_Big_Real) @b Valid_Big_Real; @b "-" (L, R : Valid_Big_Real) @b Valid_Big_Real; @b "*" (L, R : Valid_Big_Real) @b Valid_Big_Real; @b "/" (L, R : Valid_Big_Real) @b Valid_Big_Real; @b "**" (L : Valid_Big_Real; R : Integer) @b Valid_Big_Real; @b Min (L, R : Valid_Big_Real) @b Valid_Big_Real; @b Max (L, R : Valid_Big_Real) @b Valid_Big_Real;> @xcode<@b ... -- @ft<@i> @b Ada.Numerics.Big_Numbers.Big_Reals;> To_String and From_String behave analogously to the Put and Get procedures defined in Text_IO.Float_IO (in particular, with respect to the interpretation of the Fore, Aft, and Exp parameters), except that Constraint_Error (not Data_Error) is propagated in error cases. From_Quotient_String implements the inverse function of To_Quotient_String; Constraint_Error is propagated in error cases. Put_Image calls To_String, and writes the resulting value to the buffer using Text_Buffers.Put. For an instance of Float_Conversions or Fixed_Conversions, To_Big_Real is exact (that is, the result represents exactly the same mathematical value as the argument) and From_Big_Real is subject to the same precision rules as a type conversion of a value of type T to the target type Num, where T is a hypothetical floating point type whose model numbers include all of the model numbers of Num as well as the exact mathematical value of the argument. The other functions have their usual mathematical meanings. The type Big_Real needs finalization (see 7.6). @s8<@i> For purposes of determining whether predicate checks are performed as part of default initialization, the type Big_Real is considered to have a subcomponent that has a @fa. @s8<@i> No storage associated with a Big_Real object shall be lost upon assignment or scope exit. !corrigendum A.10.1(55) !AI-0241-1 !AI-0302-1 @drepl @xcode< @b Put(File : @b File_Type; Item : @b Num; Width : @b Field := Default_Width; Base : @b Number_Base := Default_Base); @b Put(Item : @b Num; Width : @b Field := Default_Width; Base : @b Number_Base := Default_Base); @b Get(From : @b String; Item : @b Num; Last : @b Positive); @b Put(To : @b String; Item : @b Num; Base : @b Number_Base := Default_Base);> @dby @xcode< @b Put(File : @b File_Type; Item : @b Num; Width : @b Field := Default_Width; Base : @b Number_Base := Default_Base) @b Global =@> @b File; @b Put(Item : @b Num; Width : @b Field := Default_Width; Base : @b Number_Base := Default_Base) @b Global =@> @b; @b Get(From : @b String; Item : @b Num; Last : @b Positive) @b Nonblocking; @b Put(To : @b String; Item : @b Num; Base : @b Number_Base := Default_Base) @b Nonblocking;> !corrigendum A.10.1(60) !AI-0241-1 !AI-0302-1 @drepl @xcode< @b Put(File : @b File_Type; Item : @b Num; Width : @b Field := Default_Width; Base : @b Number_Base := Default_Base); @b Put(Item : @b Num; Width : @b Field := Default_Width; Base : @b Number_Base := Default_Base); @b Get(From : @b String; Item : @b Num; Last : @b Positive); @b Put(To : @b String; Item : @b Num; Base : @b Number_Base := Default_Base);> @dby @xcode< @b Put(File : @b File_Type; Item : @b Num; Width : @b Field := Default_Width; Base : @b Number_Base := Default_Base) @b Global =@> @b File; @b Put(Item : @b Num; Width : @b Field := Default_Width; Base : @b Number_Base := Default_Base) @b Global =@> @b; @b Get(From : @b String; Item : @b Num; Last : @b Positive) @b Nonblocking; @b Put(To : @b String; Item : @b Num; Base : @b Number_Base := Default_Base) @b Nonblocking;> !corrigendum A.15(3) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Command_Line @b @b Preelaborate(Command_Line);> @dby @xcode<@b Ada.Command_Line @b Preelaborate, Nonblocking, Global =@> @b @b> !corrigendum A.16.1(3/3) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Directories.Hierarchical_File_Names @b> @dby @xcode<@b Ada.Directories.Hierarchical_File_Names @b Nonblocking, Global =@> @b @b> !corrigendum A.17(3/2) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Environment_Variables @b @b Preelaborate(Environment_Variables);> @dby @xcode<@b Ada.Environment_Variables @b Preelaborate, Nonblocking, Global =@> @b @b> !corrigendum A.18(2/2) !AI-0111-1 !AI-0196-1 @drepl A variety of sequence and associative containers are provided. Each container includes a @i type. A cursor is a reference to an element within a container. Many operations on cursors are common to all of the containers. A cursor referencing an element in a container is considered to be overlapping with the container object itself. @dby A variety of sequence and associative containers are provided. Each container includes a @i type. A cursor is a reference to an element within a container. Many operations on cursors are common to all of the containers. A cursor referencing an element in a container is considered to be overlapping only with the element itself. !corrigendum A.18(10/2) !AI-0112-1 !AI-0258-1 @dinsa @xbullet @dinss @s8<@i> For an indefinite container (one whose type is defined in an instance of a child package of Containers whose @fa contains "Indefinite"), each element of the container shall be created when it is inserted into the container and finalized when it is deleted from the container (or when the container object is finalized if the element has not been deleted). For a bounded container (one whose type is defined in an instance of a child package of Containers whose @fa starts with "Bounded") that is not an indefinite container, all of the elements of the capacity of the container shall be created and default initialized when the container object is created; the elements shall be finalized when the container object is finalized. For other kinds of containers, when elements are created and finalized is unspecified. For an instance @i of a container package with a container type @i, the specific type @i of the object returned from a function that returns an object of an iterator interface, as well as the primitive operations of @i, shall be nonblocking. The Global aspect specified for @i and the primitive operations of @i shall be @fc<(@b, @b)> or a specification that allows access to fewer global objects. !corrigendum A.18.2(8/3) !AI-0111-1 !AI-0112-1 !AI-0212-1 !AI-0339-1 @drepl @xcode< @b Vector @b @b Constant_Indexing =@> Constant_Reference, Variable_Indexing =@> Reference, Default_Iterator =@> Iterate, Iterator_Element =@> Element_Type; @b Preelaborable_Initialization(Vector);> @dby @xcode< @b Vector @b @b Constant_Indexing =@> Constant_Reference, Variable_Indexing =@> Reference, Default_Iterator =@> Iterate, Iterator_Element =@> Element_Type, Iterator_View =@> Stable.Vector, Aggregate =@> (Empty =@> Empty, Add_Unnamed =@> Append_One, New_Indexed =@> New_Vector, Assign_Indexed =@> Replace_Element), Stable_Properties =@> (Length, Capacity, Tampering_With_Cursors_Prohibited, Tampering_With_Elements_Prohibited), Default_Initial_Condition =@> Length (Vector) = 0 @b (@b Tampering_With_Cursors_Prohibited (Vector)) @b (@b Tampering_With_Elements_Prohibited (Vector)); @b Preelaborable_Initialization(Vector);> !corrigendum A.18.2(12/2) !AI-0112-1 !AI-0339-1 @dinsa @xcode< @b "=" (Left, Right : Vector) @b Boolean;> @dinss @xcode< @b Tampering_With_Cursors_Prohibited (Container : Vector) @b Boolean @b Nonblocking, Global =@> @b, Use_Formal =@> @b;> @xcode< @b Tampering_With_Elements_Prohibited (Container : Vector) @b Boolean @b Nonblocking, Global =@> @b, Use_Formal =@> @b;> @xcode< @b Maximum_Length @b Count_Type @b Nonblocking, Global =@> @b, Use_Formal =@> @b;> @xcode< @b Empty (Capacity : Count_Type := @ft<@i>) @b Vector @b Pre =@> Capacity <= Maximum_Length @b Constraint_Error, Post =@> Capacity (Empty'Result) @>= Capacity @b @b Tampering_With_Elements_Prohibited (Empty'Result) @b @b Tampering_With_Cursors_Prohibited (Empty'Result) @b Length (Empty'Result) = 0;> !corrigendum A.18.2(14/2) !AI-0112-1 !AI-0212-1 @drepl @xcode< @b To_Vector (New_Item : Element_Type; Length : Count_Type) @b Vector> @dby @xcode< @b To_Vector (New_Item : Element_Type; Length : Count_Type) @b Vector @b Pre =@> Length <= Maximum_Length @b Constraint_Error, Post =@> To_Vector'Result.Length = Length @b @b Tampering_With_Elements_Prohibited (To_Vector'Result) @b @b Tampering_With_Cursors_Prohibited (To_Vector'Result) @b To_Vector'Result.Capacity @>= Length;> @xcode< @b New_Vector (First, Last : Index_Type) @b Vector @b (To_Vector (Count_Type (Last - First + 1))) @b Pre =@> First = Index_Type'First;> !corrigendum A.18.2(47/2) !AI-0112-1 !AI-0212-1 @dinsa @xcode< @b Append (Container : @b Vector; New_Item : @b Element_Type; Count : @b Count_Type := 1);> @dinst @xcode< @b Append_One (Container : @b Vector; New_Item : @b Element_Type) @b Pre =@> (@b Tampering_With_Cursors_Prohibited (Container) @b Program_Error) @b (Length (Container) <= Maximum_Length - 1 @b Constraint_Error), Post =@> Length (Container)'Old + 1 = Length (Container) @b Capacity (Container) @>= Length (Container);> !corrigendum A.18.2(74.1/3) !AI-0112-1 !AI-0266-1 @drepl @xcode< @b Iterate (Container : @b Vector) @b Vector_Iterator_Interfaces.Reversible_Iterator'Class;> @dby @xcode< @b Iterate (Container : @b Vector) @b Vector_Iterator_Interfaces.Parallel_Reversible_Iterator'Class @b Post =@> Tampering_With_Cursors_Prohibited (Container);> !corrigendum A.18.2(98/3) !AI-0112-1 !AI-0339-1 @dinsa @xindent @dinss @xcode<@b Tampering_With_Cursors_Prohibited (Container : Vector) @b Boolean @b Nonblocking, Global =@> @b, Use_Formal =@> @b;> @xindent @xcode<@b Tampering_With_Elements_Prohibited (Container : Vector) @b Boolean @b Nonblocking, Global =@> @b, Use_Formal =@> @b;> @xindent @xcode<@b Maximum_Length @b Count_Type @b Nonblocking, Global =@> @b, Use_Formal =@> @b;> @xindent @xcode<@b Empty (Capacity : Count_Type := @ft<@i>) @b Vector @b Pre =@> Capacity <= Maximum_Length @b Constraint_Error, Post =@> Capacity (Empty'Result) @>= Capacity @b @b Tampering_With_Elements_Prohibited (Empty'Result) @b @b Tampering_With_Cursors_Prohibited (Empty'Result) @b Length (Empty'Result) = 0;> @xindent !corrigendum A.18.2(125/2) !AI-0112-1 !AI-0196-1 @drepl @xindent @dby @xindent !corrigendum A.18.2(133/3) !AI-0112-1 !AI-0196-1 @drepl @xindent @dby @xindent !corrigendum A.18.2(135/3) !AI-0112-1 !AI-0196-1 @drepl @xindent @dby @xindent !corrigendum A.18.2(175/2) !AI-0112-1 !AI-0212-1 @dinsa @xindent @dinss @xcode<@b Append_One (Container : @b Vector; New_Item : @b Element_Type) @b Pre =@> (@b Tampering_With_Cursors_Prohibited (Container) @b Program_Error) @b (Length (Container) <= Maximum_Length - 1 @b Constraint_Error), Post =@> Length (Container)'Old + 1 = Length (Container) @b Capacity (Container) @>= Length (Container);> @xindent !corrigendum A.18.2(230.1/3) !AI-0112-1 !AI-0266-1 @drepl @xcode<@b Iterate (Container : @b Vector) @b Vector_Iterator_Interfaces.Reversible_Iterator'Class;> @dby @xcode<@b Iterate (Container : @b Vector) @b Vector_Iterator_Interfaces.Parallel_Reversible_Iterator'Class @b Post =@> Tampering_With_Cursors_Prohibited (Container);> !corrigendum A.18.3(6/3) !AI-0111-1 !AI-0112-1 !AI-0212-1 !AI-0339-1 !AI-0391-1 @drepl @xcode< @b List @b @b Constant_Indexing =@> Constant_Reference, Variable_Indexing =@> Reference, Default_Iterator =@> Iterate, Iterator_Element =@> Element_Type; @b Preelaborable_Initialization(List);> @dby @xcode< @b List @b @b Constant_Indexing =@> Constant_Reference, Variable_Indexing =@> Reference, Default_Iterator =@> Iterate, Iterator_Element =@> Element_Type, Iterator_View =@> Stable.List, Aggregate =@> (Empty =@> Empty, Add_Unnamed =@> Append_One), Stable_Properties =@> (Length, Tampering_With_Cursors_Prohibited, Tampering_With_Elements_Prohibited), Default_Initial_Condition =@> Length (List) = 0 @b (@b Tampering_With_Cursors_Prohibited (List)) @b (@b Tampering_With_Elements_Prohibited (List)); @b Preelaborable_Initialization(List);> !corrigendum A.18.3(10/2) !AI-0112-1 !AI-0339-1 @dinsa @xcode< @b "=" (Left, Right : List) @b Boolean;> @dinss @xcode< @b Tampering_With_Cursors_Prohibited (Container : List) @b Boolean @b Nonblocking, Global =@> @b, Use_Formal =@> @b;> @xcode< @b Tampering_With_Elements_Prohibited (Container : List) @b Boolean @b Nonblocking, Global =@> @b, Use_Formal =@> @b;> @xcode< @b Empty @b List @b (Empty_List) @b Post =@> @b Tampering_With_Elements_Prohibited (Empty'Result) @b @b Tampering_With_Cursors_Prohibited (Empty'Result) @b Length (Empty'Result) = 0;> !corrigendum A.18.3(23/2) @drepl @xcode< @b Append (Container : @b List; New_Item : @b Element_Type; Count : @b Count_Type := 1);> @dby @xcode< @b Append (Container : @b List; New_Item : @b Element_Type; Count : @b Count_Type := 1) @b Pre =@> (@b Tampering_With_Cursors_Prohibited (Container) @b Program_Error) @b (Length (Container) <= Count_Type'Last - Count @b Constraint_Error), Post =@> Length (Container)'Old + Count = Length (Container);> @xcode< @b Append_One (Container : @b List; New_Item : @b Element_Type) @b Pre =@> (@b Tampering_With_Cursors_Prohibited (Container) @b Program_Error) @b (Length (Container) <= Count_Type'Last - 1 @b Constraint_Error), Post =@> Length (Container)'Old + 1 = Length (Container);> !corrigendum A.18.3(46.1/3) !AI-0112-1 !AI-0266-1 @drepl @xcode< @b Iterate (Container : @b List) @b List_Iterator_Interfaces.Reversible_Iterator'Class;> @dby @xcode< @b Iterate (Container : @b List) @b List_Iterator_Interfaces.Parallel_Reversible_Iterator'Class @b Post =@> Tampering_With_Cursors_Prohibited (Container);> !corrigendum A.18.3(81/3) !AI-0112-1 !AI-0196-1 @drepl @xindent @dby @xindent !corrigendum A.18.3(144.1/3) !AI-0112-1 !AI-0266-1 @drepl @xcode<@b Iterate (Container : @b List) @b List_Iterator_Interfaces.Reversible_Iterator'Class;> @dby @xcode<@b Iterate (Container : @b List) @b List_Iterator_Interfaces.Parallel_Reversible_Iterator'Class @b Post =@> Tampering_With_Cursors_Prohibited (Container);> !corrigendum A.18.4(36/3) !AI-0112-1 !AI-0196-1 @drepl @xindent @dby @xindent !corrigendum A.18.5(3/2) !AI-0111-1 !AI-0112-1 !AI-0212-1 !AI-0339-1 @drepl @xcode< @b Map @b @b Constant_Indexing =@> Constant_Reference, Variable_Indexing =@> Reference, Default_Iterator =@> Iterate, Iterator_Element =@> Element_Type; @b Preelaborable_Initialization(Map);> @dby @xcode< @b Map @b @b Constant_Indexing =@> Constant_Reference, Variable_Indexing =@> Reference, Default_Iterator =@> Iterate, Iterator_Element =@> Element_Type, Iterator_View =@> Stable.Map, Aggregate =@> (Empty =@> Empty, Add_Named =@> Insert), Stable_Properties =@> (Length, Tampering_With_Cursors_Prohibited, Tampering_With_Elements_Prohibited), Default_Initial_Condition =@> Length (Map) = 0 @b (@b Tampering_With_Cursors_Prohibited (Map)) @b (@b Tampering_With_Elements_Prohibited (Map)); @b Preelaborable_Initialization(Map);> !corrigendum A.18.5(7/2) !AI-0112-1 !AI-0339-1 @dinsa @xcode< @b "=" (Left, Right : Map) @b Boolean;> @dinss @xcode< @b Tampering_With_Cursors_Prohibited (Container : Map) @b Boolean @b Nonblocking, Global =@> @b, Use_Formal =@> @b;> @xcode< @b Tampering_With_Elements_Prohibited (Container : Map) @b Boolean @b Nonblocking, Global =@> @b, Use_Formal =@> @b;> @xcode< @b Empty (Capacity : Count_Type := @ft<@i>) @b Map @b Post =@> Capacity (Empty'Result) @>= Capacity @b @b Tampering_With_Elements_Prohibited (Empty'Result) @b @b Tampering_With_Cursors_Prohibited (Empty'Result) @b Length (Empty'Result) = 0;> !corrigendum A.18.5(37.1/3) !AI-0112-1 !AI-0266-1 @drepl @xcode< @b Iterate (Container : @b Map) @b Map_Iterator_Interfaces.Forward_Iterator'Class;> @dby @xcode< @b Iterate (Container : @b Map) @b Map_Iterator_Interfaces.Parallel_Iterator'Class @b Post =@> Tampering_With_Cursors_Prohibited (Container);> !corrigendum A.18.5(61.1/3) !AI-0112-1 !AI-0266-1 @drepl @xcode<@b Iterate (Container : @b Map) @b Map_Iterator_Interfaces.Forward_Iterator'Class;> @dby @xcode<@b Iterate (Container : @b Map) @b Map_Iterator_Interfaces.Parallel_Iterator'Class @b Post =@> Tampering_With_Cursors_Prohibited (Container);> !corrigendum A.18.6(4/3) !AI-0111-1 !AI-0112-1 !AI-0212-1 !AI-0339-1 @drepl @xcode< @b Map @b @b Constant_Indexing =@> Constant_Reference, Variable_Indexing =@> Reference, Default_Iterator =@> Iterate, Iterator_Element =@> Element_Type; @b Preelaborable_Initialization(Map);> @dby @xcode< @b Map @b @b Constant_Indexing =@> Constant_Reference, Variable_Indexing =@> Reference, Default_Iterator =@> Iterate, Iterator_Element =@> Element_Type, Iterator_View =@> Stable.Map, Aggregate =@> (Empty =@> Empty, Add_Named =@> Insert), Stable_Properties =@> (Length, Tampering_With_Cursors_Prohibited, Tampering_With_Elements_Prohibited), Default_Initial_Condition =@> Length (Map) = 0 @b (@b Tampering_With_Cursors_Prohibited (Map)) @b (@b Tampering_With_Elements_Prohibited (Map)); @b Preelaborable_Initialization(Map);> !corrigendum A.18.6(7/2) !AI-0112-1 !AI-0339-1 @dinsa @xcode< @b "=" (Left, Right : Map) @b Boolean;> @dinss @xcode< @b Tampering_With_Cursors_Prohibited (Container : Map) @b Boolean @b Nonblocking, Global =@> @b, Use_Formal =@> @b;> @xcode< @b Tampering_With_Elements_Prohibited (Container : Map) @b Boolean @b Nonblocking, Global =@> @b, Use_Formal =@> @b;> @xcode< @b Empty @b Map @b (Empty_Map) @b Post =@> @b Tampering_With_Elements_Prohibited (Empty'Result) @b @b Tampering_With_Cursors_Prohibited (Empty'Result) @b Length (Empty'Result) = 0;> !corrigendum A.18.6(51.1/3) !AI-0112-1 !AI-0266-1 @drepl @xcode< @b Iterate (Container : @b Map) @b Map_Iterator_Interfaces.Reversible_Iterator'Class;> @dby @xcode< @b Iterate (Container : @b Map) @b Map_Iterator_Interfaces.Parallel_Reversible_Iterator'Class @b Post =@> Tampering_With_Cursors_Prohibited (Container);> !corrigendum A.18.6(94.1/3) !AI-0112-1 !AI-0266-1 @drepl @xcode<@b Iterate (Container : @b Map) @b Map_Iterator_Interfaces.Reversible_Iterator'Class;> @dby @xcode<@b Iterate (Container : @b Map) @b Map_Iterator_Interfaces.Parallel_Reversible_Iterator'Class @b Post =@> Tampering_With_Cursors_Prohibited (Container);> !corrigendum A.18.7(34/2) !AI-0112-1 !AI-0196-1 @drepl @xindent @dby @xindent !corrigendum A.18.8(3/3) !AI-0111-1 !AI-0112-1 !AI-0212-1 !AI-0339-1 @drepl @xcode< @b Set @b @b Constant_Indexing =@> Constant_Reference, Default_Iterator =@> Iterate, Iterator_Element =@> Element_Type; @b Preelaborable_Initialization(Set);> @dby @xcode< @b Set @b @b Constant_Indexing =@> Constant_Reference, Default_Iterator =@> Iterate, Iterator_Element =@> Element_Type, Iterator_View =@> Stable.Set, Aggregate =@> (Empty =@> Empty, Add_Unnamed =@> Include), Stable_Properties =@> (Length, Tampering_With_Cursors_Prohibited), Default_Initial_Condition =@> Length (Set) = 0 @b (@b Tampering_With_Cursors_Prohibited (Set)); @b Preelaborable_Initialization(Set);> !corrigendum A.18.8(8/2) !AI-0112-1 !AI-0339-1 @dinsa @xcode< @b Equivalent_Sets (Left, Right : Set) @b Boolean;> @dinss @xcode< @b Tampering_With_Cursors_Prohibited (Container : Set) @b Boolean @b Nonblocking, Global =@> @b, Use_Formal =@> @b;> @xcode< @b Empty (Capacity : Count_Type := @ft<@i>) @b Set @b Post =@> Capacity (Empty'Result) @>= Capacity @b @b Tampering_With_Cursors_Prohibited (Empty'Result) @b Length (Empty'Result) = 0;> !corrigendum A.18.8(49.1/3) !AI-0112-1 !AI-0266-1 @drepl @xcode< @b Iterate (Container : @b Set) @b Set_Iterator_Interfaces.Forward_Iterator'Class;> @dby @xcode< @b Iterate (Container : @b Set) @b Set_Iterator_Interfaces.Parallel_Iterator'Class @b Post =@> Tampering_With_Cursors_Prohibited (Container);> !corrigendum A.18.8(85.1/3) !AI-0112-1 !AI-0266-1 @drepl @xcode<@b Iterate (Container : @b Set) @b Set_Iterator_Interfaces.Forward_Iterator'Class;> @dby @xcode<@b Iterate (Container : @b Set) @b Set_Iterator_Interfaces.Parallel_Iterator'Class @b Post =@> Tampering_With_Cursors_Prohibited (Container);> !corrigendum A.18.9(4/3) !AI-0111-1 !AI-0112-1 !AI-0212-1 !AI-0339-1 @drepl @xcode< @b Set @b @b Constant_Indexing =@> Constant_Reference, Default_Iterator =@> Iterate, Iterator_Element =@> Element_Type; @b Preelaborable_Initialization(Set);> @dby @xcode< @b Set @b @b Constant_Indexing =@> Constant_Reference, Default_Iterator =@> Iterate, Iterator_Element =@> Element_Type, Iterator_View =@> Stable.Set, Aggregate =@> (Empty =@> Empty, Add_Unnamed =@> Include), Stable_Properties =@> (Length, Tampering_With_Cursors_Prohibited), Default_Initial_Condition =@> Length (Set) = 0 @b (@b Tampering_With_Cursors_Prohibited (Set)); @b Preelaborable_Initialization(Set);> !corrigendum A.18.9(9/2) !AI-0112-1 !AI-0339-1 @dinsa @xcode< @b Equivalent_Sets (Left, Right : Set) @b Boolean;> @dinss @xcode< @b Tampering_With_Cursors_Prohibited (Container : Set) @b Boolean @b Nonblocking, Global =@> @b, Use_Formal =@> @b;> @xcode< @b Empty @b Set @b (Empty_Set) @b Post =@> @b Tampering_With_Cursors_Prohibited (Empty'Result) @b Length (Empty'Result) = 0;> !corrigendum A.18.9(61.1/3) !AI-0112-1 !AI-0266-1 @drepl @xcode< @b Iterate (Container : @b Set) @b Set_Iterator_Interfaces.Reversible_Iterator'Class;> @dby @xcode< @b Iterate (Container : @b Set) @b Set_Iterator_Interfaces.Parallel_Reversible_Iterator'Class @b Post =@> Tampering_With_Cursors_Prohibited (Container);> !corrigendum A.18.9(113.1/3) !AI-0112-1 !AI-0266-1 @drepl @xcode<@b Iterate (Container : @b Set) @b Set_Iterator_Interfaces.Reversible_Iterator'Class;> @dby @xcode<@b Iterate (Container : @b Set) @b Set_Iterator_Interfaces.Parallel_Reversible_Iterator'Class @b Post =@> Tampering_With_Cursors_Prohibited (Container);> !corrigendum A.18.10(8/3) !AI-0111-1 !AI-0112-1 @drepl @xcode< @b Tree @b @b Constant_Indexing =@> Constant_Reference, Variable_Indexing =@> Reference, Default_Iterator =@> Iterate, Iterator_Element =@> Element_Type; @b Preelaborable_Initialization(Tree);> @dby @xcode< @b Tree @b @b Constant_Indexing =@> Constant_Reference, Variable_Indexing =@> Reference, Default_Iterator =@> Iterate, Iterator_Element =@> Element_Type, Iterator_View =@> Stable.Tree, Stable_Properties =@> (Node_Count, Tampering_With_Cursors_Prohibited, Tampering_With_Elements_Prohibited), Default_Initial_Condition =@> Node_Count (Tree) = 1 @b (@b Tampering_With_Cursors_Prohibited (Tree)) @b (@b Tampering_With_Elements_Prohibited (Tree)); @b Preelaborable_Initialization(Tree);> !corrigendum A.18.10(15/3) !AI-0112-1 !AI-0339-1 @dinsa @xcode< @b "=" (Left, Right : Tree) @b Boolean;> @dinss @xcode< @b Tampering_With_Cursors_Prohibited (Container : Tree) @b Boolean @b Nonblocking, Global =@> @b, Use_Formal =@> @b;> @xcode< @b Tampering_With_Elements_Prohibited (Container : Tree) @b Boolean @b Nonblocking, Global =@> @b, Use_Formal =@> @b;> @xcode< @b Empty @b Tree @b (Empty_Tree) @b Post =@> @b Tampering_With_Elements_Prohibited (Empty'Result) @b @b Tampering_With_Cursors_Prohibited (Empty'Result) @b Node_Count (Empty'Result) = 1;> !corrigendum A.18.10(44/3) !AI-0112-1 !AI-0266-1 @drepl @xcode< @b Iterate (Container : @b Tree) @b Tree_Iterator_Interfaces.Forward_Iterator'Class;> @dby @xcode< @b Iterate (Container : @b Tree) @b Tree_Iterator_Interfaces.Parallel_Iterator'Class @b Post =@> Tampering_With_Cursors_Prohibited (Container);> !corrigendum A.18.10(45/3) !AI-0112-1 !AI-0266-1 @drepl @xcode< @b Iterate_Subtree (Position : @b Cursor) @b Tree_Iterator_Interfaces.Forward_Iterator'Class;> @dby @xcode< @b Iterate_Subtree (Position : @b Cursor) @b Tree_Iterator_Interfaces.Parallel_Iterator'Class @b Pre =@> Position /= No_Element @b Constraint_Error, Global =@> @b;> @xcode< @b Iterate_Subtree (Container : @b Tree; Position : @b Cursor) @b Tree_Iterator_Interfaces.Parallel_Iterator'Class @b Pre =@> (Position /= No_Element @b Constraint_Error) @b (Meaningful_For (Container, Position) @b Program_Error), Post =@> Tampering_With_Cursors_Prohibited (Container);> !corrigendum A.18.10(70/3) !AI-0112-1 !AI-0266-1 @drepl @xcode< @b Iterate_Children (Container : @b Tree; Parent : @b Cursor) @b Tree_Iterator_Interfaces.Reversible_Iterator'Class;> @dby @xcode< @b Iterate_Children (Container : @b Tree; Parent : @b Cursor) @b Tree_Iterator_Interfaces.Parallel_Reversible_Iterator'Class @b Pre =@> (Parent /= No_Element @b Constraint_Error) @b (Meaningful_For (Container, Parent) @b Program_Error), Post =@> Tampering_With_Cursors_Prohibited (Container);> !corrigendum A.18.10(116/3) !AI-0112-1 !AI-0266-1 @drepl @xindent @dby @xindent !corrigendum A.18.10(156/3) !AI-0112-1 !AI-0266-1 @drepl @xcode<@b Iterate (Container : @b Tree) @b Tree_Iterator_Interfaces.Forward_Iterator'Class;> @dby @xcode<@b Iterate (Container : @b Tree) @b Tree_Iterator_Interfaces.Parallel_Iterator'Class @b Post =@> Tampering_With_Cursors_Prohibited (Container);> !corrigendum A.18.10(158/3) !AI-0112-1 !AI-0266-1 @drepl @xcode<@b Iterate_Subtree (Position : @b Cursor) @b Tree_Iterator_Interfaces.Forward_Iterator'Class;> @dby @xcode<@b Iterate_Subtree (Position : @b Cursor) @b Tree_Iterator_Interfaces.Parallel_Iterator'Class @b Pre =@> Position /= No_Element @b Constraint_Error, Global =@> @b;> !corrigendum A.18.10(159/3) !AI-0112-1 !AI-0266-1 @drepl @xindent of the @fa whose @fa denotes this object). The iterator object needs finalization.> @dby @xindent of the @fa whose @fa denotes this object). The iterator object needs finalization.> @xcode<@b Iterate_Subtree (Container : @b Tree; Position : @b Cursor) @b Tree_Iterator_Interfaces.Parallel_Iterator'Class @b Pre =@> (Position /= No_Element @b Constraint_Error) @b (Meaningful_For (Container, Position) @b Program_Error), Post =@> Tampering_With_Cursors_Prohibited (Container);> @xindent of the @fa whose @fa denotes this object). The iterator object needs finalization.> !corrigendum A.18.10(218/3) !AI-0112-1 !AI-0266-1 @drepl @xcode<@b Iterate_Children (Container : @b Tree; Parent : @b Cursor) @b Tree_Iterator_Interfaces.Reversible_Iterator'Class;> @dby @xcode<@b Iterate_Children (Container : @b Tree; Parent : @b Cursor) @b Tree_Iterator_Interfaces.Parallel_Reversible_Iterator'Class @b Pre =@> (Parent /= No_Element @b Constraint_Error) @b (Meaningful_For (Container, Parent) @b Program_Error), Post =@> Tampering_With_Cursors_Prohibited (Container);> !corrigendum A.18.10(219/3) !AI-0112-1 !AI-0266-1 @drepl @xindent of the @fa whose @fa denotes this object). The iterator object needs finalization.> @dby @xindent of the @fa whose @fa denotes this object). The iterator object needs finalization.> !corrigendum A.18.18(8/3) !AI-0112-1 !AI-0339-1 @dinsa @xcode< @b "=" (Left, Right : Holder) @b Boolean;> @dinss @xcode< @b Tampering_With_The_Element_Prohibited (Container : Holder) @b Boolean @b Nonblocking, Global =@> @b, Use_Formal =@> @b;> @xcode< @b Empty @b Holder @b (Empty_Holder) @b Post =@> @b Tampering_With_The_Element_Prohibited (Empty'Result) @b Is_Empty (Empty'Result);> !corrigendum A.18.18(22/3) !AI-0112-1 !AI-0350-1 @drepl @xcode< @b Move (Target : @b Holder; Source : @b Holder);> @dby @xcode< @b Move (Target : @b Holder; Source : @b Holder) @b Pre =@> (@b Tampering_With_The_Element_Prohibited (Target) @b Program_Error) @b (@b Tampering_With_The_Element_Prohibited (Source) @b Program_Error), Post =@> (@b Target'Has_Same_Storage (Source) @b Is_Empty (Source) @b (@b Is_Empty (Target)));> @xcode< @b Swap (Left, Right : @b Holder) @b Pre =@> (@b Tampering_With_The_Element_Prohibited (Left) @b Program_Error) @b (@b Tampering_With_The_Element_Prohibited (Right) @b Program_Error), Post =@> Is_Empty (Left) = Is_Empty (Right)'Old @b Is_Empty (Right) = Is_Empty (Left)'Old;> !corrigendum A.18.18(67/3) !AI-0112-1 !AI-0350-1 @drepl @xindent @dby @xindent @xcode<@b Swap (Left, Right : @b Holder) @b Pre =@> (@b Tampering_With_The_Element_Prohibited (Left) @b Program_Error) @b (@b Tampering_With_The_Element_Prohibited (Right) @b Program_Error), Post =@> Is_Empty (Left) = Is_Empty (Right)'Old @b Is_Empty (Right) = Is_Empty (Left)'Old;> @xindent !corrigendum A.18.19(6/3) !AI-0112-1 !AI-0339-1 @dinsa @xbullet @dinss @xbullet @xbullet @xcode< Post =@> Empty'Result.Capacity = Capacity @b @b Tampering_With_Elements_Prohibited (Empty'Result) @b @b Tampering_With_Cursors_Prohibited (Empty'Result) @b Length (Empty'Result) = 0;> !corrigendum A.18.32(0) !AI-0254-1 !AI-0350-1 @dinsc The language-defined generic package Containers.Bounded_Indefinite_Holders provides a private type Holder and a set of operations for that type. It provides the same operations as the package Containers.Indefinite_Holders (see A.18.18), with the difference that the maximum storage is bounded. @s8<@i> The declaration of the generic library package Containers.Bounded_Indefinite_Holders has the same contents and semantics as Containers.Indefinite_Holders except: @xbullet @xcode< @b System.Storage_Elements; @b System.Storage_Elements;> @xbullet @xcode< Max_Element_Size_in_Storage_Elements : Storage_Count;> @xbullet @xcode< @b (New_Item'Size <= Max_Element_Size_in_Storage_Elements * System.Storage_Unit @b Program_Error)> @s8<@i> It is a bounded error to assign from a bounded holder object while tampering with elements of that object is prohibited. Either Program_Error is raised by the assignment, execution proceeds with the target object prohibiting tampering with elements, or execution proceeds normally. @s8<@i> For each instance of Containers.Indefinite_Holders and each instance of Containers.Bounded_Indefinite_Holders, if the two instances meet the following conditions, then the output generated by the Holder'Output or Holder'Write subprograms of either instance shall be readable by the Holder'Input or Holder'Read of the other instance, respectively: @xbullet @xbullet @s8<@i> Bounded holder objects should be implemented without dynamic allocation and any finalization should be trivial unless Element_Type needs finalization. The Implementation Advice about the Move and Swap operations is deleted for bounded holders; these operations can copy elements as needed. !corrigendum B.3.1(3) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Interfaces.C.Strings @b @b Preelaborate(Strings);> @dby @xcode<@b Interfaces.C.Strings @b Preelaborate, Nonblocking, Global =@> @b @b> !corrigendum B.3.2(4) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b @b Index @b (<@>); @b Element @b; @b Element_Array @b (Index @b <@>) @b Element; Default_Terminator : Element; @b Interfaces.C.Pointers @b @b Preelaborate(Pointers);> @dby @xcode<@b @b Index @b (<@>); @b Element @b; @b Element_Array @b (Index @b <@>) @b Element; Default_Terminator : Element; @b Interfaces.C.Pointers @b Preelaborate, Nonblocking, Global =@> @b @b> !corrigendum B.4(7) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Interfaces.COBOL @b @b Preelaborate(COBOL);> @dby @xcode<@b Interfaces.COBOL @b Preelaborate, Nonblocking, Global =@> @b @b> !corrigendum B.5(21) !AI-0058-1 !AI-0263-1 @drepl An implementation may add additional declarations to the Fortran interface packages. For example, the Fortran interface package for an implementation of Fortran 77 (ANSI X3.9-1978) that defines types like Integer*@i, Real*@i, Logical*@i, and Complex*@i may contain the declarations of types named Integer_Star_@i, Real_Star_@i, Logical_Star_@i, and Complex_Star_@i. (This convention should not apply to Character*@i, for which the Ada analog is the constrained array subtype Fortran_Character (1..n).) Similarly, the Fortran interface package for an implementation of Fortran 90 that provides multiple kinds of intrinsic types, e.g. Integer (Kind=@i), Real (Kind=@i), Logical (Kind=@i), Complex (Kind=@i), and Character (Kind=@i), may contain the declarations of types with the recommended names Integer_Kind_@i, Real_Kind_@i, Logical_Kind_@i, Complex_Kind_@i, and Character_Kind_@i. @dby An implementation may add additional declarations to the Fortran interface packages. For example, declarations are permitted for the character types corresponding to Fortran character kinds 'ascii' and 'iso_10646', which in turn correspond to ISO/IEC 646:1991 and to UCS-4 as specified in ISO/IEC 10646:2017. !corrigendum C.3.2(2/3) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b System; @b System.Multiprocessors; @b Ada.Interrupts @b @b Interrupt_Id @b @ft<@i>; @b Parameterless_Handler @b @b;> @dby @xcode<@b System; @b System.Multiprocessors; @b Ada.Interrupts @b Nonblocking, Global =@> @b @b @b Interrupt_Id @b @ft<@i>; @b Parameterless_Handler @b @b @b Nonblocking =@> False;> !corrigendum C.6(12/3) !AI-0282-1 !AI-0363-1 @drepl If an atomic object is passed as a parameter, then the formal parameter shall either have an atomic type or allow pass by copy. If an atomic object is used as an actual for a generic formal object of mode @b, then the type of the generic formal object shall be atomic. If the @fa of an @fa for an Access attribute denotes an atomic object (including a component), then the designated type of the resulting access type shall be atomic. If an atomic type is used as an actual for a generic formal derived type, then the ancestor of the formal type shall be atomic. Corresponding rules apply to volatile objects and types. @dby If an atomic object is passed as a parameter, then the formal parameter shall either have an atomic type or allow pass by copy. If an atomic object is used as an actual for a generic formal object of mode @b, then the type of the generic formal object shall be atomic. If the @fa of an @fa for an Access attribute denotes an atomic object (including a component), then the designated type of the resulting access type shall be atomic. Corresponding rules apply to volatile objects and to full access objects. !corrigendum C.6(12.1/3) !AI-0282-1 !AI-0363-1 @drepl If a volatile type is used as an actual for a generic formal array type, then the element type of the formal type shall be volatile. @dby If the Atomic, Atomic_Components, Volatile, Volatile_Components, Independent, Independent_Components, or Full_Access_Only aspect is True for a generic formal type, then that aspect shall be True for the actual type. If an atomic type is used as an actual for a generic formal derived type, then the ancestor of the formal type shall be atomic. A corresponding rule applies to volatile types and similarly to full access types. If a type with volatile components is used as an actual for a generic formal array type, then the components of the formal type shall be volatile. Furthermore, if the actual type has atomic components and the formal array type has aliased components, then the components of the formal array type shall also be atomic. A corresponding rule applies when the actual type has volatile full access components. !corrigendum C.6(19) !AI-0128-1 !AI-0347-1 !AI-0363-1 @dinsa If an actual parameter is atomic or volatile, and the corresponding formal parameter is not, then the parameter is passed by copy. @dinst All reads of or writes to any nonatomic subcomponent of a full access object are performed by reading and/or writing all of the nearest enclosing full access object. !corrigendum C.6.4 !AI-0321-1 !AI-0364-1 @dinsc The language-defined generic package System.Atomic_Operations.Integer_Arithmetic provides operations to perform arithmetic atomically on objects of integer types. @s8<@i> The generic library package System.Atomic_Operations.Integer_Arithmetic has the following declaration: @xcode<@b @b Atomic_Type @b <@> @b Atomic; @b System.Atomic_Operations.Integer_Arithmetic @b Pure, Nonblocking @b> @xcode< @b Atomic_Add (Item : @b Atomic_Type; Value : Atomic_Type) @b Convention =@> Intrinsic;> @xcode< @b Atomic_Subtract (Item : @b Atomic_Type; Value : Atomic_Type) @b Convention =@> Intrinsic;> @xcode< @b Atomic_Fetch_And_Add (Item : @b Atomic_Type; Value : Atomic_Type) @b Atomic_Type @b Convention =@> Intrinsic;> @xcode< @b Atomic_Fetch_And_Subtract (Item : @b Atomic_Type; Value : Atomic_Type) @b Atomic_Type @b Convention =@> Intrinsic;> @xcode< @b Is_Lock_Free (Item : @b Atomic_Type) @b Boolean @b Convention =@> Intrinsic;> @xcode<@b System.Atomic_Operations.Integer_Arithmetic;> The operations of this package are defined as follows: @xcode<@b Atomic_Add (Item : @b Atomic_Type; Value : Atomic_Type) @b Convention =@> Intrinsic;> @xindent> @xcode<@b Atomic_Subtract (Item : @b Atomic_Type; Value : Atomic_Type) @b Convention =@> Intrinsic;> @xindent> @xcode<@b Atomic_Fetch_And_Add (Item : @b Atomic_Type; Value : Atomic_Type) @b Atomic_Type @b Convention =@> Intrinsic;> @xindent Tmp;>> @xcode<@b Atomic_Fetch_And_Subtract (Item : @b Atomic_Type; Value : Atomic_Type) @b Atomic_Type @b Convention =@> Intrinsic;> @xindent Tmp;>> !corrigendum C.7.1(2/2) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Task_Identification @b @b Preelaborate(Task_Identification); @b Task_Id @b; @b Preelaborable_Initialization (Task_Id); Null_Task_Id : @b Task_Id; @b "=" (Left, Right : Task_Id) @b Boolean;> @dby @xcode<@b Ada.Task_Identification @b Preelaborate, Nonblocking, Global =@> @b @b @b Task_Id @b; @b Preelaborable_Initialization (Task_Id); Null_Task_Id : @b Task_Id; @b "=" (Left, Right : Task_Id) @b Boolean;> !corrigendum C.7.2(2) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Task_Identification; @b Ada.Task_Identification; @b @b Attribute @b; Initial_Value : @b Attribute; @b Ada.Task_Attributes @b> @dby @xcode<@b Ada.Task_Identification; @b Ada.Task_Identification; @b @b Attribute @b; Initial_Value : @b Attribute; @b Ada.Task_Attributes @b Nonblocking, Global =@> @b @b> !corrigendum C.7.3(2/2) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Task_Identification; @b Ada.Exceptions; @b Ada.Task_Termination @b @b Preelaborate(Task_Termination);> @dby @xcode<@b Ada.Task_Identification; @b Ada.Exceptions; @b Ada.Task_Termination @b Preelaborate, Nonblocking, Global =@> @b @b> !corrigendum D.2.1(1.2/3) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Dispatching @b @b Preelaborate(Dispatching);> @dby @xcode<@b Ada.Dispatching @b Preelaborate, Nonblocking, Global =@> @b @b> !corrigendum D.2.1(1.5/2) !AI-0279-1 !AI-0294-1 @dinsa Dispatching serves as the parent of other language-defined library units concerned with task dispatching. @dinss For a noninstance subprogram (including a generic formal subprogram), a generic subprogram, or an entry, the following language-defined aspect may be specified with an @fa (see 13.1.1): @xhang<@xterm The type of aspect Yield is Boolean.> @xindent shall be a static expression. If not specified (including by inheritance), the aspect is False.> @xindent of a type @i, then the aspect is inherited by the corresponding primitive subprogram of each descendant of @i.> @s8<@i> If the Yield aspect is specified for a dispatching subprogram that inherits the aspect, the specified value shall be confirming. If the Nonblocking aspect (see 9.5) of the associated callable entity is statically True, the Yield aspect shall not be specified as True. For a callable entity that is declared within a generic body, this rule is checked assuming that any nonstatic Nonblocking attributes in the expression of the Nonblocking aspect of the entity are statically True. In addition to the places where Legality Rules normally apply (see 12.3), these rules also apply in the private part of an instance of a generic unit. !corrigendum D.2.1(7/3) !AI-0241-1 !AI-0279-1 !AI-0299-1 @drepl A call of Yield is a task dispatching point. Yield is a potentially blocking operation (see 9.5.1). @dby A call of Yield and a @fa are task dispatching points for all language-defined policies. If the Yield aspect has the value True, then a call to procedure Yield is included within the body of the associated callable entity, and invoked immediately prior to returning from the body if and only if no other task dispatching points were encountered during the execution of the body. !corrigendum D.2.4(2.2/3) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Dispatching.Non_Preemptive @b @b Preelaborate(Non_Preemptive); @b Yield_To_Higher; @b Yield_To_Same_Or_Higher @b Yield; @b Ada.Dispatching.Non_Preemptive;> @dby @xcode<@b Ada.Dispatching.Non_Preemptive @b Preelaborate, Nonblocking, Global =@> @b @b @b Yield_To_Higher; @b Yield_To_Same_Or_Higher @b Yield; @b Ada.Dispatching.Non_Preemptive;> !corrigendum D.2.5(4/2) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b System; @b Ada.Real_Time; @b Ada.Dispatching.Round_Robin @b Default_Quantum : @b Ada.Real_Time.Time_Span := @ft<@i>; @b Set_Quantum (Pri : @b System.Priority; Quantum : @b Ada.Real_Time.Time_Span); @b Set_Quantum (Low, High : @b System.Priority; Quantum : @b Ada.Real_Time.Time_Span); @b Actual_Quantum (Pri : System.Priority) @b Ada.Real_Time.Time_Span; @b Is_Round_Robin (Pri : System.Priority) @b Boolean; @b Ada.Dispatching.Round_Robin;> @dby @xcode<@b System; @b Ada.Real_Time; @b Ada.Dispatching.Round_Robin @b Nonblocking, Global =@> @b @b Default_Quantum : @b Ada.Real_Time.Time_Span := @ft<@i>; @b Set_Quantum (Pri : @b System.Priority; Quantum : @b Ada.Real_Time.Time_Span); @b Set_Quantum (Low, High : @b System.Priority; Quantum : @b Ada.Real_Time.Time_Span); @b Actual_Quantum (Pri : System.Priority) @b Ada.Real_Time.Time_Span; @b Is_Round_Robin (Pri : System.Priority) @b Boolean; @b Ada.Dispatching.Round_Robin;> !corrigendum D.2.6(9/2) !AI-0230-1 !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Real_Time; @b Ada.Task_Identification; @b Ada.Dispatching.EDF @b @b Deadline @b Ada.Real_Time.Time; Default_Deadline : @b Deadline := Ada.Real_Time.Time_Last; @b Set_Deadline (D : @b Deadline; T : @b Ada.Task_Identification.Task_Id := Ada.Task_Identification.Current_Task); @b Delay_Until_And_Set_Deadline ( Delay_Until_Time : @b Ada.Real_Time.Time; Deadline_Offset : @b Ada.Real_Time.Time_Span); @b Get_Deadline (T : Ada.Task_Identification.Task_Id := Ada.Task_Identification.Current_Task) @b Deadline; @b Ada.Dispatching.EDF;> @dby @xcode<@b Ada.Real_Time; @b Ada.Task_Identification; @b Ada.Dispatching.EDF @b Nonblocking, Global =@> @b @b @b Deadline @b Ada.Real_Time.Time; @b Relative_Deadline @b Ada.Real_Time.Time_Span; Default_Deadline : @b Deadline := Ada.Real_Time.Time_Last; Default_Relative_Deadline : @b Relative_Deadline := Ada.Real_Time.Time_Span_Last; @b Set_Deadline (D : @b Deadline; T : @b Ada.Task_Identification.Task_Id := Ada.Task_Identification.Current_Task); @b Get_Deadline (T : Ada.Task_Identification.Task_Id := Ada.Task_Identification.Current_Task) @b Deadline; @b Set_Relative_Deadline (D : @b Relative_Deadline; T : @b Ada.Task_Identification.Task_Id := Ada.Task_Identification.Current_Task); @b Get_Relative_Deadline (T : Ada.Task_Identification.Task_Id := Ada.Task_Identification.Current_Task) @b Relative_Deadline; @b Delay_Until_And_Set_Deadline (Delay_Until_Time : @b Ada.Real_Time.Time; Deadline_Offset : @b Ada.Real_Time.Time_Span) @b Nonblocking =@> False; @b Get_Last_Release_Time (T : Ada.Task_Identification.Task_Id := Ada.Task_Identification.Current_Task) @b Ada.Real_Time.Time; @b Ada.Dispatching.EDF;> !corrigendum D.4(7/2) !AI-0163-1 !AI-0183-1 @drepl Two queuing policies, FIFO_Queuing and Priority_Queuing, are language defined. If no Queuing_Policy pragma applies to any of the program units comprising the partition, the queuing policy for that partition is FIFO_Queuing. The rules for this policy are specified in 9.5.3 and 9.7.1. @dby Three queuing policies, FIFO_Queuing, Ordered_FIFO_Queuing, and Priority_Queuing, are language defined. If no Queuing_Policy pragma applies to any of the program units comprising the partition, the queuing policy for that partition is FIFO_Queuing. The rules for the FIFO_Queuing policy are specified in 9.5.3 and 9.7.1. The Ordered_FIFO_Queuing policy is defined as follows: @xbullet @xbullet of a protected object becomes True, and more than one of the respective queues is nonempty, the call that arrived first is selected.> @xbullets is the same and no other @fas are open, the @fa of the @fa that is first in textual order in the @fa is executed.> @xbullet is open and has queued calls, the alternative whose queue has the call that arrived first is selected.> !corrigendum D.4(16) !AI-0164-1 !AI-0388-1 @dinsa The implementation should use names that end with "_Queuing" for implementation-defined queuing policies. @dinss @s8<@i> For a task type (including the anonymous type of a @fa), protected type (including the anonymous type of a @fa), or an @fa, the following language-defined representation aspect may be specified: @xhang<@xterm The type of aspect Max_Entry_Queue_Length is Integer.> @xindent @s8<@i> If the Max_Entry_Queue_Length aspect for a type has a nonnegative value, the Max_Entry_Queue_Length aspect for every individual entry of that type shall not be greater than the value of the aspect for the type. The Max_Entry_Queue_Length aspect of a type is nonoverridable (see 13.1.1). @s8<@i> If a restriction Max_Entry_Queue_Length applies to a partition, any value specified for the Max_Entry_Queue_Length aspect specified for the declaration of a type or entry in the partition shall not be greater than the value of the restriction. @s8<@i> If a nonconfirming value is specified for Max_Entry_Queue_Length for a type, and an entry call or requeue would cause the queue for any entry of the type to become longer than the specified value, then Program_Error is raised at the point of the call or requeue. If a nonconfirming value is specified for Max_Entry_Queue_Length for an entry, and an entry call or requeue would cause the queue for an entry to become longer than the specified value, then Program_Error is raised at the point of the call or requeue. !corrigendum D.5.1(3/2) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b System; @b Ada.Task_Identification; @ft<@i<-- See C.7.1>> @b Ada.Dynamic_Priorities @b @b Preelaborate(Dynamic_Priorities);> @dby @xcode<@b System; @b Ada.Task_Identification; @ft<@i<-- See C.7.1>> @b Ada.Dynamic_Priorities @b Preelaborate, Nonblocking, Global =@> @b @b> !corrigendum D.7(2) !AI-0290-1 !AI-0369-1 @dinsb The following @i@fas are language-defined: @dinss A scalar @fa within a protected unit is said to be @i if it is one of the following: @xbullet @xbullet that statically names (see 4.9) a scalar subcomponent of the immediately enclosing protected unit;> @xbullet whose @fa statically denotes an entry declaration of the immediately enclosing unit;> @xbullet, @b, @b, @b), where each operand is pure-barrier-eligible;> @xbullet@fa is pure-barrier-eligible, and whose @fa meets the requirements for a static membership test (see 4.9);> @xbullet @xbullet all of whose @fas, @i@fas, and @i@fas are pure-barrier-eligible; or> @xbullet enclosed in parentheses.> !corrigendum D.8(3) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Real_Time @b> @dby @xcode<@b Ada.Real_Time @b Nonblocking, Global =@> @b @b> !corrigendum D.10(3/2) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Synchronous_Task_Control @b @b Preelaborate(Synchronous_Task_Control);> @dby @xcode<@b Ada.Synchronous_Task_Control @b Preelaborate, Nonblocking, Global =@> @b @b> !corrigendum D.10(5.2/3) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Real_Time; @b Ada.Synchronous_Task_Control.EDF @b @b Suspend_Until_True_And_Set_Deadline (S : @b Suspension_Object; TS : @b Ada.Real_Time.Time_Span); @b Ada.Synchronous_Task_Control.EDF;> @dby @xcode<@b Ada.Real_Time; @b Ada.Synchronous_Task_Control.EDF @b Nonblocking, Global =@> @b @b @b Suspend_Until_True_And_Set_Deadline (S : @b Suspension_Object; TS : @b Ada.Real_Time.Time_Span) @b Nonblocking =@> False; @b Ada.Synchronous_Task_Control.EDF;> !corrigendum D.10.1(3/3) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Synchronous_Barriers @b @b Preelaborate(Synchronous_Barriers);> @dby @xcode<@b Ada.Synchronous_Barriers @b Preelaborate, Nonblocking, Global =@> @b @b> !corrigendum D.11(3/2) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Task_Identification; @b Ada.Asynchronous_Task_Control @b @b Preelaborate(Asynchronous_Task_Control); @b Hold(T : @b Ada.Task_Identification.Task_Id); @b Continue(T : @b Ada.Task_Identification.Task_Id); @b Is_Held(T : Ada.Task_Identification.Task_Id) @b Boolean; @b Ada.Asynchronous_Task_Control;> @dby @xcode<@b Ada.Task_Identification; @b Ada.Asynchronous_Task_Control @b Preelaborate, Nonblocking, Global =@> @b @b @b Hold(T : @b Ada.Task_Identification.Task_Id); @b Continue(T : @b Ada.Task_Identification.Task_Id); @b Is_Held(T : Ada.Task_Identification.Task_Id) @b Boolean; @b Ada.Asynchronous_Task_Control;> !corrigendum D.14(3/2) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Task_Identification; @b Ada.Real_Time; @b Ada.Real_Time; @b Ada.Execution_Time @b> @dby @xcode<@b Ada.Task_Identification; @b Ada.Real_Time; @b Ada.Real_Time; @b Ada.Execution_Time @b Nonblocking, Global =@> @b @b> !corrigendum D.14.1(3/2) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b System; @b Ada.Execution_Time.Timers @b> @dby @xcode<@b System; @b Ada.Execution_Time.Timers @b Nonblocking, Global =@> @b @b> !corrigendum D.14.2(3/3) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b System; @b System.Multiprocessors; @b Ada.Execution_Time.Group_Budgets @b> @dby @xcode<@b System; @b System.Multiprocessors; @b Ada.Execution_Time.Group_Budgets @b Nonblocking, Global =@> @b @b> !corrigendum D.14.3(3/3) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Interrupts; @b Ada.Execution_Time.Interrupts @b @b Clock (Interrupt : Ada.Interrupts.Interrupt_Id) @b CPU_Time; @b Supported (Interrupt : Ada.Interrupts.Interrupt_Id) @b Boolean; @b Ada.Execution_Time.Interrupts;> @dby @xcode<@b Ada.Interrupts; @b Ada.Execution_Time.Interrupts @b Nonblocking, Global =@> @b @b @b Clock (Interrupt : Ada.Interrupts.Interrupt_Id) @b CPU_Time; @b Supported (Interrupt : Ada.Interrupts.Interrupt_Id) @b Boolean; @b Ada.Execution_Time.Interrupts;> !corrigendum D.15(3/2) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Real_Time.Timing_Events @b> @dby @xcode<@b Ada.Real_Time.Timing_Events @b Nonblocking, Global =@> @b @b> !corrigendum D.16(3/3) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b System.Multiprocessors @b @b Preelaborate(Multiprocessors);> @dby @xcode<@b System.Multiprocessors @b Preelaborate, Nonblocking, Global =@> @b @b> !corrigendum D.16(14/3) !AI-0281-1 !AI-0321-1 @drepl The CPU value determines the processor on which the task will activate and execute; the task is said to be assigned to that processor. If the CPU value is Not_A_Specific_CPU, then the task is not assigned to a processor. A task without a CPU aspect specified will activate and execute on the same processor as its activating task if the activating task is assigned a processor. If the CPU value is not in the range of System.Multiprocessors.CPU_Range or is greater than Number_Of_CPUs the task is defined to have failed, and it becomes a completed task (see 9.2). @dby For a task, the CPU value determines the processor on which the task will activate and execute; the task is said to be assigned to that processor. If the CPU value is Not_A_Specific_CPU, then the task is not assigned to a processor. A task without a CPU aspect specified will activate and execute on the same processor as its activating task if the activating task is assigned a processor. If the CPU value is not in the range of System.Multiprocessors.CPU_Range or is greater than Number_Of_CPUs the task is defined to have failed, and it becomes a completed task (see 9.2). For a protected type, the CPU value determines the processor on which calling tasks will execute; the protected object is said to be assigned to that processor. If the CPU value is Not_A_Specific_CPU, then the protected object is not assigned to a processor. A call to a protected object that is assigned to a processor from a task that is not assigned a processor or is assigned a different processor raises Program_Error. @s8<@i> Starting a protected action on a protected object statically assigned to a processor should be implemented without busy-waiting. !corrigendum D.16.1(3/3) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Real_Time; @b Ada.Task_Identification; @b System.Multiprocessors.Dispatching_Domains @b> @dby @xcode<@b Ada.Real_Time; @b Ada.Task_Identification; @b System.Multiprocessors.Dispatching_Domains @b Nonblocking, Global =@> @b @b> !corrigendum E.5(3) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Streams; -- @ft<@i> @b System.RPC @b> @dby @xcode<@b Ada.Streams; -- @ft<@i> @b System.RPC @b Nonblocking =@> False, Global =@> @b @b> !corrigendum F.3.3(3) !AI-0241-1 !AI-0302-1 @drepl @xcode<@b Ada.Text_IO.Editing @b> @dby @xcode<@b Ada.Text_IO.Editing @b Nonblocking, Global =@> @b @b> !corrigendum H.4(23) !AI-0020-1 !AI-0079-3 !AI-0340-1 !AI-0380-1 @dinsa @xhang<@xtermDuring the execution of a subprogram by a task, no other task invokes the same subprogram.> @dinss @xhang<@xtermNo library-level entity shall have a Global aspect of Unspecified, either explicitly or by default. No library-level entity shall have a Global'Class aspect of Unspecified, explicitly or by default, if it is used as part of a dispatching call.> @xhang<@xtermWhen within a context where an applicable global aspect is neither Unspecified nor @b, any execution within such a context does neither of the following:> @xinbull (after any @b @endash see H.7), or from a global that has mode @b or is not within the applicable global variable set, unless the initial dereference is of a part of a formal parameter or global that is visibly of an access-to-variable type;> @xinbull @xindent @xinbull if the type of the object is declared immediately within the visible part of a package specification, and at the point of declaration of the type the part is visible and of an access type;> @xinbull if it returns a result with a part that is visibly of an access-to-variable type designating @i; similarly, a function @i if it returns a result with a part that is visibly of an access-to-constant type designating @i;> @xinbull @xindent @s8<@i> The following @i@fa is language defined: @xhang<@xterm Specifies the maximum length for the result of an Image, Wide_Image, or Wide_Wide_Image attribute. Violation of this restriction results in the raising of Program_Error at the point of the invocation of an image attribute.> !corrigendum H.4(23.8/2) !AI-0020-1 !AI-0340-1 @dinsa @xbullet 0.> @dinst If a Max_Image_Length restriction applies to any compilation unit in the partition, then for any subtype S, S'Image, S'Wide_Image, and S'Wide_Wide_Image shall be implemented within that partition without any dynamic allocation. !corrigendum H.4.1(0) !AI-0256-1 !AI-0403-1 @dinsc @s8<@i> For a type, the following type-related, operational aspect may be specified: @xhang<@xterm The type of this aspect is Boolean. If True, the type and any descendants shall not have any controlled parts. If specified, the value of the expression shall be static. If not specified, the value of this aspect is False.> The No_Controlled_Parts aspect is nonoverridable (see 13.1.1). @s8<@i> If No_Controlled_Parts is True for a type, no component of the type shall have a controlled part nor shall the type itself be controlled. In addition to the places where Legality Rules normally apply (see 12.3), this rule also applies in the private part of an instance of a generic unit. When enforcing the above rule within a generic body, a generic formal private type and a generic formal derived type of a composite type are considered to have a controlled part. !corrigendum H.5(5/2) !AI-0247-1 !AI-0267-1 @drepl An implementation is required to detect a potentially blocking operation within a protected operation, and to raise Program_Error (see 9.5.1). @dby An implementation is required to detect a potentially blocking operation that occurs during the execution of a protected operation or a parallel construct defined within a compilation unit to which the pragma applies, and to raise Program_Error (see 9.5). !corrigendum H.7(0) !AI-0079-3 !AI-0380-1 @dinsc In addition to the entities specified in 6.1.2, the Global aspect may be specified for a subtype (including a formal subtype), formal package, formal subprogram, and formal object of an anonymous access-to-subprogram type. @s8<@i> The following additional syntax is provided to override the mode of a formal parameter to reflect indirect effects on variables reachable from the formal parameter by one or more access-value dereferences: @xindent<@fa@fa<@ ::=@ >@hr @ @ @ @ @b @fa> @s8<@i> The @i@fa that is associated with an @b mode shall resolve to statically denote a formal object, or a formal parameter of the associated entity. @s8<@i> The presence of the reserved word @b in a global mode indicates that the specification is overriding the mode of a formal parameter with another mode to reflect the overall effect of an invocation of the callable entity on the state associated with the corresponding actual parameter. As described in 6.1.2, the following rules are defined in terms of operations that are performed by or on behalf of an entity. The Global aspect for a subtype identifies the global variables that might be referenced during default initialization, adjustment as part of assignment, finalization of an object of the subtype, or conversion to the subtype, including the evaluation of any assertion expressions that apply. If not specified for the first subtype of a derived type, the aspect defaults to that of the ancestor subtype; if not specified for a nonderived composite first subtype the aspect defaults to that of the enclosing library unit; if not specified for a nonderived elementary first subtype (or scalar base subtype), the aspect defaults to @b in the absence of a predicate, and to that of the enclosing library unit otherwise. If not specified for a nonfirst subtype @i, the Global aspect defaults to that of the subtype identified in the @fa defining @i. The Global'Class aspect may be specified for the first subtype of a tagged type @i, indicating an upper bound on the Global aspect of any descendant of @i. If not specified, it defaults to Unspecified. @s8<@i> For a tagged subtype @i, each mode of its Global aspect shall identify a subset of the variables identified by the corresponding mode, or by the @b mode, of the Global'Class aspect of the first subtype of any ancestor of @i.