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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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: "G.B." Newsgroups: comp.lang.ada Subject: Re: Languages don't matter. A mathematical refutation Date: Thu, 09 Apr 2015 15:14:59 +0200 Organization: A noiseless patient Spider Message-ID: References: <871tk1z62n.fsf@theworld.com> <87oan56rpn.fsf@jester.gateway.sonic.net> <877fts7fvm.fsf@jester.gateway.sonic.net> <87twwv66pk.fsf@jester.gateway.sonic.net> <32ecaopodr1g.1xqh7ssdpa2ud.dlg@40tude.net> <87pp7j62ta.fsf@jester.gateway.sonic.net> <87pp7hb2xo.fsf@jester.gateway.sonic.net> <5rxvgyes5xg8.1mqq86gacbsb1.dlg@40tude.net> <87lhi5ayuv.fsf@jester.gateway.sonic.net> <87oan0aote.fsf@jester.gateway.sonic.net> <878ue3ff6y.fsf@jester.gateway.sonic.net> Reply-To: nonlegitur@futureapps.de Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 9 Apr 2015 13:14:01 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="b96887e80893c84a90c3007226ca0d1c"; logging-data="11650"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18f2K9KicS6S8kbF6HeGme4/5dJdzuUWI0=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 In-Reply-To: Cancel-Lock: sha1:9IEep4uMFPIAt/XYtDeigWmdMVI= Xref: news.eternal-september.org comp.lang.ada:25488 Date: 2015-04-09T15:14:59+02:00 List-Id: On 09.04.15 11:38, Dmitry A. Kazakov wrote: >> (Or else, at least provide more efficient, more predictable containers >> based on contracts. ;-) I mentioned containers because Randy reminded us of their usefulness as automatic storage managers. (Containers with contracts have already appeared in GNAT.) > And the smiley means? You certainly know that there is no way to contract > [*] GC. It seems possible to guarantee certain properties of GC. That's the supplier's side of the contract. Properties of the collection process can be abstracted into mathematical estimates, and reliably so, I think. Consider pragma Suppress The idea of suppressing checks, if "ported" to containers could be based on observing the container's expectations: First, Container: "Don't do This! Because I will be assuming v(This) = False." The algorithmic "conclusion" then becomes that all checks that Ada normally associates with This can be Suppressed. (Tampering, cursors carrying their containers, etc.) That's the first win. It depends on contracts and clients being written accordingly. Now, WRT storage management, assume a bounded container. The implementation may pre-allocate the maximum number of objects.(*) Given that, why should it not be possible at all, in no case, to guarantee a known complexity of storage management? A bounded vector, say, could specify its storage management needs, on condition that ... Much like a hash table package would state that "As long as the number of slots is as least N/M, finding an object will take no more than f(M, N, g(Hash))." Thus, if every 5 timeslices, 3 are needed for working with the data stored in the container, and this container instance guarantees that maximally 1 timeslice is needed for all possible storage management cases, there is 1 left for any lags. > GC is non-functional and unrelated to the program behavior, which is > another way to explain why GC is neither low nor high level. It is > non-existent. Like everything that actually handles program data, GC does influence the program's behavior, e.g. by taking time. Hence, one may influence GC in server JVMs, for example. But that's the point. Suppose there is an abstract description of GC behavior, in terms of parameters. Will the description be sufficiently detailed for guiding the design of an algorithm? __ (*)For the sake of simplicity, WLOG. (I think GNAT's variant records are similar.)