comp.lang.ada
 help / color / mirror / Atom feed
From: Ken Garlington <GarlingtonKE@lmtas.lmco.com>
Subject: Re: Ada and Automotive Industry
Date: 1996/12/11
Date: 1996-12-11T00:00:00+00:00	[thread overview]
Message-ID: <32AEE3EF.12DD@lmtas.lmco.com> (raw)
In-Reply-To: 1996Dec11.220521.525@decus.org.nz


granville@decus.org.nz wrote:
> 
>  A good idea in theory, but subset systems are not commercial, and such a
> 'std' is likely to bog in red tape.

Since the ARA is a commercial organization that has already defined some
informal standards pretty quickly, I would say they're your best bet.

> There are also Modula-2 superset features NOT in Ada we would hate to loose.
> Nested comments is one - ALL languages should have this. HEX support is
> another.

I guess I don't understand the issue. Ada comments are line based on
purpose, to avoid misleading the reader as to the difference between
"live" and commented code. As for Hex support, Ada does provide the
ability to define hex values, perform I/O with hax values, etc. What
do you need?

> These problems perhaps make an Ada -> Modula-2 translator more practical.
> 
> >> Remember that Heap, Pointer, and dynamic memory work is not a C51
> strongpoint
> >> Fast interrupts, and boolean control logic is.
> >Fortunately, Ada 95 supports both fast interrupts (e.g., using procedures as
> >interrupt handlers) and boolean control logic. It also provides generics and
> >strong typing, which can be used with minimal overhead with most compilers.
> >I've implemented Ada programs on several systems with no use of the heap, so
> >it should be doable for a C51 (assuming the selection of an appropriate subset
> >of the language).
> 
> Given a Modula-2 subset of Ada, it is doable - & we have done this for a
> number of years now - but Ada95 it is not.

Since my statement assumed the use of an appropriate subset, it sounds
like
we are talking about the same thing. Do you have an Ada subset toolset?

> 
> >granville@decus.org.nz wrote:
> >>
> >> Following some feedback on Ada in Automotive systems, which is somewhat
> >> 80c51 focused, I have included below a document we have on Ada / Modula-2
> >> in relation to the 80c51 core.
> >>
> >> [snip]
> >>
> >>  Ada and Modula-2 are both type-safe languages, with type check, import and
> >> scope control to simplify code design. Ada is generally a superset
> >> of Modula-2 - and full Ada support is not practical on a c51 core.
> >>
> >> [snip]
> >>
> >>  You can, however code in Ada, and use a Ada2Mod translator to output
> Modula-2
> >> code, which then will run on c51 cores.

Will Ada2Mod handle those parts of Ada that are outside of Modula-2, but
are easy to implement on a c51 core, like generics? If so, it sounds
like
you have already done the work to permit Ada to be implemented on a C51!

> >>  Modula-2 has more inherant types than Ada, ( eg BYTE, WORD, LONGWORD,
> BITSET)
> >> and many code MUCH better on a C51 than std INTEGER.
> >>  A subrange declaration in Ada, could create these types, for efficent
> >> translated Mod51 usage.

Actualy, you'd probably want to declare a new type, so that you could
specify the bitwidth.

