levene@aplcomm.jhuapl.edu (Robert A. Levene) (02/17/90)
I am interested in translating C source code to Ada source code. Are there any programs, either available or vaporware, which perform this translation? I would appreciate suggestions and advice by e-mail, and I'll summarize to the net if there is sufficient interest. Rob Robert A. Levene ARPA Internerd: levene@aplcomm.jhuapl.edu The Johns Hopkins University BITHEAD: RXL1@APLVM Applied Physics Laboratory Disclaimer: I never even claimed 'er
ryer@inmet.inmet.com (02/19/90)
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.