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,5f6125e9594f9968 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.227.230 with SMTP id sd6mr3264266pbc.8.1333108568031; Fri, 30 Mar 2012 04:56:08 -0700 (PDT) Path: z9ni18541pbe.0!nntp.google.com!news2.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: phil.clayton@lineone.net Newsgroups: comp.lang.ada Subject: Re: Ada to C translator for small microcontrollers Date: Fri, 30 Mar 2012 04:54:08 -0700 (PDT) Organization: http://groups.google.com Message-ID: <5576868.1739.1333108448535.JavaMail.geo-discussion-forums@vbut24> References: <2424259e-cf1c-408e-a57e-f2c948087186@i2g2000vbv.googlegroups.com> <18324383.19.1332841560517.JavaMail.geo-discussion-forums@vbht7> <26305817.1823.1332879226490.JavaMail.geo-discussion-forums@vbiz13> <9tgt0lFqtU1@mid.individual.net> <4f737c92$0$6636$9b4e6d93@newsspool2.arcor-online.net> NNTP-Posting-Host: 2.27.136.21 Mime-Version: 1.0 X-Trace: posting.google.com 1333108567 4882 127.0.0.1 (30 Mar 2012 11:56:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 30 Mar 2012 11:56:07 +0000 (UTC) In-Reply-To: <4f737c92$0$6636$9b4e6d93@newsspool2.arcor-online.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2.27.136.21; posting-account=v7gx3AoAAABfjb9m5b7l_Lt2KVEgQBIe User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-03-30T04:54:08-07:00 List-Id: On Wednesday, March 28, 2012 10:03:14 PM UTC+1, Georg Bauhaus wrote: > I do not know (yet) why a no-op in the language is a must > in a theory-friendly programming language, I have seen that > it is. Ada has it, in any case. At a practical level, without null, using rules to reason about programs can become tedious. For example, null statements allow us to write the rule if C then P else null; end if; = if C then P end if; where C is a boolean expression and P is any program statement. That is useful because no other rules then need to deal with an implicit else null branch. Without null statements and the above rule, we would then need four versions of the following rule, for all combinations of omitting the else branch: if C then if C then P else Q else R end if; = if C then P else R end if; At a more abstract level, a null statement may be needed so that sequential composition has an identity to appeal to some other theoretical result.