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

coconutBattery 3.9.14 - Displays info ab...
With coconutBattery you're always aware of your current battery health. It shows you live information about your battery such as how often it was charged and how is the current maximum capacity in... Read more
Keynote 13.2 - Apple's presentation...
Easily create gorgeous presentations with the all-new Keynote, featuring powerful yet easy-to-use tools and dazzling effects that will make you a very hard act to follow. The Theme Chooser lets you... Read more
Apple Pages 13.2 - Apple's word pro...
Apple Pages is a powerful word processor that gives you everything you need to create documents that look beautiful. And read beautifully. It lets you work seamlessly between Mac and iOS devices, and... Read more
Numbers 13.2 - Apple's spreadsheet...
With Apple Numbers, sophisticated spreadsheets are just the start. The whole sheet is your canvas. Just add dramatic interactive charts, tables, and images that paint a revealing picture of your data... Read more
Ableton Live 11.3.11 - Record music usin...
Ableton Live lets you create and record music on your Mac. Use digital instruments, pre-recorded sounds, and sampled loops to arrange, produce, and perform your music like never before. Ableton Live... Read more
Affinity Photo 2.2.0 - Digital editing f...
Affinity Photo - redefines the boundaries for professional photo editing software for the Mac. With a meticulous focus on workflow it offers sophisticated tools for enhancing, editing and retouching... Read more
SpamSieve 3.0 - Robust spam filter for m...
SpamSieve is a robust spam filter for major email clients that uses powerful Bayesian spam filtering. SpamSieve understands what your spam looks like in order to block it all, but also learns what... Read more
WhatsApp 2.2338.12 - Desktop client for...
WhatsApp is the desktop client for WhatsApp Messenger, a cross-platform mobile messaging app which allows you to exchange messages without having to pay for SMS. WhatsApp Messenger is available for... Read more
Fantastical 3.8.2 - Create calendar even...
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
iShowU Instant 1.4.14 - Full-featured sc...
iShowU Instant gives you real-time screen recording like you've never seen before! It is the fastest, most feature-filled real-time screen capture tool from shinywhitebox yet. All of the features you... Read more

Latest Forum Discussions

See All

Square Enix commemorates one of its grea...
One of the most criminally underused properties in the Square Enix roster is undoubtedly Parasite Eve, a fantastic fusion of Resident Evil and Final Fantasy that deserved far more than two PlayStation One Games and a PSP follow-up. Now, however,... | Read more »
Resident Evil Village for iPhone 15 Pro...
During its TGS 2023 stream, Capcom showcased the Following upcoming ports revealed during the Apple iPhone 15 event. Capcom also announced pricing for the mobile (and macOS in the case of the former) ports of Resident Evil 4 Remake and Resident Evil... | Read more »
The iPhone 15 Episode – The TouchArcade...
After a 3 week hiatus The TouchArcade Show returns with another action-packed episode! Well, maybe not so much “action-packed" as it is “packed with talk about the iPhone 15 Pro". Eli, being in a time zone 3 hours ahead of me, as well as being smart... | Read more »
TouchArcade Game of the Week: ‘DERE Veng...
Developer Appsir Games have been putting out genre-defying titles on mobile (and other platforms) for a number of years now, and this week marks the release of their magnum opus DERE Vengeance which has been many years in the making. In fact, if the... | Read more »
SwitchArcade Round-Up: Reviews Featuring...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for September 22nd, 2023. I’ve had a good night’s sleep, and though my body aches down to the last bit of sinew and meat, I’m at least thinking straight again. We’ve got a lot to look at... | Read more »
TGS 2023: Level-5 Celebrates 25 Years Wi...
Back when I first started covering the Tokyo Game Show for TouchArcade, prolific RPG producer Level-5 could always be counted on for a fairly big booth with a blend of mobile and console games on offer. At recent shows, the company’s presence has... | Read more »
TGS 2023: ‘Final Fantasy’ & ‘Dragon...
Square Enix usually has one of the bigger, more attention-grabbing booths at the Tokyo Game Show, and this year was no different in that sense. The line-ups to play pretty much anything there were among the lengthiest of the show, and there were... | Read more »
Valve Says To Not Expect a Faster Steam...
With the big 20% off discount for the Steam Deck available to celebrate Steam’s 20th anniversary, Valve had a good presence at TGS 2023 with interviews and more. | Read more »
‘Honkai Impact 3rd Part 2’ Revealed at T...
At TGS 2023, HoYoverse had a big presence with new trailers for the usual suspects, but I didn’t expect a big announcement for Honkai Impact 3rd (Free). | Read more »
‘Junkworld’ Is Out Now As This Week’s Ne...
Epic post-apocalyptic tower-defense experience Junkworld () from Ironhide Games is out now on Apple Arcade worldwide. We’ve been covering it for a while now, and even through its soft launches before, but it has returned as an Apple Arcade... | Read more »

