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.6 required=5.0 tests=BAYES_00,INVALID_DATE, TO_NO_BRKTS_PCNT autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ames!bionet!agate!ucbvax!coopn1.csc.ti.com!knoll From: knoll@coopn1.csc.ti.com (Ed Knoll @(719)593-3762) Newsgroups: comp.lang.ada Subject: Re: Ada Portability Message-ID: <9011151726.AA07022@tilde> Date: 15 Nov 90 17:26:28 GMT Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet List-Id: The issue of portability is indeterminate if it is not planned for. There are some aspects of the language and of some of the compilers that can make it difficult. However, we have had some fairly decent success. For example: A group I was working with was supporting two programs simultaneously. One job was essentially a subset of the other with about 20% unique material. They were both hosted on the same target (embedded processor), but each program was using a different run-time library. This was the target environment. On the host, we were using two different compilers. One would generate code for the host and the target, the other just generated code for the host. The host only compiler was somewhat faster and had a better host debugger. In addition, there was a large simulation (written in FORTRAN and Pascal) that emulated different aspects of the environment and the system. We wished to test some of the subsystems of the Ada code by substituting them for their counterparts in the simulation. At the same time we were putting together an environment where the entire applications software would be driven by the environment and hardware components of that simulation. We constructed an OS frontend to hide the differences between the two run-times for the target and we built a body for the frontend that would allow the applications to run on the host. The host only Ada compiler did not include 'long_int' in the standard package because 'integer' was long to begin with. A package was constructed which contained a 'long_int' declaration for the host; the same package contained nothing for the target. This package was 'with'ed and 'use'ed by everyone. Driver packages were written for the different interfaces with the simulation. Library organization controlled how we constructed the different versions. Summary: Compilers - 2 Platforms - 2 (target and host) Operating Systems - 3 (two target and host emulation) Execution Environment - 5 (standalone host, subsystem w/ simulation, entire system w/ simulation, two targets) Not all code was (or could) be evaluated in every environment, but much of it was with very few portability problems. It did take some planning and some rework, but very cost effective overall. ------------------------------------------------------------------------------- Edward L. Knoll Disclaimer: If my company doesn't trust Texas Instruments my judgement, why am I working 5825 Mark Dabling Blvd for them? Colorado Springs, Colo. 80919 (719) 593-5182 knoll@coopn1.csc.ti.com