TweetFollow Us on Twitter

Ada Compiler Review
Volume Number:5
Issue Number:9
Column Tag:Ada Additions

Ada Compiler Review

By Patrick McDermott, Saint Louis, MO

Isn’t Ada an acronym??

The Ada language has been approved by the International Standards Organization as a standard programming language for all computers hosting compilers which have been “validated” by the Ada Joint Program Office (AJPO). Ada has the backing of some powerful customers (i.e. United States Department of Defense). The United States Department of Defense (DoD) has mandated that Ada must be used on all future defense systems. Ah, I can hear the cash register ringing in the minds of many readers. Ada is fast becoming the language of choice in the military and commercial sectors of the world! “Star Wars” and the Space Station plan on developing all of the “mission critical” software using Ada. I believe that the Macintosh community has grossly overlooked Ada. Some programmers still think that Ada stands for the American Dental Association. The Ada train is leaving but there is still time to climb aboard!

History lesson & Free Software...what a deal

The Ada language was sponsored by the U.S. Department of Defense when the DoD realized that software maintenance costs were rising as military systems became more complex. A new common high order language was needed to meet the needs of larger problem domains. The initial goal from the start was defining/standardizing a language that would support modern software methodologies (i.e. Object Oriented Design) such as abstraction and information hiding and provide constructs for real-time control and exception handling. At the end of the design phase, four companies were competing for the definition of the language. The winner of the design was Honeywell/Bull. A compiler validation facility was established after the winner of the design was announced. This facility ensures that each compiler meets the requirements of the language. If the compiler passed these set of tests, the compiler was “validated.” Don’t worry, I am getting to the free software portion. After the ball was rolling on the development of the Ada language, to encourage the use of Ada the AJPO established an Ada software repository(see insert Ada Information Clearinghouse) by which hundreds upon thousands of lines of FREE software can be obtained for the price of a magnetic tape. Granted, not all of the software is good but you never know what reusable software you might find.

JUST THE FACTS MA’AM

The Meridian AdaVantage Ada compiler has been available since early 1988. I tested the following: Ada compiler version 2.2A ($1195), Ada debugger ($500), Ada utility library ($50) and the Macintosh Environment Library version 1.0 ($150). The Ada development system operates under the MPW (Macintosh Programmer’s Workshop) environment, version 2.0.2. The Ada compiler uses MPW C as an intermediate language. The intermediate C language is transparently compiled by the MPW C compiler. MPW and MPW C are included in the purchase of the Ada compiler. See the insert for the system/software requirements. Version 2.2A of the Ada compiler has been validated. “Validation,” defined, by the AJPO, encompasses a set of over 2,000 tests that the compiler must successfully pass.

Do U C what I C

Before I begin with the evaluation I want to mention something regarding Meridian’s decision for using MPW C as an intermediate language. Most programmers chuckle when they find out that Meridian uses MPW C as an intermediate language. Actually, I happen to think it was quite a clever idea! By using MPW C, Meridian was able to get a product to the Mac market that much faster although Meridian did pay a price. The obvious price Meridian paid for this type of implementation is compiler speed. Sure, compiling Ada programs on almost any computer is slower than if it were in another language. Let us not forget that Ada is NOT just another language. Ada is, for now, the most powerful language with wide acceptance in the world and Meridian is the only company to offer a validated Ada compiler that executes under the Mac OS (two Ada development companies, ALSYS & Telesoft, have products that run under A/UX). I purposefully left out comparing Ada with other languages due to the size and complexity of Ada. Read the only other article written about this Ada compiler if you want to examine some timing benchmarks (The timing benchmark are the result of an older version of the compiler tested) in the September 1988 issue of BYTE magazine.

Memory Recommendations

Meridian recommends at least two megabytes of RAM, although one megabyte is adequate for compiling small compilation units. Memory problems may occur while compiling large compilation units. The problem takes place while compiling the intermediate C code generated by the Ada compiler. There are instances when the intermediate C code is compiling that a message “UNABLE TO SWAP IN TOOL SEGMENT” is displayed. The problem is the C compiler has used all of its RAM allocated to compiling a compilation unit. The next step is to exit out of MPW and restart the Mac. That task gets tiresome real QUICK. The solution is to reduce the size of the compilation unit by breaking out some of the sub compilation units into SEPARATE source files, a feature of Ada. The C compiler is not graceful when acknowledging “out of memory” problems. Two meg of RAM is strongly recommended if you plan on developing any serious software, with the Meridian Ada compiler.

Library structure

Meridian uses a hierarchical library structure for maintaining compiled compilation units. This method makes it possible to have sublibraries dependent on a parent library. Using the MPW lslib command. I was able to extract a wealth of information, from the current library. Some compilation unit information accessible from the Ada libraries include: source file name, whether or not the unit is obsolete and must be recompiled, compilation unit type (package, procedure, function, generic), whether or not the body is defined, a list of that compilation units dependencies, the time the compilation unit was entered into that particular library and information regarding sub compilation units. A compilation unit dependency option is desperately needed. Without this option, I am responsible for knowing the entire dependency chain associated with each compilation unit. For medium to large projects, manually maintaining a complete compilation order is very difficult if not impossible. Each Ada library has the capacity to store up to 4,096 compilation units. When a compilation unit is imported into a dependent compilation unit. The compiler searches 2 levels up the library chain to locate the compilation unit being imported. Unlike other Ada development systems, the Meridian Ada library does not keep a copy of the source code file although it does keep the directory name where the source code is located.

Utility library

The utility library contains a handful of packages. Three of the generic packages provide helpful service. A package, Array_Object, handles arrays larger than those allowed by MPW(currently an object is limited to 32K in total size). Array_Type allows for multiple large arrays to be defined with the same characteristics as others of the same type. Bit_Ops performs bit manipulation on objects. This utility library should contain the C bindings for interfacing to the Mac toolbox.

INSTALLATION = Piece-O-Cake

I performed my evaluation on a Mac II configured with two megabytes of RAM and a Jasmine 70 meg hard disk. Installation was a breeze! I followed the instructions in the MPW manual to get the MPW environment and C compiler up and running. I then proceeded to the Meridian Manuals. The MPW newlib command created an Ada library in my current working directory. I was now ready to compile Ada programs.

Compiling

By typing “Ada” followed by the Ada source code file name, at the MPW command line, I was able to compile Ada source code. There are a variety of compiler options available to choose from. The compile options included: setup for optimization, setup for the Meridian debugger, create C language source file with Ada code annotations, suppress all checking, prepare the compilation unit for use with MacsBug, generate an error log and produce 68020 machine code for the Mac II owners. Some of the compiler options are transparently passed on to the C compiler. For curiosity sake, I decided to compile a three line program and select the option to generate C source. The C source was annotated with each Ada statement. The C code was very difficult to understand. The Meridian manual suggests that this option only be used for curiosity sake. I believe them. I did find occasional problems with separates when the debug option was selected. The problem is that the Ada compiler generates C code that causes the C compiler confusion. This results in syntax errors. The compilation unit is added to the Ada library. When I tried to link, the linker abnormally terminated with no clear explanation. This is a deficiency in the compiler NOT the language. When the debug option was not selected. The Ada code compiled clean. The Ada compiler supports the creation of DAs, MPW tools or Mac applications.

AdaVantanges

A pragma is a way to convey information to the Ada compiler (somewhat like a compiler directive). Meridian has implemented 8 of the 14 language standard (the definition of Ada, is located in ANSI/MIL-STD 1815A) pragmas for insertion into Ada code. The 8 supported are: elaborate, interface, list, pack, page, priority, shared, suppress. The remaining 6 may be included in compilation units but are currently ignored by this version of the compiler. A very important pragma implemented is the pragma interface. The pragma interface provides an interface to source code written in either MPW C or MPW assembly. By the time you read this review, Meridian will have released its own Mac toolbox interface standard known as the Macintosh Environment Library (MEL). The MEL addresses volumes 1-3 of Inside the Macintosh. Only the most frequently used toolbox routines are included in Mac toolbox interface offered by Meridian. For $150, the MEL IS A FANTASTIC BUY! If the Mac toolbox subroutine you desire is not available through the MEL, you will have to create an MPW C binding. An MPW C binding is an MPW C routine that calls the Mac toolbox routine with the associated parameters. After compiling the MPW C binding. The MPW auglib command, informs the Ada library of the location of the object code. Sometime in 1989 EVB software incorporated (located in Frederick, Maryland) plans on releasing a Mac toolbox interface library encompassing volumes 1-5 of Inside the Macintosh. No price is yet available.

A generic compilation unit is a template. A generic may or may not have parameters (i.e. types, objects, subroutines). A compilation unit passes the proper parameters to the generic compilation unit. The unit then becomes an instance of the the original generic. The Ada compiler uses the macro expansion method for implementing Ada generics. The compiler actually duplicates the generic compilation unit for each generic instantiation. This method may increase execution time. The trade-off is a larger executable.

