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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,470860aa3e635a7 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!d55g2000hsg.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: GNAT for MS Visual Studio Date: Mon, 08 Oct 2007 03:32:44 -0700 Organization: http://groups.google.com Message-ID: <1191839564.304635.30030@d55g2000hsg.googlegroups.com> References: <4xsl4zw3bp.fsf@hod.lan.m-e-leypold.de> <1191357491.860178.230380@22g2000hsm.googlegroups.com> <4702ADCC.7080209@obry.net> <1191439439.120567.172630@g4g2000hsf.googlegroups.com> <4703F02D.3030207@obry.net> <1191682021.844225.236870@g4g2000hsf.googlegroups.com> <4707A3D0.3070702@obry.net> <1tq0h0fb74sxe$.2ys0qzmfxcqo.dlg@40tude.net> <4707C0CC.1000108@obry.net> <1aa677sd3f3ox.k8awuo7pj13r.dlg@40tude.net> <1191702767.598768.210960@o80g2000hse.googlegroups.com> <1aqbpv0czr253.wrmcd70o5se5$.dlg@40tude.net> <1191792620.535744.132500@50g2000hsm.googlegroups.com> NNTP-Posting-Host: 137.138.37.241 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1191839564 27408 127.0.0.1 (8 Oct 2007 10:32:44 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 8 Oct 2007 10:32:44 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20070724 Red Hat/1.5.0.12-0.3.slc3 Firefox/1.5.0.12,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: d55g2000hsg.googlegroups.com; posting-host=137.138.37.241; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:2346 Date: 2007-10-08T03:32:44-07:00 List-Id: On 8 Pa , 09:50, "Dmitry A. Kazakov" wrote: > It is called "higher level language," which translates to "you cannot have > ideas even if you just do 'a read'". I.e. there is no difference. There is - others already explained that containers do some bookkeeping even when they are "just" read. This bookkeeping is hidden from you. > > What is a shared data outside the protected object? > > If I have an access variable that is kept inside the protected object > > - is the object (the target) considered to be inside the protected > > object as well? > > Certainly not. Then certainly everything is FUBARed. Consider a container inside the protected object. The container presumably has access variables to actual contained objects (to elements) - some containers just cannot be implemented any other way. If the target objects are considered to be OUTside of the protected object and thus unprotected, then I'm looking forward to see an explanation how the synchronized manipulation of these contained objects is supposed to work. > Maybe those patterns are just wrong? (:-)) If you use an access > discriminant or component in a protected object, then the target shall not > be accessible otherwise than through a protected action traversing this > object. Yes. But is this guaranteed? AARM seems to say that objects outside of the protected objects are not synchronized. Is the target object covered or not? Consider this: protected P is procedure Set (I : Integer); function Get return Integer; end P; Value : Integer; protected body P is procedure Set (I : Integer) is begin Value := I; end Set; function Get return Integer is begin return Value; end Get; end P; Assume that users only interact with the protected object (Value can be in the package body, etc.). Is it compliant? As far as I understand AARM (9.10/9.b), it is not. Value is OUTside of the protected object. If it's not, then just adding access value to Value will not make any difference, unless access values have some implicit magic properties in the area of memory consistency. > I don't see any problems with procedures and entries, functions are my > concern. See above. Is it "kosher"? If yes, then 9.10/9.b is unclear to me. If not, then there is no way to synchronize a container that is implemented in terms of references (linked lists, etc.). > I am not sure what you mean here. You can safely access things outside > protected objects from protected actions. Can you confront it with 9.10/9.b? -- Maciej Sobczak * www.msobczak.com * www.inspirel.com