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,cda33fc7f63c2885,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-06 12:57:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: list strawman Date: 06 Jan 2002 15:55:50 -0500 Organization: NASA Goddard Space Flight Center Message-ID: NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1010350785 4695 128.183.220.71 (6 Jan 2002 20:59:45 GMT) X-Complaints-To: dscoggin@cne-odin.gsfc.nasa.gov NNTP-Posting-Date: 6 Jan 2002 20:59:45 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Xref: archiver1.google.com comp.lang.ada:18590 Date: 2002-01-06T20:59:45+00:00 List-Id: I've done a priliminary implementation of http://www.telepath.com/dennison/Ted/Containers-Lists-Unbounded.ads.html using SAL lists as the base. It implements fully safe iterators. The sorting nested package is not implemented, mostly because I didn't have time, but also because there are some design issues (I'll talk about that in a separate post). See http://users.erols.com/leakstan/Stephe/Ada/strawman-sal.html to Download my the source. It relies on a slightly modified version of SAL (two added functions); if you want to actually compile it, either add the functions yourself (should be obvious), or send me an email. There is only a simple test; it demonstrates the operation of "&". But it uses an iterator to print the lists, so it's actually a good test. I'll try to use Ted's test harness when that is ready. This was an interesting excersize. I got quite stuck on making the iterators safe, while at the same time not requiring the user to use 'Unchecked_Access. A hint from http://homepage.ntlworld.com/ramatthews/ (Robert A. Matthews' GAPSE) set me straight; use a layer of indirection. There are three source directories: Iterator_1, Iterator_2, and Source. The Iterator directories show early attempts at implementing safe iterators; the file "iterator_design.text" describes the attempts and the final result. The final implementation is quite complex (and I haven't done sort yet). I don't think I will ever use this package in a real project. Just writing all the tests to prove that iterators actually are safe will take quite a while. But it is an interesting example of what can be done. -- -- Stephe