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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,bb08babfc504e5ba X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!x5g2000yqk.googlegroups.com!not-for-mail From: Rod Chapman Newsgroups: comp.lang.ada Subject: Re: SPARK and unbounded tree structures Date: Thu, 11 Jun 2009 00:35:37 -0700 (PDT) Organization: http://groups.google.com Message-ID: <015c9570-0f07-492a-85aa-2289a477e2b0@x5g2000yqk.googlegroups.com> References: <06f0b9ca-3c00-44e8-9a52-63c840ed0abe@21g2000vbk.googlegroups.com> NNTP-Posting-Host: 192.108.117.69 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1244705737 24620 127.0.0.1 (11 Jun 2009 07:35:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 11 Jun 2009 07:35:37 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x5g2000yqk.googlegroups.com; posting-host=192.108.117.69; posting-account=HCzrEgkAAABSfGsTnv-u5wET6EzuneVi User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:6426 Date: 2009-06-11T00:35:37-07:00 List-Id: On Jun 10, 5:52=A0pm, xorquew...@googlemail.com wrote: > Are there any real world examples of using SPARK in situations that > involve large dynamic data structures? Only the SPARK Examiner itself, and in that even the data structures are ultimately bounded. Remember - SPARK is principally designed for the construction of hard real-time and embedded systems, where the "size" of the problem domain is known well in advance - hence most SPARK system use data-structures with a fixed upper limit. You also need to consider that SPARK is non-recurive, so walking and building such data structures nees to be done with wholly iterative algorithms, which is an unusual programming style to say the least. In short: it sounds like SPARK is unlikely to be a good choice for this style of application. If you _really_ want to see how it's done, then see the Examiner sources - data structures like stree.ads and heap.ads, and the tree-walking algorithms in sem-compunit.adb for example. Yours, Rod Chapman, SPARK Team