comp.lang.ada
 help / color / mirror / Atom feed
From: "Björn Lundin" <bnl@tiscali.se>
To: comp.lang.ada@ada-france.org
Subject: Re: Moving from Ada 83 to Ada 95
Date: Thu, 25 Nov 2004 21:14:15 +0100
Date: 2004-11-25T21:14:15+01:00	[thread overview]
Message-ID: <mailman.120.1101413758.10401.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: <co2scp$la8$1@news.ya.com>

onsdag 24 november 2004 21:53 skrev vrenna:
> Has someone done such thing? I need to move a huge application made in Ada
> 83 and installed on Solaris, to Ada 95 (probably on Linux)... looks very
> tough but maybe there're automatic tools and good advices out there. What
> do you say?
>

I've moved a Warehouse management system with ~1500 - 2000 files, from Alsys 
Ada on Aix
to Gnat. Biggest problem were how to deal with Ada libraries, since we had
3 levels in the Ada library, where many packages on the same level had the 
same name.
ie
global
  inventory
    test
  crane
  conveyor
  etc

were both crane and conveyor had a 'transport_handler' package.

The trick was to setup a similar structure on disk, using the ali-files, and 
by using (I think) -bargs -E to gnatmake to look for the ali-file, and put 
the object file in the same directory. I also had to write a frontend to 
gnatmake to set up what source and objectpaths gnatmake is allowed to look 
at. So linking on the target directory for /global/crane would not see source 
or target directory for conveyor. Yes I did look on projects, but it did not 
suit us, since we have about 25 executables, and they share a lot of code.
(gnatmake tells me that the biggest process withs 400 packages)


Other tricks was to remove Alsys Ada specific function calls like 
'Suspend_Tasking', since gnat maps tasks to threads(?) and thus allowing 
blocking calls in threads.

Filenames had to be changed, we had package names like A_Package_Body.ada resp 
A_Package_Spec.ada. Gnatchop was handy. We also sometimes had spec and body 
in the same file, and several separate procedures in the same file. Gnatchop 
again.

But the most annoying was adding 'pragma Elaborate_All' to packages using 
other generic packages. I tried without, but most processes went belly up 
with Program_Error. (Strange, It worked with Alsys Ada, and ObjectAda on 
windows, but not with gnat) 


Fileseize of the exe are bigger. From 6 Mb to 30 Mb for the biggest one. But I 
want the stackdump on crashes, so I don't want to use the -largs -s switch or 
optimize for size.  I was afraid we needed more RAM, but we don't. Not the 
whole process goes up to memory, but we need bigger disks. 

(We have simulators, that simulates the truckdrivers, and by cloning one, we 
simulate more drivers. I started 30 of them, thus wasting 900 mb on identical 
exefiles. I then found hard links usefull)

/Björn
>
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada-france.org
> http://www.ada-france.org/mailman/listinfo/comp.lang.ada



  parent reply	other threads:[~2004-11-25 20:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-24 20:53 Moving from Ada 83 to Ada 95 vrenna
2004-11-24 21:27 ` Pascal Obry
2004-11-24 21:38 ` tmoran
2004-11-24 21:58   ` vrenna
2004-11-25  1:30 ` Jeffrey Carter
2004-11-25 11:28 ` Martin Dowie
2004-11-25 20:14 ` Björn Lundin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-11-25  7:44 Christoph Karl Walter Grein
replies disabled

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