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.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Tokkun Studio unveils alpha trailer for...
We are back on the MMORPG news train, and this time it comes from the sort of international developers Tokkun Studio. They are based in France and Japan, so it counts. Anyway, semantics aside, they have released an alpha trailer for the upcoming... | Read more »
Win a host of exclusive in-game Honor of...
To celebrate its latest Jujutsu Kaisen crossover event, Honor of Kings is offering a bounty of login and achievement rewards kicking off the holiday season early. [Read more] | Read more »
Miraibo GO comes out swinging hard as it...
Having just launched what feels like yesterday, Dreamcube Studio is wasting no time adding events to their open-world survival Miraibo GO. Abyssal Souls arrives relatively in time for the spooky season and brings with it horrifying new partners to... | Read more »
Ditch the heavy binders and high price t...
As fun as the real-world equivalent and the very old Game Boy version are, the Pokemon Trading Card games have historically been received poorly on mobile. It is a very strange and confusing trend, but one that The Pokemon Company is determined to... | Read more »
Peace amongst mobile gamers is now shatt...
Some of the crazy folk tales from gaming have undoubtedly come from the EVE universe. Stories of spying, betrayal, and epic battles have entered history, and now the franchise expands as CCP Games launches EVE Galaxy Conquest, a free-to-play 4x... | Read more »
Lord of Nazarick, the turn-based RPG bas...
Crunchyroll and A PLUS JAPAN have just confirmed that Lord of Nazarick, their turn-based RPG based on the popular OVERLORD anime, is now available for iOS and Android. Starting today at 2PM CET, fans can download the game from Google Play and the... | Read more »
Digital Extremes' recent Devstream...
If you are anything like me you are impatiently waiting for Warframe: 1999 whilst simultaneously cursing the fact Excalibur Prime is permanently Vault locked. To keep us fed during our wait, Digital Extremes hosted a Double Devstream to dish out a... | Read more »
The Frozen Canvas adds a splash of colou...
It is time to grab your gloves and layer up, as Torchlight: Infinite is diving into the frozen tundra in its sixth season. The Frozen Canvas is a colourful new update that brings a stylish flair to the Netherrealm and puts creativity in the... | Read more »
Back When AOL WAS the Internet – The Tou...
In Episode 606 of The TouchArcade Show we kick things off talking about my plans for this weekend, which has resulted in this week’s show being a bit shorter than normal. We also go over some more updates on our Patreon situation, which has been... | Read more »
Creative Assembly's latest mobile p...
The Total War series has been slowly trickling onto mobile, which is a fantastic thing because most, if not all, of them are incredibly great fun. Creative Assembly's latest to get the Feral Interactive treatment into portable form is Total War:... | Read more »

Price Scanner via MacPrices.net

Early Black Friday Deal: Apple’s newly upgrad...
Amazon has Apple 13″ MacBook Airs with M2 CPUs and 16GB of RAM on early Black Friday sale for $200 off MSRP, only $799. Their prices are the lowest currently available for these newly upgraded 13″ M2... Read more
13-inch 8GB M2 MacBook Airs for $749, $250 of...
Best Buy has Apple 13″ MacBook Airs with M2 CPUs and 8GB of RAM in stock and on sale on their online store for $250 off MSRP. Prices start at $749. Their prices are the lowest currently available for... Read more
Amazon is offering an early Black Friday $100...
Amazon is offering early Black Friday discounts on Apple’s new 2024 WiFi iPad minis ranging up to $100 off MSRP, each with free shipping. These are the lowest prices available for new minis anywhere... Read more
Price Drop! Clearance 14-inch M3 MacBook Pros...
Best Buy is offering a $500 discount on clearance 14″ M3 MacBook Pros on their online store this week with prices available starting at only $1099. Prices valid for online orders only, in-store... Read more
Apple AirPods Pro with USB-C on early Black F...
A couple of Apple retailers are offering $70 (28%) discounts on Apple’s AirPods Pro with USB-C (and hearing aid capabilities) this weekend. These are early AirPods Black Friday discounts if you’re... Read more
Price drop! 13-inch M3 MacBook Airs now avail...
With yesterday’s across-the-board MacBook Air upgrade to 16GB of RAM standard, Apple has dropped prices on clearance 13″ 8GB M3 MacBook Airs, Certified Refurbished, to a new low starting at only $829... Read more
Price drop! Apple 15-inch M3 MacBook Airs now...
With yesterday’s release of 15-inch M3 MacBook Airs with 16GB of RAM standard, Apple has dropped prices on clearance Certified Refurbished 15″ 8GB M3 MacBook Airs to a new low starting at only $999.... Read more
Apple has clearance 15-inch M2 MacBook Airs a...
Apple has clearance, Certified Refurbished, 15″ M2 MacBook Airs now available starting at $929 and ranging up to $410 off original MSRP. These are the cheapest 15″ MacBook Airs for sale today at... Read more
Apple drops prices on 13-inch M2 MacBook Airs...
Apple has dropped prices on 13″ M2 MacBook Airs to a new low of only $749 in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, now available for $679 for 8-Core CPU/7-Core GPU/256GB models. Apple’s one-year warranty is included, shipping is free, and each... Read more

Jobs Board

Seasonal Cashier - *Apple* Blossom Mall - J...
Seasonal Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Seasonal Fine Jewelry Commission Associate -...
…Fine Jewelry Commission Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) Read more
Seasonal Operations Associate - *Apple* Blo...
Seasonal Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Read more
Hair Stylist - *Apple* Blossom Mall - JCPen...
Hair Stylist - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.