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,c39ad3e35a7690a9 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.68.136.40 with SMTP id px8mr12125109pbb.1.1329675264489; Sun, 19 Feb 2012 10:14:24 -0800 (PST) Path: wr5ni44438pbc.0!nntp.google.com!news2.google.com!postnews.google.com!m24g2000yqb.googlegroups.com!not-for-mail From: Phil Clayton Newsgroups: comp.lang.ada Subject: Re: Convention for naming of anything Date: Sun, 19 Feb 2012 10:07:15 -0800 (PST) Organization: http://groups.google.com Message-ID: <6eb22e0f-bb55-4d03-8b63-f6a6c248e295@m24g2000yqb.googlegroups.com> References: NNTP-Posting-Host: 2.27.136.47 Mime-Version: 1.0 X-Trace: posting.google.com 1329675264 6614 127.0.0.1 (19 Feb 2012 18:14:24 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 19 Feb 2012 18:14:24 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: m24g2000yqb.googlegroups.com; posting-host=2.27.136.47; posting-account=v7gx3AoAAABfjb9m5b7l_Lt2KVEgQBIe User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALENKRC X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20100101 Firefox/10.0,gzip(gfe) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Date: 2012-02-19T10:07:15-08:00 List-Id: On Feb 16, 5:44=C2=A0pm, Yannick Duch=C3=AAne (Hibou57) wrote: > With functional representation in mind, when an object X' is a value > derived from an object X in a recursive algorithm, which way do you name > both X and X', as the Prime symbol is not allowed in Ada names? To refer to before and after values of a variable in e.g. a postcondition, the convention of suffixing a subscript-zero to denote the before value is fairly common in formal methods texts, e.g. the classic "Programming from Specifications": http://www.cs.ox.ac.uk/publications/books/PfS/ So, for example, the postcondition X =3D X=E2=82=80 + 1 says that the value of X is increased by 1. Perhaps an ASCII equivalent would be X =3D X_0 + 1 I've come across exactly this conflict with primes in the past. The Ada verification tool, DAZ - built on ProofPower, see http://www.lemma-one.com/ProofPower/index/ - would have ideally used a prime to denote an after value because that is the convention of the Z notation, the language used to express pre- and postconditions of Ada statements. Instead it uses a subscript-zero for the before value, like in Programming from Specifications, on which it was based. Phil