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

Go from lowly lizard to wicked Wyvern in...
Do you like questing, and do you like dragons? If not then boy is this not the announcement for you, as Loongcheer Game has unveiled Quest Dragon: Idle Mobile Game. Yes, it is amazing Square Enix hasn’t sued them for copyright infringement, but... | Read more »
Aether Gazer unveils Chapter 16 of its m...
After a bit of maintenance, Aether Gazer has released Chapter 16 of its main storyline, titled Night Parade of the Beasts. This big update brings a new character, a special outfit, some special limited-time events, and, of course, an engaging... | Read more »
Challenge those pesky wyverns to a dance...
After recently having you do battle against your foes by wildly flailing Hello Kitty and friends at them, GungHo Online has whipped out another surprising collaboration for Puzzle & Dragons. It is now time to beat your opponents by cha-cha... | Read more »
Pack a magnifying glass and practice you...
Somehow it has already been a year since Torchlight: Infinite launched, and XD Games is celebrating by blending in what sounds like a truly fantastic new update. Fans of Cthulhu rejoice, as Whispering Mist brings some horror elements, and tests... | Read more »
Summon your guild and prepare for war in...
Netmarble is making some pretty big moves with their latest update for Seven Knights Idle Adventure, with a bunch of interesting additions. Two new heroes enter the battle, there are events and bosses abound, and perhaps most interesting, a huge... | Read more »
Make the passage of time your plaything...
While some of us are still waiting for a chance to get our hands on Ash Prime - yes, don’t remind me I could currently buy him this month I’m barely hanging on - Digital Extremes has announced its next anticipated Prime Form for Warframe. Starting... | Read more »
If you can find it and fit through the d...
The holy trinity of amazing company names have come together, to release their equally amazing and adorable mobile game, Hamster Inn. Published by HyperBeard Games, and co-developed by Mum Not Proud and Little Sasquatch Studios, it's time to... | Read more »
Amikin Survival opens for pre-orders on...
Join me on the wonderful trip down the inspiration rabbit hole; much as Palworld seemingly “borrowed” many aspects from the hit Pokemon franchise, it is time for the heavily armed animal survival to also spawn some illegitimate children as Helio... | Read more »
PUBG Mobile teams up with global phenome...
Since launching in 2019, SpyxFamily has exploded to damn near catastrophic popularity, so it was only a matter of time before a mobile game snapped up a collaboration. Enter PUBG Mobile. Until May 12th, players will be able to collect a host of... | Read more »
Embark into the frozen tundra of certain...
Chucklefish, developers of hit action-adventure sandbox game Starbound and owner of one of the cutest logos in gaming, has released their roguelike deck-builder Wildfrost. Created alongside developers Gaziter and Deadpan Games, Wildfrost will... | Read more »

Price Scanner via MacPrices.net

13-inch M2 MacBook Airs in stock today at App...
Apple has 13″ M2 MacBook Airs available for only $849 today in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty is included,... Read more
New today at Apple: Series 9 Watches availabl...
Apple is now offering Certified Refurbished Apple Watch Series 9 models on their online store for up to $80 off MSRP, starting at $339. Each Watch includes Apple’s standard one-year warranty, a new... Read more
The latest Apple iPhone deals from wireless c...
We’ve updated our iPhone Price Tracker with the latest carrier deals on Apple’s iPhone 15 family of smartphones as well as previous models including the iPhone 14, 13, 12, 11, and SE. Use our price... Read more
Boost Mobile will sell you an iPhone 11 for $...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering an iPhone 11 for $149.99 when purchased with their $40 Unlimited service plan (12GB of premium data). No trade-in is required... Read more
Free iPhone 15 plus Unlimited service for $60...
Boost Infinite, part of MVNO Boost Mobile using AT&T and T-Mobile’s networks, is offering a free 128GB iPhone 15 for $60 per month including their Unlimited service plan (30GB of premium data).... Read more
$300 off any new iPhone with service at Red P...
Red Pocket Mobile has new Apple iPhones on sale for $300 off MSRP when you switch and open up a new line of service. Red Pocket Mobile is a nationwide MVNO using all the major wireless carrier... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, available for $759 for 8-Core CPU/7-Core GPU/256GB models and $929 for 8-Core CPU/8-Core GPU/512GB models. Apple’s one-year warranty is... Read more
Updated Apple MacBook Price Trackers
Our Apple award-winning MacBook Price Trackers are continually updated with the latest information on prices, bundles, and availability for 16″ and 14″ MacBook Pros along with 13″ and 15″ MacBook... Read more
Every model of Apple’s 13-inch M3 MacBook Air...
Best Buy has Apple 13″ MacBook Airs with M3 CPUs in stock and on sale today for $100 off MSRP. Prices start at $999. Their prices are the lowest currently available for new 13″ M3 MacBook Airs among... Read more
Sunday Sale: Apple iPad Magic Keyboards for 1...
Walmart has Apple Magic Keyboards for 12.9″ iPad Pros, in Black, on sale for $150 off MSRP on their online store. Sale price for online orders only, in-store price may vary. Order online and choose... Read more

Jobs Board

DMR Technician - *Apple* /iOS Systems - Haml...
…relevant point-of-need technology self-help aids are available as appropriate. ** Apple Systems Administration** **:** Develops solutions for supporting, deploying, Read more
Omnichannel Associate - *Apple* Blossom Mal...
Omnichannel Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple 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
IT Systems Engineer ( *Apple* Platforms) - S...
IT Systems Engineer ( Apple Platforms) at SpaceX Hawthorne, CA SpaceX was founded under the belief that a future where humanity is out exploring the stars is Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.