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,XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4c6ea3271d0f95a2,start X-Google-Attributes: gid103376,public From: "Gordon Brunton" Subject: Elaboration of Ada object archive. Possible/Alternatives? Date: 2000/11/18 Message-ID: #1/1 X-Deja-AN: 695240614 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Complaints-To: abuse@home.net X-Trace: news1.rdc1.bc.home.com 974591316 24.115.144.192 (Sat, 18 Nov 2000 15:48:36 PST) Organization: Excite@Home - The Leader in Broadband http://home.com/faster X-MSMail-Priority: Normal NNTP-Posting-Date: Sat, 18 Nov 2000 15:48:36 PST Newsgroups: comp.lang.ada Date: 2000-11-18T00:00:00+00:00 List-Id: Having been fruitless in my search for a solution to my problem I am hoping someone on this newsgroup can assist. I am convinced there has to be someone who has encountered this problem before. Background: I'm currently involved in the implementation of a large scale Air Traffic Control System written primarily written using Ada 83. The development environment is Rational Apex on a Solaris platform. The integration/delivery platform is HP/UX. Problem: There are several components for the current system we intend to reuse from another system in the product line (These components are written in Ada as is the rest of the system). The requirement is that the source code for these reused components is a non deliverable item. The source code for the rest of the system is deliverable however and there is a requirement for the customer to be able to maintain the system after delivery and thus they need to be able to compile/link against the components we have not delivered the source code for. My intention was to provide an API subsystem housing the components for which no source code is delivered. The API subsystem would contain an API interface and an object archive of the code we are not delivering. As way of an example, I have an API that looks like (the API is deliverable code): foo_api.1.ada: package foo_api is procedure Do_Something; end foo_api; foo_api.2.ada: package body foo_api is procedure Do_Something; pragma Import (Convention => Ada, Entity => Do_Something); end foo_api; Then I have the implementation that looks like (the implementation is the non deliverable code that will be complied into an object archive): foo_implementation.1.ada package foo_implementation is procedure Do_Something; pragma Export (Convention => Ada, Entity => Do_Something); end; foo_implementation.2.ada package body foo_implementation is procedure Do_Something is begin -- The work is performed here. end; end foo_implementation; Note that the example above is given only as way of an example. The actual API has many interfaces and the implementation is composed of many packages most of which require some elaboration. This all works to the extent that I am able to compile all the code and produce an object archive of the implementation (non deliverable code) with which to resolve the symbols at link stage. However, as nothing in the main program (that calls the API interfaces) includes any of the implementation directly in it's closure a program error is resultant on execution. The problem is, is there anything I can do to force the code in the archive library to be elaborated without doing an explicit pragma elaborate (which would require me to 'with' the implementation and thereby defeat the whole purpose of the exercise). I have encountered the 'pragma Export_Elaboration_Procedure' but can't find any real examples of its usage (or if it would indeed be able to assist in my problem). If anyone has experience using this and feels it may be of use then please let me know. I would be grateful if anyone could assist me in providing a resolution to this problem (or suggest an alternative approach that still meets my needs). Note that it is preferable not to alter the non deliverable component code. Thanks in advance. Gordon Brunton Senior Software Engineer Ratheon Systems (gordon_brunton@raytheon.com)