From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a3ca574fc2007430 X-Google-Attributes: gid103376,public X-Google-Thread: 115aec,1af4ebb508a7df54 X-Google-Attributes: gid115aec,public From: Ken Garlington Subject: Re: Ada and Automotive Industry Date: 1996/12/02 Message-ID: <32A37DA8.385F@lmtas.lmco.com>#1/1 X-Deja-AN: 201987268 references: <1996Dec2.221233.523@decus.org.nz> content-type: text/plain; charset=us-ascii organization: Lockheed Martin Tactical Aircraft Systems mime-version: 1.0 newsgroups: comp.realtime,comp.lang.ada x-mailer: Mozilla 2.02 (Win95; I) Date: 1996-12-02T00:00:00+00:00 List-Id: 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. > > 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. 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): > -- 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. > > -regards - jim granville. -- LMTAS - The Fighter Enterprise - "Our Brand Means Quality" See http://www.lmtas.com for more information (job listings now available)