comp.lang.ada
 help / color / mirror / Atom feed
* Shouldn't there be a paragraph like 7.3.2(5/3) in 3.2.4?
@ 2014-05-12 12:54 Jacob Sparre Andersen
  2014-05-12 16:09 ` Adam Beneschan
  0 siblings, 1 reply; 4+ messages in thread
From: Jacob Sparre Andersen @ 2014-05-12 12:54 UTC (permalink / raw)
  To: ada-comment

Reading the fine print on subtype predicates and type invariants, I
noticed that section 3.2.4 (on subtype predicates) doesn't have a
paragraph matching 7.3.2(5/3) (on type invariants).

7.3.2(5/3): Within an invariant expression, the identifier of the first
            subtype of the associated type denotes the current instance
            of the type. Within an invariant expression associated with
            type T, the type of the current instance is T for the
            Type_Invariant aspect and T'Class for the
            Type_Invariant'Class aspect.

Greetings,

Jacob
-- 
"Reality is that which, when you stop believing in it, 
 doesn't go away."

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Shouldn't there be a paragraph like 7.3.2(5/3) in 3.2.4?
  2014-05-12 12:54 Shouldn't there be a paragraph like 7.3.2(5/3) in 3.2.4? Jacob Sparre Andersen
@ 2014-05-12 16:09 ` Adam Beneschan
  2014-05-12 22:26   ` Randy Brukardt
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Beneschan @ 2014-05-12 16:09 UTC (permalink / raw)


On Monday, May 12, 2014 5:54:52 AM UTC-7, Jacob Sparre Andersen wrote:
> Reading the fine print on subtype predicates and type invariants, I
> noticed that section 3.2.4 (on subtype predicates) doesn't have a
> paragraph matching 7.3.2(5/3) (on type invariants).
> 
> 7.3.2(5/3): Within an invariant expression, the identifier of the first
>             subtype of the associated type denotes the current instance
>             of the type. Within an invariant expression associated with
>             type T, the type of the current instance is T for the
>             Type_Invariant aspect and T'Class for the
>             Type_Invariant'Class aspect.

FYI, the first sentence is true for both subtype predicates and type invariants.  It's actually redundant in 7.3.2(5/3), and the AARM shows it as such (http://www.ada-auth.org/standards/12aarm/html/AA-7-3-2.html); 13.1.1(12/3) applies to all aspect clauses on type and subtype declarations.  I'd guess that the authors felt that in 7.3.2(5/3), they needed to repeat the rule in the first sentence in order to provide some context to help readers understand the second sentence.

                                  -- Adam

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Shouldn't there be a paragraph like 7.3.2(5/3) in 3.2.4?
  2014-05-12 16:09 ` Adam Beneschan
@ 2014-05-12 22:26   ` Randy Brukardt
  2014-05-13  8:53     ` Jacob Sparre Andersen
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Brukardt @ 2014-05-12 22:26 UTC (permalink / raw)


"Adam Beneschan" <adambeneschan@gmail.com> wrote in message 
news:dd27f835-8295-4cb2-aa28-2ff3f351b0e0@googlegroups.com...
>On Monday, May 12, 2014 5:54:52 AM UTC-7, Jacob Sparre Andersen wrote:
>> Reading the fine print on subtype predicates and type invariants, I
>> noticed that section 3.2.4 (on subtype predicates) doesn't have a
>> paragraph matching 7.3.2(5/3) (on type invariants).
>>
>> 7.3.2(5/3): Within an invariant expression, the identifier of the first
>>             subtype of the associated type denotes the current instance
>>             of the type. Within an invariant expression associated with
>>             type T, the type of the current instance is T for the
>>             Type_Invariant aspect and T'Class for the
>>             Type_Invariant'Class aspect.
>
>FYI, the first sentence is true for both subtype predicates and type 
>invariants.  It's actually redundant in 7.3.2(5/3), >and the AARM shows it 
>as such (http://www.ada-auth.org/standards/12aarm/html/AA-7-3-2.html); 
>13.1.1(12/3) >applies to all aspect clauses on type and subtype 
>declarations.  I'd guess that the authors felt that in 7.3.2(5/3), they 
> >needed to repeat the rule in the first sentence in order to provide some 
>context to help readers understand the >second sentence.

Right; this is the consequence of other rules and does not need to be 
mentioned in 3.2.4 (or 7.3.2, for that matter). There was an issue that the 
properties of the current instance of a subtype aren't well-defined; that's 
the issue of AI12-0068-1. We expect this will end up as conservative as 
possible (the current instance is a value, not an object), but it hasn't be 
resolved yet. (It's on Tucker's homework list, but he didn't get to it 
before the last meeting.)

                                        Randy.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Shouldn't there be a paragraph like 7.3.2(5/3) in 3.2.4?
  2014-05-12 22:26   ` Randy Brukardt
@ 2014-05-13  8:53     ` Jacob Sparre Andersen
  0 siblings, 0 replies; 4+ messages in thread
From: Jacob Sparre Andersen @ 2014-05-13  8:53 UTC (permalink / raw)


Randy Brukardt wrote:
> Adam Beneschan wrote:

>> FYI, the first sentence is true for both subtype predicates and type
>> invariants.  It's actually redundant in 7.3.2(5/3), and the AARM
>> shows it as such
>> (http://www.ada-auth.org/standards/12aarm/html/AA-7-3-2.html);
>> 13.1.1(12/3) applies to all aspect clauses on type and subtype
>> declarations.  I'd guess that the authors felt that in 7.3.2(5/3),
>> they needed to repeat the rule in the first sentence in order to
>> provide some context to help readers understand the >second sentence.
>
> Right; this is the consequence of other rules and does not need to be 
> mentioned in 3.2.4 (or 7.3.2, for that matter).

Thanks for clarifying this.

Greetings,

Jacob
-- 
<URL: small-talk://work/hallway-meeting/...>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-05-13  8:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-12 12:54 Shouldn't there be a paragraph like 7.3.2(5/3) in 3.2.4? Jacob Sparre Andersen
2014-05-12 16:09 ` Adam Beneschan
2014-05-12 22:26   ` Randy Brukardt
2014-05-13  8:53     ` Jacob Sparre Andersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox