comp.lang.ada
 help / color / mirror / Atom feed
From: jrcarter001@my-dejanews.com
Subject: Re: Does this model work ?
Date: 1999/05/17
Date: 1999-05-17T00:00:00+00:00	[thread overview]
Message-ID: <7hpbco$hsi$1@nnrp1.deja.com> (raw)
In-Reply-To: 7hmda1$khp$1@nnrp1.deja.com

In article <7hmda1$khp$1@nnrp1.deja.com>,
  Robert Dewar <robert_dewar@my-dejanews.com> wrote:
> However, Ada is no panacea. Over and over again, we run into
> cases where incompetence or deliberate (in-retrospect-poort)
> decisions have lead to highly non-portable code, and this can
> often be eacerbated by management or incompetent Ada vendor
> sales people who have sold the idea that Ada guarantees
> 100% portability. That's wrong, it does not.
>

I'd like to make a plug for Ada over Ada 83 for portability. Ada 83
could be used to produce highly portable programs, but in some arenas
led to lack of portability. As an example, I recently got to port some
Ada-83 real-time code from a little-endian processor to a big-endian
processor. In the process, I could convert it from Ada 83 to Ada.

The code has timing requirements, and the Ada-83 compiler had problems
with low-level bit manipulation. Converting to Boolean arrays was too
slow, so C functions were used for bit manipulation. Much of this C code
was endian dependent.

This was a portability problem that could have been avoided.

More significantly, the Ada tasking implementation did not allow them to
use tasks and meet their timing requirements, leading to OS calls for
task-related operations. This was not a portability problem, since both
versions would use the same RTOS, but could become one.

Ada now has low-level bit-manipulation capabilities through modular
types and package Interfaces, and protected objects have eliminated much
of the overhead that made Ada tasking too slow in Ada 83. I was able to
create a completely portable version of the code that ran on
little-endian and big-endian machines with different OSes, met the
timing requirements, and gave identical results.

Timing seems to be becoming a moot point. This code has since been used
successfully on a 133 Mhz Pentium laptop running Windows 95 with a
custom PCMCIA card. This duplicates the functionality of the custom
hardware that the code originally ran on, except the custom hardware
could provide 4 communications channels, and the PCMCIA card only
provides 2. This laptop/PCMCIA combination promises to be a popular
product for our company.


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---




  parent reply	other threads:[~1999-05-17  0:00 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-14  0:00 Does this model work ? Jean-Marten Marchi
1999-05-14  0:00 ` Al Christians
1999-05-14  0:00   ` Jean-Marten Marchi
1999-05-16  0:00     ` Robert Dewar
1999-05-16  0:00       ` Jean-Marten Marchi
1999-05-17  0:00       ` Roger Racine
1999-05-14  0:00   ` Jean-Marten Marchi
1999-05-15  0:00     ` Florian Weimer
1999-05-15  0:00       ` bglbv
1999-05-16  0:00         ` Tom Moran
1999-05-16  0:00       ` David Botton
1999-05-16  0:00         ` Robert Dewar
1999-05-16  0:00       ` Robert Dewar
1999-05-14  0:00 ` dennison
     [not found]   ` <01be9ee1$eca9be10$022a6282@dieppe>
1999-05-15  0:00     ` Al Christians
1999-05-16  0:00       ` Robert Dewar
1999-05-16  0:00       ` Larry Kilgallen
1999-05-17  0:00       ` Pascal Obry
1999-05-17  0:00         ` Marin David Condic
1999-05-20  0:00           ` Robert Dewar
1999-05-20  0:00             ` Marin David Condic
1999-05-16  0:00     ` Jean-Marten Marchi
1999-05-16  0:00   ` Robert Dewar
1999-05-16  0:00     ` Andi Kleen
1999-05-17  0:00       ` Robert Dewar
1999-05-17  0:00     ` jrcarter001 [this message]
1999-05-17  0:00       ` Robert Dewar
1999-05-18  0:00     ` dennison
1999-05-19  0:00       ` Robert Dewar
1999-05-19  0:00         ` dennison
1999-05-16  0:00 ` Robert Dewar
1999-05-16  0:00   ` Jean-Marten Marchi
1999-05-17  0:00     ` Robert Dewar
1999-05-17  0:00       ` Jean-Marten Marchi
1999-05-18  0:00         ` Samuel T. Harris
1999-05-20  0:00           ` Jean-Marten Marchi
1999-05-20  0:00             ` Samuel Mize
1999-05-20  0:00               ` David Botton
1999-05-20  0:00                 ` Samuel Mize
1999-05-20  0:00             ` Samuel T. Harris
1999-05-17  0:00       ` Jean-Marten Marchi
1999-05-18  0:00     ` dennison
replies disabled

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