comp.lang.ada
 help / color / mirror / Atom feed
From: "Dan'l Miller" <optikos@verizon.net>
Subject: Re: Teaching C/C++ from Ada perspective?
Date: Wed, 4 Jul 2018 10:21:29 -0700 (PDT)
Date: 2018-07-04T10:21:29-07:00	[thread overview]
Message-ID: <b45e4002-622a-4c23-81de-05eb7e98a818@googlegroups.com> (raw)
In-Reply-To: <590d4672-4aef-42a5-823c-57ccd291115a@googlegroups.com>

On Wednesday, July 4, 2018 at 9:56:46 AM UTC-5, Maciej Sobczak wrote:
> > > Yet, the trivial update of P (like adding whitespace, which again has
> > > no semantic meaning whatsoever) forces the recompilation of Test (with
> > > GNAT). Actually, it forces the recompilation of everything. Why?
> > 
> > gprbuild:
> >   -m       Minimum Ada recompilation
> > 
> > Only rebuild if there's a semantic difference
> 
> Great! Let's try it out.
> I have added a dummy declaration to P, like here:
> 
> -- p.ads:
> package P is
>    pragma Pure (P);
>    type TI is new Integer;  -- new dummy definition
> end P;
> 
> and... the whole project was recompiled from scratch.
> 
> No other part of the project relies on this new type and in particular, the author of Test still could not care less about package P and whatever it contains.
> Yet, the author of Test had to wait for the whole project to recompile, because something irrelevant was added to some irrelevant package that he might not even know that exists in the project.
> 
> I presume that the -m switch was supposed to handle a trivial (and perhaps frequent) case of editing comments and whitespace. There is some added value in this, but it is easy to replicate for C++ and sorry, but I don't call it "semantic" if it cannot figure out even the most basic cases like the one above.
> 
> My claim that Ada and C++ compilers have the same challenges when it comes to handling the physical project structure holds.

Maciej, btw, which precise version of GNAT are you utilizing?

GNAT in 2018 (or whichever recent year is your release) is defective compared to the Rational R1000 in the late 1980s.  

http://www.dtic.mil/dtic/tr/fulltext/u2/a198934.pdf

§2.1.2.1. Basis for Effective Smart Processing, page 12:
“The Rational Environment is able to provide smart processing because it maintains Ada programs as logical units, storing them in the Diana representation. This permits the Rational Environment to track user modifications to the program at the granularity of program units and •smaller units• (i.e., •••individual declarations and statements•••). The Diana representation not only reflects the abstract syntax of Ada programs (from which textual representations can be regenerated), but also contains semantic information. Semantic information includes type information and depend- ency information. Dependency information not only reflects export/import dependencies due to Ada with clauses, but actual usage sites (e.g., all procedure call sites). These actual usage sites are maintained within program units as well as across program units at the level of individual declarations.

Ҧ On one hand, the Rational Environment makes this semantic information available to the user through queries. On the other hand, the Rational Environment takes advantage of this infor- mation to perform "smart reprocessing," i.e., keeping the reprocessing due to a change at a minimum. It maintains semantic information in the Diana representation consistently by demoting dependent program units when a declaring unit is demoted to allow modification. Note that demotion to source state results in removing the demoted unit from semantic information in the Diana representation, i.e., units in source state will not be found when queries are run on seman- tic information such as finding usage sites.

Ҧ Conventional Ada environments require reprocessing of dependent program units any time any
change is made to a program unit specification. The Rational Environment takes advantage of
the Diana structure to permit certain modifications without invalidating dependent program units.
These include modification of comments, ••addition of declaration to package specifications••, etc.
(see Section 2.1.1.2). As a result, fewer recompilations are required than in conventional Ada environments.”

I see your sloppy GNAT and raise you one well-disciplined(-by-William-Wulf) Rational R1000.  Maciej, please provide any C++ compilation system from any point in human history which a normative reference claims to have this rebuild-avoidance feature at the level of “individual declarations and statements”.


  parent reply	other threads:[~2018-07-04 17:21 UTC|newest]

