comp.lang.ada
 help / color / mirror / Atom feed
From: Jean-Pierre Rosen <rosen@adalog.fr>
Subject: Re: Ada Plattform Independence
Date: Wed, 11 Mar 2009 16:37:44 +0100
Date: 2009-03-11T16:37:44+01:00	[thread overview]
Message-ID: <jsl8pg.gbq.ln@hunter.axlog.fr> (raw)
In-Reply-To: <82d07df7-bee1-4fd4-b0e1-dd10f43f9f60@q1g2000vbn.googlegroups.com>

patrick.gunia@googlemail.com a �crit :
> Hi all,
> 
> I�m currently working on an analysis of an Ada-System with focus on
> the current state of plattform-independence. As my experiences wirh
> porting Ada-software to different operating system is limited and
> close to zero, I�d like to ask, which conecpts of the langiage might
> cause problems. 

Ada allows writing portable programs, however it does not guarantee in
itself that programs will be portable. The language purposedly allowed
to depend on the peculiarities of the target. Care is still needed to
achieve portable code. Common difficulties include:

-Relying on the characteristics of predefined types (Integer and Duration)

-Differences on the implementation of Address. Some compilers (mainly
Ada83) defined Address as an integer type, while current common practice
is to make it private, which causes problems if people are doing
(uncontrolled) address arithmetic

-Representation clauses. Compilers vary in their support of
representation clauses, sometimes for good reasons: some representation
clauses that are acceptable on some targets would lead to unreasonable
code on a different hardware. Representation clauses may also depend on
predefined types; f.e., if you have a record field of type Duration, you
may have problems when moving a program from an implementation where
Duration is 32 bits to one where Duration is 64 bits

-Outrageously wrong code written by people who write "C-in-Ada", with
lots of unchecked conversions between pointers and addresses.

In practice, most portability problems are rooted in insufficient
training of the people who wrote the code initially.
-- 
---------------------------------------------------------
           J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr



  reply	other threads:[~2009-03-11 15:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-11 14:04 Ada Plattform Independence patrick.gunia
2009-03-11 15:37 ` Jean-Pierre Rosen [this message]
2009-03-11 17:00   ` patrick.gunia
2009-03-12  9:44     ` Jean-Pierre Rosen
2009-03-11 17:33 ` 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