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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,71171f53c22d92b5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-13 22:45:06 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!nf3.bellglobal.com!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!attbi_s04.POSTED!not-for-mail From: Freejack Subject: Re: C's trikery semantic opens up backdoor in new Linux kernel Newsgroups: comp.lang.ada Message-ID: References: <3FB1A63C.9080200@nowhere.com> User-Agent: Pan/0.11.4 (Unix) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Comment-To: "Craig Carey" NNTP-Posting-Host: 12.245.85.50 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s04 1068792304 12.245.85.50 (Fri, 14 Nov 2003 06:45:04 GMT) NNTP-Posting-Date: Fri, 14 Nov 2003 06:45:04 GMT Organization: Comcast Online Date: Fri, 14 Nov 2003 06:45:04 GMT Xref: archiver1.google.com comp.lang.ada:2474 Date: 2003-11-14T06:45:04+00:00 List-Id: On Thu, 13 Nov 2003 16:04:02 -0500, Craig Carey wrote: > On Wed, 12 Nov 2003 15:09:52 +0100, Vinzent 'Gadget' Hoefler wrote: ... > > Ada 95 could be enhanced so that specified record fields could be > read-only. Some one could perhaps produce data showing that it is needed > or else it may not appear. > > De-referenced pointers can identify read-only data > "type Ptr is access constant X;". > Then Ada 95 lacks a limited pointer type, and also a pointer that can be > assigned but which lacks a "=" equality operator. Perhaps the introduction of a "Concatenated Type" would be helpful here. i.e. type Ptr is tagged access X; or some such. The idea is thus... x = 2 + 3 squared = 5 squared = 5 * 5 = 25 All the functions are equivalent. Hence one could create function pointers that are extended to point to all the functions that are equivalent. Then one could optimize each function as long as the optimization does not take it out of the equality bounds. I'm dont know if there is a way to compare Instantiations of "function Get(X)'Class" to test for equality. Anyways, using this method, not only would writing the to access value be prevented, reading it outside the methods would also be unneeded. Arg. Perhaps a little more indepth explanations is necessary. http://www.latrobe.edu.au/philosophy/phimvt/joy/j02maf.html http://www.latrobe.edu.au/philosophy/phimvt/joy/j04alg.html Please ignore the atrocious syntax of that language. I find the concepts though to be very interesting. I would not care to go whole hog with it, but some of it might be useful. Freejack