From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a05:620a:1477:: with SMTP id j23mr44078560qkl.152.1641501562268; Thu, 06 Jan 2022 12:39:22 -0800 (PST) X-Received: by 2002:a25:e052:: with SMTP id x79mr2814566ybg.323.1641501562035; Thu, 06 Jan 2022 12:39:22 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 6 Jan 2022 12:39:21 -0800 (PST) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=2804:14c:4c1:8775:352d:ffd4:3db5:6282; posting-account=wgmHdgoAAAA-F7JItPEZjeXqFc0KdzEQ NNTP-Posting-Host: 2804:14c:4c1:8775:352d:ffd4:3db5:6282 References: <3b7ba153-ebf1-4b85-a1b2-3ad5aaeca11en@googlegroups.com> <546e54e7-64ba-48a5-a990-d644947992ccn@googlegroups.com> <378bc69a-8388-4daf-b13f-523fd1defa12n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Ada Pure or Preelaborate or ? in Adare_net From: Daniel Norte Moraes Injection-Date: Thu, 06 Jan 2022 20:39:22 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:63348 List-Id: Em quarta-feira, 5 de janeiro de 2022 =C3=A0s 20:40:08 UTC-3, Randy Brukard= t escreveu: > "Daniel Norte Moraes" wrote in message=20 > news:378bc69a-8388-4daf...@googlegroups.com... > >Em ter=C3=A7a-feira, 4 de janeiro de 2022 =C3=A0s 10:52:42 UTC-3, Fabien= Chouteau=20 > >escreveu:=20 > >> On Friday, December 31, 2021 at 5:13:33 PM UTC+1, daniel...@gmail.com= =20 > >> wrote:=20 > >> > For this reason, if really 'is' pure, not pure, preelaborate or what= =20 > >> > (?), pleeeeeeaaase, we ask the group's Ada Language Lawyers to help= =20 > >> > analyze and suggest modifications if necessary.=20 > >> I recommend reading this:=20 > >> https://stackoverflow.com/questions/19353228/when-to-use-pragma-pure-p= reelaborate=20 > >>=20 > >> If your units are declared as Pure, the compiler considers that they h= ave=20 > >> no side effect and can decided to call the sub-programs only once and= =20 > >> cache the result, or not even call the sub-program if the result is no= t=20 > >> used after.=20 >=20 > >Thanks!=20 > >I read the post and believe that because most variables are either strea= med=20 > >or aliased and imported, lib works as it should.=20 > >However, there is still the possible problem of omitting the same=20 > >subprograms with the same parameters (by compiler), although in the test= s=20 > >this did not happen, would replacing aspect 'pure' by 'preelaborate' sol= ve=20 > >this possible problem? > Yes. The permission to omit calls only applies to Pure (see 10.2.1(18/3))= .=20 > http://www.ada-auth.org/standards/2xaarm/html/AA-10-2-1.html#p18. (I gave= a=20 > reference to the Ada 2022 AARM, but this rule hasn't changed in spirit si= nce=20 > it was introduced in Ada 95.)=20 >=20 > Randy. Thanks! We will change the packages in LibAdare_Net to 'preelaborate'. :-) and continue from here.=20 Thanks All, Best Whishes, Dani. Enjoy!! :-)