comp.lang.ada
 help / color / mirror / Atom feed
From: anon@anon.org (anon)
Subject: Re: Compiler quality (was: Extending discriminant types)
Date: Wed, 26 Nov 2008 23:34:16 GMT
Date: 2008-11-26T23:34:16+00:00	[thread overview]
Message-ID: <Y1lXk.44171$_Y1.18421@bgtnsc05-news.ops.worldnet.att.net> (raw)
In-Reply-To: 9cb27caa-8e9f-4123-ad36-4980c3032722@20g2000yqt.googlegroups.com

Your not understanding the concept finite for programs. And this explanation 
does not the finite concept of hardware.

The Ada RM states in 2.2 (15) that the implementation must support at least 
200 character in a line length and lexical elements. But the RM allows the 
implementation to set the default maximum size.

So, by definition a identifier (a lexical elements) is define as:

RM 2.3 (2)   identifier ::=   identifier_letter {[underline] letter_or_digit}
RM 2.3 (3)   letter_or_digit ::= identifier_letter | digit


RM 2.1 (7)   identifier_letter
                upper_case_identifier_letter | lower_case_identifier_letter

RM 2.1 (8)   upper_case_identifier_letter
                Any character of Row 00 of ISO 10646 BMP whose name begins
                ``Latin Capital Letter''.

RM 2.1 (9)   lower_case_identifier_letter
                Any character of Row 00 of ISO 10646 BMP whose name begins
                ``Latin Small Letter''.

RM 2.1 (10)  digit =>   One of the characters 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9.



So, identifier has only a finite number of characters that may be use, with the 
length set by the vendor there exist only a finite number of identifiers that the 
vendor's compiler can use. That number may be large by the RM definition but 
it is still finite value.

Which means there is NO infinite number of identifier, so your are in error 
about infinite.

So anyone can create a program that can create a single to multi set of 
programs to test every identifier that a vendors's compiler can use.

And every statement type is defined in the RM and because the vendor also set 
limits, there exist only a finite number of statements.

Also, for testing identifier in GNAT you can use the "-gnatMxx" where xx is a 
smaller number such as 10 to 15 another finite number. That way, the number 
of identifier is more manageable.


The problem is, do you need to generate every statement to prove there is no 
syntax BUGs in a computer. 
The answer is no! 

An example is like using the following statement

                   X := Sin ( A ) + Cos ( W ) ;

do use need to also create the statement

                   X := Cos ( W ) + Sin ( A ) ;

to prove that a simple mathematical statement is BUG free.  The answer is no! 
So a vendor may use one not both to perform the test, to say the statement 
checking is BUG free.  

And using every statement that can be created is just overkill, but it can be 
done. There are places in a compiler that are tested to the point of being 
BUG free and that number of testing is finite. 


In <9cb27caa-8e9f-4123-ad36-4980c3032722@20g2000yqt.googlegroups.com>, Ludovic Brenta <ludovic@ludovic-brenta.org> writes:
>On Nov 25, 12:33 am, a...@anon.org (anon) wrote:
>> You also forget that Adacore has 100s may be even 1,000,000s of simple
>> files they use for syntax checking for each Ada specifications.  That can
>> trap all syntax type of errors. And that group of files grows yearly, if not
>> daily.
>
>Apparently you also forgot to read what I wrote earlier:
>
>> Even an infinite amount of testing cannot prove a program to be bug-
>> free; it can only uncover an infinite amount of bugs. If you want to
>> prove a program correct, you must use formal methods, not testing.
>
>The rest of your rantings are only a consequence of this basic
>misunderstanding of yours.
>
>--
>Ludovic Brenta.




  reply	other threads:[~2008-11-26 23:34 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-15  9:16 Extending discriminant types Stefan Bellon
2008-11-15 18:50 ` Jeffrey R. Carter
2008-11-17 16:30 ` Adam Beneschan
2008-11-18 11:02   ` christoph.grein
2008-11-18 23:24     ` Adam Beneschan
2008-11-19  9:49 ` anon
2008-11-19 10:15   ` christoph.grein
2008-11-19 19:19     ` Georg Bauhaus
2008-11-19 11:38   ` Martin
2008-11-20  7:21   ` anon
2008-11-20  8:30     ` christoph.grein
2008-11-20  8:36       ` Ludovic Brenta
2008-11-20 11:45         ` Georg Bauhaus
2008-11-20 11:46           ` Georg Bauhaus
2008-11-20 23:01             ` anon
2008-11-21 11:54               ` Ludovic Brenta
2008-11-20 14:03           ` Dmitry A. Kazakov
2008-11-20 15:03           ` Robert A Duff
2008-11-20 15:57             ` Stefan Bellon
2008-11-21  0:32               ` Adam Beneschan
2008-11-20 16:11           ` Adam Beneschan
2008-11-20 22:59       ` anon
2008-11-21  0:29         ` Adam Beneschan
2008-11-21  7:25           ` anon
2008-11-21  9:19             ` Jean-Pierre Rosen
2008-11-21 10:11             ` christoph.grein
2008-11-21 12:00             ` Ludovic Brenta
2008-11-21 22:31               ` anon
2008-11-22  0:18                 ` Stefan Bellon
2008-11-23  4:06                   ` anon
2008-11-23  5:39                     ` Georg Bauhaus
2008-11-23  8:00                       ` anon
2008-11-24 10:08                         ` Georg Bauhaus
2008-11-24 22:16                           ` anon
2008-11-25 10:37                             ` Martin
2008-11-25 11:24                               ` Georg Bauhaus
2008-11-25 20:49                                 ` Jeffrey R. Carter
2008-11-25 21:01                                   ` Adam Beneschan
2008-11-25 22:09                                     ` Georg Bauhaus
2008-11-25 22:33                                       ` Jeffrey R. Carter
2008-11-26  0:58                                         ` Adam Beneschan
2008-11-26  1:45                                           ` Jeffrey R. Carter
2008-11-26  9:31                                             ` Martin
2008-11-26  9:38                                               ` Stefan Bellon
2008-11-26  9:48                                                 ` Martin
2008-11-26 10:16                                                   ` Stefan Bellon
2008-11-26 11:05                                                     ` Ludovic Brenta
2008-11-26 11:33                                                       ` Stefan Bellon
2008-11-26 15:49                                                       ` Adam Beneschan
2008-11-26 16:15                                                         ` Ludovic Brenta
2008-11-26 11:10                                                 ` Niklas Holsti
2008-11-23  8:48                     ` Compiler quality (was: Extending discriminant types) Ludovic Brenta
2008-11-24 23:33                       ` anon
2008-11-25  6:54                         ` christoph.grein
2008-11-25 10:01                         ` Ludovic Brenta
2008-11-26 23:34                           ` anon [this message]
2008-11-27 10:24                             ` Compiler quality Georg Bauhaus
2008-11-27 14:46                               ` Ludovic Brenta
2008-11-28  9:13                                 ` Martin
2008-11-28 10:28                                   ` Georg Bauhaus
2008-12-02  3:51                                     ` Randy Brukardt
2008-11-22 13:10                 ` Extending discriminant types Gautier
2008-11-24  8:24                 ` christoph.grein
2008-11-21  6:11         ` christoph.grein
2008-11-21 21:12           ` Jeffrey R. Carter
2008-11-22 16:41             ` sjw
2008-11-21 11:44         ` Martin
2008-11-20  9:55     ` Martin
replies disabled

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