Thread overview: 117+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-30 18:04 Teaching C/C++ from Ada perspective? kouaoua16
2018-06-30 18:15 ` Luke A. Guest
2018-06-30 19:27   ` Dan'l Miller
2018-06-30 19:07 ` Dan'l Miller
2018-07-01 16:12 ` kouaoua16
2018-07-01 17:08   ` Luke A. Guest
2018-07-01 19:19     ` Dan'l Miller
2018-07-02  6:12       ` Maciej Sobczak
2018-07-01 20:52 ` Maciej Sobczak
2018-07-01 21:35   ` Dan'l Miller
2018-07-02  5:56     ` Maciej Sobczak
2018-07-02  9:58       ` Marius Amado-Alves
2018-07-02 11:03         ` Maciej Sobczak
2018-07-02 13:52           ` Marius Amado-Alves
2018-07-04 12:10             ` Dan'l Miller
2018-07-02 20:14         ` Paul Rubin
2018-07-03  9:48           ` Marius Amado-Alves
2018-07-04  2:52             ` Paul Rubin
2018-07-02 18:52       ` Dan'l Miller
2018-07-03  8:00         ` Maciej Sobczak
2018-07-03 12:40           ` Dan'l Miller
2018-07-03 20:54             ` Maciej Sobczak
2018-07-04  3:10               ` Dan'l Miller
2018-07-04  7:59                 ` Maciej Sobczak
2018-07-04  8:37                   ` Marius Amado-Alves
2018-07-04 12:22                     ` Maciej Sobczak
2018-07-04 14:13                       ` Simon Wright
2018-07-04 14:56                         ` Maciej Sobczak
2018-07-04 15:52                           ` Dmitry A. Kazakov
2018-07-04 16:24                             ` Alejandro R. Mosteo
2018-07-04 20:00                               ` Jeffrey R. Carter
2018-07-05 18:35                                 ` Randy Brukardt
2018-07-05 19:39                                   ` Jeffrey R. Carter
2018-07-06 18:45                                     ` Randy Brukardt
2018-07-04 20:13                             ` Maciej Sobczak
2018-07-04 21:09                               ` Dmitry A. Kazakov
2018-07-05  5:49                                 ` Maciej Sobczak
2018-07-05  7:37                                   ` Dmitry A. Kazakov
2018-07-05 13:14                                     ` Maciej Sobczak
2018-07-05 15:18                                       ` Dmitry A. Kazakov
2018-07-05 19:16                                       ` Randy Brukardt
2018-07-07 15:09                                         ` Lucretia
2018-07-05 19:12                                     ` Randy Brukardt
2018-07-05 20:10                                       ` Maciej Sobczak
2018-07-06 19:01                                         ` Randy Brukardt
2018-07-06 19:35                                           ` Dmitry A. Kazakov
2018-07-05  7:43                                   ` Alejandro R. Mosteo
2018-07-05 18:53                                   ` Randy Brukardt
2018-07-05 19:06                                     ` Dan'l Miller
2018-07-06 18:47                                       ` Randy Brukardt
2018-07-05 20:12                                     ` Maciej Sobczak
2018-07-06 18:51                                       ` Randy Brukardt
2018-07-06 19:43                                         ` Dmitry A. Kazakov
2018-07-06 20:18                                           ` Dan'l Miller
2018-07-07  8:39                                             ` Dmitry A. Kazakov
2018-07-07 11:53                                           ` Björn Lundin
2018-07-06 20:22                                         ` Maciej Sobczak
2018-07-06 23:26                                           ` Paul Rubin
2018-07-07  6:17                                             ` J-P. Rosen
2018-07-07  6:37                                               ` Micronian Coder
2018-07-07  8:48                                                 ` Privacy and child packages (Was: Teaching C/C++ from Ada perspective?) Jacob Sparre Andersen
2018-07-07 20:19                                               ` Teaching C/C++ from Ada perspective? Maciej Sobczak
2018-07-08 15:25                                           ` Simon Wright
2018-07-08 20:00                                             ` Maciej Sobczak
2018-07-09  9:04                                               ` Alejandro R. Mosteo
2018-07-05 15:30                               ` Dan'l Miller
2018-07-05 20:38                                 ` Maciej Sobczak
2018-07-05 21:05                                   ` Dan'l Miller
2018-07-05 18:47                               ` Randy Brukardt
2018-07-04 16:01                           ` Simon Wright
2018-07-04 17:12                           ` G. B.
2018-07-04 20:18                             ` Maciej Sobczak
2018-07-04 21:03                               ` G.B.
2018-07-04 17:21                           ` Dan'l Miller [this message]
2018-07-04 20:36                             ` Maciej Sobczak
2018-07-04 22:44                               ` Dan'l Miller
2018-07-05  2:01                                 ` Luke A. Guest
2018-07-05  5:03                                   ` Dan'l Miller
2018-07-05  5:58                                 ` Maciej Sobczak
2018-07-05 19:25                                   ` Randy Brukardt
2018-07-05 19:22                                 ` Randy Brukardt
2018-07-05 18:31                       ` Randy Brukardt
2018-07-06  3:32           ` Dan'l Miller
2018-07-06 12:05             ` Dan'l Miller
2018-07-06 20:42             ` Maciej Sobczak
2018-07-06 21:32               ` Dan'l Miller
2018-07-07 20:43                 ` Maciej Sobczak
2018-07-08 17:36                   ` Dan'l Miller
2018-07-08 18:39                     ` Bill Findlay
2018-07-08 19:28                       ` Dan'l Miller
2018-07-09 12:34                         ` Bill Findlay
2018-07-09 15:19                           ` Dan'l Miller
2018-07-09 19:34                             ` Bill Findlay
2018-07-09 22:03                               ` Dan'l Miller
2018-07-09 22:35                                 ` Bill Findlay
2018-07-10  1:56                                   ` Lucretia
2018-07-10 23:14                         ` Randy Brukardt
2018-07-11 14:05                           ` Dan'l Miller
2018-07-11 20:20                             ` Randy Brukardt
2018-07-08 20:43                     ` Maciej Sobczak
2018-07-08 23:17                       ` Dan'l Miller
2018-07-09  6:13                         ` Maciej Sobczak
2018-07-09 16:35                           ` Dan'l Miller
2018-07-10 23:20                       ` Randy Brukardt
2018-07-10 23:51                         ` Britt
2018-07-02 17:10   ` kouaoua16
2018-07-02 17:28     ` Dennis Lee Bieber
2018-07-02 18:22     ` Maciej Sobczak
2018-07-02 20:27     ` G.B.
2018-07-02  0:11 ` Paul Rubin
2018-07-02 14:26 ` kouaoua16
2018-07-02 19:57 ` G.B.
2018-07-02 20:17   ` Dan'l Miller
2018-07-03  9:56 ` Brian Drummond
2018-07-04 12:18 ` Olivier Henley
2018-07-04 14:17   ` kouaoua16
2018-07-12  5:38 ` robin.vowels
replies disabled

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