comp.lang.ada
 help / color / mirror / Atom feed
From: James Alan Farrell <jfarrell@grammatech.com>
Subject: Re: Syntax question:  new with a constrained subtype indication
Date: Tue, 26 Apr 2005 10:17:17 -0400
Date: 2005-04-26T10:17:17-04:00	[thread overview]
Message-ID: <426e4dc2$1_2@newsfeed.slurp.net> (raw)
In-Reply-To: <1274636.7TPvRdpl6B@linux1.krischik.com>

Martin Krischik wrote:
> James Alan Farrell wrote:
> 
> 
>>>>      V := new Vector range 1 .. 10;
>>>
>>>
>>>What I've done quite frequently is
>>>
>>>V := new Vector (1 .. 10);
>>>
>>
>>Yes, but the problem is I need to account for the WHOLE EBNF, not just
>>what I would do.  (ie, I need to account for ANYTHING my customers MIGHT
>>do)
> 
> 
> How is he going to do it when the compiler won't compile it?
> 
> Martin
You mean as a result of syntax errors?  We only need to worry about 
syntactically correct programs, but we still need to worry about any 
syntactically correct program.

So the question was, why was the compiler not compiling it?  Is it some 
caveat in the gnat compiler, and other compilers would handle it?

And the answer to the question (as we've found) is that words in 3.2.2 
show that this sort of constraint is inappropriate for an array.  Ie, it 
is incorrect, not because of something in the EBNF, but because of 
someting outside of the EBNF.

BTW, it SHOULD be that all Ada compilers compile the same stuff in the 
same way.  But compilation is a subtle process.  We always run our 
software through ACATS to ensure we can handle anything the user might 
throw our way.  And yet, in the past we have come up with examples that 
crash the program. Or to put it another way, the example contained 
something ACATS did not.  Therefore there are things certified compilers 
are not tested for.

(sorry don't have an example handy.  Once that problem was corrected we 
moved on and I don't recall what it was)

J.



  reply	other threads:[~2005-04-26 14:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-25 15:44 Syntax question: new with a constrained subtype indication James Alan Farrell
2005-04-25 16:07 ` Alex R. Mosteo
2005-04-25 16:34   ` James Alan Farrell
2005-04-25 18:52     ` Martin Krischik
2005-04-26 14:17       ` James Alan Farrell [this message]
2005-04-25 16:18 ` Adrien Plisson
2005-04-25 16:37   ` James Alan Farrell
2005-04-25 17:16     ` Adrien Plisson
2005-04-25 16:34 ` Martin Krischik
2005-04-25 19:03   ` James Alan Farrell
2005-04-25 17:02 ` Martin Dowie
2005-04-25 17:22   ` Adrien Plisson
2005-04-25 23:28     ` Randy Brukardt
replies disabled

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