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!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: How to get Ada to ?cross the chasm?? Date: Sun, 6 May 2018 22:02:46 +0300 Organization: Tidorum Ltd Message-ID: References: <1c73f159-eae4-4ae7-a348-03964b007197@googlegroups.com> <87k1su7nag.fsf@nightsong.com> <87po2la2qt.fsf@nightsong.com> <87in8buttb.fsf@jacob-sparre.dk> <87wowqpowu.fsf@nightsong.com> <16406268-83df-4564-8855-9bd0fe9caac0@googlegroups.com> <87o9i2pkcr.fsf@nightsong.com> <87in88m43h.fsf@nightsong.com> <87efiuope8.fsf@nightsong.com> <87lgd1heva.fsf@nightsong.com> <87zi1gz3kl.fsf@nightsong.com> <878t8x7k1j.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net oil07u02tZ09GoBMsmDFywvsuFXyVTmpCKpoNovYZYi9bEhDt4 Cancel-Lock: sha1:+tudFb1ZhvSaW8BzzTldPFOt180= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: Xref: reader02.eternal-september.org comp.lang.ada:52049 Date: 2018-05-06T22:02:46+03:00 List-Id: On 18-05-06 12:53 , Dmitry A. Kazakov wrote: > On 2018-05-06 10:34, Niklas Holsti wrote: ... >> Moving the focus back to Ada, efficient applicative data structures >> are interesting for real-time systems because they could reduce >> locking/blocking times: a "reader task" could quickly grab a (logical) >> immutable copy of a large data structure and read the data at its own >> speed, without interfering with "writer" tasks that transform their >> own (logical) copies of the data structure. > > You need to merge incoherent copies at some point later. More removed > the point is, more difficult it becomes and more expensive could be a > rollback, in case something happens. One of the beauties of applicative data structures is that there is no need to roll back changes to a structure; if you keep a reference to the original structure, it remains valid (using more memory, of course). The paper that Paul Rubin referenced has a nice example: when they changed their compiler's control-flow graph into an applicative structure, they could let the compiler perform some potential optimizations eagerly and early, before the optimization is known to be valid; if it turns out to be invalid, it can be "rolled back" simply by discarding the optimized version of the control-flow graph and returning to the un-optimized version. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .