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-Thread: 103376,1a44c40a66c293f3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.albasani.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: PAR (Was: Embedded languages based on early Ada) Date: Fri, 9 Mar 2007 19:50:26 -0600 Organization: Jacob's private Usenet server Message-ID: References: <1172192349.419694.274670@k78g2000cwa.googlegroups.com> <113ls6wugt43q$.cwaeexcj166j$.dlg@40tude.net> <1i3drcyut9aaw.isde6utlv6iq.dlg@40tude.net> <1c61jqeqo68w$.2irtg70stnsa.dlg@40tude.net> <1vdieyr16h7ct$.1vuvfmghy8dzo$.dlg@40tude.net> <1l5727owshrjf$.uuylbc4ek430.dlg@40tude.net> <45EF1E2B.2020703@obry.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1173491322 318 69.95.181.76 (10 Mar 2007 01:48:42 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 10 Mar 2007 01:48:42 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Xref: g2news1.google.com comp.lang.ada:14443 Date: 2007-03-09T19:50:26-06:00 List-Id: "Ray Blaak" wrote in message news:uvehbtxpn.fsf@STRIPCAPStelus.net... > "Randy Brukardt" writes: > > A parallel subprogram would be defined by the keyword parallel. They would > > be like a normal Ada subprogram, except: > > * Access to global variables is prohibited, other than protected > > objects, atomic objects, and objects of a declared parallel type. Note that > > this also includes global storage pools! > > I understand the reason for this restriction, but fear that it is not useful > in practice. This would prevent the use of regular library calls, unless those > libraries are pure. Is that reasonable? I think so (see below). > Hmm, maybe those libraries can be access via calls from protected objects > only? Right. And I'd expect "parallel" versions of many things to be constructed. (Surely containers.) Intrinsics like "+" and "**" would be defined to be "parallel". Everything in a pure package could be considered "parallel" as well (and if a pure function was given a first class definition, they could be too -- but only if they are checked). I neglected the obvious restriction that a parallel routine isn't allowed to call a non-parallel routine (just like a pure package can't depend on an impure package). Else the restrictions could be trivially circumvented. > I am wondering if this restriction makes things too onerous for the programmer > to use the library environment they have access to, especially as compared to > normal sequential programming. Well, that's the big question, isn't it? But I don't think it is necessarily impossible; in this sense it is much like SPARC, which adds a lot of restrictions to Ada in order to get the ability to formally prove the programs (and in a reasonable amount of time). People are willing to use that, why not parallel restrictions? It just depends on the possible gain. Randy.