Price Scanner via MacPrices.net

New low price: 13″ M2 MacBook Pro for $1049,...
Amazon has the Space Gray 13″ MacBook Pro with an Apple M2 CPU and 256GB of storage in stock and on sale today for $250 off MSRP. Their price is the lowest we’ve seen for this configuration from any... Read more
Apple AirPods 2 with USB-C now in stock and o...
Amazon has Apple’s 2023 AirPods Pro with USB-C now in stock and on sale for $199.99 including free shipping. Their price is $50 off MSRP, and it’s currently the lowest price available for new AirPods... Read more
New low prices: Apple’s 15″ M2 MacBook Airs w...
Amazon has 15″ MacBook Airs with M2 CPUs and 512GB of storage in stock and on sale for $1249 shipped. That’s $250 off Apple’s MSRP, and it’s the lowest price available for these M2-powered MacBook... Read more
New low price: Clearance 16″ Apple MacBook Pr...
B&H Photo has clearance 16″ M1 Max MacBook Pros, 10-core CPU/32-core GPU/1TB SSD/Space Gray or Silver, in stock today for $2399 including free 1-2 day delivery to most US addresses. Their price... Read more
Switch to Red Pocket Mobile and get a new iPh...
Red Pocket Mobile has new Apple iPhone 15 and 15 Pro models on sale for $300 off MSRP when you switch and open up a new line of service. Red Pocket Mobile is a nationwide service using all the major... Read more
Apple continues to offer a $350 discount on 2...
Apple has Studio Display models available in their Certified Refurbished store for up to $350 off MSRP. Each display comes with Apple’s one-year warranty, with new glass and a case, and ships free.... Read more
Apple’s 16-inch MacBook Pros with M2 Pro CPUs...
Amazon is offering a $250 discount on new Apple 16-inch M2 Pro MacBook Pros for a limited time. Their prices are currently the lowest available for these models from any Apple retailer: – 16″ MacBook... Read more
Closeout Sale: Apple Watch Ultra with Green A...
Adorama haș the Apple Watch Ultra with a Green Alpine Loop on clearance sale for $699 including free shipping. Their price is $100 off original MSRP, and it’s the lowest price we’ve seen for an Apple... Read more
Use this promo code at Verizon to take $150 o...
Verizon is offering a $150 discount on cellular-capable Apple Watch Series 9 and Ultra 2 models for a limited time. Use code WATCH150 at checkout to take advantage of this offer. The fine print: “Up... Read more
New low price: Apple’s 10th generation iPads...
B&H Photo has the 10th generation 64GB WiFi iPad (Blue and Silver colors) in stock and on sale for $379 for a limited time. B&H’s price is $70 off Apple’s MSRP, and it’s the lowest price... Read more

Jobs Board

Housekeeper, *Apple* Valley Villa - Cassia...
Apple Valley Villa, part of a 4-star senior living community, is hiring entry-level Full-Time Housekeepers to join our team! We will train you for this position and Read more
Housekeeper, *Apple* Valley Village - Cassi...
Apple Valley Village Health Care Center, a 4-star rated senior care campus, is hiring a Part-Time Housekeeper to join our team! We will train you for this position! Read more
Optometrist- *Apple* Valley, CA- Target Opt...
Optometrist- Apple Valley, CA- Target Optical Date: Sep 23, 2023 Brand: Target Optical Location: Apple Valley, CA, US, 92308 **Requisition ID:** 796045 At Target Read more
Senior *Apple* iOS CNO Developer (Onsite) -...
…Offense and Defense Experts (CODEX) is in need of smart, motivated and self-driven Apple iOS CNO Developers to join our team to solve real-time cyber challenges. Read more
*Apple* Systems Administrator - JAMF - Activ...
…**Public Trust/Other Required:** None **Job Family:** Systems Administration **Skills:** Apple Platforms,Computer Servers,Jamf Pro **Experience:** 3 + years of Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.