comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: How to challenge a GCC patch?
Date: Sat, 2 Oct 2021 04:34:30 -0500	[thread overview]
Message-ID: <sj9937$ten$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: sj6k41$7i4$1@dont-email.me

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4030 bytes --]

"J-P. Rosen" <rosen@adalog.fr> wrote in message 
news:sj6k41$7i4$1@dont-email.me...
> Le 01/10/2021 à 02:18, Randy Brukardt a écrit :
>> "J-P. Rosen" <rosen@adalog.fr> wrote in message
>> The ASIS design and definition is a mess (at least from the perspective 
>> of
>> explaining what is expected). We tried to clean it up in the previous 
>> ASIS
>> standardization update, but that was a lot of work and we probably didn't
>> match implementations very well.
> That was mainly an attempt to introduce more static and tagged typing, and 
> it failed due to the complexity involved (and that AdaCore said they would 
> never implement it). LibAdalang made the same error, and got the same 
> unnecessary complexity.

No, the existing part also had major problems. Many of the terms were never 
defined, many possible effects were missing from the various lists of 
results, and loads of other things as well. That all would have had to be 
fixed even if the semantic interface was completely forgotten (indeed, it 
was kept pretty separate for that reason).

>> The entire model of ASIS doesn't make much sense for static analysis
>> purposes, it's way too focused on syntax rather than semantics.
> It is a exact image of the program, from which you can derive all 
> information you need. Some higher level queries are needed, but they can 
> be provided as secondary queries or added to the standard.

That's exactly the problem. You start with the source code, which is way too 
low a level for any useful analysis. At most, you want a simple connection 
to the source in the semantic information, not trying to preserve every 
punctuation mark and comment. (Janus/Ada discards all of that stuff as soon 
as parsing succeeds.) If you need to refer to the original source, say for 
error handling purposes, then do that, but don't waste vast amounts of space 
and time trying to keep loads of irrelevant material.

>> And it
>> doesn't work well for syntax analysis because it requires a compilable
>> program. So it really has a very narrow use case (if any).
> On the contrary. There is no semantic you can analyze in a non-compilable 
> program. And since it analyzes the output of a validated compiler, you can 
> trust it better than any custom analyzer without known pedigree.

No sane compiler (validated or not) keeps all of the irrelevant syntactic 
detail required by ASIS. It ends up getting reconstructed solely for the use 
of ASIS, and how a rarely used interface is somehow more reliable escapes 
me.

A true semantic interface on the lines of the one proposed for ASIS would 
make good sense (design of types), but the vast majority of the existing 
ASIS belongs in a rubbish bin. Good riddance.

 ...
> But you didn't use it. True, a first approach or a casual reading of the 
> interface is not very friendly. But the more you use it, the more you 
> realize that it is very consistently defined, and allows you to do 
> whatever you need.

I don't use it because implementing it would require adding loads of useless 
cruft to our Ada compiler. And even then, it doesn't make much sense based 
on our compilation model and our generic unit model. Supporting it would be 
like building a whole new Ada compiler. Ergo, it is a lie, it claims to be 
an "interface to a compiler", but it requires many things that most 
compilers would not waste time on. (I think it is a fairly close 
representation of the internals of early Rational compilers, which is 
probably why they were so slow and memory hogs. ;-) So what is it really? 
Just a very complex way to do stuff that you can easily do with a parser. No 
worth anyone's time, IMHO.

I've assumed most people used it because it was there and because some 
people had spent a lot of time trying to define it as some sort of Standard. 
Just because people put a lot of work into something doesn't mean that it is 
a useful thing.

                                             Randy.


  reply	other threads:[~2021-10-02  9:34 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27 10:06 How to challenge a GCC patch? J-P. Rosen
2021-09-27 11:23 ` Stéphane Rivière
2021-09-27 14:18   ` J-P. Rosen
2021-09-28  7:38   ` Arnaud Charlet
2021-09-29 16:26     ` Stéphane Rivière
2021-09-29 19:04       ` Emmanuel Briot
2021-09-29 23:29         ` Luke A. Guest
2021-09-30  6:23           ` J-P. Rosen
2021-09-30  7:53             ` Luke A. Guest
2021-09-30  8:13               ` J-P. Rosen
2021-09-30  8:26                 ` Luke A. Guest
2021-09-30 10:54                   ` J-P. Rosen
2021-09-30 12:27                     ` Luke A. Guest
2021-09-30 15:25                       ` J-P. Rosen
2021-10-01  0:37                       ` Randy Brukardt
2021-10-01  0:33                     ` Randy Brukardt
2021-10-01  0:30                 ` Randy Brukardt
2021-10-01  9:41                   ` J-P. Rosen
2021-10-02  9:14                     ` Randy Brukardt
2021-10-04 12:30                       ` J-P. Rosen
2021-10-14  1:48                         ` Randy Brukardt
2021-10-14  6:09                           ` J-P. Rosen
2021-09-30  7:53             ` Luke A. Guest
2021-09-30  8:16               ` J-P. Rosen
2021-09-30  8:28                 ` Luke A. Guest
2021-09-30 10:56                   ` J-P. Rosen
2021-09-30 12:27                     ` Luke A. Guest
2021-09-30 15:28                       ` J-P. Rosen
2021-09-30  6:19         ` J-P. Rosen
2021-10-01  0:18           ` Randy Brukardt
2021-10-01  9:24             ` J-P. Rosen
2021-10-02  9:34               ` Randy Brukardt [this message]
2021-10-04 12:26                 ` J-P. Rosen
2021-10-14  1:40                   ` Randy Brukardt
2021-10-14  6:04                     ` J-P. Rosen
2021-09-30  5:57     ` J-P. Rosen
2021-09-30  7:29       ` Arnaud Charlet
2021-09-30  7:52         ` J-P. Rosen
2021-09-30  8:21           ` Arnaud Charlet
2021-10-01  9:56             ` J-P. Rosen
2021-10-01 12:29             ` J-P. Rosen
2021-09-30  8:28           ` Fabien Chouteau
2021-09-27 12:48 ` Simon Wright
2021-09-27 14:20   ` J-P. Rosen
2021-09-28  6:55     ` Emmanuel Briot
2021-09-30  6:44       ` J-P. Rosen
2021-09-29  8:58     ` nobody in particular
2021-09-29  9:34       ` Emmanuel Briot
2021-09-29 10:03       ` Simon Wright
2021-09-29 11:03         ` Luke A. Guest
2021-09-29 11:07           ` Simon Wright
2021-09-29 18:58     ` Andreas ZEURCHER
replies disabled

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