TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Subject:
From:
"W. Wesley Groleau (Wes)" <[log in to unmask]>
Date:
Tue, 19 Nov 1996 11:48:30 EST
Reply-To:
"W. Wesley Groleau (Wes)" <[log in to unmask]>
Parts/Attachments:
text/plain (103 lines)
Philip's reply reveals that my language was a little sloppy, so
to summarize:  I advise against trying to design a subset for any
implementation until you can demonstrate that a particular feature
is not feasible.  The discussions, predictions, and speculations going
on here are valuable in themselves, but they are still not
"demonstrations."

(Also I apologize for trying to remember the subject line from memory)

--------------

From [log in to unmask] Tue Nov 19 11:22 EST 1996
Date: Tue, 19 Nov 1996 10:17:42 -0600
From: Philip Johnson <[log in to unmask]>
Subject: Re: Ada Subset for micro-controller?

W. Wesley Groleau (Wes) wrote:
>
> Why a subset?

I realize that your comments are pointed at Microcontrollers,  but the subset
question is far more reaching than just one class of processor.  My comments
are pointed at general system consideration.

> Some believe that the full language can not possibly be implemented in a
> cross-compiler for such (a) chip(s).  Well, why not port gnat/gcc to the
> chip first, and find out if compiled code can "fit" and run?  THEN if it
> doesn't, think about what to leave out.

Here you refer to "chips", then "compiled code" that can fit.  Isn't getting
the compiled code to fit a system contraint rather than a processor contraint?

In my experience this is the case.  I wrote a system in full ISO/ANSI Pascal
that worked great as long as I had 64Kb of memory and a 512Kb EPROM.  It would
never fit in 256 bytes of memory or a 1Kb EPROM.

I have written systems that run within 256 bytes of ram and 4 Kb of EPROM.
I fully understood the contraints and adjusted my approach to fit the system.

> In the case of gnat, isn't it true that most of the run-time is in Ada
> and only linked if needed?  So the documentation MIGHT end up saying
> "Can compile full Ada, but if you use features A, B, C, ... then your
> program won't fit in ..."

This is the case in all software.  I remember when a system (DEC PDP-11)
only allowed a 32 Kb task image.  I remember my first PC had 4 Kb of memory
and I could run everything from games to word processors.  Now if you have
less than 16 Mb in a PC you can barely get the OS to run.  I say this only
to demonstrate that all systems present some contraint on the developer.


Any development requires knowledge of the system contraints.  If a language
feature is not appropriate for a specific environment and the developer is
made aware of the restriction I see no problem.

> >From the marketing viewpoint, which do you think will sell better:
>
> 1. "MyCo's "Tiny Ada" has been carefully crafted to exclude constructs
>     that will not fit on the 5097 control system."

If this were the only configuration that I was planning to use and the cost
was satisfactory I would select this.

> 2. "OurCo's Ada compiler supports the full language, although users
>    cross-compiling to the 5097 CS will have to avoid certain features
>    via pragma Restrictions."

If I were planning to have this system reuse code from other systems, or
reuse code developed for this system on other systems, and the restrictions
were completely identified, and the cost was satisfactory this would be my
choice.

> 3. "Wizards, Inc. used our tremendous expertise in these systems to
>    design out features that are unsupportable.  Don't buy MyCo or OurCo
>    because their compiler can't possibly work.  Wizard Ada will be
>    available Real Soon Now..."

Sound like MS vaporware.  8^{)

This says that someone has decided for me what is and isn't supportable.
They may be completely correct or maybe not.  I would have to spend my mony
to find out if they are truely experts or not.  I would have to think long
and hard on this one.

You bring up a number of valid points if they are viewed from a narrow scope
of microcontrollers, but as I said the subset question is far more reaching
than just one class of processor.  Also,  my experiences with language
subsets has not been positive and I tend to stay away from them.

The nice thing about this is that all sides can be presented and debated.
You neve can tell I have been swayed before when the arguments were strong
enough to convince me that I was in error.  8^{)

Phil
 _______________________________________________________________________
|                Ada, Perl, and Java! It can't get any better.
|
|Philip Johnson                             Telco: (205) 890-1178
|Sr. Software Engineer                      Fax  : (205) 890-1174
|International Space Systems Inc.           email: [log in to unmask]
|Huntsville, AL
-----------------------------------------------------------------------

ATOM RSS1 RSS2