-- sample Ada code
with Text_IO;  -- attain visibility of the Text_IO package
package Print_Numbers is

-- here is a sample of a generic instantiation
package Do_Some_Integer_IO is new Text_IO.Integer_IO(Num => Integer);
o
o
o

Tasking is implemented by using a round-robbin prioritized scheduling technique. Every task is queued up according to task priority. You must insert a delay statement in the Ada code if a task contains an infinite loop with no tasking constructs. This delay statement will cause the task to suspend and allow other tasks that are queued up to execute. Priorities are defined for each task at the task declaration time with the pragma priority statement. Objects shared between tasks are permitted through the pragma shared. The pragma shared forces the reads/writes to that object to be synchronized between the tasks. The compiler assigns the lowest priority if a task is not assigned a priority at declaration time. Each task created is allocated one kilobyte for its stack size. This limit can be altered at task declaration time by using the Ada length clause. Meridian needs to incorporate preemptive tasking into their task scheduler. This would allow each task to execute in a time slice. After execution, the task would queue up for its next time slice.

Debugger

The source level debugger has the makings of a very helpful product. All of the debugger commands are entered at the debug prompt. The debugger offers the traditional execution control features: set/list/cancel break points on executable code, examination of objects, list source code, Input/Output redirection, print the stack of subroutine calls, trace a subroutine/object. I was able to examine object attributes (last, length, first, constrained, address, size, all) from within the Ada visibility scoping rules. The debugger offers some more elegant features: a break point whenever there is a contact switch between tasks, a break point when an exception is raised, the ability to examine the raw memory and dump the value of each object that was compiled with the debugger option. I found a rather disturbing problem while executing the debugger. The debugger did not grant visibility to compilation units that are separate from its parent compilation unit. Meridian needs to address this deficiency. The debugger will work with the application option(the ability to create a stand alone Mac application) selected at link time so long as there are no Mac toolbox calls located in the code.

Optimization

The Meridian optimizer is included in the purchase of the Ada compiler. The optimizer optimizes either on a local or global level. Global optimization removes unused subprograms and global data objects from the executable image. This includes Meridian run-time code. Due to longer link times the Meridian manual suggest that the optimizer be used only when “the project is near completion.” I used the optimizer to compare speed between optimized and non-optimized execution. Execution time was faster and the executable was smaller in size. It would be helpful if the optimizer informed the user of the compilation units and objects that were stripped out of the executable.

Help!

I thought the Ada on-line help facility was adequate. The topics listed in the help facility where valid topics of interest, however, there was not enough information on each of the topics. It would be helpful to have the Ada LRM (Language Reference Manual) available on-line so that syntax error explanations caused by a compilation may be referenced. I found the Meridian compiler/debugger manual to be easy to read and divided up such that it was possible to locate topics of immediate interest. Although I did not sign up for the Meridian technical support, they were very helpful when I did contact them regarding a possible compiler problem. Contact Meridian for information regarding the types of technical support.

The Verdict

Before I continue, let me just say that I will be the first to admit that Ada has its faults and is not the answer to all of our software problems. Ada is the BEST thing going currently and for the foreseeable future. The Meridian Ada compiler is good, although it does have some faults. The Meridian debugger has potential. It does need some work to make it really shine. I have two complaints that should be addressed immediately if this Ada product is to succeed in the Mac market. One, allow visibility of separates from the parent compilation unit in the debugger. Two, get the debugger to work with routines that access the Mac toolbox via the MEL. I discussed these problems with Meridian. Meridian told me that these problems would be fixed with the release of their native code compiler. The native code system is due out in August of 1989. With a price tag of $1195 for the compiler and $500 for the debugger, this development system is aimed at the professional programmer. If you plan on buying the compiler I would recommend that you purchase the whole shootin’ match for $1,700 (compiler, debugger, utility library and the MEL). Is the Ada development system worth it? Well, if you plan on doing any type of software business with the United States Department of Defense in the future you had better give Ada and the Meridian development system a careful look.

the hardware/software insert

AdaVantage v2.2A

Type of software

Validated Ada language compiler for a Mac.

Company

Meridian Software Systems, Inc.

23141 Verdugo Drive

Suite 105

Laguna Hills, CA 92653

(714) 380-9800

(800) 221-2522

Hardware requirements

At least 1 meg of RAM

2 meg or more of RAM is recommended

