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,37b5f16b9be86fec X-Google-Attributes: gid103376,public From: William Clodius Subject: Re: ada -> C translator Date: 1997/04/08 Message-ID: <334A660E.52BF@lanl.gov>#1/1 X-Deja-AN: 231576622 References: <33436B29.41C6@sema-grenoble.fr> <5i243c$i1h@mulga.cs.mu.OZ.AU> <5i4jok$qiq@mulga.cs.mu.OZ.AU> <5i9r5t$nb6@mulga.cs.mu.OZ.AU> <5icuf7$4k1$1@goanna.cs.rmit.edu.au> Organization: Los Alamos National Lab Newsgroups: comp.lang.ada Date: 1997-04-08T00:00:00+00:00 List-Id: Richard A. O'Keefe wrote: > > Nor has Fergus said that "portable C is portable C and that is that". > His claim, as I understood it, was that one can translate a source > program that is intended to be portable to C that can adapt to particular > targets but is usable on many. Talking about interfacing to COBOL misses > _his_ point, because in that case the source program isn't _intended_ to > be portable (the porting target might not _have_ a COBOL compiler). > Both Robert Dewar and Fergus Henderson are talking past one another. Robert argues that there are significant machine dependencies in the translation of Ada, Fergus argues that any given machine dependency can be handled using conditional compilation. Both statements are valid and not in contradiction, but both are misleading. Fergus's points are perfectly valid for Mercury, however, this thread is not about compiling Mercury to C, but about compiling Ada to C. As a logic programming language Mercury is much more distant from the machine than is Ada. An Ada compiler to retain efficiency and correctness of translation has to be more sensitive than Mercury to machine (and C compiler) differences. If the amount of code that is processor independent is relatively small, then the usefullness of C as a portable language vanishes. The problem is not that conditional compilation cannot in principle be used to address these issues, which is what Robert Dewar's arguments seem to suggest, but rather that in the case of Ada what is possible in principle is impractical in practice. -- William B. Clodius Phone: (505)-665-9370 Los Alamos Nat. Lab., NIS-2 FAX: (505)-667-3815 PO Box 1663, MS-C323 Group office: (505)-667-5776 Los Alamos, NM 87545 Email: wclodius@lanl.gov