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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,23cf9f1e93744eed,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-26 06:15:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cs.utexas.edu!geraldo.cc.utexas.edu!not-for-mail From: "Bobby D. Bryant" Newsgroups: comp.lang.ada Subject: Need advice re package organization. Date: Sat, 26 Jul 2003 07:08:27 -0600 Organization: dis- Message-ID: NNTP-Posting-Host: dial-102-5.ots.utexas.edu Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: geraldo.cc.utexas.edu 1059224954 26894 128.83.176.5 (26 Jul 2003 13:09:14 GMT) X-Complaints-To: abuse@utexas.edu NNTP-Posting-Date: Sat, 26 Jul 2003 13:09:14 +0000 (UTC) User-Agent: Pan/0.14.0 (I'm Being Nibbled to Death by Cats!) Xref: archiver1.google.com comp.lang.ada:40830 Date: 2003-07-26T07:08:27-06:00 List-Id: Most of my work with Ada has involved either smallish programs or simple self-contained library units where a good package organization was obvious, but now I'm doing something with several layers of interrelated parts and I'd like to get some experienced advice on how to organize my components into packages. For the (n+1)th revision of my research code I'm going to break up my neural network implementation into a hierarchy of objects, not a derivational hierarchy but a hierarchy of objects composed from more elementary objects. In particular I'll start with some atomic types for weights, activation accumulators, etc., implement neurons as compositions of those atomic types, layers as compositions of neurons, and networks as compositions of layers. Each component will have various utility procedures and functions in addition to the type definitions, and most of the types will be tagged types to facilitate the creation of derived types for instrumenting the behavior of individual objects and some other odd things I do in my research. The intent of that component design is to allow programs or auxiliary packages to manipulate networks as high-level abstractions, but to be able to reach down and manipulate a layer or a neuron directly when necessary. My question is how would be the best way to translate that structural hierarchy into Ada packages. Three obvious solutions come to mind: 1) Roll everything into a single package. 2) Create an independent package for each level of the hierarchy, "with"ing the other packages as needed. 3) Create a lean parent package and implement each object in a separate child package, "with"ing the others as needed. The third does not seem a very obvious solution to me, but I'm considering it because that's generally how GtkAda is organized. However, the hierarchy flattened by the GtkAda package structure is more a derivational hierarchy than a compositional hierarchy, so I don't know whether the same design considerations would apply. Any suggestions, either for my specific example or for more general considerations? Thanks, -- Bobby Bryant Austin, Texas