A# is a port of Ada to the Microsoft .NET Platform. A# is freely distributed by the Department of Computer Science at the United States Air Force Academy as a service to the Ada community under the terms of the GNU general public license.
A# has been fully integrated into AdaGIDE, a leading open-source IDE for Ada under Windows. A .NET port of the multi-platform open-source GUI Design tool RAPID has been completed. I've looked into incorporating A# into Visual Studio .NET, but right now it looks like too much work for me to take on.
Read more about the A# project in our SIGAda 2002 paper. Here are files from a SIGAda 2004 tutorial (available 14 November 2004).
New with version 2.01 (26 October 2004)
- Totally redesigned msil2ada (uses .NET Reflection)
- InstallShield Installer available here
- Now compiles with GNAT GAP (Academic Edition) 1.0.0 (uses some Ada 2005 features)
New with version 1.20
- All dependence on Visual J# eliminated (at least I hope so)
- Sources now compilable with GNAT 3.15 (1.1 had to be compiled with 3.13p)
Features
- Extract Ada specification files directly from .NET DLLs (MSIL2Ada)
- Compile Ada programs into .NET executables (MGNAT)
Download
To use A#, you need the following:
- MS .NET Framework or Visual Studio .NET (tested with version 1.1.4322)
- MGNAT (compiles from Ada to MSIL) (28MB). See
mgnat\include folder for Ada specs for standard .NET DLLs-- these specs were
generated by MSIL2Ada, below. Unzip, then:
- Add mgnat\bin to your PATH
- Add C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\ to your path (or wherever ILASM.exe is located).
- Add the following to your registry (modify to your unzip folder):
- HKLM\Software\Ada Core Technologies\MGNAT\Root = "c:\mgnat"
- HKLM\Software\Ada Core Technologies\MGNAT\Standard Libraries\DOTNET = "c:\mgnat\include"
- Run compile.bat in c:\mgnat\include (if using .NET DLLs)
- Finally, run register_mgnat.bat in the DLL folder to install the Ada libraries as .NET DLLs
- MSIL2Ada (takes an MSIL file and generates a set of Ada specifications-- use ILDASM to create an MSIL file from a .NET DLL) (1.5 MB). (You only need this if you are planning to use other .NET DLLs besides mscorlib.dll, System.dll, System.Windows.Forms.dll, and System.Drawing.dll (which are in the include folder of mgnat.zip).
MSIL2Ada was generated using AdaGOOP.
The latest version was posted 1 November 2004. Bug report list is here.
US mirror (site may be more up-to-date):
http://asharp.martincarlisle.com
European mirror:
ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/ftp.usafa.af.mil/pub/dfcs/carlisle/asharp/
Rebuilding from sources:
To rebuild from sources, you can use the Makefile in the src subfolder. Also use the makefile in src\lib to rebuild mgnat.dll and mgnatcs.dll. Note that MGNAT must be compiled using GNAT for Windows, and also that the Makefile must be run from a UNIX shell (e.g. Cygwin, at http://www.cygwin.com ). Rebuilding mgnatcs.dll requires MS Visual Studio .NET. "make install" will then copy the files. Note that you will have to change Makefile and jMakefile to reflect your directory structure (look for "c:/d/rsrch..." and replace and also "c:\d\rsrch...").
Hints:
- Building a DLL: Try "mgnatmake -z test_pkg.adb -largs /DLL /out=test_pkg.dll", where test_pkg.adb is a package that with's all of the others that you want to include in the DLL. Make sure that ada_test_pkg_pkg.adainit is called by the client of the DLL.
Authors:
- Dr. Martin C. Carlisle
- Lt Col Ricky Sward
- Capt Jeff Humphries
Comments, suggestions, and bug reports are welcome. If you have a comment, suggestion or bug report, send email to: Martin.Carlisle@usafa.af.mil. The bug report list is here.
This page maintained by Dr. Martin Carlisle, HQ USAFA/DFCS, (719) 333-3590, Date Last Modified: 05/02/2008 4:32 PM
