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,25e091afe1184988 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!kanaga.switch.ch!news-zh.switch.ch!switch.ch!cernne03.cern.ch!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Reference-oriented language and high-integrity software Date: Fri, 03 Nov 2006 10:06:38 +0100 Organization: CERN News Message-ID: References: <87mz78zz1w.fsf@ludovic-brenta.org> NNTP-Posting-Host: abpc10883.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: cernne03.cern.ch 1162544798 4744 137.138.37.241 (3 Nov 2006 09:06:38 GMT) X-Complaints-To: news@@cern.ch NNTP-Posting-Date: Fri, 3 Nov 2006 09:06:38 +0000 (UTC) User-Agent: Thunderbird 1.5.0.7 (X11/20060922) In-Reply-To: <87mz78zz1w.fsf@ludovic-brenta.org> Xref: g2news2.google.com comp.lang.ada:7348 Date: 2006-11-03T10:06:38+01:00 List-Id: Ludovic Brenta wrote: > Maciej Sobczak writes: >> Taking into account that JB also wrote a book about SPARK, some >> reasoning can be found there and my understanding (simplified) is that >> reference-oriented language implies a heavy use of dynamic memory, >> which makes it impractical/impossible to perform any static analysis >> of memory consumption. Garbage collectors add their own factors to the >> problem. >> >> Is the above a reasonable explanation? Is it the only one? What else >> makes the reference-oriented languages inappropriate for >> high-integrity software? > > The other part of the explanation, AFAIU, is that a reference can go > wrong, i.e. point to deallocated memory, to unallocated memory, or to > the wrong piece of memory. This can be rebutted on the basis that those languages ensure that nothing like this happens (no pointer arithmetic + garbage collector). > References also introduce aliasing, > i.e. two references can point to the same item. All these make it > almost impossible to statically prove that no unintended side effects > ever occur in the program This makes sense in case of Java, but one could also argued that immutability of objects - a common feature in some reference-oriented languages - can make it less severe. So - let's imagine a language, which is reference-oriented with all objects immutable. Apart from dynamic memory, is there any problem? -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/