comp.lang.ada
 help / color / mirror / Atom feed
* Moving from Ada 83 to Ada 95
@ 2004-11-24 20:53 vrenna
  2004-11-24 21:27 ` Pascal Obry
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: vrenna @ 2004-11-24 20:53 UTC (permalink / raw)


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?





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Moving from Ada 83 to Ada 95
  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
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Pascal Obry @ 2004-11-24 21:27 UTC (permalink / raw)



"vrenna" <closure@nin.com> writes:

> 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?

That Ada95 is mostly upward compatible with Ada83 and that it should not be as
tough as you could think. It depends mostly on the compiler vendor specific
libraries used in the Ada83 code. I would start here.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Moving from Ada 83 to Ada 95
  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
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: tmoran @ 2004-11-24 21:38 UTC (permalink / raw)


>Has someone done such thing?
  Duh.  Just possibly.
> 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.
Have you tried just compiling your source code with an Ada 95 compiler?
Unless it uses a lot of vendor-specific addons or libraries, you'll
probably be surprised how little needs to change.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Moving from Ada 83 to Ada 95
  2004-11-24 21:38 ` tmoran
@ 2004-11-24 21:58   ` vrenna
  0 siblings, 0 replies; 8+ messages in thread
From: vrenna @ 2004-11-24 21:58 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 742 bytes --]


<tmoran@acm.org> escribi� en el mensaje
news:2b7pd.562010$mD.208238@attbi_s02...
> >Has someone done such thing?
>   Duh.  Just possibly.

Hehehehe. Yes, what a question!

> > 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.
> Have you tried just compiling your source code with an Ada 95 compiler?
> Unless it uses a lot of vendor-specific addons or libraries, you'll
> probably be surprised how little needs to change.

Thanks, but maybe I should have said I don't have the chance to go wrong. I
have to be sure, so I'll try to check first if those vendor-specific
libraries (?) exist.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Moving from Ada 83 to Ada 95
  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-25  1:30 ` Jeffrey Carter
  2004-11-25 11:28 ` Martin Dowie
  2004-11-25 20:14 ` Björn Lundin
  4 siblings, 0 replies; 8+ messages in thread
From: Jeffrey Carter @ 2004-11-25  1:30 UTC (permalink / raw)


vrenna wrote:

> 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 large quantities simply by recompiling. Actual 
incompatibilities in the languages are quite rare. If the code is 
designed for portability, then I'd be surprised if you have a problem.

-- 
Jeff Carter
"I'm particularly glad that these lovely children were
here today to hear that speech. Not only was it authentic
frontier gibberish, it expressed a courage little seen
in this day and age."
Blazing Saddles
88




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Moving from Ada 83 to Ada 95
@ 2004-11-25  7:44 Christoph Karl Walter Grein
  0 siblings, 0 replies; 8+ messages in thread
From: Christoph Karl Walter Grein @ 2004-11-25  7:44 UTC (permalink / raw)
  To: comp.lang.ada

I've moved a 800kLOC program from Ada83 running on Motorola 68040 to Ada95 running on IRIX, different compiler vendors, in a few weeks. Mostly an easy job - getting it to compile and run was a few days. What took the rest of the time was to find causes of crashes and non-portable code.

Problem areas:

Original code used overlays (for A use at X) for low level hardware access.
If you do such erroneous (in Ada83) things, take care that alignments match or else you will get segmentation error crashes.

Unchecked_Conversion often had different sizes on Source and Target. This leads to non-portability and funny results.
Additionally you have to be careful with alignment issues (RM 13.9(7)). Gnat however does the correct thing, even if alignments do not match.
________________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt neu bei WEB.DE FreeMail: http://freemail.web.de/?mc=021193




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Moving from Ada 83 to Ada 95
  2004-11-24 20:53 Moving from Ada 83 to Ada 95 vrenna
                   ` (2 preceding siblings ...)
  2004-11-25  1:30 ` Jeffrey Carter
@ 2004-11-25 11:28 ` Martin Dowie
  2004-11-25 20:14 ` Björn Lundin
  4 siblings, 0 replies; 8+ messages in thread
From: Martin Dowie @ 2004-11-25 11:28 UTC (permalink / raw)


vrenna wrote:
> 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?

If the original was well written (i.e. with portability in mind) then it
should be very straight forward. I had the misfortune to try with some very
badly written code - 'with'-ing in package System into every other package
and using the non-standard items in it! Other things that needed changing
were subtle little things that one compiler would accept the new one
wouldn't, e.g.

1) Address clauses must immediately follow the object declaration in the new
one;
2) Deal with non-portable pragmas;
3) Spot 'new' Ada95 reserved words;
4) Array indexing changes

The last of these may have been the original compiler (XD-Ada) being
"over-zealous", as I've found nothing in any porting guide that indicates
this should have been necessary.

In the end I wrote a small (~400 NCNB lines) program to do it all.

Cheers

-- Martin






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Moving from Ada 83 to Ada 95
  2004-11-24 20:53 Moving from Ada 83 to Ada 95 vrenna
                   ` (3 preceding siblings ...)
  2004-11-25 11:28 ` Martin Dowie
@ 2004-11-25 20:14 ` Björn Lundin
  4 siblings, 0 replies; 8+ messages in thread
From: Björn Lundin @ 2004-11-25 20:14 UTC (permalink / raw)
  To: comp.lang.ada

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



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-11-25 20:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2004-11-25  7:44 Christoph Karl Walter Grein

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