comp.lang.ada
 help / color / mirror / Atom feed
From: Martin <martin.dowie@btopenworld.com>
Subject: Re: Ada Plattform Independence
Date: Wed, 11 Mar 2009 10:33:49 -0700 (PDT)
Date: 2009-03-11T10:33:49-07:00	[thread overview]
Message-ID: <9e83b410-71a3-4993-bdbc-24267897d488@z9g2000yqi.googlegroups.com> (raw)
In-Reply-To: 82d07df7-bee1-4fd4-b0e1-dd10f43f9f60@q1g2000vbn.googlegroups.com

On Mar 11, 2:04 pm, "patrick.gu...@googlemail.com"
<patrick.gu...@googlemail.com> wrote:
> 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. I don´t mean aspects like including plattform-
> dependent libraries or calling system-functions from Ada-Code. I know
> that this will lead to portation problems. I´m more interested in
> problems with the Ada language itself. For example use of
> represantation clauses or I/O statements. I´ve been searching a while
> to find a listing of parts of the Ada standard which might cause
> problems, but didn´t succeed. So I hope, that you can help.
>
> Thanks,
> Patrick


Hi Patrick,

I've ported Ada code from 68k to i386 from no-OS to VxWorks to Win32
and in each case the biggest hurdle has been 'how good is the original
code'.

Assumptions on the sizes and ranges, esp. of the prefined types (esp.
Integer), can cause problems.

Fixed-point numbers are different between revisions of the language
(e.g. Ada83 v Ada95 v Ada2005) but should be portable enough between
different ports using the same language. Providing your not dependent
on a particular underlying representation being used.

The 'favourite' gotcha is usually using non-standard additions to
standard packages. E.g. XD-Ada extended the contents of package
'System' to include 8/16/32-bit signed/unsigned integer. Easy to deal
with - just define a package called 'XDAda_System' and defines
subtypes of the types in Interfaces in it. Then do a globel find/
replace for all occurences of 'with System' (and 'use'!) and you're
90% there.

I ported 45kSLOC from no-OS XD-Ada to GNAT GPL 2008 Wintel in an hour
the other week**.

Cheers
-- Martin

** Where 'ported' means getting a clean compilation / link and not
actually running it!



      parent reply	other threads:[~2009-03-11 17:33 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
2009-03-11 17:00   ` patrick.gunia
2009-03-12  9:44     ` Jean-Pierre Rosen
2009-03-11 17:33 ` Martin [this message]
replies disabled

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