Macintosh(Plus, SE, II)

and a Hard disk with at least 2

megabytes of free space

Software Requirements

System 4.1 or higher

Finder 5.5 or higher

Documentation

227 page manual for the compiler

114 page manual for the debugger

101 page manual for Macintosh Environment Library

Price

$1195 for the compiler

$500 for the debugger

$150 for the Macintosh Environment Library

$50 for the utility library

ADA INFORMATION CLEARINGHOUSE

Information such as validated compilers, software repository and other Ada related information may be obtained by writing or calling.

Ada Information Clearinghouse

Room 3D139(1211 FERN street/C-107)

The Pentagon

Washington, D.C. 20301-3081

(703) 685-1477

(301) 731-8894

Biography

Patrick McDermott has been an Ada consultant since 1985. He is an ex-Apple employee & cofounder of THE_Ada_EXCEPTION, Inc. which is a consultant group based in Saint Louis, Missouri.

 
AAPL
$101.63
Apple Inc.
-0.03
MSFT
$46.24
Microsoft Corpora
-0.46
GOOG
$573.10
Google Inc.
-2.52

MacTech Search:
Community Search:

Software Updates via MacUpdate

OS X Yosemite 10.10 DP8 - Developer Prev...
Note: This is a Developer Preview. You must be a registered Apple Mac Developer to download this update. You can also sign up for the free OS X Beta Program to download and preview public beta... Read more
FotoMagico 4.5 - Powerful slideshow crea...
FotoMagico lets you create professional slideshows from your photos and music with just a few, simple mouse clicks. It sports a very clean and intuitive yet powerful user interface. High image... Read more
Screenshot Path 1.2.1 - Change the defau...
Screenshot Path lets you change the folder where OS X saves screenshots. Screenshots are saved by default to the user’s desktop. This is handy for the occasional screenshot but those looking to take... Read more
Fantastical 1.3.16 - Create calendar eve...
Fantastical is the Mac calendar you'll actually enjoy using. Creating an event with Fantastical is quick, easy, and fun: Open Fantastical with a single click or keystroke Type in your event details... Read more
GIMP 2.8.14 - Powerful, free image editi...
GIMP is a multi-platform photo manipulation tool. GIMP is an acronym for GNU Image Manipulation Program. The GIMP is suitable for a variety of image manipulation tasks, including photo retouching,... Read more
HoudahSpot 3.9.3 - Advanced front-end fo...
HoudahSpot is an advanced file search tool built upon MacOS X Spotlight. Spotlight unleashed Create detailed queries to locate the exact file you need Narrow down searches. Zero in on files Save... Read more
djay 4.2.3 - Transform your Mac into a f...
djay transforms your Mac into a full-fledged DJ system, allowing you to mix your iTunes music library on a hyper-realistic turntable interface. Perform live, record mixes on-the-go, or enable... Read more
iDefrag 2.2.8 - Disk defragmentation and...
iDefrag helps defragment and optimize your disk for improved performance. Features include: Supports HFS and HFS+ (Mac OS Extended). Supports case sensitive and journaled filesystems. Supports... Read more
Bookends 12.2.3 - Reference management a...
Bookends is a full-featured bibliography/reference and information-management system for students and professionals. Access the power of Bookends directly from Mellel, Nisus Writer Pro, or MS Word (... Read more
Copy 1.47.0410 - Cloud storage and file...
Note: You must first sign up to use Copy (get a 5GB sign-up bonus through our 'Download' link above). Copy lets you sync, protect, and share. Everywhere. Want to bring some files home? No problem!... Read more

Latest Forum Discussions

See All

The Sleeping Prince Review
The Sleeping Prince Review By Jennifer Allen on September 15th, 2014 Our Rating: :: RESTRICTIVE KINGDOM SAVINGUniversal App - Designed for iPhone and iPad The Sleeping Prince looks and feels great to play, but its lack of peril and... | Read more »
It Came From Canada: Terra Battle
In some way or another, most Japanese RPGs owe something to Final Fantasy. But with Terra Battle, the now-common mix of Western medieval fantasy with Eastern anime aesthetic feels earned. After all, its developer, Mistwalker, was founded by the... | Read more »
Five Nights at Freddy’s Review
Five Nights at Freddy’s Review By Rob Thomas on September 15th, 2014 Our Rating: :: FIVE FRIGHTS AT FREDDY'SUniversal App - Designed for iPhone and iPad Can you survive five nights as the new night watchman of Freddy Fazbear’s... | Read more »
Phantom Rift Review
Phantom Rift Review By Nadia Oxford on September 15th, 2014 Our Rating: :: FRIENDLY PHANTOMUniversal App - Designed for iPhone and iPad Despite a snag here and there, Phantom Rift is a well-crafted and imaginative adventure RPG.   | Read more »
Phantom Rift – Tips, Tricks, Strategies,...
Hello, Wanderers: | Read more »
Meet the Newest Character for Temple Run...
Meet the Newest Character for Temple Run 2, from National Geographic Kids’ Action-Adventure Book Posted by Jessica Fisher on September 15th, 2014 [ | Read more »
Battle Riders Review
Battle Riders Review By Jordan Minor on September 15th, 2014 Our Rating: :: UNTWISTED METALUniversal App - Designed for iPhone and iPad BattleRiders has cool car combat, but it could be crazier.   | Read more »
Rapture - World Conquest (Games)
Rapture - World Conquest 1.0.0 Device: iOS Universal Category: Games Price: $2.99, Version: 1.0.0 (iTunes) Description: The End is coming! Bombard the globe with devastating miracles and decimate the enemy civilizations. Guide your... | Read more »
Toonia Jelly: Music Review
Toonia Jelly: Music Review By Amy Solomon on September 15th, 2014 Our Rating: :: CUTE MUSICAL EXPLORATIONUniversal App - Designed for iPhone and iPad Toonia Jelly: Music is a charming exploratory app for young children with a... | Read more »
CounterSpy Review
CounterSpy Review By Lee Hamlet on September 15th, 2014 Our Rating: :: AN EXCELLENT PORTUniversal App - Designed for iPhone and iPad Shaken or stirred, CounterSpy is simply the best stealth action game to sneak its way onto the App... | Read more »

Price Scanner via MacPrices.net

10% off iPhone 6 and 6 Plus Otterbox cases
Get 10% off on popular Otterbox iPhone 6 and iPhone 6 Plus cases at MacMall through September 19th. Use code OTTERBOX10 to see the discount. Read more
15-inch MacBook Pros on sale for up to $125 o...
Amazon has the new 2014 15″ Retina MacBook Pros on sale for up to $125 off MSRP including free shipping: - 15″ 2.2GHz Retina MacBook Pro: $1899.99 save $100 - 15″ 2.5GHz Retina MacBook Pro: $2374... Read more
27-inch 3.2GHz iMac on sale for $1698, $101 o...
Abt has the 27″ 3.2GHz iMac on sale for $1698 including free shipping. Their price is $101 off MSRP. Read more
More To Making A Larger iPad Than Expanded Sc...
CNET’s Ross Rubin has posted a thoughtful analysis of prospects for a larger display iPad Pro, noting that Microsoft and Samsung currently have the large-display touchscreen tablet category to... Read more
SwiftKey Keyboard Finally Coming To iPhone An...
At the TechCrunch Disrupt event in San Francisco, Swiftkey unveiled the first details about SwiftKey Keyboard for iPhone, iPad & iPod touch. SwiftKey’s philosophy is that you should be able to... Read more
Save $75 on the 16GB iPad mini with Retina Di...
Best Buy has the 16GB iPad mini with Retina Display on sale for $324.99 on their online store for a limited time. Their price is $75 off MSRP, and it’s the lowest price available for this mini.... Read more
21-inch 1.4GHz iMac on sale for $979, $120 of...
B&H Photo has the new 21″ 1.4GHz iMac on sale for $979.99 including free shipping plus NY sales tax only. Their price is $120 off MSRP. B&H will also include free copies of Parallels Desktop... Read more
Apple restocks refurbished 21-inch 1.4GHz iMa...
The Apple Store has restocked Apple Certified Refurbished 21″ 1.4GHz iMacs for $929 including free shipping plus Apple’s standard one-year warranty. Their price is $170 off the cost of new models,... Read more
13-inch 2.6GHz/256GB Retina MacBook Pro on sa...
Adorama has the 13″ 2.6GHz/256GB Retina MacBook Pro on sale for $1379 including free shipping plus NY & NJ sales tax only. Their price is $120 off MSRP, and it’s the lowest price available for... Read more
Macally iPhone 6 Cases
Macally has introduced a Line of Snap-On Shell Cases, Frame Bumper Cases and a Rugged Protective Case for iPhone 6 with 4.7inch Screen, such as the SNAP case in a variety of brilliant metallic... Read more

Jobs Board

*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.