> 
> >Have you looked at implementing Ada constructs that are not directly mappable
> >to Modula-2, but that should be implementable on a C51? For example, it
> appears
> >from your message that the following Ada code can be implemented on a C51
> (after
> >translation):
> 
>  Yes.  ( and also some Visual BASIC ones too ! )
> 
> >> --  Ada Code here    (* Modula-2 Code here  *)
> >> [snip]
> >> FUNCTION  Add(x, y: integer)      PROCEDURE Add(x, y: integer) : INTEGER;
> >>            RETURN integer IS
> >> value: integer;    VAR  value: integer;
> >> BEGIN                             BEGIN
> >>   value :=  ( x + y value :=( x + y );
> >>   RETURN value;                     RETURN value;
> >> END Add;                          END Add;
> 
> >It would seem that the following Ada code, which extends Add for types other
> than
> >Integer, would also be implementable...
> >
> >-- "Add" specification
> >generic
> >  type Item is private;
> >  function "+" (Left, Right : Item) return Item is <>;
> >function Add (Left, Right : Item) return Item;
> >
> >-- "Add" body
> >function Add (Left, Right : Item) return Item is
> >begin
> >
> >  return Left + Right;
> >end Add;
> 
> >I would hope that generics, child packages, and other parts of Ada that
> >are more "static" in nature can be implemented without respect to the
> >amount of memory, processor speed, etc. available on a target.
> 
> We did look at this, but features like this generic provide little gain to
> an embedded control programmer, and would more likely penalise code size.

I'm an embedded control programmer, and we use generics a lot for things
like
gains, lead/lags, etc. Our compilers generate very efficient code for
them.

>  The source might 'look simple', but what is being done is hidden and not
> obvious to another programmer. There is no code-size, or safety advantage
> to this feature.

I have a lot of practical experience to the contrary! Using standard
generics
makes the code a lot simpler to write and more reliable as well!

This is one of the best features of Ada, in our experience!

> 
>  We did see some others features that we would like to implement, especially
> as other PC/Win95 hosted Modula-2 supplier's have done this as well.
> 
>  Code portability ( cross development ) is important.
> 
>  Especially in the development phases where the prototype and test features
> of a std PC are very useful. eg user interface, Sin / Frequency / ADC algorithm
> testing etc.
> 
>  'Ada' ideas we have on a 'short list' to add to Mod51 are :-
> 
> ** .First, .Last  ->> MIN and MAX, with some extensions to std MIN,MAX.
>  Advantage : More readable code & further encourages the safe use of Enums.
>  Extends the lead over C.
> ** the IN operator in Ada looks to have wider context than Modula-2, but I
>  need to test this further.
>  Advantage : More readable, and smaller code
> ** Open CONST arrays,
>  Open CONSTS may be simpler to code, but not so safe! I have seen very nasty
>  C bugs caused by this 'feature'. Still, some M2's do have this extension.
> ** 'repeat fields'.
>  Repeat fields look safe, with no dangers, and make code more readable.
> ** Numerics allow #2#1111_0000 - ie CHAR '_' is legal (skipped ) in numbers.
>  This is also in IEC1131, and we support this already on BINARY NUMBERS.
>  We also ONLY accept multiples of 8 fields in BINARY Nums
> ** Initialised VARs
>  Significant code overhead. Suggested instead is Clr_RAM module, that clears
>  all C51 Data RAM to 00H, at a cost of << 10 Bytes.
> 
> - jim granville.
> ===== Mandeno Granville FAX +64 9 6301 720, 128 Grange Rd Auckland 3 NZ ======
> * Developers and suppliers of serious MicroController Embedded Control Tools *
> * 89c2051, 89c1051 Emulator / ChipreProgrammers                              *
> * x51 C, Pascal & Modula-2 Compilers, Simulators, Emulators & FLASH Pgmrs    *
> * Contact : Jim Granville . Email above.                                     *

--
LMTAS - The Fighter Enterprise - "Our Brand Means Quality"
For job listings, other info: http://www.lmtas.com or
http://www.lmco.com




       reply	other threads:[~1996-12-11  0:00 UTC|newest]

Thread overview: 163+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1996Dec11.220521.525@decus.org.nz>
1996-12-11  0:00 ` Ken Garlington [this message]
1996-12-13  0:00 Ada and Automotive Industry Franco Mazzanti
  -- strict thread matches above, loose matches on Subject: below --
1996-12-11  0:00 Franco Mazzanti
1996-12-11  0:00 ` Robert Dewar
1996-12-13  0:00 ` Robert I. Eachus
1996-12-10  0:00 Franco Mazzanti
1996-12-05  0:00 Franco Mazzanti
1996-12-06  0:00 ` Robert Dewar
1996-12-11  0:00 ` Robert I. Eachus
1996-12-13  0:00   ` Ted Dennison
1996-12-15  0:00     ` Robert Dewar
1996-12-17  0:00       ` Tucker Taft
1996-12-18  0:00       ` Keith Thompson
1996-12-18  0:00         ` Keith Thompson
1996-12-18  0:00       ` Robert A Duff
1996-12-18  0:00         ` Robert Dewar
1996-12-18  0:00           ` Robert A Duff
1996-12-18  0:00             ` Ken Garlington
1996-12-19  0:00               ` Robert A Duff
1996-12-20  0:00                 ` Philip Brashear
1996-12-20  0:00                   ` Robert Dewar
1996-12-22  0:00               ` Robert Dewar
1996-12-23  0:00                 ` Ken Garlington
1996-12-18  0:00       ` Geert Bosch
1996-12-17  0:00 ` Robert I. Eachus
     [not found] <1996Dec2.221233.523@decus.org.nz>
1996-12-02  0:00 ` Ken Garlington
     [not found] <1996Nov30.130532.522@decus.org.nz>
1996-12-02  0:00 ` Ken Garlington
1996-11-27  0:00 W. Wesley Groleau (Wes)
1996-11-25  0:00 Ada and automotive industry W. Wesley Groleau (Wes)
1996-11-24  0:00 Ada and Automotive Industry Ingemar Persson
1996-11-13  0:00 Marin David Condic, 561.796.8997, M/S 731-93
1996-11-13  0:00 ` Ken Garlington
1996-11-12  0:00 James Thiele
1996-11-12  0:00 James Thiele
1996-11-13  0:00 ` Frank Manning
1996-11-13  0:00 ` Robert Dewar
1996-11-15  0:00   ` Ken Garlington
1996-11-13  0:00 ` Ken Garlington
1996-11-11  0:00 James Thiele
1996-11-01  0:00 ETHoierman
1996-11-05  0:00 ` Stanley R. Allen
1996-11-06  0:00 ` Stanley R. Allen
1996-11-06  0:00   ` James Thiele
1996-11-06  0:00     ` Stanley R. Allen
1996-11-07  0:00       ` Dale Stanbrough
1996-11-11  0:00       ` Ken Tindell
1996-11-11  0:00         ` Robert Dewar
1996-11-11  0:00         ` Matthew Heaney
1996-11-11  0:00           ` Philip Brashear
1996-11-07  0:00     ` Frank Manning
1996-11-11  0:00     ` Frank Manning
1996-11-13  0:00       ` Ken Tindell
1996-11-13  0:00       ` Richard Riehle
1996-11-14  0:00         ` Jack Patteeuw
1996-11-16  0:00           ` David Taylor
1996-11-20  0:00             ` Richard Riehle
1996-11-21  0:00               ` Dave Wood
1996-11-21  0:00             ` Art Schwarz
1996-11-22  0:00               ` Ken Tindell
1996-11-22  0:00               ` Robert B. Love 
1996-11-24  0:00               ` "Paul E. Bennett"
1996-11-18  0:00           ` David Taylor
1996-11-17  0:00         ` Robert Dewar
1996-11-18  0:00           ` Ken Tindell
1996-11-22  0:00             ` Richard Kenner
1996-11-23  0:00               ` James Thiele
1996-11-27  0:00                 ` Richard Kenner
1996-11-22  0:00             ` Robert Dewar
1996-12-05  0:00             ` Michael Warner
1996-11-20  0:00           ` Richard Riehle
1996-11-23  0:00             ` Robert Dewar
1996-11-25  0:00               ` Richard Riehle
1996-11-27  0:00                 ` Robert Dewar
1996-11-27  0:00                 ` Robert Dewar
1996-11-29  0:00                   ` Richard Riehle
1996-12-02  0:00                   ` Chris Hills
1996-12-04  0:00                   ` Jon S Anthony
1996-11-27  0:00                 ` Ken Garlington
1996-12-01  0:00                   ` Richard Riehle
1996-11-25  0:00               ` Ken Tindell
1996-11-24  0:00             ` Richard Kenner
1996-11-25  0:00               ` Ken Tindell
1996-11-26  0:00                 ` John Dammeyer
1996-11-26  0:00                   ` Ken Garlington
1996-11-25  0:00               ` Richard Riehle
     [not found]           ` <Pine.GSO.3.95.961120154239.3 <Pine.GSO.3.95.961201100430.21598A-100000@nunic.nu.edu>
1996-12-01  0:00             ` James Thiele
1996-11-27  0:00         ` Jon S Anthony
1996-12-03  0:00           ` Richard A. O'Keefe
1996-12-03  0:00             ` Ted Dennison
1996-12-11  0:00             ` Richard Riehle
1996-12-13  0:00               ` Ted Dennison
1996-11-11  0:00     ` Norman H. Cohen
1996-11-14  0:00     ` Robert I. Eachus
1996-11-15  0:00       ` William P. Milam
1996-11-08  0:00   ` Robert I. Eachus
1996-11-08  0:00     ` James Thiele
1996-11-08  0:00       ` nasser
1996-11-09  0:00         ` Robert Dewar
1996-11-22  0:00           ` Dirk Dickmanns
1996-11-10  0:00       ` Matthew Heaney
1996-11-11  0:00         ` Robert Dewar
1996-11-11  0:00           ` James Thiele
1996-11-12  0:00             ` Robert Dewar
1996-11-12  0:00       ` Richard A. O'Keefe
1996-11-12  0:00         ` Robert Dewar
1996-11-13  0:00           ` Richard A. O'Keefe
1996-11-14  0:00         ` William P. Milam
1996-11-19  0:00           ` Richard A. O'Keefe
1996-11-15  0:00       ` Robert Dewar
1996-11-15  0:00       ` Robert Dewar
1996-11-16  0:00         ` Adam Beneschan
1996-11-22  0:00           ` Robert Dewar
1996-11-16  0:00         ` Geert Bosch
1996-11-21  0:00           ` Robert Dewar
1996-11-11  0:00     ` Ken Tindell
1996-11-11  0:00       ` Matthew Heaney
1996-11-11  0:00       ` Robert Dewar
1996-11-08  0:00   ` Ken Garlington
     [not found]   ` <847341612snz@transcontech.co.uk>
1996-11-10  0:00     ` Robert Dewar
1996-11-12  0:00       ` "Paul E. Bennett"
1996-11-15  0:00   ` Robert I. Eachus
1996-11-15  0:00     ` William P. Milam
1996-11-15  0:00     ` John Howard
1996-11-15  0:00     ` Robert Dewar
1996-11-18  0:00       ` Ken Tindell
1996-11-18  0:00         ` Robert Dewar
1996-11-19  0:00         ` Richard A. O'Keefe
1996-12-05  0:00         ` Michael Warner
1996-12-06  0:00           ` Robert Dewar
1996-11-21  0:00     ` James Weaver
1996-11-21  0:00   ` Robert I. Eachus
1996-11-22  0:00   ` Jon S Anthony
1996-11-22  0:00   ` Chris Hills
1996-11-23  0:00   ` Ralph Paul
1996-11-24  0:00   ` Otto Lind
1996-11-25  0:00     ` Richard Kenner
1996-11-28  0:00       ` Eyal Ben-Avraham
1996-11-29  0:00         ` Richard Kenner
1996-11-25  0:00   ` Robert I. Eachus
1996-11-26  0:00   ` Jon S Anthony
1996-11-26  0:00   ` Jon S Anthony
1996-11-27  0:00   ` Jon S Anthony
1996-11-27  0:00   ` Jon S Anthony
1996-12-01  0:00   ` Chris Hills
1996-12-01  0:00     ` Robert Dewar
1996-12-01  0:00     ` Robert Dewar
1996-12-02  0:00     ` Robert A Duff
1996-12-02  0:00   ` Chris Hills
1996-12-03  0:00     ` Andy Ashworth
1996-12-03  0:00       ` Ian Ward
1996-12-03  0:00   ` Ted Dennison
1996-12-03  0:00   ` Ken Garlington
1996-12-03  0:00   ` George Romanski
1996-12-05  0:00     ` Ken Tindell
1996-12-04  0:00   ` Jon S Anthony
1996-12-11  0:00   ` Robert I. Eachus
1996-12-13  0:00   ` Ted Dennison
1996-12-13  0:00     ` Robert Dewar
1996-12-14  0:00   ` Chris Hills
1996-12-19  0:00     ` Ian Ward
1996-12-17  0:00   ` Robert I. Eachus
1996-12-18  0:00     ` Robert Dewar
1996-12-19  0:00   ` Robert I. Eachus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox