comp.lang.ada
 help / color / mirror / Atom feed
From: Brad Moore <brad.moore@shaw.ca>
Subject: Re: GNAT Pro for .NET
Date: Wed, 26 Nov 2008 00:05:51 -0700
Date: 2008-11-26T00:05:51-07:00	[thread overview]
Message-ID: <kz6Xk.1141$%M6.591@newsfe13.iad> (raw)
In-Reply-To: <22d85cff-dbef-4e94-b4b5-e3e93b73a256@f20g2000yqg.googlegroups.com>

george.priv@gmail.com wrote:
> Wonder if anyone has any experience with Ada .NET?  How well it is
> integrated and what are the major issues you had with it?

I've been involved in a port of a number-crunching system originally
written in Ada 83 from a different compiler vendor running on Unix, to 
Gnat on Windows in Ada 95, and then most recently to .NET in Ada 2005 
using Gnat Pro for .NET. I say port, but for the most part it was simply
a matter of setting the compiler switches for Ada 95, and Ada 2005,
and recompiling, though we have been introducing new language features
during maintenance of the system.

The original system features several tasks with rendezvous, and heavy 
use of the Ada math libraries. There is no GUI involved.

My experiences from these ports are;

Port 1) Ada 83 SCO Unix (non-Gnat vendor) to Win32 Gnat in Ada 95

- Issues relating to compiler vendor switch:
     None come to mind

_ Issues relating to language switch, Ada 83 - Ada 95
    1)  We had a generic protected queue, which had used the Ada 95
        reserved word "protected" in its variable names. We had to
        change the name of the variables to something else.
        (A very trivial change)
    2)  The generic would accept an unconstrained type as a formal
        parameter. In Ada 95, we had to add the box notation to the
        formal paramter.

        eg. Instead of;

        generic
              type Element_Type is private;
        package P is

we had to write;
        generic
              type Element_Type (<>) is private;
        package P is
...
       Another very trivial change.

     3) We had used passive tasks in a couple of places. In Ada 95, we
        replaced these library units with protected types.
        This was a bit more work, but the end result was satisfying and
        a better result.

- Issues relating to operating system switch: Unix to Windows
     This was probably the biggest impact, though we had isolated OS
     routines, so changes were quite localized. The biggest challenge
     was finding a replacement for Unix's memory mapped array feature,
     which Windows didn't seem to have matching support for.

- Issues relating to change from services being invoked by CORBA to
   interface accessed via a DLL.
    The use of the Interfaces.C library routines was very helpful.
    To invoke the DLL from .NET, a .NET wrapper was needed to complete
    the interface.

-------------------------------------------------

Port 2: Ada 95 Windows to Ada 2005 .NET


- Issues relating to the language switch. (Ada 95 to Ada 2005)
    None: Or at least I don't recall there being any.
    We have now incorporated new language features including interfaces,
    Ada.Directories, containers, object prefix notation, to name a few.
    These mostly come as enhancements needed for maintenance, and are
    unrelated to the actual port.


- Issues going from win32 to .NET
    For the most part we didn't need to make any significant code
    changes. There are a few libraries that weren't implemented in .NET
    Ada. The ones that
    come to mind are Ada.Direct_IO and Ada.Directories I believe, though
    there are other libraries that come with Gnat that provided suitable
    workarounds. There may have been some other minor issues, but we
    found workarounds for everything. The application runs well in .NET.
    We no longer needed the .NET wrapper around our DLL, which simplified
    things. We had to get rid of our Interfaces.C pragmas and replace
    with similar vendor specific pragmas for interfacing to .NET.
    I believe the full list of issues/differences between .NET Gnat Pro
    and Windows Gnat Pro can be obtained from Adacore.

Regards,
Brad Moore



  parent reply	other threads:[~2008-11-26  7:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-22 19:51 GNAT Pro for .NET george.priv
2008-11-23 16:36 ` Rob Veenker
2008-11-24 15:44   ` george.priv
2008-11-24 23:07     ` Rob Veenker
2008-11-28  4:20       ` george.priv
2008-11-30 11:40         ` Rob Veenker
2008-11-26  7:05 ` Brad Moore [this message]
2008-11-29 20:07   ` george.priv
replies disabled

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