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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: How to merge multiple compilation units into a compilation unit. Date: Sat, 24 Oct 2015 23:09:10 +0200 Organization: A noiseless patient Spider Message-ID: References: <46b41ae0-ae3f-427d-a52a-8655295c5ea5@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 24 Oct 2015 21:07:09 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="df8ad0c2340efa940888bbc81c3c2a66"; logging-data="12064"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18jfhDFfaPg+3nFt+WyOYX3" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: Cancel-Lock: sha1:tD7OwsByNmX/6Rak80y+jSuN2h8= Xref: news.eternal-september.org comp.lang.ada:28044 Date: 2015-10-24T23:09:10+02:00 List-Id: Le 24/10/2015 05:18, Bo Wang a écrit : > Perhaps "merge" is vague. I want to create a new compilation unit > that acts as same as the original two compilation units, so that I > can use the new compilation unit to replace the original two > compilation units. Sorry, but I don't understand what you are trying two do. In Ada, a "compilation unit" is either a package spec, a package body, a subprogram... What kind of compilation units are you trying to merge? And what would be the benefit of doing so? A landmark of good design is that each package should be strongly coherent and weakly coupled, i.e. it should correspond to /all/ of /one/ thing. You can't keep this if you merge two packages... > When a target program is small-scaled, I can > create the new compilation unit manually, however, for a large target > program that has massive compilation units, the manual process is > impossible. Does there exist a tool that implements this function > automatically. I doubt it, because I see no point in doing that (or I misunderstood what you mean by compilation unit, if not in the Ada sense). -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr