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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!inmet!ryer From: ryer@inmet.inmet.com Newsgroups: comp.lang.ada Subject: Re: Wanted: C to Ada translator Message-ID: <20600034@inmet> Date: 19 Feb 90 14:16:00 GMT References: <4727@aplcen.apl.jhu.edu> Nf-ID: #R:aplcen.apl.jhu.edu:4727:inmet:20600034:000:1083 Nf-From: inmet.inmet.com!ryer Feb 19 09:16:00 1990 List-Id: Re Automatic translation: There are two approaches: 1. Brute Force Approach Takes C and generates Ada approximately line for line. Uses unchecked conversion of integers to access types and back to handle nearly every C construct. The generated Ada code is guaranteed to be less maintainable, less portable, and less efficient. Removes any trace of good software engineering that was in the input C. About 3/4 of the comments in the code still make sense, and only 10% are diabolically misleading. I believe there are several companies selling these. 2. High Quality Approach: Takes C and generates a good Ada program. C types that were conceptually enumerations become enumerations. Deduces appropriate abstract types. Produces a logical separate compilation structure. Uses generics where sensible. Resultant program is more maintainable, equally or more portable, and at least as efficient. I don't believe that any of these exist. Your selection of one of these approaches will be driven by your objectives in doing the translation. Mike Ryer Intermetrics, Inc.