comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@linus.mitre.org (Robert I. Eachus)
Subject: Re: Ada portability
Date: 19 Nov 90 23:19:53 GMT	[thread overview]
Message-ID: <EACHUS.90Nov19181953@aries.linus.mitre.org> (raw)
In-Reply-To: MADMATS@ELCGL.EPFL.CH's message of 16 Nov 90 17:09:00 GMT


In article <901116180937.45k@sic.epfl.ch> MADMATS@ELCGL.EPFL.CH ("", Mats Weber) writes:

   We have had major problems in this area which until now have made it 
   impossible to port some quite small applications from VAX Ada to Unix with 
   ANY compiler available on Unix.

   In my opinion, the only two compilers I know that deserve the "validated" 
   label are Rational and Vax Ada.

     Please!!  If everyone is out of step but you, maybe you are the
person who is out of step...

     More seriously, for many years there have been two "mechanisms"
for implementing generics, and DEC has been the only major player
using the generics as macros approach.  I used to joke that (since I
heavily use generics in my programs, and preferred Verdix for
development) I had never written an Ada program that compiled and ran
using the DEC compiler.  This does not mean that my programs or the
DEC compiler were not legal Ada, but that I kept running in to the
Godel Incompleteness problem: (Godel translated: Any compiler for any
useful language must either not accept all legal programs, or must
accept some illegal programs.)

     A similar example is the way variant records are implemented.  To
simplify drastically, Alsys uses hidden pointers for records contaning
unconstrained arrays, while Verdix uses allocates the maximum size.
(Both compilers actually have available tuning parameters, and...)
Well written programs will compile and run on both compilers without a
hitch, but it is possible to construct programs which raise exceptions
on one of the two but not the other when run.  Is one implementation
better than the other?  Not in my opinion.

     With version 2.0,my understanding is that the DEC compiler is
much closer to the generic "mainstream." However, DEC is obviously not
going to intentionaly modify their compiler so that it refuses
programs that it accepted previously, so it will probably be the case
for a long time that programs will be harder to port from DEC to the
rest of the world than vice-versa.

     Just so that you don't get the wrong idea from all of this, I
have, as part of an evaluation of software capabilities, implemented a
system (missing the body a generic package) and gone into a
contractors facility and expected them to compile and execute my code
with a body for the package supplied by them.  In several cases, the
system compiled, linked and executed test cases without one line of
code changed.  Note that I did not know which systems it would be
compiled or run on when I wrote the code, and the (potential)
contractors had not seen my code in advance (or for that matter before
they ran it).

     And yes, when I tested my code, I explicitly tested it on several
systems, and as expected from my personal experience, the only one
which required signifcant modification was DEC Ada 1.5.  I was able to
come up with a DEC Ada and everybody else version.  Note again, I'm am
not saying that their impelmentation was wrong, illegal, or not Ada.
It just required be to rein in my generic nesting style to comply with
the limits of that implementation.

--

					Robert I. Eachus

with STANDARD_DISCLAIMER;
use  STANDARD_DISCLAIMER;
function MESSAGE (TEXT: in CLEVER_IDEAS) return BETTER_IDEAS is...

  reply	other threads:[~1990-11-19 23:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1990-11-16 17:09 Ada portability "", Mats Weber
1990-11-19 23:19 ` Robert I. Eachus [this message]
  -- strict thread matches above, loose matches on Subject: below --
1990-11-15 17:26 Ada Portability Ed Knoll @(719)593-3762
1990-11-14 17:04 Ada portability David Emery
1990-11-14 14:47 ada portability Claus Franzkowiak
1990-11-14 14:27 Claus Franzkowiak
1990-11-14 14:19 Claus Franzkowiak
1990-11-14 14:16 Claus Franzkowiak
1990-11-17  4:09 ` Ted Holden
1990-11-14 14:09 Claus Franzkowiak
1990-11-15 14:10 ` ryer
1989-12-16 20:03 portability problems William Thomas Wolfe, 2847 
1989-12-20  4:17 ` ARTEWG Bruce Jones
1989-12-22 12:29   ` Ada Portability Ed Matthews
replies disabled

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